Skip to main content
DELETE
Cancel Search Job
This stops a search job that is queued or currently running. Search jobs usually resolve in a few seconds, but a degraded upstream network can occasionally make one run much longer than normal — use this to stop waiting on it rather than polling indefinitely. Cancelling a job that has already reached a terminal state (completed or failed) returns a 400.

Example Request

Response

What Polling Sees After Cancelling

A search job has no separate “cancelled” job state — cancelling either removes it from the queue before it started, or signals the running job to stop at its next checkpoint (between search sources/attempts, not mid-request):
  • If the job hadn’t started yet, a subsequent GET /search/ returns 404 (JOB_NOT_FOUND).
  • If the job was already running, it keeps reporting status: "active" for a brief moment, then settles to status: "failed" with error: "Search cancelled".
When you cancel a search that is already running, the DELETE response also includes a message field explaining that cancellation was requested and not yet applied. A running search can only stop at a checkpoint: between search sources and attempts, and once the engines have answered but before the search is billed. If the search had already finished finding results, it completes normally and is charged as usual. The same applies to a search with scrapeOptions: if cancellation arrives while page content is being fetched, no new pages are fetched, but pages already started are billed like any other scrape. Always check GET /search/ for the final state. No credits are charged for a search that ends as failed with error: "Search cancelled".

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

jobId
string
required

The job ID to cancel

Response

Job cancelled

status
enum<string>
Available options:
cancelled
jobId
string