Wikimedie REST API
Wikimedia REST API nabízí přístup k obsahu a metadatům Wikimedie ve strojově čitelných formátech. Focused on high-volume use cases, it tightly integrates with Wikimedia's globally distributed caching infrastructure. As a result, API users benefit from reduced latencies and support for high request volumes.
The REST API along with its documentation is available for all major Wikimedia projects at the location /api/rest_v1/. For example, for the English Wikipedia it is available at https://en.wikipedia.org/api/rest_v1/.
While the functionality offered by most projects closely matches that on English Wikipedia, there are some noteworthy exceptions:
- wikimedia.org offers cross-project information like page view metrics.
- en.wiktionary.org offers an experimental definition end point, exposing Wiktionary information as structured data. Support for other languages is under discussion.
Versioning
The REST API follows this API versioning policy.
Terms and conditions
- By using the REST API, you agree to Wikimedia's general Terms of Use and Privacy Policy.
- To avoid impacting other API users, limit your clients to no more than 200 requests/sec to this API overall. Many entry points additionally specify and enforce more restrictive rate limits.
- We ask you to set a unique
User-Agent
orApi-User-Agent
header that allows us to contact you quickly. Email addresses or URLs of contact pages work well.
Other APIs
For the REST API included with MediaWiki 1.35 and later, see the MediaWiki Core REST API.
API | Dostupnost | Základ URL | Příklad |
---|---|---|---|
Akce API MediaWiki | je součástí MediaWiki
aktivováno na projektech Wikimedie |
/api.php | https://cs.wikipedia.org/w/api.php?action=query&prop=info&titles=Země |
REST API MediaWiki | je součástí MediaWiki 1.35+
aktivováno na projektech Wikimedie |
/rest.php | https://cs.wikipedia.org/w/rest.php/v1/page/Země |
Wikimedie REST API | není součástí MediaWiki
k dispozici pouze pro projekty Wikimedie |
/api/rest | https://cs.wikipedia.org/api/rest_v1/page/title/Země |
Rozhraní API v komerčním měřítku pro projekty Wikimedie najdete na stránkách Wikimedia Enterprise |
See also
- RESTBase, which is being deprecated, the technology behind the REST API
- Blog post announcing the 1.0 release. Describes several important production use cases, discusses how the REST API fits into Wikimedia's larger technical strategy, and provides pointers to some implementation details.
- The API is implemented using Node.js. This blog post describes our experience upgrading the REST API and other services to Node 6.
- MediaWiki Platform Team, product owners for the REST API.
- Core Platform Team/Initiatives/API Gateway (2020)