openapi: 3.0.3 info: title: MediaWiki Action articles Meta API description: 'The MediaWiki Action API is the original programmatic interface to MediaWiki, exposed under /w/api.php on every MediaWiki installation. All operations dispatch via the ?action= query parameter. The API supports JSON, XML, and PHP serialization; JSON is the recommended format. Wikimedia projects strongly recommend serial (not parallel) calls, the use of maxlag for non-interactive jobs, and a contactable User-Agent header. The Action API remains the primary write interface (edit, upload, login, patrol) even where the Core REST API is also available.' 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: Meta description: Metadata operations (action=opensearch, action=feedrecentchanges) paths: /api.php: get: operationId: callActionApiGet summary: MediaWiki Action Dispatch an Action API Call (GET) description: Generic dispatch endpoint for read operations. Use ?action=query for data retrieval, ?action=parse to parse wikitext, ?action=opensearch for auto-complete. Always include format=json. Combine multiple titles with the pipe character (titles=A|B|C). Use the maxlag parameter for non-interactive jobs. tags: - Meta parameters: - name: action in: query required: true schema: type: string enum: - query - parse - opensearch - feedrecentchanges - feedcontributions - feedwatchlist - sitematrix - compare - expandtemplates - help - paraminfo - rsd example: query description: API action to dispatch - name: format in: query required: true schema: type: string enum: - json - jsonfm - xml - xmlfm - php - rawfm - none default: json description: Response format. Always use json. - name: titles in: query schema: type: string description: Pipe-separated list of titles example: Earth|Mars|Venus - name: pageids in: query schema: type: string description: Pipe-separated list of page IDs - name: prop in: query schema: type: string description: Properties to fetch (info|revisions|links|categories|images|extracts|...) example: info|revisions - name: list in: query schema: type: string description: List generators (allpages|search|recentchanges|categorymembers|...) - name: meta in: query schema: type: string description: Meta queries (siteinfo|userinfo|tokens|...) example: tokens - name: maxlag in: query schema: type: integer description: Maximum replication lag in seconds before the request is rejected. Required for bots. example: 5 - name: smaxage in: query schema: type: integer description: Shared-cache max-age in seconds - name: maxage in: query schema: type: integer description: Cache max-age in seconds responses: '200': description: Action result content: application/json: schema: $ref: '#/components/schemas/ActionResult' '429': description: Rate limited - retry with exponential backoff 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 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