Cancel Data Set Collection V4

POST www.hashscraper.com/v4/api/schedule_results/{id}/cancel

Requests cancellation of an in-progress data set collection.

Registers a cancel signal for the requested data set. The worker picks up the signal at its next safe checkpoint, so this is not guaranteed to stop the run instantly.

Calling cancel on a data set that has already ended (finish/complete/canceled etc.) returns success without changing it; the current status comes back as sr_status (since 2026-09-27; previously it was overwritten to canceling).

Once the cancellation finishes (all jobs wound down), sr_status becomes canceled. This value was added on 2026-09-27; previously the data set stayed at canceling.

Request Parameters

  • Authorization: Header
    HashScraper API key. Send it in the form Bearer <api_key>.
    Example Bearer YOUR_API_KEY
  • id: Integer (path)
    ID of the data set to cancel.
    Example 239758028

Response Fields

  • result: String
    Result of the request.
    Allowed success, error
  • version: String
    API version.
    Example v4
  • request_id: String
    Request trace ID.
    Example req_5a8c1f1c-...
  • elapsed_sec: Float
    Time the server took to produce the response, in seconds (Float).
    Example 0.0153
  • data: Object
    Status snapshot right after the cancel request.
    • schedule_result_id: Integer
      Echo of the data set ID (same as requested).
    • schedule_id: String
      ID of the scraper this data set belongs to.
    • name: String
      Name of the scraper this data set belongs to.
    • sr_status: String
      Status right after the cancel request. Typically canceling; it becomes canceled once the jobs have wound down. A dataset with no running job (its jobs are already gone, or only waiting for a retry) can already be canceled in this response.
    • param_info: Object
      Snapshot of the parameters used for this data set. Keys are stable (param1~paramN) and each entry contains name (label) and value.

Error Responses

  • MISSING_API_KEY
    Missing or malformed Authorization header. Send as Authorization: Bearer <api_key>. (HTTP 401)
    {
      "result": "error",
      "version": "v4",
      "request_id": "req_5a8c1f1c-...",
      "code": "MISSING_API_KEY",
      "message": "API key is missing.",
      "elapsed_sec": 0.0008,
      "details": { "hint": "Send `Authorization: Bearer <api_key>` header." }
    }
  • INVALID_API_KEY
    No user matches the provided API key. (HTTP 401)
    {
      "result": "error",
      "version": "v4",
      "request_id": "req_5a8c1f1c-...",
      "code": "INVALID_API_KEY",
      "message": "API key is invalid.",
      "elapsed_sec": 0.0011
    }
  • SCHEDULE_RESULT_NOT_FOUND
    No data set matches the ID, or the caller does not have access. (HTTP 404)
    {
      "result": "error",
      "version": "v4",
      "request_id": "req_5a8c1f1c-...",
      "code": "SCHEDULE_RESULT_NOT_FOUND",
      "message": "ScheduleResult not found.",
      "elapsed_sec": 0.0021,
      "details": { "resource": "schedule_result", "id": "999999" }
    }

Related Guides

Example Request
  • cURL
  • Ruby
  • Python
  • NodeJS
  • PHP
  • Java
Example Response 200
{
  "result": "success",
  "version": "v4",
  "request_id": "req_5a8c1f1c-9b2d-4e7c-9abf-3f7e0a4d1b21",
  "elapsed_sec": 0.0153,
  "data": {
    "schedule_result_id": 239758028,
    "schedule_id": "8f3a7c1e9b5d24f6",
    "name": "네이버 뉴스 검색",
    "sr_status": "canceling",
    "param_info": {
      "param1": { "name": "키워드", "value": "키성장" },
      "param2": { "name": "정렬",   "value": "관련도순" }
    }
  }
}