質問

I want to user Search API for twitter using 1.1 version.

There is a limit for 450 request per applications.

But I have a doubt in this rate limiting. I thought that it means we can make 450 request in every 15 mins of request window.

But I read(but i am not sure about what exactly i read) something like by default it returns 15 status based on search query. But if you query more status in single request it's considered based on the number of statuses.

Do they have a rate limit only for every 15 mins or they have rate limit for a day too?

So I couldn't understand how it exactly works ? Can any one help me with this?

役に立ちましたか?

解決

Rate limits are segmented by the type of authentication, user or app. User authentication is any OAuth process that is based on the user. Application-only authentication is for your application credentials and not based on user. In the case of Search, you have a 15 minute window of 180 for user and 450 for app. For a higher rate limit (in the case of search) use application-only authentication. This will give you:

24 hours x 4 15-minute increments x 450 requests per 15-minute increments == 43200 requests per day

You just have to control your app so that it doesn't exceed 450 requests in a 15 minute interval.

Here's Twitter's docs on rate limiting:

https://developer.twitter.com/en/docs/basics/rate-limiting

You can also use the X-Rate-Limit-Limit/Remaining/Reset HTTP headers and the rate-limiting endpoint to keep track of where you're at and what's available:

https://developer.twitter.com/en/docs/developer-utilities/rate-limit-status/api-reference/get-application-rate_limit_status

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top