> ## 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.

# Usage

> The Usage endpoint lets you monitor your API usage, including the number of Posts consumed. Reference for the X API v2 standard tier covering usage.

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

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.

<Note>
  Pay-per-usage plans are subject to a monthly cap of 2 million Post reads. If you need higher volume, consider an [Enterprise plan](/forms/enterprise-api-interest).
</Note>

## Overview

<CardGroup cols={2}>
  <Card title="Post usage" icon="chart-simple">
    Track Posts consumed
  </Card>

  <Card title="Daily breakdown" icon="calendar-days">
    View usage by day
  </Card>

  <Card title="App-level" icon="gauge">
    Monitor usage across your App
  </Card>
</CardGroup>

***

## Endpoint

| Method | Endpoint                                    | Description         |
| :----- | :------------------------------------------ | :------------------ |
| GET    | [`/2/usage/tweets`](/x-api/usage/get-usage) | Get Post usage data |

***

## Response data

The response includes daily Post consumption counts:

```json theme={null}
{
  "data": {
    "daily_project_usage": [
      {
        "date": "2024-01-15",
        "usage": [
          {
            "app_id": "12345678",
            "tweets_consumed": 15420
          }
        ]
      }
    ],
    "project_id": "1234567890",
    "project_cap": 10000000
  }
}
```

### Fields

| Field                 | Description               |
| :-------------------- | :------------------------ |
| `daily_project_usage` | Array of daily usage data |
| `date`                | Date in YYYY-MM-DD format |
| `app_id`              | Your App's ID             |
| `tweets_consumed`     | Posts consumed that day   |
| `project_cap`         | Your monthly Post limit   |

***

## Example request

```bash theme={null}
curl "https://api.x.com/2/usage/tweets" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

***

## Use cases

* **Cost monitoring** — Track consumption against your budget
* **Alerting** — Set up alerts when approaching limits
* **Optimization** — Identify high-consumption endpoints
* **Reporting** — Generate usage reports

<Tip>
  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 →](/x-api/getting-started/pricing)
</Tip>

***

## Getting started

<Note>
  **Prerequisites**

  * An approved [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * A [Project and App](/resources/fundamentals/developer-apps) in the Developer Console
  * Your App's [Bearer Token](/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/x-api/usage/post-usage">
    Full endpoint documentation
  </Card>

  <Card title="Developer Console" icon="gauge" href="https://developer.x.com/en/portal/dashboard">
    View usage in the dashboard
  </Card>
</CardGroup>
