搜索

搜索趋势

GET /v1/search/trends reads 2 额度

打开某个趋势时 X 展示的排名帖子:该趋势名称的 top 结果集,顺序与读者在趋势页面上看到的一致。

查询参数

查询参数类型含义
q *string趋势的名称或查询,与趋势响应中列出的完全一致
countint 1–100 = 20请求的页大小;X 仅作参考
cursorstring来自上一页的 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…"
}