32

There is no tutorial for the API, nor is there likely to be one -- at least officially. There is a "Hello World" introduction. To use the current API (version 2.2), you really only need to know/do: How to make an HTTP GET request, in the language of your choice. There are also various user-supplied libraries in .net, PHP, Python, etc. to help with this. ...


8

Python: Below is python code to get minimal info results. See bottom on how to run. import requests BASEURL = "https://api.stackexchange.com/2.2/info" params = { "site" : "stackoverflow" } r = requests.get(BASEURL, params=params) print(r.json()) Expected output is like: {u'has_more': False, u'items': [{u'...


3

JavaScript: Here is a bare-bones javascript, and you can run it from the console of decent modern browsers. It returns the 5 most recently active economics questions, tagged inflation: fetch ( 'https://api.stackexchange.com/2.2/questions?pagesize=5&tagged=inflation&site=economics' ) .then (function (response) { if (response.ok) { return ...


2

I am trying to get the amount of reputation that a user has how to handle the response (or get one) from a script You can do this with a Bash command that you can then embed in a script. Here's how: 1. Look up your user ID Assuming you want to get the reputation on Stack Overflow, go to your account and look up your user ID in the URL: https://stackoverflow....


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