Skip to main content
Commonmark migration
Source Link

The Stack Exchange API is based on HTTP and URLs, just like the web page you're browsing now. Except instead of HTML, the responses are all in JSON.

Let's say we wanted to call the /info method:

https://api.stackexchange.com/2.2/info?site=stackoverflow&key=app key

  • 2.2 - the current api version
  • info - the method
  • site=site name - the site to query
  • key=app key - a parameter to pass to the method

The response:

{
    "items": [
        {
            "api_revision": "2014.1.3.9409",
            "total_questions": 6381965,
            "total_unanswered": 1490184,
            "total_accepted": 3767695,
            "total_answers": 11393820,
            "questions_per_minute": 2.24,
            "answers_per_minute": 3.99,
            "total_comments": 29151387,
            "total_votes": 41269191,
            "total_badges": 8166497,
            "badges_per_minute": 2.86,
            "total_users": 2684447,
            "new_active_users": 23
        }
    ],
    "quota_remaining": 299,
    "quota_max": 300,
    "has_more": false
}

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

##Do I need an API key?

Do I need an API key?

A single IP address can only make a limited number of requests per day to the API. This limit is determined at by the presence of an API key. Should an IP address be using more than one key, the highest request limit will be used.

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 stepped down to the No Key limit; they just aren't completed.

For further discussion of keys, refer to How API Keys Work.


##Register for an API Key

Register for an API Key


##How do I announce my application, library, wrapper, or userscript?

How do I announce my application, library, wrapper, or userscript?

Create a question here and tag it , , or .

Please refer to How to list your application/library/wrapper/script here for suggested formatting.

The Stack Exchange API is based on HTTP and URLs, just like the web page you're browsing now. Except instead of HTML, the responses are all in JSON.

Let's say we wanted to call the /info method:

https://api.stackexchange.com/2.2/info?site=stackoverflow&key=app key

  • 2.2 - the current api version
  • info - the method
  • site=site name - the site to query
  • key=app key - a parameter to pass to the method

The response:

{
    "items": [
        {
            "api_revision": "2014.1.3.9409",
            "total_questions": 6381965,
            "total_unanswered": 1490184,
            "total_accepted": 3767695,
            "total_answers": 11393820,
            "questions_per_minute": 2.24,
            "answers_per_minute": 3.99,
            "total_comments": 29151387,
            "total_votes": 41269191,
            "total_badges": 8166497,
            "badges_per_minute": 2.86,
            "total_users": 2684447,
            "new_active_users": 23
        }
    ],
    "quota_remaining": 299,
    "quota_max": 300,
    "has_more": false
}

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

##Do I need an API key?

A single IP address can only make a limited number of requests per day to the API. This limit is determined at by the presence of an API key. Should an IP address be using more than one key, the highest request limit will be used.

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 stepped down to the No Key limit; they just aren't completed.

For further discussion of keys, refer to How API Keys Work.


##Register for an API Key


##How do I announce my application, library, wrapper, or userscript?

Create a question here and tag it , , or .

Please refer to How to list your application/library/wrapper/script here for suggested formatting.

The Stack Exchange API is based on HTTP and URLs, just like the web page you're browsing now. Except instead of HTML, the responses are all in JSON.

Let's say we wanted to call the /info method:

https://api.stackexchange.com/2.2/info?site=stackoverflow&key=app key

  • 2.2 - the current api version
  • info - the method
  • site=site name - the site to query
  • key=app key - a parameter to pass to the method

The response:

{
    "items": [
        {
            "api_revision": "2014.1.3.9409",
            "total_questions": 6381965,
            "total_unanswered": 1490184,
            "total_accepted": 3767695,
            "total_answers": 11393820,
            "questions_per_minute": 2.24,
            "answers_per_minute": 3.99,
            "total_comments": 29151387,
            "total_votes": 41269191,
            "total_badges": 8166497,
            "badges_per_minute": 2.86,
            "total_users": 2684447,
            "new_active_users": 23
        }
    ],
    "quota_remaining": 299,
    "quota_max": 300,
    "has_more": false
}

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

Do I need an API key?

A single IP address can only make a limited number of requests per day to the API. This limit is determined at by the presence of an API key. Should an IP address be using more than one key, the highest request limit will be used.

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 stepped down to the No Key limit; they just aren't completed.

For further discussion of keys, refer to How API Keys Work.


Register for an API Key


How do I announce my application, library, wrapper, or userscript?

Create a question here and tag it , , or .

Please refer to How to list your application/library/wrapper/script here for suggested formatting.

replaced http://stackapps.com/ with https://stackapps.com/
Source Link

The Stack Exchange API is based on HTTP and URLs, just like the web page you're browsing now. Except instead of HTML, the responses are all in JSON.

Let's say we wanted to call the /info method:

https://api.stackexchange.com/2.2/info?site=stackoverflow&key=app key

  • 2.2 - the current api version
  • info - the method
  • site=site name - the site to query
  • key=app key - a parameter to pass to the method

The response:

{
    "items": [
        {
            "api_revision": "2014.1.3.9409",
            "total_questions": 6381965,
            "total_unanswered": 1490184,
            "total_accepted": 3767695,
            "total_answers": 11393820,
            "questions_per_minute": 2.24,
            "answers_per_minute": 3.99,
            "total_comments": 29151387,
            "total_votes": 41269191,
            "total_badges": 8166497,
            "badges_per_minute": 2.86,
            "total_users": 2684447,
            "new_active_users": 23
        }
    ],
    "quota_remaining": 299,
    "quota_max": 300,
    "has_more": false
}

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

##Do I need an API key?

A single IP address can only make a limited number of requests per day to the API. This limit is determined at by the presence of an API key. Should an IP address be using more than one key, the highest request limit will be used.

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 stepped down to the No Key limit; they just aren't completed.

For further discussion of keys, refer to How API Keys WorkHow API Keys Work.


##Register for an API KeyRegister for an API Key


##How do I announce my application, library, wrapper, or userscript?

Create a question here and tag it , , or .

Please refer to How to list your application/library/wrapper/script hereHow to list your application/library/wrapper/script here for suggested formatting.

The Stack Exchange API is based on HTTP and URLs, just like the web page you're browsing now. Except instead of HTML, the responses are all in JSON.

Let's say we wanted to call the /info method:

https://api.stackexchange.com/2.2/info?site=stackoverflow&key=app key

  • 2.2 - the current api version
  • info - the method
  • site=site name - the site to query
  • key=app key - a parameter to pass to the method

The response:

{
    "items": [
        {
            "api_revision": "2014.1.3.9409",
            "total_questions": 6381965,
            "total_unanswered": 1490184,
            "total_accepted": 3767695,
            "total_answers": 11393820,
            "questions_per_minute": 2.24,
            "answers_per_minute": 3.99,
            "total_comments": 29151387,
            "total_votes": 41269191,
            "total_badges": 8166497,
            "badges_per_minute": 2.86,
            "total_users": 2684447,
            "new_active_users": 23
        }
    ],
    "quota_remaining": 299,
    "quota_max": 300,
    "has_more": false
}

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

##Do I need an API key?

A single IP address can only make a limited number of requests per day to the API. This limit is determined at by the presence of an API key. Should an IP address be using more than one key, the highest request limit will be used.

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 stepped down to the No Key limit; they just aren't completed.

For further discussion of keys, refer to How API Keys Work.


##Register for an API Key


##How do I announce my application, library, wrapper, or userscript?

Create a question here and tag it , , or .

Please refer to How to list your application/library/wrapper/script here for suggested formatting.

The Stack Exchange API is based on HTTP and URLs, just like the web page you're browsing now. Except instead of HTML, the responses are all in JSON.

Let's say we wanted to call the /info method:

https://api.stackexchange.com/2.2/info?site=stackoverflow&key=app key

  • 2.2 - the current api version
  • info - the method
  • site=site name - the site to query
  • key=app key - a parameter to pass to the method

The response:

{
    "items": [
        {
            "api_revision": "2014.1.3.9409",
            "total_questions": 6381965,
            "total_unanswered": 1490184,
            "total_accepted": 3767695,
            "total_answers": 11393820,
            "questions_per_minute": 2.24,
            "answers_per_minute": 3.99,
            "total_comments": 29151387,
            "total_votes": 41269191,
            "total_badges": 8166497,
            "badges_per_minute": 2.86,
            "total_users": 2684447,
            "new_active_users": 23
        }
    ],
    "quota_remaining": 299,
    "quota_max": 300,
    "has_more": false
}

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

##Do I need an API key?

A single IP address can only make a limited number of requests per day to the API. This limit is determined at by the presence of an API key. Should an IP address be using more than one key, the highest request limit will be used.

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 stepped down to the No Key limit; they just aren't completed.

For further discussion of keys, refer to How API Keys Work.


##Register for an API Key


##How do I announce my application, library, wrapper, or userscript?

Create a question here and tag it , , or .

Please refer to How to list your application/library/wrapper/script here for suggested formatting.

fix URL to API call to actually use version number 2.2 instead of old 2.1
Source Link
AlexD
  • 101
  • 3

The Stack Exchange API is based on HTTP and URLs, just like the web page you're browsing now. Except instead of HTML, the responses are all in JSON.

Let's say we wanted to call the /info method:

https://api.stackexchange.com/2.2/info?site=stackoverflow&key=app keyhttps://api.stackexchange.com/2.2/info?site=stackoverflow&key=app key

  • 2.2 - the current api version
  • info - the method
  • site=site name - the site to query
  • key=app key - a parameter to pass to the method

The response:

{
    "items": [
        {
            "api_revision": "2014.1.3.9409",
            "total_questions": 6381965,
            "total_unanswered": 1490184,
            "total_accepted": 3767695,
            "total_answers": 11393820,
            "questions_per_minute": 2.24,
            "answers_per_minute": 3.99,
            "total_comments": 29151387,
            "total_votes": 41269191,
            "total_badges": 8166497,
            "badges_per_minute": 2.86,
            "total_users": 2684447,
            "new_active_users": 23
        }
    ],
    "quota_remaining": 299,
    "quota_max": 300,
    "has_more": false
}

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

##Do I need an API key?

A single IP address can only make a limited number of requests per day to the API. This limit is determined at by the presence of an API key. Should an IP address be using more than one key, the highest request limit will be used.

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 stepped down to the No Key limit; they just aren't completed.

For further discussion of keys, refer to How API Keys Work.


##Register for an API Key


##How do I announce my application, library, wrapper, or userscript?

Create a question here and tag it , , or .

Please refer to How to list your application/library/wrapper/script here for suggested formatting.

The Stack Exchange API is based on HTTP and URLs, just like the web page you're browsing now. Except instead of HTML, the responses are all in JSON.

Let's say we wanted to call the /info method:

https://api.stackexchange.com/2.2/info?site=stackoverflow&key=app key

  • 2.2 - the current api version
  • info - the method
  • site=site name - the site to query
  • key=app key - a parameter to pass to the method

The response:

{
    "items": [
        {
            "api_revision": "2014.1.3.9409",
            "total_questions": 6381965,
            "total_unanswered": 1490184,
            "total_accepted": 3767695,
            "total_answers": 11393820,
            "questions_per_minute": 2.24,
            "answers_per_minute": 3.99,
            "total_comments": 29151387,
            "total_votes": 41269191,
            "total_badges": 8166497,
            "badges_per_minute": 2.86,
            "total_users": 2684447,
            "new_active_users": 23
        }
    ],
    "quota_remaining": 299,
    "quota_max": 300,
    "has_more": false
}

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

##Do I need an API key?

A single IP address can only make a limited number of requests per day to the API. This limit is determined at by the presence of an API key. Should an IP address be using more than one key, the highest request limit will be used.

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 stepped down to the No Key limit; they just aren't completed.

For further discussion of keys, refer to How API Keys Work.


##Register for an API Key


##How do I announce my application, library, wrapper, or userscript?

Create a question here and tag it , , or .

Please refer to How to list your application/library/wrapper/script here for suggested formatting.

The Stack Exchange API is based on HTTP and URLs, just like the web page you're browsing now. Except instead of HTML, the responses are all in JSON.

Let's say we wanted to call the /info method:

https://api.stackexchange.com/2.2/info?site=stackoverflow&key=app key

  • 2.2 - the current api version
  • info - the method
  • site=site name - the site to query
  • key=app key - a parameter to pass to the method

The response:

{
    "items": [
        {
            "api_revision": "2014.1.3.9409",
            "total_questions": 6381965,
            "total_unanswered": 1490184,
            "total_accepted": 3767695,
            "total_answers": 11393820,
            "questions_per_minute": 2.24,
            "answers_per_minute": 3.99,
            "total_comments": 29151387,
            "total_votes": 41269191,
            "total_badges": 8166497,
            "badges_per_minute": 2.86,
            "total_users": 2684447,
            "new_active_users": 23
        }
    ],
    "quota_remaining": 299,
    "quota_max": 300,
    "has_more": false
}

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

##Do I need an API key?

A single IP address can only make a limited number of requests per day to the API. This limit is determined at by the presence of an API key. Should an IP address be using more than one key, the highest request limit will be used.

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 stepped down to the No Key limit; they just aren't completed.

For further discussion of keys, refer to How API Keys Work.


##Register for an API Key


##How do I announce my application, library, wrapper, or userscript?

Create a question here and tag it , , or .

Please refer to How to list your application/library/wrapper/script here for suggested formatting.

edited body
Source Link
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62
Loading
copyedited; clarified; updated for the modern era
Source Link
Loading
Improved formatting
Source Link
Loading
deleted 775 characters in body
Source Link
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62
Loading
Corrected API version mentioned in post body.
Source Link
Nathan Osman
  • 23.3k
  • 11
  • 61
  • 107
Loading
edited with more recent information
Source Link
Loading
edited title
Link
Jeff Atwood
  • 960
  • 1
  • 12
  • 18
Loading
Corrected the API version number in the links and text body.
Source Link
coobird
  • 133
  • 6
Loading
fixed version info
Source Link
Jason
  • 3.1k
  • 19
  • 11
Loading
edited body
Source Link
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62
Loading
key behavior has changed in the face of >1 key
Source Link
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62
Loading
added parameter example
Source Link
Joel
  • 4.8k
  • 1
  • 14
  • 12
Loading
added 126 characters in body
Source Link
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62
Loading
Minor edit: grammar/spelling/case/punctuation/etc.
Source Link
Loading
added 59 characters in body
Source Link
Jeff Atwood
  • 960
  • 1
  • 12
  • 18
Loading
discusson tag doesn't fit...but I fixed a broken link and it wont let me submit a question missing a special tag
Source Link
jjnguy
  • 3k
  • 15
  • 14
Loading
added 224 characters in body
Source Link
Jeff Atwood
  • 960
  • 1
  • 12
  • 18
Loading
added 817 characters in body
Source Link
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62
Loading
Post Made Community Wiki
Source Link
Kevin Montrose
  • 18.7k
  • 6
  • 35
  • 62
Loading