Premium API rate limit status endpoint


#1

Is there a way to get the current Premium API rate limit status? I know about the rate_limit_status results endpoint but that says I have 1800 remaining, when I’m currently only at 500 level. This caused my script to exceed 500 hits within one day! Here is the response from the rate endpoint:

"tweets": {
  "/tweets/search/:product/:label": {
    "limit": 1800,
    "remaining": 1800,
    "reset": 1523467961
  },
  "/tweets/search/:product/:instance/counts": {
    "limit": 900,
    "remaining": 900,
    "reset": 1523467961
  }
},

Further, I’ve read on the forum that here should be rate limit numbers in the response headers for searches under X-Rate-Limit-Limit. This is not the case for Premium Search, below are the only X headers included in the response. (Note this is from a search where I’m already over the limit and received “Request exceeds account’s current query limits.” Never the less, it should have rate limits.)

X-Connection-Hash: 77ab951dd49f84b8ee15747a74930c77
X-Response-Time: 27
X-Tsa-Request-Body-Time: 0

General feedback, PLEASE clarify the rate limits on the upgrade page. Numerous people continue to have questions about it on this forum, and the API documentation about rate limit windows muddies your statements about a “period”. I thought surely that was 500 hits per 15 minute window. I was shocked to discover Twitter charges $150 for 500 queries PER MONTH when the standard API I can do 600x that for free.


#2

You’re right that this is not currently very clear from an API standpoint. At the current time we don’t have a usage API for premium (it’s a known request, but not currently on the roadmap), and the values returned on the rate_limit_status endpoint and in the X-Rate-Limit headers are misleading. We certainly need to clarify this in a number of places in the documentation and we do have an open ticket to work on this soon.

On the “period” vs “window” piece - the premium APIs are completely new and operate differently than the older standard API. In premium terminology, “period” means the billing period, which is 1 month. The only way to see your usage at the moment is via the graphic on the developer dashboard.

Note that premium search offers significantly higher data quality (access to longer history, 5x more Tweets per request, Tweet data enrichments, and 2x more complex queries by character count).


#3

Thanks for the info Andy. Are you able to reset my API usage so I can continue to develop with the Premium API? I’m currently blocked because my rate limiter was following the misleading numbers in the rate_limit_status endpoint.

Lastly, the enrichment features didn’t seem to work. Specifically url_title said that it wasn’t supported.


#5

I’m very sorry but we are unable to reset the premium quotas. I do appreciate how frustrating that will be for you and that it will cause a delay in your ability to continue to code. If you were to upgrade your tier then the quota would be reset. This is a technical limitation on our side, but I recognise that this is not the most friendly answer you might hope for.

Note that the enrichments for polls, profile geo and URL data are only available in the paid premium tiers, and not in the free sandbox.