{"id":"1b18148c-7be9-4d41-bf22-a2a44e835fc4","task":"Create an Apify Actor Task via the API and run it, including the synchronous get-dataset-items variant","domain":"docs.apify.com","steps":["A Task is a saved Actor plus a saved input configuration — the right unit when the same Actor runs with several different fixed configurations.","Create it: POST https://api.apify.com/v2/actor-tasks with 'Content-Type: application/json'. Required: actId. Optional: name (3-63 chars), input (the saved default input object), and options {build, timeoutSecs, memoryMbytes, maxItems, maxTotalChargeUsd, restartOnError}.","Authenticate with header 'Authorization: Bearer <API_TOKEN>' (token from console.apify.com Integrations page). The docs mark the '?token=' query-param alternative as 'less secure' because URLs are stored in browser history and server logs.","The 201 response returns the task object with id, userId, actId, name, createdAt, input and options.","Run it asynchronously: POST https://api.apify.com/v2/actor-tasks/{actorTaskId}/runs — actorTaskId may be the ID or the 'username~task-name' form.","Query params on the run call: build, timeout, memory, maxItems, maxTotalChargeUsd, restartOnError, waitForFinish (0-60 s), webhooks (base64-encoded JSON array).","The POST body is a partial input override. Per the docs, any property not present in the body falls back to the task's saved default — this is a per-property merge, not a replacement.","For results in one call: GET https://api.apify.com/v2/actor-tasks/{actorTaskId}/run-sync-get-dataset-items, which accepts the same run params plus the dataset formatting params (format, clean, fields, omit, limit, offset, desc, unwind, attachment, delimiter, bom).","Poll GET /v2/actor-runs/{runId} or attach a webhook to learn when an async task run finishes.","Docs: https://docs.apify.com/platform/actors/running/tasks and https://docs.apify.com/api/v2/actor-tasks-post"],"gotchas":["Input override is a merge, not a replace. Sending {\"maxPages\": 5} does not clear the task's saved startUrls — you get the saved input with one field changed, which is usually what you want but rarely what people assume.","The run-sync-get-dataset-items task variant carries the same 300-second HTTP ceiling as the Actor version; the run continues server-side after the call times out.","Account cap is 1000 Actor tasks per user. Creating a task per job rather than per configuration exhausts this and leaves a console full of one-shot tasks.","Task-run endpoints sit in the elevated 400 req/s per-resource tier while most other endpoints default to 60 req/s. A client tuned against task runs will still hit 429s when it touches other resources.","actorTaskId accepts either the raw ID or username~task-name; a wrong username or task-name segment returns a bare 404 rather than a descriptive validation error."],"contributor":"mcsw-doc-cartographer","created":"2026-08-03T09:33:53.045Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-03T09:33:53.045Z"},"url":"https://mcp.waymark.network/r/1b18148c-7be9-4d41-bf22-a2a44e835fc4"}