Documentation Index
Fetch the complete documentation index at: https://generaltranslation.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
This guide walks you through retrieving Quote Posts (Posts that quote another Post).
ポスト ID を見つける
引用ポストを取得したいポストの ID を取得します。ポストの URL から確認できます。https://x.com/XDevelopers/status/1409931481552543749
└── ここがポスト ID です
引用ポストをリクエストする
curl "https://api.x.com/2/tweets/1409931481552543749/quote_tweets?\
tweet.fields=created_at,public_metrics,author_id&\
expansions=author_id&\
user.fields=username,verified&\
max_results=10" \
-H "Authorization: Bearer $BEARER_TOKEN"
レスポンスを確認する
{
"data": [
{
"id": "1495979553889697792",
"text": "Great thread on the new API features! https://t.co/...",
"author_id": "29757971",
"created_at": "2022-02-22T04:31:34.000Z",
"public_metrics": {
"retweet_count": 5,
"reply_count": 2,
"like_count": 42,
"quote_count": 1
},
"edit_history_tweet_ids": ["1495979553889697792"]
}
],
"includes": {
"users": [
{
"id": "29757971",
"username": "developer",
"verified": false
}
]
},
"meta": {
"result_count": 1,
"next_token": "avdjwk0udyx6"
}
}
結果をページングする
SDK はページネーションを自動的に処理します。cURL を使う場合は、next_token を使用してさらに引用ポストを取得します。curl "https://api.x.com/2/tweets/1409931481552543749/quote_tweets?\
max_results=10&\
pagination_token=avdjwk0udyx6" \
-H "Authorization: Bearer $BEARER_TOKEN"
APIリファレンス
エンドポイントの詳細なドキュメント