![]() | This page is part of the MediaWiki Action API documentation. |
This page provides an overview of the MediaWiki Action API, represented by the api.php
endpoint.
This page is intended for technical contributors and software developers who wish to understand and use the MediaWiki Action API.
Quick Start
Get the contents of an article on English Wikipedia in HTML:
Endpoint
All Wikimedia wikis have endpoints that follow this pattern: https://www.example.org/w/api.php
API Endpoint | Wiki |
---|---|
https://www.mediawiki.org/w/api.php |
MediaWiki API |
https://meta.wikimedia.org/w/api.php |
Meta-Wiki API |
https://en.wikipedia.org/w/api.php |
English Wikipedia API |
https://nl.wikipedia.org/w/api.php |
Dutch Wikipedia API |
https://commons.wikimedia.org/w/api.php |
Wikimedia Commons API |
https://test.wikipedia.org/w/api.php |
Test Wiki API |
To see the endpoint URL on a particular wiki, see section "Entry point URLs" on the Special:Version page.
Introduction
The MediaWiki Action API is a web service that allows access to some wiki features like authentication, page operations, and search. It can provide meta information about the wiki and the logged-in user.
Uses for the MediaWiki Action API
- Monitor a MediaWiki installation
- Create a bot to maintain a MediaWiki installation
- Log in to a wiki, access data, and post changes by making HTTP requests to the web service
Getting started with MediaWiki Action API
Before you start using the MediaWiki Action API, you should review the following pages:
- API etiquette and usage guidelines
- Frequently asked questions
- Input and output formats
- Errors and warnings
- Any policies that apply to the wiki you want to access, such as Wikimedia Foundation wikis' terms of use and trademark policy. These terms apply to you when you access or edit using the API, just as they do when you use your web browser.
API documentation
![]() | The following documentation is the output of Special: |
Other APIs
If you do not find what you are looking for in this API documentation, there are many other APIs related to Wikimedia projects. For the REST API included with MediaWiki 1.35 and later, see API:REST API
.API | Availability | URL base | Example |
---|---|---|---|
![]() |
Included with MediaWiki
Enabled on Wikimedia projects |
/api.php | https://en.wikipedia.org/w/api.php?action=query&prop=info&titles=Earth |
![]() |
Included with MediaWiki 1.35+
Enabled on Wikimedia projects |
/rest.php | https://en.wikipedia.org/w/rest.php/v1/page/Earth |
![]() |
Not included with MediaWiki
Available for Wikimedia projects only |
/api/rest | https://en.wikipedia.org/api/rest_v1/page/title/Earth |
![]() |
Code stewardship
![]() | This page or project is maintained by Core Platform Team.
Get help:
|