Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Wikimedia Enterprise Structured Snapshots API
version: 2.0.0
description: '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.'
license:
name: CC-BY-SA-4.0
url: https://creativecommons.org/licenses/by-sa/4.0/
contact:
name: Commercial Partnerships Division
url: https://enterprise.wikimedia.com/contact/
termsOfService: https://enterprise.wikimedia.com/terms/
servers:
- url: https://api.enterprise.wikimedia.com
description: Metadata, Snapshot, and On-demand APIs, plus Realtime (Batch) files
- url: https://auth.enterprise.wikimedia.com
description: Authentication API
- url: https://realtime.enterprise.wikimedia.com
description: Realtime streaming API
security:
- bearerAuth: []
tags:
- name: structured-snapshots
description: Structured Contents snapshots (Beta).
paths:
/v2/snapshots/structured-contents:
summary: List all pre-parsed snapshots
servers:
- url: https://api.enterprise.wikimedia.com
description: Metadata, Snapshot, and On-demand APIs, plus Realtime (Batch) files
get:
summary: Structured Contents Snapshots Available (Beta)
description: Returns a list of available project Structured Contents snapshots.
operationId: getSnapshotsStructuredContents
tags:
- structured-snapshots
parameters:
- in: query
name: fields
description: 'Select which fields to receive in your response, using JSON dot notation. Sent as one `fields` query parameter per field: `?fields=name&fields=identifier`. A comma-separated list in a single value is not supported.'
style: form
explode: true
schema:
type: array
items:
type: string
example: name
- in: query
name: filters
description: 'Select which projects and languages to receive in your response. Sent as one `filters` query parameter per filter, each a JSON object: `?filters={"field":"is_part_of.identifier","value":"enwiki"}&filters={"field":"namespace.identifier","value":0}`. Repeated filters combine as AND. A JSON array in a single value returns `422 Unprocessable Entity`.'
style: form
explode: true
schema:
type: array
items:
$ref: '#/components/schemas/filter'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/snapshot'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"identifier": "string", "version": "string", "date_modified": "string" , "is_part_of":{"identifier":"string"},"namespace":{"identifier":0},"in_language":{"identifier":"string"}, "size": {"value": 4741.598, "unit_text": "MB"}}
{"identifier": "string", "version": "string", "date_modified": "string" , "is_part_of":{"identifier":"string"},"namespace":{"identifier":0},"in_language":{"identifier":"string"}, "size": {"value": 4741.598, "unit_text": "MB"}}
'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 401}
'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 403}
'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":422}
'
'500':
description: Internal Server Error, Retry Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":500}
'
post:
summary: Structured Contents Snapshots Available (Beta)
description: Returns a list of available project Structured Contents snapshots.
operationId: querySnapshotsStructuredContents
tags:
- structured-snapshots
requestBody:
content:
application/json:
schema:
type: object
properties:
fields:
type: array
example:
- name
- identifier
description: Select which fields to receive in your response, using JSON dot notation.
items:
type: string
filters:
type: array
description: Select which projects and languages to receive in your response.
items:
$ref: '#/components/schemas/filter'
example:
- field: is_part_of.identifier
value: enwiki
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/snapshot'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"identifier": "string", "version": "string", "date_modified": "string" , "is_part_of":{"identifier":"string"},"namespace":{"identifier":0},"in_language":{"identifier":"string"}, "size": {"value": 4741.598, "unit_text": "MB"}}
{"identifier": "string", "version": "string", "date_modified": "string" , "is_part_of":{"identifier":"string"},"namespace":{"identifier":0},"in_language":{"identifier":"string"}, "size": {"value": 4741.598, "unit_text": "MB"}}
'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 401}
'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 403}
'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":422}
'
'500':
description: Internal Server Error, Retry Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":500}
'
/v2/snapshots/structured-contents/{identifier}:
summary: Receive info for one pre-parsed snapshot
servers:
- url: https://api.enterprise.wikimedia.com
description: Metadata, Snapshot, and On-demand APIs, plus Realtime (Batch) files
get:
summary: Structured Contents Snapshot Info (Beta)
description: Information on a specific Structured Contents snapshot bundle.
operationId: getSnapshotsStructuredContentsByIdentifier
tags:
- structured-snapshots
parameters:
- in: path
name: identifier
description: 'Structured Contents snapshot identifier looks like `<language><project_name>_namespace_<number>`, examples: `dewiki_namespace_0` downloads structured_contents used in de.wikipedia.org, `enwiki_namespace_0` downloads articles used in en.wikipedia.org. Note: Beta Structured Contents supports eleven projects: `enwiki_namespace_0`, `dewiki_namespace_0`, `frwiki_namespace_0`, `eswiki_namespace_0`, `ptwiki_namespace_0`, `itwiki_namespace_0`, `nlwiki_namespace_0`, `cywiki_namespace_0`, `arwiki_namespace_0`, `jawiki_namespace_0`, and `idwiki_namespace_0`.'
required: true
schema:
type: string
minLength: 1
- in: query
name: fields
description: 'Select which fields to receive in your response, using JSON dot notation. Sent as one `fields` query parameter per field: `?fields=name&fields=identifier`. A comma-separated list in a single value is not supported.'
style: form
explode: true
schema:
type: array
items:
type: string
example: name
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/snapshot'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"identifier": "string", "version": "string", "date_modified": "string" , "is_part_of":{"identifier":"string"},"namespace":{"identifier":0},"in_language":{"identifier":"string"}, "size": {"value": 4741.598, "unit_text": "MB"}}
'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 401}
'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 403}
'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 404}
'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":422}
'
'500':
description: Internal Server Error, Retry Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":500}
'
post:
summary: Structured Contents Snapshot Info (Beta)
description: Information on a specific Structured Contents snapshot bundle.
operationId: querySnapshotsStructuredContentsByIdentifier
tags:
- structured-snapshots
parameters:
- in: path
name: identifier
description: 'Structured Contents snapshot identifier looks like `<language><project_name>_namespace_<number>`, examples: `dewiki_namespace_0` downloads structured_contents used in de.wikipedia.org, `enwiki_namespace_0` downloads articles used in en.wikipedia.org. Note: Beta Structured Contents supports eleven projects: `enwiki_namespace_0`, `dewiki_namespace_0`, `frwiki_namespace_0`, `eswiki_namespace_0`, `ptwiki_namespace_0`, `itwiki_namespace_0`, `nlwiki_namespace_0`, `cywiki_namespace_0`, `arwiki_namespace_0`, `jawiki_namespace_0`, and `idwiki_namespace_0`.'
required: true
schema:
type: string
minLength: 1
requestBody:
content:
application/json:
schema:
type: object
properties:
fields:
type: array
example:
- name
- identifier
description: Select which fields to receive in your response, using JSON dot notation.
items:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/snapshot'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"identifier": "string", "version": "string", "date_modified": "string" , "is_part_of":{"identifier":"string"},"namespace":{"identifier":0},"in_language":{"identifier":"string"}, "size": {"value": 4741.598, "unit_text": "MB"}}
'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 401}
'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 403}
'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 404}
'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":422}
'
'500':
description: Internal Server Error, Retry Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":500}
'
/v2/snapshots/structured-contents/{identifier}/download:
summary: Download one pre-parsed snapshot
servers:
- url: https://api.enterprise.wikimedia.com
description: Metadata, Snapshot, and On-demand APIs, plus Realtime (Batch) files
head:
summary: Project Structured Contents Snapshot Headers (Beta)
description: Set of headers that describe the Structured Contents snapshot download.
operationId: headSnapshotsStructuredContentsByIdentifierDownload
tags:
- structured-snapshots
parameters:
- in: path
name: identifier
description: 'Structured Contents snapshot identifier looks like `<language><project_name>_namespace_<number>`, examples: `dewiki_namespace_0` downloads structured_contents used in de.wikipedia.org, `enwiki_namespace_0` downloads articles used in en.wikipedia.org. Note: Beta Structured Contents supports eleven projects: `enwiki_namespace_0`, `dewiki_namespace_0`, `frwiki_namespace_0`, `eswiki_namespace_0`, `ptwiki_namespace_0`, `itwiki_namespace_0`, `nlwiki_namespace_0`, `cywiki_namespace_0`, `arwiki_namespace_0`, `jawiki_namespace_0`, and `idwiki_namespace_0`.'
required: true
schema:
type: string
minLength: 1
responses:
'200':
description: OK
headers:
Accept-Ranges:
schema:
type: string
example: bytes
description: HTTP response header is a marker used by the server to advertise its support for partial requests.
Last-Modified:
schema:
type: string
description: Response HTTP header contains a date and time when the origin server believes the resource was last modified.
Content-Length:
schema:
type: string
description: Header indicates the size of the message body, in bytes, sent to the recipient.
ETag:
schema:
type: string
description: Entity tag - HTTP response header is an identifier for a specific version of a resource.
Content-Disposition:
schema:
type: string
description: Header indicating if the content is expected to be displayed in the browser or as an attachment, that is downloaded and saved locally.
Content-Encoding:
schema:
type: string
description: Lists any encodings that have been applied to the representation (message payload), and in what order.
Content-Type:
schema:
type: string
example: binary/octet-stream
description: Indicates the original media type of the resource (prior to any content encoding applied for sending).
Expires:
schema:
type: string
description: Contains the date/time after which the response is considered expired.
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 401}
'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 403}
'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 404}
'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":422}
'
'500':
description: Internal Server Error, Retry Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":500}
'
get:
summary: Structured Contents Snapshot Download (Beta)
description: 'Downloadable bundle of Structured Contents of all current revisions in a specified project and namespace. Updated daily at 00:00 UTC.
Responds `307 Temporary Redirect` with a presigned URL in the `Location` header, valid for 60 seconds. The file is served from that URL, not from this endpoint, so clients must follow the redirect (for example `curl --location`) and request a fresh URL for each download rather than storing one. Do not send the API bearer token to the presigned URL: the storage service rejects a request that carries both with `400 InvalidArgument`. The payload is a gzipped tar archive served as `binary/octet-stream`. Use HEAD on this path for `Content-Length`, `ETag`, `Last-Modified` and `Accept-Ranges`, and send `Range` requests to the presigned URL to resume a partial download.'
operationId: getSnapshotsStructuredContentsByIdentifierDownload
tags:
- structured-snapshots
parameters:
- in: path
name: identifier
description: 'Structured Contents snapshot identifier looks like `<language><project_name>_namespace_<number>`, examples: `dewiki_namespace_0` downloads structured_contents used in de.wikipedia.org, `enwiki_namespace_0` downloads articles used in en.wikipedia.org. Note: Beta Structured Contents supports eleven projects: `enwiki_namespace_0`, `dewiki_namespace_0`, `frwiki_namespace_0`, `eswiki_namespace_0`, `ptwiki_namespace_0`, `itwiki_namespace_0`, `nlwiki_namespace_0`, `cywiki_namespace_0`, `arwiki_namespace_0`, `jawiki_namespace_0`, and `idwiki_namespace_0`.'
required: true
schema:
type: string
minLength: 1
- in: header
name: Range
description: The Range HTTP request header indicates the part of a document that the server should return. This endpoint redirects before reading it, so send `Range` to the presigned URL in the redirect instead.
schema:
type: string
responses:
'200':
description: OK, from the presigned URL after the redirect
content:
binary/octet-stream:
schema:
type: string
format: binary
description: Gzipped tar archive.
'307':
description: Temporary Redirect to a short-lived presigned download URL
headers:
Location:
schema:
type: string
format: uri
description: Presigned URL for the file, valid for 60 seconds. Follow it to download, and request a new one for each download rather than storing it.
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 401}
'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 403}
'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status": 404}
'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":422}
'
'500':
description: Internal Server Error, Retry Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
application/x-ndjson:
schema:
type: string
format: ndjson
example: '{"message":"string","status":500}
'
components:
schemas:
snapshot:
type: object
description: Compressed bundle of a project namespace's articles, or of the Wikidata Main Graph's items or properties, as NDJSON, served by the Snapshot endpoints
properties:
identifier:
type: string
description: Identifier of the snapshot, combining the project identifier and namespace, e.g. `enwiki_namespace_0`. The Wikidata snapshots are `wikidata_items` and `wikidata_properties`; the Wikidata snapshot endpoints take `items` or `properties` as their `{identifier}` path parameter, not this value
example: enwiki_namespace_0
version:
type: string
description: Content hash of the snapshot file. Changes whenever the snapshot contents change
example: 709b969f88afcf2e695d3255ed625ddc
date_modified:
type: string
format: date-time
description: Timestamp of when the snapshot was last updated
example: '2026-07-22T01:18:47.597185557Z'
in_language:
$ref: '#/components/schemas/language'
description: Language of the project the snapshot belongs to
is_part_of:
$ref: '#/components/schemas/project'
description: Project the snapshot belongs to
namespace:
$ref: '#/components/schemas/article_namespace'
description: Namespace of the articles in the snapshot
size:
$ref: '#/components/schemas/size'
description: Size of the snapshot file in decimal megabytes (`unit_text` is `MB`). For the exact byte count, use `Content-Length` from a HEAD request on the download endpoint.
example:
value: 150238.487
unit_text: MB
chunks:
type: array
items:
type: string
description: Identifiers of the chunk files this snapshot is split into for download, e.g. `enwiki_namespace_0_chunk_0`
record_count:
type: integer
description: Number of records (NDJSON lines) in the snapshot file. A small number of snapshots on small wikis omit the field. Treat a missing value as unknown, not as zero
example: 3943117
error:
type: object
description: Error response returned when a request fails
properties:
message:
type: string
description: Human-readable description of the error
status:
type: integer
description: HTTP status code of the error
size:
type: object
description: Size of a resource, in the unit given by `unit_text`.
properties:
unit_text:
type: string
description: '`MB` on snapshots, chunks and batches: decimal megabytes, bytes divided by 1,000,000, to three decimals. `B` on article versions: bytes of wikitext.'
value:
type: number
description: Size in the unit given by `unit_text`. For the exact byte count of a download, use the `Content-Length` header from a HEAD request on its download endpoint.
article_namespace:
type: object
description: Namespace the page belongs to
properties:
identifier:
type: number
description: Numeric identifier of the namespace. Names and descriptions are available from the Namespaces metadata endpoints
example: 0
project:
type: object
description: Wikimedia project a resource belongs to
properties:
identifier:
type: string
description: Unique identifier of the project, combining language and project code, e.g. `enwiki` for English Wikipedia
example: enwiki
code:
type: string
description: Code of the project type, e.g. `wiki` for Wikipedia projects
example: wiki
name:
type: string
description: Name of the project
example: Wikipedia
url:
type: string
format: uri
description: URL of the project
example: https://en.wikipedia.org
in_language:
$ref: '#/components/schemas/language'
description: Primary language of the project
filter:
type: object
description: Filter condition applied to a POST request body, narrowing the response to records matching the value
properties:
field:
type: string
description: Field to filter on, in dot notation, e.g. `is_part_of.identifier`
example: is_part_of.identifier
value:
description: Value the field must equal. Use the field's own type - a number for numeric fields such as `namespace.identifier`, a string for text fields.
oneOf:
- type: string
- type: number
example: enwiki
language:
type: object
description: Language of a Wikimedia project or article
properties:
identifier:
type: string
description: Wikimedia [language code](https://www.wikidata.org/wiki/Help:Wikimedia_language_codes/lists/all) of the language
example: en
name:
type: string
description: Full name of the language
example: English
alternate_name:
type: string
description: Alternate name of the language
example: English
direction:
type:
- string
- 'null'
enum:
- ltr
- rtl
- null
description: Direction the language is written in, `ltr` (left-to-right) or `rtl` (right-to-left)
example: ltr
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
externalDocs:
description: Wikimedia Enterprise API documentation
url: https://enterprise.wikimedia.com/docs/
x-tagGroups:
- name: Authentication
tags:
- authentication
- name: Metadata
tags:
- codes
- languages
- projects
- namespaces
- name: Snapshots
tags:
- snapshots
- structured-snapshots
- wikidata-snapshots
- name: On-demand
tags:
- articles
- structured-contents
- wikidata
- name: Realtime
tags:
- realtime-articles
- batches
- realtime-wikidata
- wikidata-batches