検索
トレンドを検索
GET /v1/search/trends reads 2 クレジット
トレンドを開いたときに X が表示するランク順の投稿: トレンド名に対する top 結果セットを、トレンドページで読者が目にする順序で。
クエリパラメータ
| クエリパラメータ | 型 | 意味 |
|---|---|---|
q * | string | トレンドのレスポンスに記載されたとおりのトレンド名またはクエリ |
count | int 1–100 = 20 | 要求するページサイズ。X はヒントとして扱います |
cursor | string | 前のページの next_cursor から |
レスポンス
検索と同じ形式で、product は常に top。投稿を含まない最初のページで next_cursor は null になります。 フィールドごとの説明: Tweet (読み取り).
ステータス: 200, 400, 422, 429, 502
リクエスト
curl https://api.xsignalfeed.com/v1/search/trends?q=NASA&count=10 \ -H "Authorization: Bearer xsf_your_key"
レスポンス · 200 / 400
{
"query": "NASA",
"product": "top",
"tweets": [
{
"id": 2100295141441347962,
"created_ms": 1789584357973,
"user_id": 15165493,
"user": "NASASolarSystem",
"name": "NASA Solar System",
"text": "…",
"lang": "en",
"reply_to": null,
"reply_to_status_id": null,
"reply_to_user_id": null,
"conversation_id": "2100295141441347962",
"is_rt": false,
"rt_of": null,
"is_quote": false,
"quoted": null,
"media": [
"https://pbs.twimg.com/media/HSW_TFmX0AA6HWR.jpg"
],
"media_items": [
{
"type": "photo",
"url": "https://pbs.twimg.com/media/HSW_TFmX0AA6HWR.jpg",
"expanded_url": "https://x.com/NASASolarSystem/status/2100295141441347962/photo/1",
"width": 2856,
"height": 1604
}
],
"urls": [
"https://go.nasa.gov/…"
],
"views": "295748",
"counts": {
"reply": 103,
"rt": 444,
"like": 2990,
"quote": 58,
"bookmark": 253
},
"source": "<a href=\"https://www.sprinklr.com\" rel=\"nofollow\">Sprinklr</a>"
},
{
"…": "…"
}
],
"next_cursor": "DAACCgACHSYw9bMAJxAKAAMd…"
}