11

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?

1
  • 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? Commented Feb 2, 2012 at 14:05

2 Answers 2

17

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

2
  • 1
    and what if you want more than 10000?
    – PirateApp
    Commented Dec 14, 2016 at 2:45
  • 1
    NOTE: The backoff field indicates you need to wait that many seconds prior to making any request with the same method. It is not that you need to wait only if you are making an identical request. Ping me if you update this answer to correct that. I will then remove this comment.
    – Makyen
    Commented Apr 6, 2017 at 17:08
7

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
0

You must log in to answer this question.

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