Skip to content
Wikimedia Enterprise
v2.0.0
OpenAPI 3.1.2

The Wikimedia Enterprise API provides high-volume, read-only access to Wikipedia and other supported Wikimedia projects.

This single specification covers all Wikimedia Enterprise APIs:

  • Authentication (auth.enterprise.wikimedia.com) - exchange credentials for JWT access and refresh tokens.
  • Metadata, Snapshot, and On-demand (api.enterprise.wikimedia.com) - reference data, bulk downloads, and single-article lookups, plus Realtime (Batch) hourly files.
  • Realtime (realtime.enterprise.wikimedia.com) - streaming article and Wikidata updates.

All data endpoints are read-only. Most accept either a GET request or a POST whose JSON body carries fields, filters, and limit to shape the response - the POST form never modifies data.

Authenticated endpoints expect a Bearer JWT access token in the Authorization header. Content is Wikimedia project text, licensed CC-BY-SA-4.0.

Metadata, Snapshot, and On-demand APIs, plus Realtime (Batch) files

Client Libraries

authentication (Collapsed)

Login

Create new access, id, and refresh tokens with your valid username and password.

Body
required
application/json
  • password
    Type: string
  • username
    Type: string
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/login
curl https://auth.enterprise.wikimedia.com/v1/login \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "admin",
  "password": "j8BDWYrQwDF5u4Yu"
}'
{
  "id_token": "string",
  "access_token": "string",
  "refresh_token": "string",
  "expires_in": 86400
}

Refresh Token

Provides new access and id tokens with your valid username and refresh token.

Body
required
application/json
  • refresh_token
    Type: string
  • username
    Type: string
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/token-refresh
curl https://auth.enterprise.wikimedia.com/v1/token-refresh \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "admin",
  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}'
{
  "id_token": "string",
  "access_token": "string",
  "expires_in": 86400
}

Revoke Token

Revokes the associated access tokens with your valid refresh token.

Body
required
application/json
  • refresh_token
    Type: string
Responses
  • 204

    Token was successfully revoked

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/token-revoke
curl https://auth.enterprise.wikimedia.com/v1/token-revoke \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}'
No Body

Forgot Password

Sends a confirmation code via email. That code is then required to change user's password using /v1/forgot-password-confirm.

Body
required
application/json
  • username
    Type: string
Responses
  • 204

    Confirmation code sent successfully

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/forgot-password
curl https://auth.enterprise.wikimedia.com/v1/forgot-password \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "admin"
}'
No Body

Forgot Password Confirmation

Changes user password with your valid username, confirmation_code sent to your email from previously hitting /v1/forgot-password endpoint, and new password.

Body
required
application/json
  • confirmation_code
    Type: string
  • password
    Type: string
  • username
    Type: string
Responses
  • 204

    Password reset successfully

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/forgot-password-confirm
curl https://auth.enterprise.wikimedia.com/v1/forgot-password-confirm \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "username": "admin",
  "password": "j8BDWYrQwDF5u4Yu",
  "confirmation_code": "6MadrbRF"
}'
No Body

Change Password

Changes user password with your valid access token, current password, and a new proposed password.

Note: This endpoint currently accepts the access token in the request body (access_token field) rather than via the Authorization: Bearer header. A future API version will align it with the rest of the platform's bearer-auth convention.

Body
required
application/json
  • access_token
    Type: string
  • previous_password
    Type: string
  • proposed_password
    Type: string
Responses
  • 204

    Successful password change

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/change-password
curl https://auth.enterprise.wikimedia.com/v1/change-password \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "access_token": "sInR5cCI6IkpXVCJ9eyJhbGciOiJIUzI1NiI",
  "previous_password": "j8BDWYrQwDF5u4Yu",
  "proposed_password": "b2BDWZrQwDF5u4Yu"
}'
No Body

New Password Required

Responds NEW_PASSWORD_REQUIRED challenge by receiving username and session token and setting new password.

Body
required
application/json
  • new_password
    Type: string
  • session
    Type: string
  • username
    Type: string
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/new-password-required
curl https://auth.enterprise.wikimedia.com/v1/new-password-required \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "session": "eyJhbGcisInR5cCI6IkOiJIUzI1NiIpXVCJ9",
  "username": "admin",
  "new_password": "b2BDWZrQwDF5u4Yu"
}'
{
  "id_token": "string",
  "access_token": "string",
  "refresh_token": "string",
  "session": "string",
  "expires_in": 86400
}

codes (Collapsed)

languages (Collapsed)

projects (Collapsed)

namespaces (Collapsed)

articles (Collapsed)

On-demand article lookup.

structured-contents (Collapsed)

On-demand Structured Contents article lookup (Beta).

realtime-articles (Collapsed)

Streaming article updates over SSE / NDJSON.

realtime-articles Operations

realtime-wikidata (Collapsed)

Streaming Wikidata updates over SSE / NDJSON (Beta).

realtime-wikidata Operations

Models