Skip to main content

Get Document Contents

Use this API endpoint to retrieve the content and details of a single document stored in a specific AddSearch index.

Endpoint

GET /v2/indices/{index_public_key}/documents/{document_id}

Replace {index_public_key} with your index's public key and {document_id} with the unique identifier of the document you want to retrieve.

Response

The API returns a JSON object containing the document's fields. Example:

{
"id": "8700a03070a37982924597d6baa87be7",
"thumbnail_external_src": "https://www.example.com/thumbnail-image.jpg",
"custom_fields": {
"title": "Example product",
"description": "Description for example product",
"price_cents": 599,
"average_customer_rating": 4.5
}
}

Response Fields

FieldDescriptionTypeNotes
idDocument's unique identifierstringThis is usually a URL-encoded MD5 hash.
thumbnail_external_srcURL for the document's thumbnail imagestringOptional URL to an image used as a thumbnail for the document.
Standard fieldsAny standard fields except the document URLvariesSee standard fields documentation for details.
custom_fieldsMap of custom key-value pairsobjectSupported data types include text, integer, and double values.

Notes

  • Each field is returned as a separate key-value pair.
  • Authentication and any required HTTP headers depend on your API setup; verify your API access details.

Refer to the Indexing Overview for more information about standard fields and how to structure your documents.