Is there any way (other than having to add custom code) to check if my application has exceeded the YQL limits that are allowed? (Not sure if per application limit or the per IP limit applies in my case) I assume that all queries would fail after the limit is reached, but I'd like to be proactive in adding measures to prevent this from happening.
I am using YQL in a critical piece in the application and since a query is issued every few seconds, I suspect I might be nearing the limit.
Unfortunately error code 999 is also returned in other situations, so it is not a reliable indicator of reaching the hourly 10k limit.
Example of response from Yahoo/YQL:
HTTP/1.1 999 Unable to process request at this time -- error 999
Date: Sun, 07 Nov 2010 13:46:10 GMT
Expires: Thu, 01 Jan 1970 22:00:00 GMT
Cache-Control: no-cache, private
Cache-Control: no-store
Pragma: no-cache
Vary: Accept-Encoding
Content-Type: text/html;charset=UTF-8
Age: 0
Transfer-Encoding: chunked
Connection: keep-alive
Server: YTS/1.17.21
I think it would be great if YQL could return a header field with the remaining YQL calls for per hour, like Twitter does.
Relevant parts of the HTTP Response Header of the Twitter API:
HTTP/1.1 200 OK
Date: Sun, 07 Nov 2010 13:52:18 GMT
X-RateLimit-Limit: 150
X-RateLimit-Remaining: 147
X-RateLimit-Class: api
X-Revision: DEV
X-RateLimit-Reset: 1289141505
If you exceed the hourly allowance of 10k hits you will get back an error with the code 999 - write your code accordingly to avoid being blocked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With