PrerequisitesBefore you begin, you’ll need:
- A developer account with Self-serve or Enterprise access
- Your App’s Bearer Token
Get full-archive Post counts
1
Build a query
Use the same query syntax as full-archive search. For example, to count Posts from @XDevelopers:
2
Set a time range
Specify
start_time and end_time to search specific historical periods:| Parameter | Format | Example |
|---|---|---|
start_time | ISO 8601 | 2020-01-01T00:00:00Z |
end_time | ISO 8601 | 2020-12-31T23:59:59Z |
3
Make the request
cURL
4
Review the response
Granularity options
Control how counts are grouped:| Granularity | Description |
|---|---|
minute | Counts per minute |
hour | Counts per hour (default) |
day | Counts per day |
Paginate through results
For large time ranges, use thenext_token from the response:
cURL
Key differences from recent counts
| Feature | Recent Counts | Full-Archive Counts |
|---|---|---|
| Time range | Last 7 days | March 2006 to now |
| Access required | All developers | Pay-per-use, Enterprise |
| Default time range | Last 7 days | Last 30 days |
Common parameters
| Parameter | Description | Default |
|---|---|---|
query | Search query (required) | — |
granularity | Time bucket size | hour |
start_time | Oldest timestamp (ISO 8601) | 30 days ago |
end_time | Newest timestamp (ISO 8601) | Now |
next_token | Pagination token | — |