Ae · X · Twitter · Searchpostsall

1.24积分/次
ae_x_twitter_searchpostsall

按关键词、时间或帖子ID范围分页检索公开历史帖子。返回顺序可能不严格按时间排列。

社交
1.24积分/次

价格说明

1.24积分/次

API 调用

通过统一工具网关发起同步请求,鉴权和计费由 AgentEarth 处理。

cURL
curl --request POST \
  --url 'https://api.agentearth.ai/v1/tools/run' \
  --header 'Authorization: Bearer $AGENTEARTH_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "tool": "ae_x_twitter_searchpostsall",
  "input": {
    "query": "xxx",
    "end_time": "xxx",
    "since_id": "xxx",
    "until_id": "xxx",
    "sort_order": "xxx",
    "start_time": "xxx",
    "pagination_token": "xxx"
  }
}'
请求方式
POST
接口地址
/v1/tools/run
鉴权方式
Bearer Token
超时时间
60 秒
当前版本
—
响应示例
{
  "error_no": 0,
  "error_msg": "",
  "result": [
    {
      "type": "text",
      "text": "xxx"
    }
  ],
  "platform_annotations": {
    "source": "AgentEarth",
    "platform_note": "xxx",
    "platform_suggestion": "xxx"
  }
}

工具参数

未传入的可选参数将使用平台默认值。

参数类型必填说明默认值
querystring是搜索表达式,例如from:NASA、filter:media、lang:en。 Search expression, such as from:NASA, filter:media or lang:en.—
end_timestring否截止时间,不包含该时刻。使用带时区的RFC3339格式;与until_id二选一。 Exclusive end time in RFC3339 format with a timezone. Do not combine with until_id.—
since_idstring否仅查询晚于该推文ID的帖子;与start_time二选一。 Return posts newer than this post ID; do not combine with start_time.—
until_idstring否仅查询早于该推文ID的帖子;与end_time二选一。 Return posts older than this post ID; do not combine with end_time.—
sort_orderenum (recency | relevancy)否检索方式:recency优先近期结果,relevancy优先相关结果;返回顺序可能不严格按时间排列。 Search mode: recency favors recent results; relevancy favors relevant results. Results may not be strictly chronological.—
start_timestring否起始时间,包含该时刻。使用带时区的RFC3339格式;与since_id二选一。 Inclusive start time in RFC3339 format with a timezone. Do not combine with since_id.—
pagination_tokenstring否上一页返回的分页标记。首次查询不填;不能自行编造。 Pagination token returned by the previous page. Omit for the first page; do not invent a token.—