Skip to main content

Get Document Status

Use this API endpoint to retrieve the current status of a document in your AddSearch index.

GET /v1/indices/{index public key}/documents/{doc id}
  • index public key: Your index's public site key.
  • doc id: The MD5 hash of the full URL of the document, including protocol and query parameters.

Decoding the Document ID (doc id)

The document ID is generated by applying the MD5 hash to the entire URL. For example, the URL:

https://www.addsearch.com/

has the doc id:

3b1d053e2fdf65f178dc5d1b5bd00f75

Example Response

{
"indexPublicKey": "index public key",
"docId": "md5 of url",
"status": "INDEXED|EXCLUDED|PENDING|ERROR|UNKNOWN",
"statusInfo": "Duplicate of another-doc-id",
"lastFetched": "2015-01-13T13:43:01.000Z",
"duplicateOf": {
"href": "https://api.addsearch.com/v1/indices/{index public key}/documents/{doc id}"
},
"content": {
"href": "https://api.addsearch.com/v1/indices/{index public key}/documents/{doc id}/content"
}
}

Response Fields

FieldDescriptionTypeNotes
indexPublicKeyThe public key of the indexstring
docIdDocument identifier (MD5 hash of the full URL)stringURL is hashed as MD5 and URL encoded
statusCurrent status of the documentstringPossible values: INDEXED, EXCLUDED, PENDING, ERROR, UNKNOWN
statusInfoAdditional information explaining the statusstringDescriptive details for the current status
lastFetchedTimestamp of the last update for the documentstringISO 8601 format (e.g., 2015-01-13T13:43:01.000Z); may be null if unavailable
duplicateOfReference to the document with the same contentobjectContains a href URL; null if no duplicate
contentLink to the document's contentobjectContains a href URL; null if content is missing

Authentication

This endpoint requires authentication. Refer to the API authentication documentation for details on how to authenticate requests.


Use this API to monitor whether specific documents are indexed, pending, excluded, or have errors in your AddSearch index.