Wikimedia Math API

formula rendering

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/wikimedia-math-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

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

OpenAPI Specification

wikimedia-math-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Wikimedia Enterprise API spec articles Math API
  description: 'OpenAPI 3.0 specification for the Metadata, On-demand, Snapshot, and Realtime Batch API(s) of WME.


    While we provide this swagger spec for quick reference, our official documentation is located on our website:


    - [Official Documentation](https://enterprise.wikimedia.com/docs/)

    - [Data Dictionary & Schema](https://enterprise.wikimedia.com/docs/data-dictionary/)

    '
  version: 2.0.0
servers:
- url: https://api.enterprise.wikimedia.com
security:
- bearerAuth: []
tags:
- name: Math
  description: formula rendering
paths:
  /media/math/check/{type}:
    post:
      deprecated: true
      tags:
      - Math
      summary: Check and normalize a TeX formula.
      description: 'Checks the supplied TeX formula for correctness and returns the

        normalised formula representation as well as information about

        identifiers. Available types are tex and inline-tex. The response

        contains the `x-resource-location` header which can be used to retrieve

        the render of the checked formula in one of the supported rendering

        formats. Just append the value of the header to `/media/math/{format}/`

        and perform a GET request against that URL.


        **NOTE**: the use of this endpoint is *strongly discouraged*. Instead, use the identical endpoint of the (canonical) Math API on the `wikimedia.org` domain.


        Stability: [deprecated](https://www.mediawiki.org/wiki/API_versioning#Deprecated).

        '
      parameters:
      - name: type
        in: path
        description: The input type of the given formula; can be tex or inline-tex
        required: true
        schema:
          type: string
          enum:
          - tex
          - inline-tex
          - chem
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
              - q
              properties:
                q:
                  type: string
                  description: The formula to check
        required: true
      responses:
        '200':
          description: Information about the checked formula
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid type
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: true
      x-amples:
      - title: Mathoid - check test formula
        request:
          params:
            domain: wikimedia.org
            type: tex
          body:
            q: E=mc^{2}
        response:
          status: 200
          headers:
            content-type: /^application\/json/
            x-resource-location: /.+/
            cache-control: no-cache
          body:
            success: true
            checked: /.+/
  /media/math/formula/{hash}:
    get:
      deprecated: true
      tags:
      - Math
      summary: Get a previously-stored formula
      description: 'Returns the previously-stored formula via `/media/math/check/{type}` for

        the given hash.


        **NOTE**: the use of this endpoint is *strongly discouraged*. Instead, use the identical endpoint of the (canonical) Math API on the `wikimedia.org` domain.


        Stability: [deprecated](https://www.mediawiki.org/wiki/API_versioning#Deprecated).

        '
      parameters:
      - name: hash
        in: path
        description: The hash string of the previous POST data
        required: true
        schema:
          minLength: 1
          type: string
      responses:
        '200':
          description: Information about the checked formula
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Data for the given hash cannot be found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: false
  /media/math/render/{format}/{hash}:
    get:
      deprecated: true
      tags:
      - Math
      summary: Get rendered formula in the given format.
      description: 'Given a request hash, renders a TeX formula into its mathematic

        representation in the given format. When a request is issued to the

        `/media/math/check/{format}` POST endpoint, the response contains the

        `x-resource-location` header denoting the hash ID of the POST data. Once

        obtained, this endpoint has to be used to obtain the actual render.


        **NOTE**: the use of this endpoint is *strongly discouraged*. Instead, use the identical endpoint of the (canonical) Math API on the `wikimedia.org` domain.


        Stability: [deprecated](https://www.mediawiki.org/wiki/API_versioning#Deprecated).

        '
      parameters:
      - name: format
        in: path
        description: The output format; can be svg or mml
        required: true
        schema:
          type: string
          enum:
          - svg
          - mml
          - png
      - name: hash
        in: path
        description: The hash string of the previous POST data
        required: true
        schema:
          minLength: 1
          type: string
      responses:
        '200':
          description: The rendered formula
          content:
            image/svg+xml:
              schema:
                type: string
            application/mathml+xml:
              schema:
                type: string
        '404':
          description: Unknown format or hash ID
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/problem'
      x-monitor: false
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
      bearerFormat: JWT