DELETE
/
scrape
/
{job_id}
Cancel Job
curl --request DELETE \
  --url https://api.skop.dev/scrape/{job_id} \
  --header 'Authorization: Bearer <token>'
{
  "job_id": "<string>",
  "status": "cancelled",
  "message": "Job cancelled successfully",
  "cancelled_at": "2023-11-07T05:31:56Z"
}
Cancels a running scraping job and stops further processing.

Path Parameters

ParameterTypeDescription
job_idstringUnique job identifier

Example Request

const cancelJob = async (jobId) => {
  const response = await fetch(`https://api.skop.dev/scrape/${jobId}`, {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer sk-your-api-key'
    }
  })
  
  return await response.json()
}

Response (200 OK)

{
  "message": "Job job_123456789 cancelled successfully",
  "status": "cancelled"
}

Response Fields

FieldTypeDescription
messagestringConfirmation message with job ID
statusstringNew job status (always “cancelled”)

Error Responses

StatusDescription
404Job not found or access denied
500Internal server error

Use Cases

  • Resource Management: Cancel jobs that are taking too long
  • Cost Control: Stop jobs to avoid unnecessary charges
  • Queue Management: Cancel queued jobs that are no longer needed
  • Error Recovery: Cancel stuck or problematic jobs
Once cancelled, a job cannot be restarted. You’ll need to create a new job if you want to retry the same scraping task.

Authorizations

Authorization
string
header
required

API key in format 'sk-xxxxxxxxxxxxx' or 'sk_xxxxxxxxxxxxx'

Path Parameters

job_id
string
required

Unique job identifier

Response

200
application/json

Job cancelled successfully

The response is of type object.