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
| Field | Description | Type | Notes |
|---|---|---|---|
id | Document's unique identifier | string | This is usually a URL-encoded MD5 hash. |
thumbnail_external_src | URL for the document's thumbnail image | string | Optional URL to an image used as a thumbnail for the document. |
| Standard fields | Any standard fields except the document URL | varies | See standard fields documentation for details. |
custom_fields | Map of custom key-value pairs | object | Supported 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.