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

# Rate Limits

> Understand X API rate limits across access tiers and endpoints, including app-level vs user-level limits, response headers, and best practices for retries.

Rate limits control how many API requests you can make in a given time period. They ensure fair usage and system stability across the platform.

***

## Rate limits by product

Each X API product has its own rate limiting approach:

<CardGroup cols={3}>
  <Card title="X API v2" icon="square-x-twitter" href="/x-api/fundamentals/rate-limits">
    Per-endpoint limits based on 15-minute windows. View detailed tables and recovery tips.
  </Card>

  <Card title="Enterprise API" icon="building" href="/x-api/enterprise-gnip-2.0/fundamentals/rate-limits">
    Custom limits based on your enterprise agreement and data package.
  </Card>

  <Card title="X Ads API" icon="rectangle-ad" href="/x-ads-api/fundamentals/rate-limiting">
    Limits specific to ad management and analytics endpoints.
  </Card>
</CardGroup>

***

## How rate limits work

| Concept               | Description                                             |
| :-------------------- | :------------------------------------------------------ |
| **Time window**       | Most limits reset every 15 minutes                      |
| **Per-user limits**   | Apply when using OAuth 1.0a or OAuth 2.0 user tokens    |
| **Per-app limits**    | Apply when using Bearer Token (app-only) authentication |
| **Endpoint-specific** | Each endpoint has its own limit                         |

***

## Checking your limits

Every API response includes headers showing your current rate limit status:

```
x-rate-limit-limit: 900
x-rate-limit-remaining: 847
x-rate-limit-reset: 1705420800
```

| Header                   | Description                                    |
| :----------------------- | :--------------------------------------------- |
| `x-rate-limit-limit`     | Maximum requests allowed in the current window |
| `x-rate-limit-remaining` | Requests remaining in the current window       |
| `x-rate-limit-reset`     | Unix timestamp when the limit resets           |

***

## Rate limit errors

When you exceed a rate limit, you'll receive a **429 Too Many Requests** response:

```json theme={null}
{
  "errors": [{
    "code": 88,
    "message": "Rate limit exceeded"
  }]
}
```

***

## Best practices

<CardGroup cols={2}>
  <Card title="Cache responses" icon="database">
    Store API responses locally to reduce repeated requests for the same data.
  </Card>

  <Card title="Use exponential backoff" icon="clock-rotate-left">
    When rate limited, wait before retrying. Double the wait time with each retry.
  </Card>

  <Card title="Check headers" icon="list-check">
    Monitor rate limit headers to avoid hitting limits proactively.
  </Card>

  <Card title="Use streaming" icon="signal-stream">
    For real-time data, use filtered stream instead of polling search endpoints.
  </Card>
</CardGroup>

***

## Next steps

For detailed rate limit tables by endpoint, see the rate limits page for your specific API:

* [X API v2 Rate Limits](/x-api/fundamentals/rate-limits)
* [X Ads API Rate Limits](/x-ads-api/fundamentals/rate-limiting)
