Riken ScraperDocs

Cancel a job

POSThttps://scraper.riken.me/v1/jobs/{id}/cancel
Cost: FreeLiveErrors are free

Try it

Paste your key under Authorization and send a live request to https://scraper.riken.me. The key stays in this browser tab only (session storage, cleared when the tab closes) and is sent nowhere else. A live request spends credits like any other.

POST
/v1/jobs/{id}/cancel

Stop a queued or running job and refund what it has not spent. Work already under way finishes and is billed; nothing is deleted. A job in any other state is 400 bad_request. Free.

Headers

NameTypeRequiredDescriptionExample
x-api-keystringone of the auth headersYour API key. If both headers are sent, `x-api-key` wins.sk_...
Authorizationstringone of the auth headers`Authorization: Bearer <key>`, the same key.Bearer sk_...

Path parameters

NameTypeRequiredDescriptionExample
idintegeryesThe job id. Another key's job answers as if it did not exist.685

Status codes

StatusChargedMeaning
200FreeThe job after the cancel and refund.
400FreeA malformed body, parameter or cursor. Free.
401FreeMissing, unknown or revoked key. Free.
404FreeNo such job, another key's job, or (GET export only) no export requested yet. Free.
429FreeThe key's request rate. Free.
500FreeOur fault. Free.

Response Body

The job after the cancel and refund.

application/json
  1. response
id*integer
Formatint64
kind*JobKind

tiktok.search keywords; tiktok.screen handles (profile and first videos); tiktok.walk handles (newest posts, about 24 per creator); tiktok.audience handles (US+CA audience share); instagram.search keywords; instagram.fetch handles (profile and feed).

Value in"tiktok.search""tiktok.screen""tiktok.walk""tiktok.audience""instagram.search""instagram.fetch"
state*JobState
Value in"queued""running""done""failed""canceled"
priority*integer
idempotency_key?string
progress*
credits*

Money as exact micro-credit integers and as decimal strings. Never a JSON number of credits.

error?string
created_at*string
Formatdate-time
started_at?string
Formatdate-time
finished_at?string

Set once nothing is still writing to the job; export needs it.

Formatdate-time

Example request

# A call can be held open up to 180 s (audience: 300 s). Set a client timeout above that.curl -X POST 'https://scraper.riken.me/v1/jobs/685/cancel'
Example Response
{  "id": 686,  "kind": "instagram.fetch",  "state": "canceled",  "priority": 100,  "progress": {    "units_done": 50,    "units_total": 200  },  "credits": {    "held_micro": 0,    "spent_micro": 50000000,    "held": "0.000000",    "spent": "50.000000"  },  "created_at": "2026-11-05T10:00:00Z",  "started_at": "2026-11-05T10:00:02Z"}