openapi: 3.0.3 info: title: Wiktionary MediaWiki Core REST Definition Parse API description: The newer MediaWiki Core REST API, exposed per wiki at /w/rest.php. It offers a smaller, streamlined surface than the Action API for fetching page content, history, search, files, and revisions. On Wiktionary it serves the same content as the Action API in a more developer-friendly JSON shape. All content is CC BY-SA 4.0. version: 1.0.0 termsOfService: https://foundation.wikimedia.org/wiki/Terms_of_Use contact: name: Wikimedia Foundation url: https://www.mediawiki.org/wiki/API:REST_API license: name: CC BY-SA 4.0 url: https://creativecommons.org/licenses/by-sa/4.0/ x-generated-from: documentation x-last-validated: '2026-05-30' servers: - url: https://en.wiktionary.org/w/rest.php description: English Wiktionary Core REST endpoint security: - {} - oauth2: [] tags: - name: Parse description: action=parse — Render wikitext to HTML and parse section trees paths: /api.php#parse: get: operationId: parsePage summary: Wiktionary Parse Page description: Parse the wikitext of a page (or supplied text) and return rendered HTML, section structure, links, categories, and other parser output. tags: - Parse parameters: - name: action in: query required: true schema: type: string enum: - parse default: parse description: Must be `parse`. - name: page in: query required: false schema: type: string description: Title of the page to parse. - name: text in: query required: false schema: type: string description: Wikitext to parse instead of an existing page. - name: prop in: query required: false schema: type: string default: text|sections|links|categories description: Which parts of the parser output to return. - $ref: '#/components/parameters/Format' responses: '200': description: Parser output. content: application/json: schema: $ref: '#/components/schemas/ParseResponse' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: parameters: Format: name: format in: query required: false description: Response format. schema: type: string enum: - json - jsonfm - xml - xmlfm - php - phpfm - none default: json schemas: ParseResponse: title: ParseResponse description: action=parse result containing parser output for a page or text. type: object properties: parse: type: object properties: title: type: string example: hello pageid: type: integer example: 12345 text: type: object properties: '*': type: string description: Rendered HTML. example:
hello — a standard greeting.
sections: type: array items: $ref: '#/components/schemas/ParseSection' links: type: array items: type: object additionalProperties: true categories: type: array items: type: object additionalProperties: true ParseSection: title: ParseSection type: object properties: toclevel: type: integer example: 1 level: type: string example: '2' line: type: string example: English number: type: string example: '1' index: type: string example: '1' fromtitle: type: string example: hello anchor: type: string example: English securitySchemes: oauth2: type: oauth2 description: OAuth 2.0 access tokens issued via api.wikimedia.org. flows: authorizationCode: authorizationUrl: https://meta.wikimedia.org/w/rest.php/oauth2/authorize tokenUrl: https://meta.wikimedia.org/w/rest.php/oauth2/access_token scopes: basic: Basic read access to user identity