Trigger a crawl
const url = 'https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/crawl';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"chainA11y":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/crawl \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "chainA11y": true }'Start a crawl for the site right now. This is idempotent with respect to in-progress crawls: if a crawl is already running, no new crawl is started.
- 202 Accepted — a new crawl was started (
started: true). - 200 OK — a crawl was already running, so this was a no-op
(
started: false).
Owners, admins, and API keys can always trigger crawls; a restricted
member needs the canCrawl grant. A manual crawl does not advance
the scheduled cadence clock — see the Crawl behavior guide.
By default a manual crawl is a full scan — it chains the accessibility
render pass when that app is installed. Pass { "chainA11y": false }
for a links-only run.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The site’s UUID.
Request Body
Section titled “ Request Body ”object
Set false to skip the chained accessibility scan.
Responses
Section titled “ Responses ”A crawl was already running; nothing was started.
The result of triggering a crawl.
object
true if a new crawl was started, false if one was already running.
Live crawl state from the crawler. Unlike persisted records, these are camelCase counters describing the in-progress run.
object
URLs currently leased and being checked.
URLs waiting in the frontier to be leased.
The adaptive in-flight window size.
Example
{ "started": false, "status": { "state": "crawling", "runId": "9f1c2e44-5b3a-4d8e-9f10-2a7c6b8e0d11", "pagesCrawled": 134, "linksChecked": 512, "brokenCount": 3, "inFlight": 8, "pending": 47, "window": 16 }}A new crawl was started.
The result of triggering a crawl.
object
true if a new crawl was started, false if one was already running.
Live crawl state from the crawler. Unlike persisted records, these are camelCase counters describing the in-progress run.
object
URLs currently leased and being checked.
URLs waiting in the frontier to be leased.
The adaptive in-flight window size.
Example
{ "started": true, "status": { "state": "seeding", "runId": "9f1c2e44-5b3a-4d8e-9f10-2a7c6b8e0d11", "pagesCrawled": 0, "linksChecked": 0, "brokenCount": 0, "inFlight": 0, "pending": 1, "window": 8 }}Missing or invalid credentials.
object
A human-readable error message.
Example
{ "error": "invalid api key"}The caller’s role or key scope does not allow this action.
object
A human-readable error message.
Example
{ "error": "only owners and admins can edit site settings"}No site with that id is visible to the caller.
object
A human-readable error message.
Example
{ "error": "site not found"}Neither the Broken Links nor the Accessibility app is enabled.
object
A human-readable error message.
Example
{ "error": "neither broken links nor accessibility is enabled for this site"}