Crawl or Recrawl a Document Using the API
Send a POST request to the /v1/crawler endpoint to crawl a new URL or recrawl an already indexed URL.
Request Structure
Endpoint
POST /v1/crawler
Payload
Include the following JSON object in the request body:
{
"action": "FETCH",
"indexPublicKey": "SITEKEY",
"url": "http://foo.com/bar.html"
}
| Field | Description | Type | Notes |
|---|---|---|---|
action | Specify the action to perform on the URL | string | Acceptable value: FETCH to add or update the URL in the index |
indexPublicKey | Your site's public key for identification | string | Find this key in your AddSearch dashboard |
url | The full URL of the document to crawl or recrawl | string | Must include protocol (http or https), domain, and path Example: https://www.example.com/page.html |
Response
A successful request returns HTTP status 202 ACCEPTED with a JSON response like this:
{
"message": "Scheduled",
"docId": "doc id"
}
| Field | Description | Type | Notes |
|---|---|---|---|
message | Status message about the crawl | string | Typically indicates the request was scheduled |
docId | Unique identifier for the document | string | MD5 hash of the URL, URL-encoded |
Additional Information
- Indexing usually starts within one minute after the API call.
- This endpoint requires authentication. For details on how to authenticate your API requests, see API authentication.
Use this API to keep your site's search index updated by submitting URLs for initial crawl or recrawl.