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.

Our development community wants to use Stackoverflow: http://www.openntf.org/blogs/openntf.nsf/d6plinks/NHEF-8R4ABK

We used the Stackoverflow REST APIs to display the most recent requests on http://xpages.info/so

This worked until two hours ago which is when I announced this which caused several people to visit that page.

Now I get a HTTP Status 400, Bad Request. HTTP error response code received in response to request to url: https:// api.stackexchange.com/2.0/questions?pagesize=50&site=stackoverflow&tagged=xpages&order=desc&sort=creation&page=1 which used to work and is also what the doc says.

So I'm wondering whether there is a limit of APIs requests or something?

share|improve this question
    
I've added caching so that only three requests are done per minute for all users (at max). But do you have to enable my server's ip address first again? –  Niklas Heidloff Feb 2 '12 at 14:05
add comment

2 Answers

up vote 3 down vote accepted

This page sums up request limits pretty well.

Basically:

  • Don't make more than 30 requests per second
  • Without a key you can make 300 requests per day, with a key you can make 10,000 requests per day
    • With an access token, the 10,000 request limit is just for your app for that user. *
    • Without an access token, the 10,000 request limit is shared between apps on the IP Address.
  • You must obey the backoff field which is in the wrapper object, if the field is there then you must wait the number of seconds it contains before you make an identical request.
  • Making an indentical request more than once a minute is unlikely to return new results

( So if a user/server has mutliple apps using an access token (authenticated), each app can make 10,000 requests per day. Each user has up to 5 blocks of 10,000 requests, but a user can have more than 5 authenticate apps running at once)*

It looks as though you arent passing a key, so I would imagine that your problem is that you've gone over the 300 requests limit. To get a key just register your application here

share|improve this answer
    
Thanks. Worked. –  Niklas Heidloff Feb 2 '12 at 17:17
add comment

Without a registered API key, your server's IP address will be restricted to 300 calls per day. With an API key, that limit is increased to 10000 per day. What most likely happened was that you exceeded the (free) 300 quota.

After you register for an 2.0 API key, change your request URL as follows:

https://api.stackexchange.com/2.0/questions?key=YOUR_API_KEY&pagesize=50&site=stackoverflow&tagged=xpages&order=desc&sort=creation&page=1
share|improve this answer
    
Thanks. Worked. –  Niklas Heidloff Feb 2 '12 at 17:18
add comment

You must log in to answer this question.

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