Wikipedia / MediaWiki Edit API
Create/modify page content (action=edit)
Create/modify page content (action=edit)
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/wikipedia-edit-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: MediaWiki Action Edit API
description: The MediaWiki Action API is the original programmatic interface to MediaWiki, exposed under /w/api.php on every MediaWiki installation.
version: '1.45'
x-generated-from: documentation
x-source-url: https://www.mediawiki.org/wiki/API:Main_page
x-last-validated: '2026-05-29'
contact:
name: Wikimedia Foundation
url: https://www.mediawiki.org/wiki/API:Etiquette
license:
name: CC BY-SA 4.0
url: https://creativecommons.org/licenses/by-sa/4.0/
servers:
- url: https://en.wikipedia.org/w
description: English Wikipedia
- url: https://{lang}.wikipedia.org/w
description: Per-language Wikipedia
variables:
lang:
default: en
description: Language code
- url: https://commons.wikimedia.org/w
description: Wikimedia Commons
- url: https://www.wikidata.org/w
description: Wikidata
- url: https://www.mediawiki.org/w
description: MediaWiki.org
tags:
- name: Edit
description: Create/modify page content (action=edit)
paths:
/api.php:
post:
operationId: callActionApiPost
summary: MediaWiki Action Dispatch an Action API Call (POST)
description: Generic dispatch endpoint for write operations. Use ?action=edit to create/modify pages, ?action=upload for files, ?action=login or ?action=clientlogin to authenticate. All write operations require a CSRF token from action=query&meta=tokens. POSTs are not cached - use them for writes only.
tags:
- Edit
parameters:
- name: action
in: query
required: true
schema:
type: string
enum:
- edit
- upload
- login
- clientlogin
- logout
- patrol
- rollback
- move
- delete
- protect
- block
- unblock
- thank
- createaccount
- emailuser
- managetags
- tag
- options
example: edit
- name: format
in: query
required: true
schema:
type: string
enum:
- json
- jsonfm
- xml
- xmlfm
default: json
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ActionApiWriteRequest'
multipart/form-data:
schema:
$ref: '#/components/schemas/ActionApiWriteRequest'
description: Use multipart for action=upload
responses:
'200':
description: Action result
content:
application/json:
schema:
$ref: '#/components/schemas/ActionResult'
'401':
description: Authentication required or invalid token
'403':
description: Permission denied
'429':
description: Rate limited
security:
- BearerAuth: []
- CookieAuth: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
schemas:
ActionApiError:
type: object
properties:
code:
type: string
example: ratelimited
info:
type: string
description: Human-readable error description
'*':
type: string
description: Legacy error text
docref:
type: string
description: Pointer to docs for this error class
ActionApiWriteRequest:
type: object
required:
- token
properties:
title:
type: string
description: Page title for edit/move/delete/protect
pageid:
type: integer
description: Alternative to title
text:
type: string
description: Full wikitext content for action=edit
appendtext:
type: string
prependtext:
type: string
summary:
type: string
description: Edit summary
token:
type: string
description: CSRF token from query&meta=tokens
basetimestamp:
type: string
format: date-time
description: Timestamp of base revision for edit conflict detection
starttimestamp:
type: string
format: date-time
bot:
type: boolean
description: Mark as bot edit (requires bot right)
minor:
type: boolean
recreate:
type: boolean
createonly:
type: boolean
nocreate:
type: boolean
lgname:
type: string
description: Login username (action=login)
lgpassword:
type: string
description: Login password (action=login)
lgtoken:
type: string
description: Login token
filename:
type: string
description: Destination filename for action=upload
file:
type: string
format: binary
description: File contents for action=upload (multipart)
url:
type: string
format: uri
description: Source URL for action=upload (sideload)
comment:
type: string
description: Upload comment
tags:
type: string
description: Pipe-separated change tags
ActionResult:
type: object
description: Generic envelope for Action API responses. Concrete payload shape depends on action and prop/list/meta selection.
properties:
batchcomplete:
type: string
description: Present when the batch completed in one round-trip
continue:
type: object
description: Continuation tokens for paginated responses
query:
type: object
description: Result body for action=query
parse:
type: object
description: Result body for action=parse
edit:
type: object
description: Result body for action=edit
login:
type: object
description: Result body for action=login
error:
$ref: '#/components/schemas/ActionApiError'
warnings:
type: object
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: OAuth 2.0 bearer token from meta.wikimedia.org
CookieAuth:
type: apiKey
in: cookie
name: '{wiki}wikiUserID'
description: Session cookie obtained via action=login or action=clientlogin