Wikipedia / MediaWiki Transforms API

Wikitext HTML transformation

GitHub OpenAPI

Operations 10

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /transform/html/to/wikitext Convert Parsoid HTML back to wikitext · Wikimedia REST Transform HTML to Wikitext #
Ask an LLM
“How do I turn Parsoid-rendered HTML back into wikitext?”
“Can I keep the original wikitext's small syntactic variations when converting HTML back?”
Tell an agent
Convert this HTML back to wikitext: {html}.
Transform {html} to wikitext, scrubbing wikitext to {scrub_wikitext}.
POST /transform/html/to/wikitext/{title} Convert HTML to wikitext for a page · Wikimedia REST Transform HTML to Wikitext #
Ask an LLM
“Can I convert HTML back to wikitext for a specific page title?”
“What happens to diffs when I convert a page's HTML back to wikitext?”
Tell an agent
Convert the HTML of page {title} back to wikitext.
Transform {html} to wikitext for {title}, scrubbing wikitext to {scrub_wikitext}.
POST /transform/html/to/wikitext/{title}/{revision} Convert Parsoid HTML back to wikitext · Wikimedia REST Transform HTML to Wikitext #
Ask an LLM
“How do I turn a rendered Parsoid HTML version of a page back into wikitext?”
“Can I keep the wikitext diffs readable when converting HTML back to wikitext?”
Tell an agent
Convert HTML {html} of {title} revision {revision} back to wikitext.
Transform Parsoid rendered HTML {html} at {title} rev {revision}, using the {if-match} ETag.
POST /transform/wikitext/to/html Convert wikitext to HTML · Wikimedia REST Transform Wikitext to HTML #
Ask an LLM
“How do I render wikitext as HTML?”
“Can I get just the body of the HTML output?”
Tell an agent
Convert this wikitext to HTML: {wikitext}.
Render {wikitext} as HTML, body-only set to {body_only}.
POST /transform/wikitext/to/html/{title} Render wikitext into HTML · Wikimedia REST Transform Wikitext to HTML #
Ask an LLM
“How do I render wikitext into HTML to preview it?”
“Can I get only the body HTML of a wikitext render?”
Tell an agent
Render wikitext {wikitext} for {title} into HTML.
Transform {wikitext} for page {title} into HTML, body only set to {body_only}.
POST /transform/wikitext/to/html/{title}/{revision} Render wikitext of a revision into HTML · Wikimedia REST Transform Wikitext to HTML #
Ask an LLM
“How do I preview a specific past revision of a page as HTML?”
“Can I stash a rendered HTML version of an old revision?”
Tell an agent
Render wikitext {wikitext} of {title} revision {revision} into HTML.
Transform {wikitext} for {title} rev {revision} into HTML, stash set to {stash}.
POST /transform/wikitext/to/lint Lint wikitext for errors · Wikimedia REST Check Wikitext for Lint Errors #
Ask an LLM
“How do I check wikitext for lint errors before saving it?”
“Can I validate wikitext against MediaWiki's lint rules?”
Tell an agent
Lint this wikitext for errors: {wikitext}.
Check {wikitext} for lint errors.
POST /transform/wikitext/to/lint/{title} Lint wikitext for a page · Wikimedia REST Check Wikitext for Lint Errors #
Ask an LLM
“Can I lint wikitext against a page's context?”
“What lint errors does a page's wikitext have?”
Tell an agent
Lint the wikitext of page {title} for errors.
Check {wikitext} for lint errors in the context of {title}.
POST /transform/wikitext/to/lint/{title}/{revision} Check wikitext for lint errors · Wikimedia REST Check Wikitext for Lint Errors #
Ask an LLM
“How do I find parsing errors in wikitext before saving it?”
“Can Parsoid catch wikitext lint issues on an old revision?”
Tell an agent
Lint wikitext {wikitext} on {title} revision {revision} for errors.
Check {wikitext} on {title} rev {revision} for wikitext lint problems.
POST /transform/wikitext/to/mobile-html/{title} Render wikitext into mobile HTML · Wikimedia REST Transform Wikitext to Mobile HTML #
Ask an LLM
“How do I render wikitext for a mobile preview?”
“Can I get mobile HTML in a specific language?”
Tell an agent
Render wikitext {wikitext} for {title} into mobile HTML.
Transform {wikitext} of {title} into mobile HTML for language {lang}, output mode {mode}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/wikipedia:wikipedia-transforms-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

wikipedia-transforms-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Wikipedia Transforms API
  version: 1.0.0
  x-refined-note:
  - x-generated-from differs across the merged source definitions and was not carried
  - x-last-validated differs across the merged source definitions and was not carried
  - x-source-url differs across the merged source definitions and was not carried
  description: 'Operations tagged Transforms across 2 of this provider''s published API definitions: wikipedia-rest-v1-openapi.yaml, wikipedia-mediawiki-core-rest-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://en.wikipedia.org/api/rest_v1
  description: English Wikipedia REST v1 endpoint
- url: https://{lang}.wikipedia.org/api/rest_v1
  description: Per-language Wikipedia REST v1 endpoint
  variables:
    lang:
      default: en
      description: Language code (e.g. en, de, fr, es, ja)
- url: https://en.wikipedia.org/w/rest.php/v1
  description: English Wikipedia
- url: https://{lang}.wikipedia.org/w/rest.php/v1
  description: Per-language Wikipedia (en, de, fr, es, ja, zh, ...)
  variables:
    lang:
      default: en
      description: Language subdomain
- url: https://api.wikimedia.org/core/v1/wikipedia/{lang}
  description: Wikimedia API Gateway equivalent of the Core REST API
  variables:
    lang:
      default: en
      description: Language code
tags:
- name: Transforms
  description: convert content between HTML and Wikitext
paths:
  /transform/html/to/wikitext:
    post:
      tags:
      - Transforms
      summary: Wikimedia REST Transform HTML to Wikitext
      description: 'Transform Parsoid HTML

        to Wikitext.


        When converting pre-existing (possibly modified) content, you should

        pass in the `title`, `revision`, and `If-Match` header. This lets

        Parsoid preserve small

        syntactic variations in wikitext, which ensures that diffs are

        readable.


        - Stability: stable

        - Rate limit: 25 req/s'
      parameters:
      - name: if-match
        in: header
        description: 'The `ETag` header of the original render indicating it''s revision and timeuuid.

          Required if both `title` and `revision` parameters are present.

          '
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - html
              properties:
                html:
                  type: string
                  description: The HTML to transform
                  x-textarea: true
                scrub_wikitext:
                  type: boolean
                  description: Normalise the DOM to yield cleaner wikitext?
        required: true
      responses:
        '200':
          description: MediaWiki Wikitext.
          content:
            text/plain; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/wikitext/1.0.0":
              schema:
                type: string
        '403':
          description: Access to the specific revision is restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '404':
          description: Unknown page title or revision
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '409':
          description: Revision was restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '410':
          description: Page was deleted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: false
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      operationId: postTransformHtmlToWikitext
      x-operation-id-source: derived
    servers:
    - url: https://en.wikipedia.org/api/rest_v1
      description: English Wikipedia REST v1 endpoint
    - url: https://{lang}.wikipedia.org/api/rest_v1
      description: Per-language Wikipedia REST v1 endpoint
      variables:
        lang:
          default: en
          description: Language code (e.g. en, de, fr, es, ja)
  /transform/html/to/wikitext/{title}:
    post:
      tags:
      - Transforms
      summary: Wikimedia REST Transform HTML to Wikitext
      description: 'Transform Parsoid HTML

        to Wikitext.


        When converting pre-existing (possibly modified) content, you should

        pass in the `title`, `revision`, and `If-Match` header. This lets

        Parsoid preserve small

        syntactic variations in wikitext, which ensures that diffs are

        readable.


        - Stability: stable

        - Rate limit: 25 req/s'
      parameters:
      - name: title
        in: path
        description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.'
        required: true
        schema:
          type: string
      - name: if-match
        in: header
        description: 'The `ETag` header of the original render indicating it''s revision and timeuuid.

          Required if both `title` and `revision` parameters are present.

          '
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - html
              properties:
                html:
                  type: string
                  description: The HTML to transform
                  x-textarea: true
                scrub_wikitext:
                  type: boolean
                  description: Normalise the DOM to yield cleaner wikitext?
        required: true
      responses:
        '200':
          description: MediaWiki Wikitext.
          content:
            text/plain; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/wikitext/1.0.0":
              schema:
                type: string
        '403':
          description: Access to the specific revision is restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '404':
          description: Unknown page title or revision
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '409':
          description: Revision was restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '410':
          description: Page was deleted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: false
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      operationId: postTransformHtmlToWikitextByTitle
      x-operation-id-source: derived
    servers:
    - url: https://en.wikipedia.org/api/rest_v1
      description: English Wikipedia REST v1 endpoint
    - url: https://{lang}.wikipedia.org/api/rest_v1
      description: Per-language Wikipedia REST v1 endpoint
      variables:
        lang:
          default: en
          description: Language code (e.g. en, de, fr, es, ja)
  /transform/html/to/wikitext/{title}/{revision}:
    post:
      tags:
      - Transforms
      summary: Wikimedia REST Transform HTML to Wikitext
      description: 'Transform Parsoid HTML

        to Wikitext.


        When converting pre-existing (possibly modified) content, you should

        pass in the `title`, `revision`, and `If-Match` header. This lets

        Parsoid preserve small

        syntactic variations in wikitext, which ensures that diffs are

        readable.


        - Stability: stable

        - Rate limit: 25 req/s'
      parameters:
      - name: title
        in: path
        description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.'
        required: true
        schema:
          type: string
      - name: revision
        in: path
        description: The page revision
        required: true
        schema:
          type: integer
      - name: if-match
        in: header
        description: 'The `ETag` header of the original render indicating it''s revision and timeuuid.

          Required if both `title` and `revision` parameters are present.

          '
        schema:
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - html
              properties:
                html:
                  type: string
                  description: The HTML to transform
                  x-textarea: true
                scrub_wikitext:
                  type: boolean
                  description: Normalise the DOM to yield cleaner wikitext?
        required: true
      responses:
        '200':
          description: MediaWiki Wikitext.
          content:
            text/plain; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/wikitext/1.0.0":
              schema:
                type: string
        '403':
          description: Access to the specific revision is restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '404':
          description: Unknown page title or revision
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '409':
          description: Revision was restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '410':
          description: Page was deleted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: false
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      operationId: postTransformHtmlToWikitextByTitleByRevision
      x-operation-id-source: derived
    servers:
    - url: https://en.wikipedia.org/api/rest_v1
      description: English Wikipedia REST v1 endpoint
    - url: https://{lang}.wikipedia.org/api/rest_v1
      description: Per-language Wikipedia REST v1 endpoint
      variables:
        lang:
          default: en
          description: Language code (e.g. en, de, fr, es, ja)
  /transform/wikitext/to/html:
    post:
      tags:
      - Transforms
      summary: Wikimedia REST Transform Wikitext to HTML
      description: 'Transform wikitext to HTML. Note that if you set `stash: true`, you

        also need to supply the title.


        - Stability: stable

        - Rate limit: 25 req/s (5 req/s when `stash: true`)'
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - wikitext
              properties:
                wikitext:
                  type: string
                  description: The Wikitext to transform to HTML
                  x-textarea: true
                body_only:
                  type: boolean
                  description: Return only `body.innerHTML`
                stash:
                  type: boolean
                  description: Whether to temporarily stash the result of the transformation
        required: true
      responses:
        '200':
          description: See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec
          content:
            text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.1.0":
              schema:
                type: string
        '403':
          description: access to the specific revision is restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '404':
          description: Unknown page title or revision
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '409':
          description: Revision was restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '410':
          description: Page was deleted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: false
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      operationId: postTransformWikitextToHtml
      x-operation-id-source: derived
    servers:
    - url: https://en.wikipedia.org/api/rest_v1
      description: English Wikipedia REST v1 endpoint
    - url: https://{lang}.wikipedia.org/api/rest_v1
      description: Per-language Wikipedia REST v1 endpoint
      variables:
        lang:
          default: en
          description: Language code (e.g. en, de, fr, es, ja)
  /transform/wikitext/to/html/{title}:
    post:
      tags:
      - Transforms
      summary: Wikimedia REST Transform Wikitext to HTML
      description: 'Transform wikitext to HTML. Note that if you set `stash: true`, you

        also need to supply the title.


        - Stability: stable

        - Rate limit: 25 req/s (5 req/s when `stash: true`)'
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - wikitext
              properties:
                wikitext:
                  type: string
                  description: The Wikitext to transform to HTML
                  x-textarea: true
                body_only:
                  type: boolean
                  description: Return only `body.innerHTML`
                stash:
                  type: boolean
                  description: Whether to temporarily stash the result of the transformation
        required: true
      responses:
        '200':
          description: See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec
          content:
            text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.1.0":
              schema:
                type: string
        '403':
          description: access to the specific revision is restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '404':
          description: Unknown page title or revision
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '409':
          description: Revision was restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '410':
          description: Page was deleted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: true
      parameters:
      - name: title
        in: path
        description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.'
        required: true
        schema:
          type: string
      x-amples:
      - title: Transform wikitext to html
        request:
          params:
            domain: en.wikipedia.org
            title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein
          body:
            wikitext: == Heading ==
            body_only: true
        response:
          status: 200
          headers:
            content-type: /^text\/html.+/
          body: /^<h2.*>Heading<\/h2>$/
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      operationId: postTransformWikitextToHtmlByTitle
      x-operation-id-source: derived
    servers:
    - url: https://en.wikipedia.org/api/rest_v1
      description: English Wikipedia REST v1 endpoint
    - url: https://{lang}.wikipedia.org/api/rest_v1
      description: Per-language Wikipedia REST v1 endpoint
      variables:
        lang:
          default: en
          description: Language code (e.g. en, de, fr, es, ja)
  /transform/wikitext/to/html/{title}/{revision}:
    post:
      tags:
      - Transforms
      summary: Wikimedia REST Transform Wikitext to HTML
      description: 'Transform wikitext to HTML. Note that if you set `stash: true`, you

        also need to supply the title.


        - Stability: stable

        - Rate limit: 25 req/s (5 req/s when `stash: true`)'
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - wikitext
              properties:
                wikitext:
                  type: string
                  description: The Wikitext to transform to HTML
                  x-textarea: true
                body_only:
                  type: boolean
                  description: Return only `body.innerHTML`
                stash:
                  type: boolean
                  description: Whether to temporarily stash the result of the transformation
        required: true
      responses:
        '200':
          description: See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec
          content:
            text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/2.1.0":
              schema:
                type: string
        '403':
          description: access to the specific revision is restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '404':
          description: Unknown page title or revision
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '409':
          description: Revision was restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '410':
          description: Page was deleted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: false
      parameters:
      - name: title
        in: path
        description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.'
        required: true
        schema:
          type: string
      - name: revision
        in: path
        description: The page revision
        required: true
        schema:
          type: integer
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      operationId: postTransformWikitextToHtmlByTitleByRevision
      x-operation-id-source: derived
    servers:
    - url: https://en.wikipedia.org/api/rest_v1
      description: English Wikipedia REST v1 endpoint
    - url: https://{lang}.wikipedia.org/api/rest_v1
      description: Per-language Wikipedia REST v1 endpoint
      variables:
        lang:
          default: en
          description: Language code (e.g. en, de, fr, es, ja)
  /transform/wikitext/to/lint:
    post:
      tags:
      - Transforms
      summary: Wikimedia REST Check Wikitext for Lint Errors
      description: 'Parse the supplied wikitext and check it for lint errors.


        - Stability: experimental

        - Rate limit: 25 req/s'
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - wikitext
              properties:
                wikitext:
                  type: string
                  description: The Wikitext to check
                  x-textarea: true
          application/json:
            schema:
              required:
              - wikitext
              properties:
                wikitext:
                  type: string
                  description: The Wikitext to check
                  x-textarea: true
        required: true
      responses:
        '200':
          description: Linter errors, if any, as a JSON blob
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Unknown page title
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '409':
          description: Latest revision was restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '410':
          description: Page was deleted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: false
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      operationId: postTransformWikitextToLint
      x-operation-id-source: derived
    servers:
    - url: https://en.wikipedia.org/api/rest_v1
      description: English Wikipedia REST v1 endpoint
    - url: https://{lang}.wikipedia.org/api/rest_v1
      description: Per-language Wikipedia REST v1 endpoint
      variables:
        lang:
          default: en
          description: Language code (e.g. en, de, fr, es, ja)
  /transform/wikitext/to/lint/{title}:
    post:
      tags:
      - Transforms
      summary: Wikimedia REST Check Wikitext for Lint Errors
      description: 'Parse the supplied wikitext and check it for lint errors.


        - Stability: experimental

        - Rate limit: 25 req/s'
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - wikitext
              properties:
                wikitext:
                  type: string
                  description: The Wikitext to check
                  x-textarea: true
        required: true
      responses:
        '200':
          description: Linter errors, if any, as a JSON blob
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Unknown page title
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '409':
          description: Latest revision was restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '410':
          description: Page was deleted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: false
      parameters:
      - name: title
        in: path
        description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.'
        required: true
        schema:
          type: string
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      operationId: postTransformWikitextToLintByTitle
      x-operation-id-source: derived
    servers:
    - url: https://en.wikipedia.org/api/rest_v1
      description: English Wikipedia REST v1 endpoint
    - url: https://{lang}.wikipedia.org/api/rest_v1
      description: Per-language Wikipedia REST v1 endpoint
      variables:
        lang:
          default: en
          description: Language code (e.g. en, de, fr, es, ja)
  /transform/wikitext/to/lint/{title}/{revision}:
    post:
      tags:
      - Transforms
      summary: Wikimedia REST Check Wikitext for Lint Errors
      description: 'Parse the supplied wikitext and check it for lint errors.


        - Stability: experimental

        - Rate limit: 25 req/s'
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - wikitext
              properties:
                wikitext:
                  type: string
                  description: The Wikitext to check
                  x-textarea: true
        required: true
      responses:
        '200':
          description: Linter errors, if any, as a JSON blob
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Unknown page title
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '409':
          description: Latest revision was restricted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        '410':
          description: Page was deleted
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: false
      parameters:
      - name: title
        in: path
        description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.'
        required: true
        schema:
          type: string
      - name: revision
        in: path
        description: The page revision
        required: true
        schema:
          type: integer
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      operationId: postTransformWikitextToLintByTitleByRevision
      x-operation-id-source: derived
    servers:
    - url: https://en.wikipedia.org/api/rest_v1
      description: English Wikipedia REST v1 endpoint
    - url: https://{lang}.wikipedia.org/api/rest_v1
      description: Per-language Wikipedia REST v1 endpoint
      variables:
        lang:
          default: en
          description: Language code (e.g. en, de, fr, es, ja)
  /transform/wikitext/to/mobile-html/{title}:
    post:
      tags:
      - Transforms
      summary: Wikimedia REST Transform Wikitext to Mobile HTML
      description: 'Transform wikitext to Mobile HTML.


        - Stability: stable

        - Rate limit: 25 req/s (5 req/s when `stash: true`)


        Please follow wikitech-l or mediawiki-api-announce for announcements of breaking changes.'
      parameters:
      - name: title
        in: path
        description: 'Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.'
        required: true
        schema:
          type: string
      - name: Accept-Language
        in: header
        description: 'The desired language variant code for wikis where LanguageConverter is enabled. Example: `sr-el` for Latin transcription of the Serbian language.

          '
        schema:
          type: string
      - name: output-mode
        in: header
        description: Output mode for mobile-html. Default is `editPreview`.
        required: false
        schema:
          type: string
          enum:
          - editPreview
          - contentAndReferences
          - content
          - references
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - wikitext
              properties:
                wikitext:
                  type: string
                  description: The Wikitext to transform to HTML
                  x-textarea: true
        required: true
      responses:
        '200':
          description: See wikipage https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec
          content:
            text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Mobile-HTML/1.0.0":
              schema:
                type: string
        '404':
          description: Unknown page title
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      operationId: transformWikitextToMobileHtml
      x-monitor: false
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: https://en.wikipedia.org/api/rest_v1
      description: English Wikipedia REST v1 endpoint
    - url: https://{lang}.wikipedia.org/api/rest_v1
      description: Per-language Wikipedia REST v1 endpoint
      variables:
        lang:
          default: en
          description: Language code (e.g. en, de, fr, es, ja)
components:
  schemas:
    problem:
      required:
      - type
      type: object
      properties:
        type:
          type: string
        title:
          type: string
        detail:
          type: string
        instance:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 bearer token issued via api.wikimedia.org. Required for write operations.
x-refined-from:
- wikipedia-rest-v1-openapi.yaml
- wikipedia-mediawiki-core-rest-openapi.yaml
x-host-basePath: /api/rest_v1
x-default-params: {}
x-provenance:
  method: harvested
  publisher: Wikipedia / MediaWiki
  source: https://en.wikipedia.org/api/rest_v1/?spec
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)