5

I have registered an app at https://stackapps.com/apps/register, got a Key right away after I have submitted.

But now when I request http://api.stackoverflow.com/0.8/stats?key=MYKEY, I got RequestLimitExceeded Error

{
  "error": {
    "code": "RequestLimitExceeded",
    "message": "This IP has exceeded the request-per-day limit."
  }
}

Note: I have reached 300 requests, but not 10k for sure :)


Ok, Now I fixed it by changing my IP Address (Glad I am at home)

X-RateLimit-Max 100000
X-RateLimit-Current 99998

And I just noticed that key is need to set for the first time only.

Once first request is success and got X-RateLimit-Max in response header, you don't need to set key an API URL anymore for the whole day.

2 Answers 2

4

Did you make any requests earlier today without a key?

The API only checks your key and sets a limit on the first request.

A single IP address can only make a limited number of requests per day to the API. This limit is determined at first request time, and is dependent upon the presence of an API key.

4
  • I did requests with and without API Key before reaching 300, but the very first request was without key.
    – YOU
    May 21, 2010 at 16:59
  • If the first request was without a key, than your limit today is 300.
    – Joel
    May 21, 2010 at 17:07
  • This happened to my app too. May 21, 2010 at 17:09
  • Is that quote "quoted" from somewhere specific? (I can't find the second sentence anywhere "official".)
    – ashleedawg
    Jun 8, 2018 at 22:59
2

A help request in the browser will trigger the daily max cap. The SO team has set different request limits on the help requests (yesterday it was 300, but today it's 100000). So, by making stats?help (no key) request your first request for the day, you're 'hacking' your daily cap to 100000. :-)

I suspect this hack won't last long, so use it while it's there...

2
  • 1
    What a dumb way to do it. Oh well. May 21, 2010 at 17:23
  • 1
    Just by browsing any page on api.stackoverflow.com without key will make your daily limit to 300 I guess
    – YOU
    May 21, 2010 at 17:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .