X Twitter Getpostscountsrecent

6 credits/call
ae_x_twitter_getpostscountsrecent

Count matching posts within the past seven days, grouped by minute, hour or day.

Social
6 credits/call

Pricing

6 credits/call
ConditionCharge
Each call6 credits/call

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
querystringYes帖子搜索表达式,例如from:NASA或NASA lang:en。 Post search expression, such as from:NASA or NASA lang:en.—
end_timestringNo截止时间,不包含该时刻。使用带时区的RFC3339格式;与until_id二选一。 Exclusive end time in RFC3339 format with a timezone. Do not combine with until_id.—
since_idstringNo仅查询晚于该推文ID的帖子;与start_time二选一。 Return posts newer than this post ID; do not combine with start_time.—
until_idstringNo仅查询早于该推文ID的帖子;与end_time二选一。 Return posts older than this post ID; do not combine with end_time.—
next_tokenstringNo上一页返回的分页标记。首次查询不填;不能自行编造。 Pagination token returned by the previous page. Omit for the first page; do not invent a token.—
start_timestringNo起始时间,包含该时刻。使用带时区的RFC3339格式;与since_id二选一。 Inclusive start time in RFC3339 format with a timezone. Do not combine with since_id.—
granularityenum (minute | hour | day)No统计时间桶:minute按分钟、hour按小时、day按天。 Count buckets: minute, hour or day.hour
pagination_tokenstringNo上一页返回的分页标记。首次查询不填;不能自行编造。 Pagination token returned by the previous page. Omit for the first page; do not invent a token.—
search_count.fieldsstringNo需要返回的字段,多个字段名用逗号分隔。可选值:end, start, tweet_count。 Comma-separated fields to include in the response. Allowed values: end, start, tweet_count.—

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key
Request coderequest.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_x_twitter_getpostscountsrecent' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "granularity": "day",
    "query": "#changsha"
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "data": [
    {
      "end": "2026-11-06T00:00:00.000Z",
      "start": "2026-11-05T04:09:27.000Z",
      "tweet_count": 17
    }
  ],
  "meta": {
    "total_tweet_count": 90
  }
}

This example shows part of the response. Copied content is valid JSON.