トレンド

トレンドを取得

GET /v1/trends reads 2 クレジット

X の「話題を検索」ページのトレンドトピックをランク順のリストで: 全体の「トレンド」リスト、または「ニュース」「スポーツ」「エンターテインメント」の各タブ。

クエリパラメータ

クエリパラメータ型意味
categorytrending | news | sport | entertainment = trendingtrending、news、sport、entertainment のいずれか (大文字小文字を区別せず、sports も受け付けます)。「スポーツ」タブは空であることが多いです。
limitint 1–100 = 30返すトレンドの最大数

レスポンス

カテゴリー、X がリストの上に表示するタイトル (ない場合は null)、ランク順のトレンド。各トレンドには名前、X が付けるコンテキストラベル、X が表示している場合は投稿数または要約行、関連するグループ化されたトレンド、検索 URL が含まれます。リストは 1 ページのみです。X が現在何も表示していないタブでは空になることがあり、空のリストには課金されません。

ステータス: 200, 400, 422, 429, 502

リクエスト
curl https://api.xsignalfeed.com/v1/trends?category=trending&limit=20 \
  -H "Authorization: Bearer xsf_your_key"
レスポンス · 200 / 400
{
  "category": "trending",
  "title": "United States trends",
  "trends": [
    {
      "rank": 1,
      "name": "#dwts",
      "description": null,
      "posts": null,
      "domain": "Movies & TV · Trending",
      "url": "https://x.com/search?q=%23dwts&src=trend_click&vertical=trends",
      "related": [
        "Maura",
        "Amber"
      ]
    },
    {
      "rank": 2,
      "name": "#AEWDynamite",
      "description": null,
      "posts": null,
      "domain": "Wrestling · Trending",
      "url": "https://x.com/search?q=%23AEWDynamite&src=trend_click&vertical=trends",
      "related": [
        "All Out",
        "Lena Kross"
      ]
    }
  ]
}