Trigger schedule now
curl -X POST 'https://api.justcrawl.io/api/v1/schedules/sch_01ABC/trigger' \ -H 'Authorization: Bearer $JUSTCRAWL_API_KEY' \ -H 'Idempotency-Key: one-key-per-invocation' \ -H 'Content-Type: application/json' -d '{"maxJobs":100}'import os, requests, uuidinvocation_key = str(uuid.uuid4()) # Preserve this key for retries and recovery.r = requests.post( f'https://api.justcrawl.io/api/v1/schedules/{schedule_id}/trigger', headers={'Authorization': f'Bearer {os.environ["JUSTCRAWL_API_KEY"]}', 'Idempotency-Key': invocation_key}, json={'maxJobs': 100},)r.raise_for_status()run = r.json() # 202: shared run summary plus replayed; outcome may be skipped.const invocationKey = crypto.randomUUID(); // Preserve for retries and recovery.const res = await fetch(`https://api.justcrawl.io/api/v1/schedules/${scheduleId}/trigger`, { method: 'POST', headers: { Authorization: `Bearer ${process.env.JUSTCRAWL_API_KEY}`, 'Idempotency-Key': invocationKey, 'Content-Type': 'application/json' }, body: JSON.stringify({ maxJobs: 100 }),});if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);const run = await res.json();Requires schedules:write. Accepts one durable run without enumerating URLs, creating jobs, charging credits or publishing queue messages. Nonempty bodies must be JSON; unparsed bodies return static 400 rather than discarding maxJobs. Count the proposed selector first and show the URL count before a large launch. maxJobs optionally caps later seed and descendant admission. Keep one 1–256-character Idempotency-Key and unchanged options for this invocation. Receipt replay precedes mutable schedule, email and quota checks, including after deletion. Fresh requests require verified email and active quota. Different principal or intent, including a changed maxJobs, returns RUN_SUBMISSION_CONFLICT (409). Returns the shared flattened run summary and replayed flag with 202 for accepted, replayed and skipped runs. Overlap skips name the blocking run and age; unresolved workflows produce workflow_unresolved skips. A skip consumes the key: use a new key for a later invocation. Disabled and brand-paused schedules can be triggered manually. Run-now preserves nextRunAt and registers no schedule-agent wake. Preparation chooses the waiting-caller dispatch lane. For an uncertain response, recover with GET /batch-job-runs?submissionKey=…&entryMode=schedule_run_now. Zero matches means acceptance never committed; repeat the same intent with the same key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Body
Section titled “Request Body”object
Examplegenerated
{ "maxJobs": 1}Responses
Section titled “Responses”Durable accepted, replayed or skipped run.
object
object
Frozen for each run. Setting additional tags or inheritance requires urls:write; generated provenance tag prefixes are reserved.
object
object
object
Frozen for each run. Setting additional tags or inheritance requires urls:write; generated provenance tag prefixes are reserved.
object
Null until preparation measures the finite initial set. Measured zero is distinct.
object
object
object
Example
{ "entryMode": "api", "skipReason": "overlap", "definitionSnapshot": { "input": { "kind": "tags" } }, "input": { "kind": "tags" }, "phase": "preparing", "lane": "interactive", "stopReason": "credits_exhausted", "outcome": "completed", "fundingDetail": "no_plan", "partialCauses": [ "credits_exhausted" ]}Validation failed — request body or query is missing/invalid
object
Example
{ "error": "Missing or invalid \"url\" field"}Missing or invalid authentication token
object
Example
{ "error": "Missing or invalid authentication token"}Fresh manual invocation refused for insufficient credits. Do not retry automatically.
Insufficient permissions for this operation
object
Example
{ "error": "No organization. Complete onboarding first."}Resource not found
object
Example
{ "error": "Workflow not found"}Operation conflicts with current resource state
object
Example
{ "error": "Resource already exists"}Unexpected server error. Logs and PostHog $exception capture
object
Example
{ "error": "Something went wrong"}