Skip to content
2.1.0
OpenAPI 3.2.1

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

​

Login

​

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

Body

required
application/json

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

​

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

Body

required
application/json

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 all access tokens generated by your valid refresh token.

Body

required
application/json

Responses

  • 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 for a given username. Use that confirmation code to change the user's password using /v1/forgot-password-confirm.

Body

required
application/json

Responses

  • 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 a user password with your valid username, confirmation code received after requesting the /v1/forgot-password endpoint, and new password.

Body

required
application/json

Responses

  • 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 a user password with your valid access token, current password, and a new proposed password. Send the access token in the access_token field of the request body, not in the Authorization: Bearer header.

Body

required
application/json

Responses

  • 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 to a NEW_PASSWORD_REQUIRED challenge for a given username, session token, and new password.

Body

required
application/json

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
}

Metadata (Collapsed)

​

Get project identifiers for use in other API calls.

Snapshots (Collapsed)

​

Download the entirety of a Wikimedia project.

On-demand (Collapsed)

​

Get the latest version of articles by name.

Realtime (Collapsed)

​

Get real-time updates as a streaming firehose or as hourly batch files.

Models