Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

I have registered an app at http://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 on api URL anymore for the whole day.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

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.

share|improve this answer
    
I did requests with and without API Key before reaching 300, but the very first request was without key. –  YOU May 21 '10 at 16:59
    
If the first request was without a key, than your limit today is 300. –  Joel Potter May 21 '10 at 17:07
    
This happened to my app too. –  Nathan Osman May 21 '10 at 17:09
    
I've got it, going to change my IP. Thanks. –  YOU May 21 '10 at 17:12
add comment

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...

share|improve this answer
1  
What a dumb way to do it. Oh well. –  Nathan Osman May 21 '10 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 '10 at 17:23
add comment

You must log in to answer this question.

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