X Twitter Getpostscountsrecent
6 credits/call
ae_x_twitter_getpostscountsrecent
Count matching posts within the past seven days, grouped by minute, hour or day.
6 credits/call
Pricing
6 credits/call
| Condition | Charge |
|---|---|
| Each call | 6 credits/call |
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
query | string | Yes | 帖子搜索表达式,例如from:NASA或NASA lang:en。 Post search expression, such as from:NASA or NASA lang:en. | — |
end_time | string | No | 截止时间,不包含该时刻。使用带时区的RFC3339格式;与until_id二选一。 Exclusive end time in RFC3339 format with a timezone. Do not combine with until_id. | — |
since_id | string | No | 仅查询晚于该推文ID的帖子;与start_time二选一。 Return posts newer than this post ID; do not combine with start_time. | — |
until_id | string | No | 仅查询早于该推文ID的帖子;与end_time二选一。 Return posts older than this post ID; do not combine with end_time. | — |
next_token | string | No | 上一页返回的分页标记。首次查询不填;不能自行编造。 Pagination token returned by the previous page. Omit for the first page; do not invent a token. | — |
start_time | string | No | 起始时间,包含该时刻。使用带时区的RFC3339格式;与since_id二选一。 Inclusive start time in RFC3339 format with a timezone. Do not combine with since_id. | — |
granularity | enum (minute | hour | day) | No | 统计时间桶:minute按分钟、hour按小时、day按天。 Count buckets: minute, hour or day. | hour |
pagination_token | string | No | 上一页返回的分页标记。首次查询不填;不能自行编造。 Pagination token returned by the previous page. Omit for the first page; do not invent a token. | — |
search_count.fields | string | No | 需要返回的字段,多个字段名用逗号分隔。可选值: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-KeyRequest 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
{
"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.





