搜索帖子
返回与 X 搜索语句匹配的近期 X 帖子,按 X 的“最新”顺序排列(不严格按 ID),并附带下一页的 URL。一次搜索的所有分页合计最多返回 100 条帖子;返回第 100 条后,next 为 null。
GET
/api/search/posts授权
Authorizationstringheader必填使用 TweetStream API 密钥进行 Bearer 认证:Bearer <key>。
查询参数
querystring必填X 搜索语句,可包含搜索运算符。limitinteger可选最多返回的帖子数。pagestring可选不透明值,只能取自 next。
响应字段
nextstring | null必填Absolute URL of the next page: request it as it is, with the same API key. Null when there is nothing more or the search has returned 100 posts. Works for 30 minutes.postsobject[]必填kindenum<string>可选quotedobject可选The post a reply also quotes. A quote keeps the post it quotes in ref and has no quoted.typestring必填
refobject可选typeenum<string>必填
metricsobject必填bookmarksinteger必填likesinteger必填quotesinteger必填repliesinteger必填repostsinteger必填viewsinteger | null必填
tweetIdstring必填
响应
- 200成功
- 400query 或 limit 无效,或分页链接被修改或已超过 30 分钟。请不带 page 重新搜索。
- 401API key 缺失或无效
- 403该 API key 所属账号当前没有 Pro、Ultra Speed 或 Scale 订阅。
- 405只支持 GET
- 429账号的搜索额度已用完,或进行中的搜索已达套餐上限:Pro 每分钟 60 次(突发 10 次,同时进行 4 个);Ultra Speed 每分钟 120 次(突发 10 次,同时进行 6 个);Scale 每分钟 300 次(突发 10 次,同时进行 10 个)
- 503帖子搜索或认证暂时不可用