This guide walks you through getting Post counts (volume) for the last 7 days.Documentation Index
Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
PrerequisitesBefore you begin, you’ll need:
- A developer account with an approved App
- Your App’s Bearer Token
Get recent Post counts
Build a query
Use the same query syntax as recent search. For example, to count Posts from @XDevelopers:
Granularity options
Control how counts are grouped:| Granularity | Description |
|---|---|
minute | Counts per minute |
hour | Counts per hour (default) |
day | Counts per day |
cURL
Filter by time range
Limit counts to a specific time period:cURL
Common parameters
| Parameter | Description | Default |
|---|---|---|
query | Search query (required) | — |
granularity | Time bucket size | hour |
start_time | Oldest timestamp (ISO 8601) | 7 days ago |
end_time | Newest timestamp (ISO 8601) | Now |
Next steps
Full-archive counts
Get historical Post counts
Build a query
Master query syntax
API Reference
Full endpoint documentation