Skip to main content
The Post counts endpoints return the volume of Posts matching a query over time, without returning the Posts themselves. Use these endpoints to analyze trends, understand conversation size, and refine queries before searching.

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

EndpointDescriptionAccess
GET /2/tweets/counts/recentCount Posts from last 7 daysAll developers
GET /2/tweets/counts/allCount Posts from complete archivePay-per-use, Enterprise

Granularity options

Specify how counts are grouped using the granularity parameter:
GranularityDescriptionUse case
minuteCounts per minuteReal-time monitoring
hourCounts per hour (default)Daily analysis
dayCounts per dayLong-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

{
  "data": [
    { "start": "2024-01-15T00:00:00.000Z", "end": "2024-01-15T01:00:00.000Z", "tweet_count": 1523 },
    { "start": "2024-01-15T01:00:00.000Z", "end": "2024-01-15T02:00:00.000Z", "tweet_count": 1247 },
    { "start": "2024-01-15T02:00:00.000Z", "end": "2024-01-15T03:00:00.000Z", "tweet_count": 892 }
  ],
  "meta": {
    "total_tweet_count": 3662
  }
}

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:
python lang:en -is:retweet

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