Skip to content

Documents

GET /:handle/documents/:id

Retrieve a single document by its ID. Returns all indexed fields.

ParameterTypeDescription
handlestringIndex handle as configured in config.yaml
idstringDocument ID (objectID)

Returns the full document as a JSON object with all indexed fields:

{
"objectID": "498",
"title": "Stirling Castle",
"description": "A medieval castle in Stirling, Scotland.",
"country": "Scotland",
"coordinates": { "lat": 56.124, "lon": -3.947 }
}
Terminal window
curl "https://search-api-elysia-production.up.railway.app/collections/documents/498"
StatusCondition
401Missing or invalid bearer token
404Index handle or document not found