Skip to content
Wikimedia Enterprise
Documentation menu

Snapshot API

View as Markdown (opens in a new tab)

Our Snapshot API provides you the entirety of a Wikimedia project (examples: English Wikipedia or French Wiktionary) in a compressed tarball (.tar.gz) that contains a single .ndjson file. This file holds all articles (pages), with all data fields, in Newline-Delimited JSON format. Updated once a month, on the 1st day of the month, these snapshots are provided free with an account. You also get free access to Structured Contents snapshots. Wikidata project data has its own set of Snapshot endpoints, separate from the other textual Wikimedia project endpoints. If you need fresher data, you can get access to up to daily snapshot updates by contacting Sales.

At a glance

  • Base URL: https://api.enterprise.wikimedia.com
  • Auth: JWT Bearer access token (Authentication)
  • Formats: .tar.gz containing one NDJSON file
  • Response model: article
  • Access: free monthly snapshots; 30 snapshot + 1,500 chunk downloads/month; weekly or daily snapshots with a paid account
  • Status: Wikidata and Structured Contents endpoints are in beta, other endpoints are fully released

When to use

Use the Snapshot API when you need a full Wikimedia project in bulk - every article in one download, refreshed monthly, weekly, or daily. If you only need specific articles, the On-demand API fetches them one at a time. If you need updates faster than daily, use the Realtime API.

Endpoints

Download endpoints also answer HEAD requests, so you can inspect a snapshot's size before committing to the transfer. The Structured Contents snapshots hold pre-parsed articles from the Structured Contents initiative, and are currently in beta with no SLA.

For most use cases, calling the endpoints in this order returns the data you're looking for:

  1. Snapshots Available allows you to find the snapshot identifiers you want to download.
  2. Snapshot Info with your chosen snapshot identifier as input to check snapshot size and chunk identifiers.
  3. Snapshot Download or Snapshot Chunk Download to download the snapshot in full or as separate chunks.

Worked example

Download English Wikipedia's article namespace as a single tarball. The snapshot identifier follows the <language><project_code>_namespace_<number> pattern - see the Identifiers guide for how to construct it. The Wikidata snapshots are addressed by items or properties rather than a project identifier, and are also beta with no SLA; see Wikidata snapshots below.

curl -H "Authorization: Bearer ACCESS_TOKEN" -L \
https://api.enterprise.wikimedia.com/v2/snapshots/enwiki_namespace_0/download \
--output enwiki.tar.gz

Each line of the extracted NDJSON is one article. This example shows one trimmed article response:

Response
{
"name": "Squirrel",
"identifier": 28492,
"abstract": "Squirrels are members of the family Sciuridae, a family that includes small or medium-sized rodents. ...",
"date_modified": "2026-06-10T08:38:57Z",
"url": "https://en.wikipedia.org/wiki/Squirrel",
"in_language": {
"identifier": "en"
},
"is_part_of": {
"identifier": "enwiki"
},
"namespace": {
"identifier": 0
},
"watchers_count": 382,
"protection": [
{
"expiry": "infinity",
"level": "autoconfirmed",
"type": "edit"
},
{
"expiry": "infinity",
"level": "autoconfirmed",
"type": "move"
}
],
"event": {
"identifier": "e04c1fc5-caa0-4b26-96d4-cc4c61224cd9",
"type": "update",
"date_created": "2026-06-10T08:39:03.755241Z"
},
"version": {
"identifier": 1358688336,
"editor": {
"identifier": 10248457,
"name": "Orenburg1"
},
"scores": {
"revertrisk": {
"probability": {
"false": 0.6065611243247986,
"true": 0.3934388756752014
}
}
},
"number_of_characters": 41873
},
"article_body": {
"html": "<!DOCTYPE html>\n<html prefix=\"dc: http://purl.org/dc/terms/ ... (truncated)",
"wikitext": "{{short description|Family of rodents}}\n{{About|the squirrel ... (truncated)"
},
"license": [
{
"identifier": "CC-BY-SA-4.0",
"name": "Creative Commons Attribution-ShareAlike License 4.0",
"url": "https://creativecommons.org/licenses/by-sa/4.0/"
}
]
}

The On-demand API returns the same article model, so one parser covers both.

Working with snapshots

Start with Snapshots Available. Use filters and fields to narrow the response. This example returns only English Wikipedia's namespace 0 snapshot, with three fields:

curl --location 'https://api.enterprise.wikimedia.com/v2/snapshots' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--data '{
"filters": [
{
"field": "namespace.identifier", "value": 0
},
{
"field": "is_part_of.identifier", "value": "enwiki"
}
],
"fields": ["is_part_of.identifier","date_modified","size.value"]
}'
Response
[
{
"is_part_of__identifier": "enwiki",
"date_modified": "2025-08-25T01:02:01.315827526Z",
"size__value": 141980.842e0
}
]

Extract the identifier(s) of the snapshot bundle(s) you want, then request Snapshot Info for each:

curl --location --request POST 'https://api.enterprise.wikimedia.com/v2/snapshots/dewiki_namespace_0' \
--header 'Authorization: Bearer ACCESS_TOKEN'

The response covers the bundle's size, when it was last modified, the chunk identifiers you can download individually, and record_count, the number of articles (NDJSON lines) in the file. Chunk Info responses carry no record_count. size.value is the snapshot's size in decimal megabytes, bytes divided by 1,000,000, to three decimals, and unit_text is always MB for snapshots. For the exact byte count, request Project Snapshot Headers and read Content-Length.

Response
{
"identifier": "dewiki_namespace_0",
"version": "d68aa4e8ee0f9bdb6e87664c26553637",
"date_modified": "2026-09-04T00:47:18.699138385Z",
"is_part_of": {
"identifier": "dewiki"
},
"in_language": {
"identifier": "de"
},
"namespace": {
"identifier": 0
},
"size": {
"value": 35530.513,
"unit_text": "MB"
},
"chunks": [
"dewiki_namespace_0_chunk_0",
"dewiki_namespace_0_chunk_1",
"dewiki_namespace_0_chunk_2",
"dewiki_namespace_0_chunk_3",
[...]
],
"record_count": 3169295
}

Decide whether to download the bundle(s) in full or in chunks, using the chunk identifiers from the Snapshot Info response. Chunks are ideal for downloading just a small sample of a wiki project for testing, and for avoiding the need to keep a connection open for a long time while downloading a single large file. Some projects (like English Wikipedia) are larger than a terabyte. Downloading chunks on a free account counts towards your monthly limit of snapshot chunk downloads, downloading a full bundle counts towards your (separate) monthly limit of snapshot downloads.

Example request to the Snapshot Chunk Download endpoint to download the first chunk of German Wikipedia:

curl --location 'https://api.enterprise.wikimedia.com/v2/snapshots/dewiki_namespace_0/chunks/dewiki_namespace_0_chunk_0/download' \
--header 'Authorization: Bearer ACCESS_TOKEN'

Call Snapshot Info every time before downloading a bundle or chunk to make sure the bundle is available, and check its date_modified field to see when it was last updated. The process to update Snapshot bundles starts daily at midnight (00:00) UTC. We recommend consuming new bundles between 4:00 and 8:00 AM UTC to make sure the new bundles are available and complete. If you are on a free plan, your Snapshot bundles update once a month, on the 1st day of the month.

Note:

Snapshots, structured-contents snapshots, and chunks may contain a small amount of duplicate articles (< 1%). Similarly, they may contain a small amount of deleted articles.

When encountering more than one instance of an article, please use the one with the highest version.identifier number. This will be the latest among the duplicates.

When encountering deleted articles, please download the successive snapshots. The deleted articles will be removed in the successive generation of these snapshots/structured-contents snapshots/chunks.

Wikidata snapshots

The Wikidata snapshot endpoints deliver the Wikidata Main Graph as two bundles, addressed by a fixed identifier instead of the project-and-namespace recipe:

  • items - every item (QID) in the Main Graph: concepts, places, people, and things. About 76 million records and roughly 105 GB compressed, split into close to 300 chunks (measured in September 2026).
  • properties - every property (PID): the attributes and relationships that define the graph. About 16,000 records in a single chunk.

The Main Graph is Wikidata without scholarly articles (roughly 45 million items), lexemes, and schemas. Read about the Wikidata Graph Split to learn more about the Wikidata Main Graph and Scholarly Graph.

Each line of the NDJSON file is a wikidata_article object, the same model the On-demand Wikidata lookups return, with the entity's labels, descriptions, aliases, sitelinks, and statements under entity. Downloading a snapshot and then ingesting every hourly batch since that first download ensures you always have an up-to-date copy of the Main Graph without the need for a constant open connection to the Realtime Stream.

Wikidata Snapshot Info reports the bundle's size in decimal megabytes, its chunk identifiers, and record_count, the number of lines in the file:

curl --location 'https://api.enterprise.wikimedia.com/v2/snapshots/wikidata/properties' \
--header 'Authorization: Bearer ACCESS_TOKEN'
Response
{
"identifier": "wikidata_properties",
"version": "faa1ca20c1707f7cca674a2f9d23df4b",
"date_modified": "2026-09-03T02:24:39.018449251Z",
"is_part_of": {
"identifier": "wikidatawiki"
},
"in_language": {
"identifier": "en"
},
"namespace": {
"identifier": 120
},
"size": {
"value": 36.945,
"unit_text": "MB"
},
"chunks": [
"wikidata_properties_chunk_0"
],
"record_count": 14069
}

Download the whole bundle from Wikidata Snapshot Download, or one chunk at a time from Wikidata Snapshot Chunk Download using the identifiers from the chunks array:

curl --location 'https://api.enterprise.wikimedia.com/v2/snapshots/wikidata/items/download' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--output wikidata_items.tar.gz
curl --location 'https://api.enterprise.wikimedia.com/v2/snapshots/wikidata/items/chunks/wikidata_items_chunk_0/download' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--output wikidata_items_chunk_0.tar.gz

The bundles refresh on the same schedule as the project snapshots, up to daily for paid accounts and monthly on free accounts. Downloads count against the same limits as project snapshots: a full snapshot download counts toward your snapshot limit, and a chunk download counts toward your separate chunk limit. Items live in namespace 0 and properties in namespace 120, which is why the two bundles report different namespace values.

Resumable downloads

Every /download endpoint answers a GET request with 307 Temporary Redirect to a presigned URL, and the file is served from that URL rather than from the API. The presigned URL is valid for 60 seconds, so request a fresh one for every attempt instead of storing it. The --location flag in the examples above is what follows the redirect. Do not send the API bearer token to the presigned URL: the storage service rejects a request that carries both with 400 InvalidArgument. curl drops the Authorization header on its own when a redirect leaves the API host.

The presigned URL accepts Range requests, so a large bundle that stops partway resumes from the byte it stopped at. The API path ignores Range, because it redirects before reading it; the header has to reach the presigned URL.

  1. Send a HEAD request to Project Snapshot Headers before the first attempt and record Content-Length, the exact byte count, and ETag. Accept-Ranges: bytes confirms the file supports partial requests.
  2. Download with curl --location --continue-at -. curl reads the size of the output file, sends Range for the remaining bytes to the presigned URL, and receives 206 Partial Content with a Content-Range header that names the byte span and the total.
  3. Before each resume, send the HEAD request again and compare ETag with the one you recorded. A different ETag means the snapshot rotated (the update process starts at 00:00 UTC), and the partial file belongs to the previous bundle: delete it and start over.
  4. A 416 Range Not Satisfiable response after a matching ETag means the file is already complete.

The example uses angwiki_namespace_6, the file namespace of the Old English Wikipedia, a snapshot small enough to run in seconds; the headers shown are from a real run.

curl --head --header 'Authorization: Bearer ACCESS_TOKEN' \
https://api.enterprise.wikimedia.com/v2/snapshots/angwiki_namespace_6/download
# content-length: 60862
# etag: "a4941a7f21b2d17b5bf6ed9a9ec0b903"
# accept-ranges: bytes
curl --location --continue-at - --header 'Authorization: Bearer ACCESS_TOKEN' \
https://api.enterprise.wikimedia.com/v2/snapshots/angwiki_namespace_6/download \
--output angwiki_namespace_6.tar.gz
# on a resume: HTTP/1.1 206 Partial Content
# content-range: bytes 30000-60861/60862
# etag: "a4941a7f21b2d17b5bf6ed9a9ec0b903"

The same contract applies to every /download path: project snapshots and chunks, Structured Contents snapshots, Wikidata snapshots and chunks, and the hourly project and Wikidata batch files of the Realtime API.

Response model

Every NDJSON line is an article object: the full payload for one page, identical in schema across the Snapshot and On-demand APIs. Every article contains credibility signals like watchers_count, protection, and version.scores; see the credibility signals tuning guide for how to combine them when deciding what content to trust.

See also