Skip to main content
The Usage endpoint lets you monitor your API usage, including the number of Posts consumed. Track your usage programmatically to manage costs and stay within limits.

Overview

Post usage

Track Posts consumed

Daily breakdown

View usage by day

App-level

Monitor usage across your App

Endpoint

MethodEndpointDescription
GET/2/usage/tweetsGet Post usage data

Response data

The response includes daily Post consumption counts:
{
  "data": {
    "daily_project_usage": [
      {
        "date": "2024-01-15",
        "usage": [
          {
            "app_id": "12345678",
            "tweets_consumed": 15420
          }
        ]
      }
    ],
    "project_id": "1234567890",
    "project_cap": 10000000
  }
}

Fields

FieldDescription
daily_project_usageArray of daily usage data
dateDate in YYYY-MM-DD format
app_idYour App’s ID
tweets_consumedPosts consumed that day
project_capYour monthly Post limit

Example request

curl "https://api.x.com/2/usage/tweets" \
  -H "Authorization: Bearer $BEARER_TOKEN"

Use cases

  • Cost monitoring — Track consumption against your plan limits
  • Alerting — Set up alerts when approaching limits
  • Optimization — Identify high-consumption endpoints
  • Reporting — Generate usage reports
Resources are deduplicated within a 24-hour UTC window, so requesting the same resource multiple times in a day only counts as one charge. Learn more about pricing →

Getting started

Prerequisites