Chunk IDs follow the format {page_id}_{chunk_index}:
736_0 - First chunk (index 0) of page 736 (Albert Einstein)
736_5 - Sixth chunk (index 5) of page 736
12345_12 - Thirteenth chunk of page 12345
Path Parameters
Parameter
Type
Description
id
string
Chunk ID in format {page_id}_{chunk_index}
Response
{
"id": "736_0",
"page_id": 736,
"rev_id": 1234567890,
"title": "Albert Einstein",
"section": "",
"text": "Albert Einstein (14 March 1879 - 18 April 1955) was a German-born theoretical physicist who is widely held to be one of the greatest and most influential scientists of all time.",
"chunk_id": 0,
"url": "https://en.wikipedia.org/wiki/Albert_Einstein",
"timestamp": "2024-01-15T10:30:00Z",
"source": {
"project": "en.wikipedia.org",
"page_id": 736,
"revision_id": 1234567890,
"source_url": "https://en.wikipedia.org/wiki/Albert_Einstein",
"permalink": "https://en.wikipedia.org/w/index.php?curid=736&oldid=1234567890"
},
"license": {
"name": "CC BY-SA 4.0",
"full_name": "Creative Commons Attribution-ShareAlike 4.0 International",
"url": "https://creativecommons.org/licenses/by-sa/4.0/"
},
"modified": true,
"modifications": [
"Converted from Wikitext markup to plain text",
"HTML tags and references removed",
"Chunked into passages for semantic search"
]
}
# Search returns chunk IDs in hits[].id
# Use that ID to fetch the full chunk:
curl -H "X-API-Key: YOUR_KEY" \
"https://api.wikirest.com/v1/chunk/736_5"
Use Cases
Building LLM context: Fetch specific chunks identified by search
Citations: Each chunk includes full source attribution
Navigation: Use chunk IDs to iterate through an article