Skip to main content
GET
/
2
/
tweets
/
counts
/
all
Get count of all Posts
curl --request GET \
  --url https://api.x.com/2/tweets/counts/all \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "end": "2023-11-07T05:31:56Z",
      "start": "2023-11-07T05:31:56Z",
      "tweet_count": 123
    }
  ],
  "errors": [
    {
      "detail": "<string>",
      "status": 123,
      "title": "<string>",
      "type": "<string>"
    }
  ],
  "meta": {
    "newest_id": "<string>",
    "next_token": "<string>",
    "oldest_id": "<string>",
    "total_tweet_count": 123
  }
}

Authorizations

Authorization
string
header
required

Query Parameters

query
string
required
Required string length: 1 - 4096
Example:
start_time
string<date-time>
end_time
string<date-time>
since_id
string
Example:
until_id
string
Example:
next_token
string
Minimum length: 1
pagination_token
string
Minimum length: 1
granularity
enum<string>
default:hour
Available options:
minute,
hour,
day
search_count.fields
enum<string>[]
Minimum length: 1
Example:

Response

data
object[]
Minimum length: 1
errors
object[]
Minimum length: 1
meta
object