Retrieves usage statistics for Posts over a specified number of days.
curl --request GET \
--url https://api.x.com/2/usage/tweets \
--header 'Authorization: Bearer <token>'{
"data": {
"cap_reset_day": 123,
"daily_client_app_usage": [
{
"client_app_id": "<string>",
"usage": [
{
"date": "2021-01-06T18:40:40.000Z",
"usage": 123
}
],
"usage_result_count": 123
}
],
"daily_project_usage": {
"project_id": 123,
"usage": [
{
"date": "2021-01-06T18:40:40.000Z",
"usage": 123
}
]
},
"project_cap": 123,
"project_id": "<string>",
"project_usage": 123
},
"errors": [
{
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"status": 123
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The number of days for which you need usage for.
1 <= x <= 90A comma separated list of Usage fields to display. The fields available for a Usage object.
1cap_reset_day, daily_client_app_usage, daily_project_usage, project_cap, project_id, project_usage [
"cap_reset_day",
"daily_client_app_usage",
"daily_project_usage",
"project_cap",
"project_id",
"project_usage"
]
The request has succeeded.
Usage per client app
Show child attributes
1An HTTP Problem Details object, as defined in IETF RFC 7807 (https://tools.ietf.org/html/rfc7807).
Show child attributes
curl --request GET \
--url https://api.x.com/2/usage/tweets \
--header 'Authorization: Bearer <token>'{
"data": {
"cap_reset_day": 123,
"daily_client_app_usage": [
{
"client_app_id": "<string>",
"usage": [
{
"date": "2021-01-06T18:40:40.000Z",
"usage": 123
}
],
"usage_result_count": 123
}
],
"daily_project_usage": {
"project_id": 123,
"usage": [
{
"date": "2021-01-06T18:40:40.000Z",
"usage": 123
}
]
},
"project_cap": 123,
"project_id": "<string>",
"project_usage": 123
},
"errors": [
{
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"status": 123
}
]
}