API:REST API
The MediaWiki REST API provides access to wiki content and functionality through a RESTful, HTTP interface. It supports operations like searching, getting and transforming wiki pages, and accessing page history.
Learn about the API and get started making basic API calls.
Interact with the API and find documentation for each endpoint.
- Special:RestSandbox on any Wikimedia wiki (English Wikipedia example)
- API reference
- Status codes and error messages
Explore working examples of how you can use the API.
Find instructions for tasks related to this API.
API features
The MediaWiki REST API offers the following key features:
- Build apps and scripts that access content from Wikipedia, or any other Wikimedia project.
- Get data in JSON or HTML format.
- Define extension-specific API endpoints within MediaWiki extensions.
Compared to the MediaWiki Action API, the REST API offers:
- A smaller, more streamlined set of operations and resources.
- Better performance, and cached responses to reduce system load on Wikimedia projects.
- Simple, consistent URL structure for endpoints.
To learn more about how the MediaWiki REST API compares to other available APIs, see API.
Get help
- 由MediaWiki Interfaces Team维护。
- 即时聊天(IRC):#mediawiki-core 在线
- 问题追踪器:Phabricator MediaWiki-REST-API(报告问题)
Contribute
这些文档是基于MediaWiki核心源代码手动编写的。 欢迎指正和补充! To share a tutorial or app that uses the MediaWiki REST API, add a comment on the Talk page.
Client libraries
APIs for Wikimedia wikis
For information about other APIs available for Wikimedia wikis, see Wikimedia APIs. See recent changes to all Wikimedia APIs at Wikimedia APIs/Changelog.