Crawl

Cancelling Crawl Jobs

If you no longer need a crawl job to continue processing, you can cancel it using its job ID.

Cancelling a crawl job stops scheduling new crawl pages while allowing any pages already being processed to finish.


Cancel a Crawl Job

Cancel an existing crawl job.

DELETE /v1/crawl/{job_id}

If the cancellation request is accepted, the API returns information about the crawl job, including its current status, a URL for checking job status, and the number of pages that are still being processed.

Example:

{
  "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
  "status": "queued",
  "status_url": "string",
  "in_flight_pages": 0
}

Response Fields

FieldDescription
job_idUnique identifier of the crawl job.
statusCurrent status of the crawl job.
status_urlEndpoint that can be used to retrieve the latest status of the crawl job.
in_flight_pagesNumber of queued or processing pages that are still completing after the cancellation request.

What Happens After Cancellation?

After the cancellation request is accepted, you can continue monitoring the crawl job by retrieving its latest status using the status_url or the job ID.


Unable to Cancel a Job

If a crawl job cannot be cancelled in its current state, the API returns a 409 Conflict response.

For example, attempting to cancel a job that has already completed returns:

{
  "code": "INVALID_STATE",
  "message": "Crawl job 9293f045-0523-409e-a4e9-874abc663a9e is already completed and cannot be cancelled",
  "retryable": false
}

Error Fields

FieldDescription
codeMachine-readable error code.
messageDescription of why the cancellation request failed.
retryableIndicates whether retrying the same request may succeed.

Possible Responses

Status CodeDescription
202 AcceptedCancellation request accepted successfully.
401 UnauthorizedAuthentication failed.
404 Not FoundThe specified crawl job was not found.
409 ConflictThe crawl job cannot be cancelled in its current state.
422 Validation ErrorThe request contains invalid parameters.

On this page