Recent Tweet counts

GET https://api.twitter.com/2/tweets/counts/recent?query=

Search for public Tweets created in the last 7 days.

For full details, see the API reference for this endpoint.

Sign up for the Twitter API

Request Params

KeyDatatypeRequiredDescription
querynullRequired. Query for matching Tweets. Up to 512 characters.
start_timenullThe oldest UTC timestamp (from most recent 7 days) from which the Tweets will be provided. YYYY-MM-DDTHH:mm:ssZ (ISO 8601/RFC 3339).
end_timenullThe newest, most recent UTC timestamp to which the Tweets will be provided. YYYY-MM-DDTHH:mm:ssZ (ISO 8601/RFC 3339).
since_idnullReturns results with a Tweet ID greater than (that is, more recent than) the specified ID. The ID specified is exclusive and responses will not include it.
until_idnullReturns results with a Tweet ID less than (that is, older than) the specified ID. The ID specified is exclusive and responses will not include it.
granularitynullThis is the granularity that you want the timeseries count data to be grouped by. Possible values are day, hour or minute. The default granularity, if not specified is hour.