1

How can I make about 10k requests on

https://api.stackexchange.com/2.2/users/+J+/questions?order=desc&sort=activity&site=stackoverflow

using python program in a day. Where J is variable and changing over a loop.

I am trying to get text data from above link by iterating over J but only 300 requests are entertained a day. I want to know with an example how can I get about 10k requests a day.

1

1 Answer 1

1

You are subject to throttling.

You can get more calls by first registering your application. After that you get access to a detail page which includes a value for key. The description for that field is:

Pass this as key when making requests against the Stack Exchange API to receive a higher request quota.

This is not considered a secret, and may be safely embed in client side code or distributed binaries.

Once you have your key, the url to use becomes:

/users/+J+/questions?order=desc&sort=activity&site=stackoverflow&key=*somekey*

I have an example here where I use a key query parameter in a similar way.

Keep in mind to still check for the existence of a value in the backoff field in the wrapper response. It indicates the number of seconds to wait before you are allowed to make the next call.

2
  • If this is his answer, then this question is a duplicate of this and others. It's a poor question, but he seems to want a working example in Python. Nov 20, 2015 at 14:51
  • @BrockAdams not completely. Getting an access token is one way to get a higher quota. Using a key is a different one. That distinction is not explained in either the doc or the answer you linked to but does work as well. Maybe I found a usage scenario of key that wasn't supposed to work without an access_token. In that case I've found a bug.
    – rene
    Nov 20, 2015 at 16:00

You must log in to answer this question.

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