Rate limits

Every day many thousands of developers make requests to the X API. To help manage the sheer volume of these requests, limits are placed on the number of requests that can be made. These limits help us provide the reliable and scalable API that our developer community relies on. 

The maximum number of requests that are allowed is based on a time interval, some specified period or window of time. The most common request limit interval is fifteen minutes. If an endpoint has a rate limit of 900 requests/15-minutes, then up to 900 requests over any 15-minute interval is allowed. 

Rate limits are applied based on which authentication method you are using. For example, if you are using OAuth 1.0a User Context, you will have one limit per time period for each set of users’ Access Tokens, while if you are using OAuth 2.0 Bearer Token, you will have a separate limit per time period for requests made by your app. When these limits are exceeded, an error is returned. Keep reading to learn more about these details and tips on how to avoid being rate limited. 
 

Table of contents

 

X API v2 rate limits - Free

The following table lists the rate limits for the X API v2 Free access. These rate limits are also documented on each endpoint's API Reference page and also displayed in the  developer portal's products section.

 

 

Endpoint #Requests Window of time Per Part of the Post pull cap? Effective 30-day limit

POST_2_tweets

17 24 hours per user no 500
17 24 hours per app no 500

DELETE_2_tweets_id                                           

50 24 hours per user no 1,500
50 24 hours per app no 1,500
GET_2_users_me 25 24 hours per user no 750

 

X API v2 rate limits - Basic

The following table lists the rate limits for the X API v2 Basic access. These rate limits are also documented on each endpoint's API Reference page and also displayed in the  developer portal's products section.

 

Endpoint #Requests Window of time Per Part of the Post pull cap? Effective 30-day limit
DELETE_2_lists_param 5 15 minutes per user no 14,400
DELETE_2_lists_param_members_param 5 15 minutes per user no 14,400
DELETE_2_tweets_param 5 15 minutes per user no 14,400
DELETE_2_users_id_bookmarks_tweet_id 5 15 minutes per user no 14,400
DELETE_2_users_param_blocking_param 5 15 minutes per user no 14,400
DELETE_2_users_param_followed_lists_param 5 15 minutes per user no 14,400
DELETE_2_users_param_following_param 5 15 minutes per user no 14,400

DELETE_2_users_param_likes_param

5 15 minutes per user no 14,400
100 24 hours per user no 3,000
DELETE_2_users_param_muting_param 5 15 minutes per user no 14,400
DELETE_2_users_param_pinned_lists_param 5 15 minutes per user no 14,400
DELETE_2_users_param_retweets_param 5 15 minutes per user no 14,400
GET_2_compliance_jobs 5 15 minutes per app no 14,400
GET_2_compliance_jobs_param 5 15 minutes per app no 14,400
GET_2_dm_conversations_param_dm_events 3 15 minutes per user no 8,640
GET_2_dm_conversations_with_param_dm_events 3 15 minutes per user no 8,640
GET_2_dm_events 5 15 minutes per user no 14,400

GET_2_lists_id

5 15 minutes per user no 14,400
5 15 minutes per app no 14,400  

GET_2_lists_id_members

5 15 minutes per user no 14,400
25 15 minutes per app no 72,000

GET_2_lists_id_tweets

5 15 minutes per user yes 10,000
25 15 minutes per app yes 10,000

GET_2_spaces

5 15 minutes per user no 14,400
25 15 minutes per app no 72,000

GET_2_spaces_by_creator_ids

5 15 minutes per user no 14,400
25 15 minutes per app no 72,000

GET_2_spaces_param

25 15 minutes per app no 72,000
5 15 minutes per user no 14,400

GET_2_spaces_param_buyers

5 15 minutes per user no 14,400
25 15 minutes per app no 72,000

GET_2_spaces_param_tweets

5 15 minutes per user no 14,400
25 15 minutes per app no 72,000

GET_2_spaces_search

5 15 minutes per user no 14,400
25 15 minutes per app no 72,000

GET_2_tweets

15 15 minutes per user yes 10,000
15 15 minutes per app yes 10,000
GET_2_tweets_counts_recent 5 15 minutes per app no 14,400

GET_2_tweets_param

15 15 minutes per user yes 10,000
15 15 minutes per app yes 10,000

GET_2_tweets_param_liking_users

5 15 minutes per user no 14,400
25 15 minutes per app no 72,000

GET_2_tweets_param_quote_tweets

5 15 minutes per user yes 10,000
5 15 minutes per app yes 10,000

GET_2_tweets_param_retweeted_by

5 15 minutes per app yes 10,000
5 15 minutes per user yes 10,000  
GET_2_tweets_search_recent 60 15 minutes  per app  yes 10,000
60 15 minutes  per user yes  

GET_2_users

500 24 hours per app no 15,000
100 24 hours per user no 3,000

GET_2_users_by

100 24 hours per user no 3,000
500 24 hours per app no 15,000

GET_2_users_by_username_param

100 24 hours per user no 3,000
500 24 hours per app no 15,000

GET_2_users_by_username_param_followers

100 24 hours per user no 3,000
500 24 hours per app no 15,000

GET_2_users_by_username_param_mentions

25 15 minutes per app no 72,000
5 15 minutes per user no 14,400

GET_2_users_by_username_param_tweets

25 15 minutes per app yes 10,000
5 15 minutes per user yes 10,000
GET_2_users_id_bookmarks 10 15 minutes per user no 28,800

GET_2_users_id_list_memberships

25 15 minutes per app no 72,000
5 15 minutes per user no 14,400

GET_2_users_id_owned_lists

500 24 hours per app no 15,000
100 24 hours per user no 3,000

GET_2_users_id_pinned_lists

100 24 hours per user no 3,000
500 24 hours per app no 15,000
GET_2_users_me 250 24 hours per user no 7,500

GET_2_users_param

500 24 hours per user no 15,000
100 24 hours per app no 3,000
GET_2_users_param_blocking 5 15 minutes per user no 14,400

GET_2_users_param_following_spaces

5 15 minutes per user no 14,400
25 15 minutes per app no 72,000

GET_2_users_param_liked_tweets

5 15 minutes per app yes 10,000
5 15 minutes per user yes 10,000
GET_2_users_param_mentions 15 15 minutes per app yes 10,000
10 15 minutes per user yes 10,000
GET_2_users_param_muting 100 24 hours per user no 3,000
GET_2_users_param_timelines_reverse_chronological 5 15 minutes per user no 14,400

GET_2_users_param_tweets

10 15 minutes per app yes 10,000
5 15 minutes per user yes 10,000
POST_2_compliance_jobs 15 15 minutes per app no 43,200

POST_2_dm_conversations

5 15 minutes per user no 14,400
500 24 hours per app no 15,000
50 24 hours per user no 1,500

POST_2_dm_conversations_param_messages

500 24 hours per app no 15,000
50 24 hours per user no 1,500
5 15 minutes per user no 14,400

POST_2_dm_conversations_with_param_messages

500 24 hours per app no 15,000
50 24 hours per user no 1,500
5 15 minutes per user no 14,400
POST_2_lists 100 24 hours per user no 3,000
POST_2_lists_param_members 5 15 minutes per user no 14,400

POST_2_tweets

100 24 hours per user no 3,000
1667 24 hours per app no 50,010
POST_2_users_id_bookmarks 5 15 minutes per user no 14,400
POST_2_users_param_blocking 5 15 minutes per user no 14,400
POST_2_users_param_followed_lists 5 15 minutes per user no 14,400
POST_2_users_param_following 5 15 minutes per user no 14,400

POST_2_users_param_likes

200 24 hours per user no 6,000
5 15 minutes per user no 14,400
POST_2_users_param_muting 5 15 minutes per user no 14,400
POST_2_users_param_pinned_lists 5 15 minutes per user no 14,400
POST_2_users_param_retweets 5 15 minutes per user no 14,400
PUT_2_lists_param 5 15 minutes per user no 14,400
PUT_2_tweets_param_hidden 5 15 minutes per user no 14,400

 

X API v2 rate limits - Pro

The following table lists the rate limits for the X API v2 Pro access. These rate limits are also documented on each endpoint's API Reference page and also displayed in the  developer portal's products section.

 

Endpoint #Requests Window of time Per Part of the Post pull cap? Effective 30-day limit
DELETE_2_lists_param 300 15 minutes per user no 864,000
DELETE_2_lists_param_members_param 300 15 minutes per user no 864,000
DELETE_2_tweets_param 50 15 minutes per user no 144,000
DELETE_2_users_id_bookmarks_tweet_id 50 15 minutes per user no 144,000
DELETE_2_users_param_blocking_param 50 15 minutes per user no 144,000
DELETE_2_users_param_followed_lists_param 50 15 minutes per user no 144,000
DELETE_2_users_param_following_param 50 15 minutes per user no 144,000

DELETE_2_users_param_likes_param

50 15 minutes per user no 144,000
1000 24 hours per user no 30,000
DELETE_2_users_param_muting_param 50 15 minutes per user no 144,000
DELETE_2_users_param_pinned_lists_param 50 15 minutes per user no 144,000
DELETE_2_users_param_retweets_param 50 15 minutes per user no 144,000
GET_2_compliance_jobs 150 15 minutes per app no 432,000
GET_2_compliance_jobs_param 150 15 minutes per app no 432,000
GET_2_dm_conversations_param_dm_events 100 15 minutes per user no 288,000
GET_2_dm_conversations_with_param_dm_events 100 15 minutes per user no 288,000
GET_2_dm_events 100 15 minutes per user no 288,000

GET_2_lists_id

75 15 minutes per user no 216,000
75 15 minutes per app no 216,000

GET_2_lists_id_members

900 15 minutes per user no 2,592,000
900 15 minutes per app no 2,592,000

GET_2_lists_id_tweets

900 15 minutes per user yes 2,592,000
900 15 minutes per app yes 2,592,000

GET_2_spaces

300 15 minutes per user no 864,000
300 15 minutes per app no 864,000

GET_2_spaces_by_creator_ids

300 15 minutes per user no 864,000
1 1 second per app no 2,592,000
1 1 second per user no 2,592,000
300 15 minutes per app no 864,000

GET_2_spaces_param

300 15 minutes per app no 864,000
300 15 minutes per user no 864,000

GET_2_spaces_param_buyers

300 15 minutes per user no 864,000
300 15 minutes per app no 864,000

GET_2_spaces_param_tweets

300 15 minutes per user no 864,000
300 15 minutes per app no 864,000

GET_2_spaces_search

300 15 minutes per user no 864,000
300 15 minutes per app no 864,000

GET_2_tweets

900 15 minutes per user yes 2,592,000
450 15 minutes per app yes 1,296,000
GET_2_tweets_counts_recent 300 15 minutes per app no 864,000

GET_2_tweets_param

900 15 minutes per user yes 2,592,000
450 15 minutes per app yes 1,296,000

GET_2_tweets_param_liking_users

75 15 minutes per user no 216,000
75 15 minutes per app no 216,000

GET_2_tweets_param_quote_tweets

75 15 minutes per user yes 216,000
75 15 minutes per app yes 216,000

GET_2_tweets_param_retweeted_by

75 15 minutes per app yes 216,000
75 15 minutes per user yes 216,000

GET_2_tweets_search_recent

450 15 minutes per app yes 1,296,000
300 15 minutes per user yes 864,000
GET_2_tweets_search_stream 50 15 minutes per app yes 144,000
GET_2_tweets_search_stream_rules 450 15 minutes per app no 1,296,000

GET_2_users

300 15 minutes per app no 864,000
900 15 minutes per user no 2,592,000

GET_2_users_by

900 15 minutes per user no 2,592,000
300 15 minutes per app no 864,000

GET_2_users_by_username_param

900 15 minutes per user no 2,592,000
300 15 minutes per app no 864,000

GET_2_users_by_username_param_followers

15 15 minutes per user no 43,200
15 15 minutes per app no 43,200

GET_2_users_by_username_param_mentions

450 15 minutes per app no 1,296,000
180 15 minutes per user no 518,400

GET_2_users_by_username_param_tweets

1500 15 minutes per app yes 4,320,000
900 15 minutes per user yes 2,592,000
GET_2_users_id_bookmarks 180 15 minutes per user no 518,400

GET_2_users_id_list_memberships

75 15 minutes per app no 216,000
75 15 minutes per user no 216,000

GET_2_users_id_owned_lists

15 15 minutes per app no 43,200
15 15 minutes per user no 43,200

GET_2_users_id_pinned_lists

15 15 minutes per user no 43,200
15 15 minutes per app no 43,200
GET_2_users_me 75 15 minutes per user no 216,000

GET_2_users_param

900 15 minutes per user no 2,592,000
300 15 minutes per app no 864,000
GET_2_users_param_blocking 15 15 minutes per user no 43,200

GET_2_users_param_following_spaces

300 15 minutes per user no 864,000
300 15 minutes per app no 864,000

GET_2_users_param_liked_tweets

75 15 minutes per app yes 216,000
75 15 minutes per user yes 216,000

GET_2_users_param_mentions

450 15 minutes per app yes 1,296,000
300 15 minutes per user yes 864,000
GET_2_users_param_muting 15 15 minutes per user no 43,200
GET_2_users_param_timelines_reverse_chronological 180 15 minutes per user no 518,400

GET_2_users_param_tweets

1500 15 minutes per app yes 4,320,000
900 15 minutes per user yes 2,592,000
POST_2_compliance_jobs 150 15 minutes per app no 432,000

POST_2_dm_conversations

200 15 minutes per user no 576,000
2500 24 hours per app no 75,000
1000 24 hours per user no 30,000

POST_2_dm_conversations_param_messages

2500 24 hours per app no 75,000
1000 24 hours per user no 30,000
200 15 minutes per user no 576,000

POST_2_dm_conversations_with_param_messages

2500 24 hours per app no 75,000
1000 24 hours per user no 30,000
200 15 minutes per user no 576,000
POST_2_lists 300 15 minutes per user no 864,000
POST_2_lists_param_members 300 15 minutes per user no 864,000

POST_2_tweets

100 15 minutes per user no 288,000
10000 24 hours per app no 300,000
POST_2_tweets_search_stream_rules 100 15 minutes per user no 288,000
POST_2_users_id_bookmarks 50 15 minutes per user no 144,000
POST_2_users_param_blocking 50 15 minutes per user no 144,000
POST_2_users_param_followed_lists 50 15 minutes per user no 144,000
POST_2_users_param_following 50 15 minutes per user no 144,000

POST_2_users_param_likes

1000 24 hours per user no 30,000
50 15 minutes per user no 144,000
POST_2_users_param_muting 50 15 minutes per user no 144,000
POST_2_users_param_pinned_lists 50 15 minutes per user no 144,000
POST_2_users_param_retweets 50 15 minutes per user no 144,000
PUT_2_lists_param 300 15 minutes per user no 864,000
PUT_2_tweets_param_hidden 50 15 minutes per user no 144,00

X API v2 rate limits - Enterprise

To learn more about enterprise access rate limits reach out to your account manager.

Please note

In addition to rate limits, we also have Post caps that limit the number of Posts that any Project can retrieve from certain endpoints in a given month, which is based on your access level.


Rate limits and authentication method

Rate limits are set at both the developer App and the user access token levels:

  • OAuth 2.0 Bearer Token: App rate limit
    This authentication method and rate limit allows you to make a certain number of requests to endpoints on behalf of your developer App. When using this authentication method, rate limits are determined by the number of requests you make using a Bearer Token.

    If an endpoint has an App rate limit of 450 requests per 15 minute interval, then you can make 450 requests per window on behalf of your App when you use your Bearer Token.

    This limit is considered completely separate from the user rate limit.

  • OAuth 1.0a User Context: User rate limit
    This authentication method and rate limit allows for you to make a certain number of requests to endpoints on behalf of a X user, identified by the user Access Token used when authenticating the request. For example, if you would like to retrieve private metrics from Posts, you would need to authenticate with the user Access Tokens associated with that user, which can be generated by using the 3-legged OAuth flow

    If ten users have authorized your developer App, and the endpoint you are making a request to has a user rate limit of 900 requests per 15-minute interval, then you can make up to 900 requests per user in that 15 minute time period, for a total of 9000 requests.

    This limit is considered completely separate from App rate limit. 
     

Please note

Users' rate limits are shared across all Apps that they have authorized. For example, if a specific user likes 20 Posts using one developer App and likes 20 Posts on a separate developer App within a 15 minute time period, the 40 requests would pull out of the same per user rate limit bucket. That means that if this endpoint has a user rate limit of 1,000 requests per 15 minutes, then this user would be able to like 960 more Posts within that 24 hour period of time across all X and third-party apps. 

 

HTTP headers and response codes

Use the HTTP headers in order to understand where the application is at for a given rate limit, on the method that was just utilized.

Note that the HTTP headers are contextual. When using application-only authentication, they indicate the rate limit for the application context. When using user-based authentication, they indicate the rate limit for that user context.

  • x-rate-limit-limit: the rate limit ceiling for that given endpoint
  • x-rate-limit-remaining: the number of requests left for the 15-minute window
  • x-rate-limit-reset: the remaining window before the rate limit resets, in UTC epoch seconds
     

When an application exceeds the rate limit for a given X API endpoint, the API will return a HTTP 429 “Too Many Requests” response code, and the following error will be returned in the response body:

{ "errors": [ { "code": 88, "message": "Rate limit exceeded" } ] } 

 

Recovering from a rate limit

When these rate limits are exceeded, a 429 'Too many requests' error is returned from the endpoint.  As discussed below, when rate limit errors occur, a best practice is to examine HTTP headers that indicate when the limit resets and pause requests until then.  

When a "too many requests" or rate-limiting error occurs, the frequency of making requests needs to be slowed down. When a rate limit error is hit, the x-rate-limit-reset: HTTP header can be checked to learn when the rate-limiting will reset. 

Another common pattern is based on exponential backoff, where the time between requests starts off small (for example, a few seconds), then doubled before each retry. This is continued until a request is successful, or some reasonable maximum time between requests is reached (for example, a few minutes).  

Ideally, the client-side is self-aware of existing rate limits and can pause requests until the currently exceeded window expires. If you exceed a 15-minute limit, then waiting a minute or two before retrying makes sense.

Note that beyond these limits on the number of requests, the Standard Basic level of access provides up to 500,000 Posts per month from the recent search and filtered stream endpoints. If you have exceeded the monthly limit on the number of Posts, then it makes more sense for your app to raise a notification and know its enrollment day of the month and hold off requests until that day.  
 

Tips to avoid being rate limited

The tips below are there to help you code defensively and reduce the possibility of being rate limited. Some application features that you may want to provide are simply impossible in light of rate-limiting, especially around the freshness of results. If real-time information is an aim of your application, look into the filtered and sampled stream endpoints. 
 

Caching

Store API responses in your application or on your site if you expect a lot of use. For example, don’t try to call the X API on every page load of your website landing page. Instead, call the API infrequently and load the response into a local cache. When users hit your website load the cached version of the results.
 

Prioritize active users

If your site keeps track of many X users (for example, fetching their current status or statistics about their X usage), consider only requesting data for users who have recently signed into your site.
 

Adapt to the search results

If your application monitors a high volume of search terms, query less often for searches that have no results than for those that do. By using a back-off you can keep up to date on queries that are popular but not waste cycles requesting queries that very rarely change. Alternatively, consider using the filtered stream endpoint and filter with your search queries.
 

Denylist

If an application abuses the rate limits, it will be denied. Denied apps are unable to get a response from the X API. If you or your application has been denied and you think there has been a mistake, you can use our Platform Support forms to request assistance. Please include the following information:

  1. Explain why you think your application was denied.
  2. If you are no longer being rate limited, describe in detail how you fixed the problem.