v1

latestOpenAPI 3.0.0Twitter Developer Agreement and Policy2026-07-1480235216.3 KB
Tweets

Full archive search counts

Returns Tweet Counts that match a search query.

get/2/tweets/counts/all

Query parameters

querystring required
Example:(from:TwitterDev OR from:TwitterAPI) has:media -is:retweet

One query/rule/filter for matching Tweets. Refer to https://t.co/rulelength to identify the max query length.

start_timestring date-time

YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp (from most recent 7 days) from which the Tweets will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 includes the first second of the minute).

end_timestring date-time

YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Tweets will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00:01 excludes the first second of the minute).

since_idstring

Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.

Example:1346889436626259968

Returns results with a Tweet ID greater than (that is, more recent than) the specified ID.

until_idstring

Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.

Example:1346889436626259968

Returns results with a Tweet ID less than (that is, older than) the specified ID.

next_tokenstring

A base36 pagination token.

This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.

pagination_tokenstring

A base36 pagination token.

This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.

granularity'minute' | 'hour' | 'day'

The granularity for the search counts results.

search_count.fieldsstring[]

The fields available for a SearchCount object.

A comma separated list of SearchCount fields to display.

[
  "end",
  "start",
  "tweet_count"
]

Response

The request has succeeded.