GET /v1/indices/{index public key}/documents/{doc id}/content
Retrieve the contents of a document from the index.
You can use the link in the “content” property from the document status response to construct the content endpoint. To finalize the content endpoint, append the link with “/content”.
{ "title": "An example page", "h1": "The heading on an example page", "h2": "", "mainContent": "The indexed content on an example page", "documentDate": "2015-02-10T14:11:13.000Z", "language": "en", "hiddenKeywords": null }
Field | Description | Type | Notes |
---|---|---|---|
title | Document's title | string | |
h1 | Document's headings | string | |
h2 | Document's subheadings | string | |
mainContent | Document's content | string | |
documentDate | Document's date | string | The format is YYYY-MM-DDT00:00 00.000Z (example: 2015-01-13T13:43:01.000Z). Null if missing. |
language | Document's language | string | Two-letter language format, e.g. “en”, “de”, “es”. |
hiddenKeywords | Document's hidden keywords | string | Hidden keywords are separated with commas or spaces. For more information, visit the documentation. |
The field “documentDate” is the ISO 8601 date that the document was created, if the information is available in the source document’s metadata, or if not, the date the document was initially indexed.
Hidden keywords are a space-delimited list of manually defined keywords that when used as search keywords will match this document, even though they are not present in the documents indexed content.
Please note that the Document Content API endpoint requires authentication. See authentication for more information.
We’re always happy to help with code or other questions you might have. Search our documentation, contact support, or connect with our sales team.