Overview
Volume analysis
Build trendlines and visualizations showing Post volume over time
Query refinement
Estimate result size before running full search queries
Event detection
Identify when conversations peaked around events
Efficient research
Understand conversation scale without retrieving all Posts
Endpoints
| Endpoint | Description | Access |
|---|---|---|
GET /2/tweets/counts/recent | Count Posts from last 7 days | All developers |
GET /2/tweets/counts/all | Count Posts from complete archive | Pay-per-use, Enterprise |
Granularity options
Specify how counts are grouped using thegranularity parameter:
| Granularity | Description | Use case |
|---|---|---|
minute | Counts per minute | Real-time monitoring |
hour | Counts per hour (default) | Daily analysis |
day | Counts per day | Long-term trends |
Recent counts
Count Posts from the last 7 days. Available to all developers.Features
- Counts grouped by minute, hour, or day
- Same query operators as recent search
- 512-character query length
Example response
Full-archive counts
Count Posts from the complete archive back to 2006.Full-archive counts is available to pay-per-use and Enterprise customers.
Features
- Count historical Posts from any time period
- All query operators available
- 1,024-character query length (4,096 for Enterprise)
Pagination
Results paginate at 31 days per response:- Day granularity: 31 days per page
- Hour granularity: 744 hours (31 days) per page
- Minute granularity: 44,640 minutes (31 days) per page
Query operators
Post counts use the same query syntax as search endpoints:Build a query
Learn query syntax and operators
Important notes
Counts vs search resultsCounts may not exactly match search results. Search endpoints apply additional compliance filtering that counts endpoints do not perform.
Getting started
Prerequisites
- An approved developer account
- A Project and App in the Developer Console
- Your App’s Bearer Token