Skip to Content

按关键词搜索推文

按 X 搜索语法搜索。支持 `from:`、`lang:`、`-filter:replies`、`since_id:`、`min_faves:` 等。

GET
/v1/tweets/search

按 X 搜索语法搜索。支持 from:、lang:、-filter:replies、since_id:、min_faves: 等。

Authorization

headerX-API-KEY<token>

Query Parameters

q*string

搜索词,1–512 字符

Range1 <= value <= 512
count?integer

1–100,默认 20。X 决定实际页大小

Range1 <= value <= 100
Default"20"
category?string

Latest(默认)或 Top

Default"Latest"
Value in"Latest""Top"
cursor?string

上一页的 meta.cursor

Rangevalue <= 2048
raw?string

传 1 或 true 返回上游原始 JSON(用于基准对比,不做扁平化)

Response Body

OK

application/json
  1. response
data*array<>
meta?
Example Request
curl -X GET 'https://api.agenttweet.com/v1/tweets/search?q=string'
Example Response
{  "data": [    {      "id": "string",      "text": "string",      "author": "string",      "created_at": "string",      "is_retweet": true,      "author_id": "string",      "author_name": "string",      "likes": 0,      "retweets": 0,      "replies": 0,      "quotes": 0,      "views": 0,      "media": null,      "hashtags": null,      "mentions": null,      "urls": null,      "lang": "string",      "is_reply": true,      "is_quote": true,      "quoted_tweet_id": "string",      "conversation_id": "string",      "in_reply_to": "string"    }  ],  "meta": {    "count": 0,    "cursor": "string",    "provider": "string",    "cached": true,    "tokens_raw": 0,    "tokens_flat": 0,    "tokens_saved": 0,    "tokens_saved_pct": 0,    "tokens_billed": 0,    "cost_usd": 0,    "balance_usd": 0,    "request_id": "string"  }}