Skip to main content
4 of 22
discusson tag doesn't fit...but I fixed a broken link and it wont let me submit a question missing a special tag
jjnguy
  • 3k
  • 15
  • 14

Getting Started with the API

Let's say we wanted to call the stats method. We can do that by retrieving the URL in the client of our choice:

http://api.stackoverflow.com/0.8/stats

  • api.stackoverflow.com - the site to query
  • 0.8 - the api version
  • stats - the method

All of our responses are in JSON format by default.

{ "statistics": [ { "total_questions": 680175, "total_unanswered": 104562, "total_answers": 1910940, "total_comments": 2678849, "total_votes": 6720440, "total_badges": 688675, "total_users": 242593, "questions_per_minute": 1.75, "answers_per_minute": 3.76, "badges_per_minute": 1.55, "api_version": { "version": "0.8", "revision": "1.0.1234.5678" } } ] } 

(for a full list of possible API methods, refer to the documentation.)

##Do I need an API key?

A single IP 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.

API daily limits:

  • Key: 10,000
  • No Key: 300

The No Key limit is meant to facilitate experimentation, not for deployed apps.

Requests with invalid or revoked keys are not completed, they are not stepped down to the No Key limit.

##Register for an API Key


##How do I announce my applicaton, library, or wrapper?

Creating a question here with the [app] or [library] tag. Refer to How to list your application on Stack Apps for suggested formatting.

Kevin Montrose
  • 18.6k
  • 6
  • 36
  • 62