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
| Field | Description | Type | Notes |
|---|---|---|---|
| indexPublicKey | The public key of the index | string | |
| docId | Document identifier (MD5 hash of the full URL) | string | URL is hashed as MD5 and URL encoded |
| status | Current status of the document | string | Possible values: INDEXED, EXCLUDED, PENDING, ERROR, UNKNOWN |
| statusInfo | Additional information explaining the status | string | Descriptive details for the current status |
| lastFetched | Timestamp of the last update for the document | string | ISO 8601 format (e.g., 2015-01-13T13:43:01.000Z); may be null if unavailable |
| duplicateOf | Reference to the document with the same content | object | Contains a href URL; null if no duplicate |
| content | Link to the document's content | object | Contains 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.