This is the documentation for the v2.3 Stack Exchange API (with bothauthentication andwrite support). If you have additional questions, or believe you have encountered a bug, don't hesitate to post a question onStack Apps.
If your application is in a runnable state (even a beta one), Stack Apps is also the place tolist it.
Applications should be registered onStack Apps to get a request key. Request keys grant more requests per day, and are necessary for using access_tokens created viaauthentication.
All API responses areJSON, we do supportJSONP with thecallback query parameter. Every response in the API is returned in a common"wrapper" object, for easier and more consistent parsing.
Additionally, all API responses are compressed. TheContent-Encoding header is always set, but some proxies will strip this out. The proper way to decode API responses can be foundhere.
API usage is subject to anumber of throttles. In general, applications should strive to make as few requests as possible to satisfy their function.
API responses are heavily cached. Polling for changes should be done sparingly in any case, and polling at a rate faster than once a minute (for semantically identical requests) is considered abusive.
Developers can trim API responses down to just the fields they are interested in usingcustom filters. Many types have fields that are not normally returned (question bodies, for example) that can likewise be requested via a custom filter.
There are a few methods which require that the application be acting on behalf of a user in order to be invoked. For authentication purposes, the Stack Exchange APIimplements OAuth 2.0 (templated on Facebook's implementation in pursuit of developer familiarity).
A number of methods in the Stack Exchange accept dates as parameters and return dates as properties, the format of these dates isconsistent and documented. The cliff-notes version is, all dates in the Stack Exchange API are inunix epoch time.
Unless otherwise noted, the maximum size of any page is100, any{ids} parameter likewise is capped at100 elements, all indexes start at 1.
The maximum page number that will be returned for anonymous API access (no access token or app key) is 25
If a parameter name is plural it acceptsvectorized requests, otherwise a single value may be passed. Compareusers/{id}/inbox and/users/{ids}.
It is possible to composereasonably complex queries against the live Stack Exchange sites using themin,max,fromdate,todate, andsort parameters. Most, but not all, methods accept some or all of these parameters, the documentation for individual methods will highlight which do. Most methods also have a common set ofpaging parameters.
Some methods require access_tokens with particular scopes, such as private_info (/users/{id}/reputation-history/full for example) or write_access (/questions/add). Certain fields require access_tokens with the private_info scope, such as answer.upvoted; the documentation for each time makes note of these fields.
Each of these methods operates on a single site at a time, identified by thesite parameter. This parameter can be the full domain name (ie. "stackoverflow.com"), or a short form identified byapi_site_parameter on thesite object.
All user methods that take an{ids} parameter have a/me equivalent method that takes anaccess_token instead. These methods are provided for developer convenience, with the exception of plain/me, which is actually necessary for discovering which userauthenticated to an application.
These methods return data across the entire Stack Exchange network of sites. Accordingly, you do not pass a site parameter to them.
access_tokens when it is done with them.access_tokens it has, useful for debugging.aboutblogterms of usecontact usfeedback always welcome
site design / logo © 2025 Stack Exchange, Inc; user contributions licensed underCC BY-SA