Tag Info

Hot answers tagged

13

I imagine a /status method would not be too hard, and is crucial in both testing and deploying applications. Imagine an application that updates a database with new questions. It can query the /status method to correctly time it's calls so that it can make it through the day. I would also consider whether this call should count towards the limit. Twitter, ...


9

For the API, the day ends 24 hours after your first API call. 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.


8

I have confirmed that a constant interval of 170 ms will run without error. // 30 per 5 sec = 6 per sec = interval 166.6 ms Soapi.RequestQueue.setInterval(170); Soapi.RouteFactory("api.meta.stackoverflow.com", apiKey) .Tags({ pagesize: 1 }) .getPagedResponse(); will run through all the tags on meta 1 at a time without issue. This is very ...


7

Now, I can confirm that changing my IP Address reset rate-limit to 10000 back. So, 10k limit is per IP Address, not globally.


7

Its 10k now, the way it was intended. Anyone with an active lease will stick to 100k until the day ends, or an update is deployed.


5

An IP has a request quota, an application key is used to determine that quota. In answer to your question, 10k.


5

Every response from the API can be cached for up to a minute, so making the same request multiple times in that time-frame typically won't return different results. We make note of this in the throttle documentation: While not strictly a throttle, the Stack Exchange employs heavy caching and as such no application should make semantically identical ...


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

You can get data close-enough to "real time" for most practical purposes. See the StackHose app, for example. Read the page about the API's Throttles and Quotas. From that page we can deduce: The maximum, burst, request rate is 30 requests per second, and this risks getting your app shut down. Your app will never be allowed more than 10,000 requests per ...


4

Note: I'm the author of stack.PHP. You're likely running into rate limit issues. The API only allows you to make som many requests per second. Quoting from the question I linked to: The API will cut you off if you make more than 30 requests over 5 seconds to any single endpoint. Based on past experience, what you need to do is make sure that there is ...


3

Each application/user pair (as signified by an access_token) has a per-day quota of 10k requests (by default). Any number of these can be in flight at once, and they're reported as part of quota_remaining and quota_max. On top of that, is a per-user quota of 50,000. This quota isn't reported anywhere (for privacy reasons, we'd rather not leak a user's ...


3

It sounds like you've either got a bug which is in fact making more requests than you think it is, or you're on a network where there's some other source of high-frequency requests. You're not supposed to have to deal with this situation in general, because this isn't an API error - it's an error from the load balancer because your IP is generating incoming ...


3

The comments are more or less correct; caching applies to the /events endpoint just like every other method. This is by design for now. We have looked at differing caching policies for /events and /inbox/* routes, as the minute lag on those methods is a bit heavy handed; though we still need to protect ourselves from abusive requests.


2

The documentation for the response wrapper defines the backoff field as an integer, so you can expect it to come back in the first form. I don't believe there's any way to graciously test a backoff response short of actually angering the API (which I'd recommend against).


2

You might consider looking at StacMan for inspiration, a C# client that deals with some of these questions. Off hand it does push everything through a "Manager" (called a Client in that code) and automatically enforces backoff and simultaneous request throttling. How many requests are OK to send simultaneously? While there is a strict cutoff... ...


2

backoff isn't used to indicate when you're breaking api limits (we start returning errors when you break contracts). The typical cause of a backoff is a request that takes unusual resources to run. These are normally either complicated queries or high page values; however, backoff is applied dynamically so the exact definition of "complicated" and "high" ...


2

If I'm not mistaken, you will only be allowed 10,000 requests from an IP address no matter how many keys you use.


2

I would imagine it's the start of the day, GMT like everything else on the sites, can't confirm this though. For me, that would be 8PM EST (-4 hours) at the moment. Suggestion here: If this isn't the case, I believe it should be. The most likely alternative is that I'm wrong and it's a 24 hour cache expiration on an item that gets cached your first ...


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


2

I completely understand and share your concern. (I have no intention of switching to C#, though.) My concern is for my own apps which share a server. StackMobile, StackList, StackCenter, StackImage, Stack2XML, and StackMail all share a server. None of them are getting enough traffic for this to be a concern, though.


2

From my personal observation and from the occasional SE dev statement, many items update every 60 seconds (cached at server). Also the page AJAX updates every 60 seconds. (using JS like: setInterval(updateRelativeDates, 60000);) So, per sampling theory, sampling more than once every 30 seconds gives diminishing returns. Personally, I would just reload ...


2

When this class of error is encountered, the number of seconds until the quota rolls over is indicated as part of error_message now. For example: { "error_message": "too many requests from this app/user pair, more requests available in 76400 seconds" } This is meant for debugging and development purposes only, applications should take care to not ...


2

Would running two servers with seperate IP addresses be allowed to exceed this limit providing neither exceeds 30 req. / 5 sec. on its own?


2

The page where you can find the API key for your registered application says that the key doesn't need to be kept secret: [The key] is not considered a secret, and may be safely embed [sic] in client side code or distributed binaries. Abuse is typically an issue for the end-user, so you shouldn't be concerned about it beyond recognizing backoff ...


1

Provided you don't do anything "evil" (which basically means leaking user messages to people/apps they haven't authorized), we have no objections to a generic push service. Yes, the per-minute throttle is for the same request; changing the parameters counts as separate requests. Do note that the 30 requests/second cutoff is by IP (it's a DOS prevention ...


1

I believe this has been fixed. Let me know if you run into it again.


1

You can use Charles to simulate any response, It has a free 30 day trial, for Windows, Mac and Linux. Just set a breakpoint for http://api.stackexchange/* which breaks on Response (obviously you can't use it for https, so that means it can't be used for the routes which require authentication) You can then edit the response, (as text, not in a ...


1

You shouldn't be making more than 4 requests in this case. fetch a page of /users/{ids}/timeline group the ids by type (question, answers, comments) since the max pagesize fo users/{ids}/timeline is 100, we know there are < 100 of each id* make 1 query each with the appropriate ids to /questions/{ids}, /answers/{ids}, and /comments/{ids} This is the ...


1

The official rate limits are posted here. One thing you mentioned in your post does strike me as a little odd: "I've been doing a first call with pagesize=0 to determine how many pages there are then running a loop querying each page." Why the need to fetch an empty page to determine the total? Why not fetch the first page (which contains the total) ...


1

I am not sure if it has fallen off the radar or if it is an honest oversight but we can't seem to get an explicit description of the throttling guidelines. Core issues like this are critical, especially for library developers, and care should be taken to be as explicit as necessary to clearly define the guidelines. Case in point: My lazy loading library ...



Only top voted, non community-wiki answers of a minimum length are eligible