ツイート
ID で複数の投稿を取得
GET /v1/tweets reads 1 クレジット
ID で複数の投稿を 1 回で取得します。1 リクエスト最大 20 件、ID ごとに 1 クレジット。ID は投稿リンクの /status/ の後ろの数字です。
クエリパラメータ
| クエリパラメータ | 型 | 意味 |
|---|---|---|
ids * | string (comma-separated, ≤ 20) | カンマ区切りの投稿 ID。最大 20 件 |
レスポンス
items には解決できた投稿が要求順に入ります。解決できなかった ID (削除済み、非公開、または存在しなかったもの) は missing に列挙されます。 フィールドごとの説明: Tweet (読み取り).
ステータス: 200, 400, 429, 502
リクエスト
curl https://api.xsignalfeed.com/v1/tweets?ids=2099875660290228642,2100085873807364122,1234567890123456789 \ -H "Authorization: Bearer xsf_your_key"
レスポンス · 200 / 400
{
"items": [
{
"id": 2099875660290228642,
"created_ms": 1789484345873,
"user_id": 44196397,
"user": "elonmusk",
"name": "Elon Musk",
"text": "Live demo of building a company with @Grok @Bot!",
"lang": "en",
"reply_to": null,
"reply_to_status_id": null,
"reply_to_user_id": null,
"conversation_id": "2099875660290228642",
"is_rt": false,
"rt_of": null,
"is_quote": true,
"quoted": {
"id": "2099871914655424894",
"user": "poteto",
"name": "lauren",
"user_id": "2832427459",
"text": "going live in about an hour!\n\n…",
"media": [],
"media_items": [],
"created_ms": 1789483452844,
"url": "https://x.com/poteto/status/2099871914655424894"
},
"media": [],
"media_items": [],
"urls": [],
"views": "28720489",
"counts": {
"reply": 2323,
"rt": 2244,
"like": 22995,
"quote": 177,
"bookmark": 3136
},
"article": null,
"edit_of": null,
"edit_ids": [
2099875660290228642
],
"source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>"
},
{
"id": 2100085873807364122,
"user": "elonmusk",
"text": "😂🎯",
"…": "…"
}
],
"missing": [
"1234567890123456789"
]
}