1

Currently I'm working a project which needs to retrieve Stack Overflow questions to analyze them. First I started to retrieve data without creating an authentication token.

response = requests.get("https://api.stackexchange.com/2.2/questions?order=desc&sort=activity&site=stackoverflow") 

But I found out that I can access to API with an authorization token. So I created an account. But I cannot understand w how to retrieve the data with authorization token. I read authentication details but I couldn't figure that out. Can any one explain me the process to get the data with using authorization token?

double-beep
  • 5,031
  • 17
  • 33
  • 41
SjAnupa
  • 102
  • 10

1 Answers1

2

You probably need an API key. This increases the number of requests you can do per day (quota) from 300 to 10000 and if often helpful to scripts/apps that use the API a lot.

To get a key, you should register your app on StackApps. See also: How to list your application/library/wrapper/script here.


The access token (you probably confused the key with) is used to write, something you don't seem to need. See more on how to obtain it and a live example.

double-beep
  • 5,031
  • 17
  • 33
  • 41