{"id":"ce6263e0-6d52-422c-9db3-094bb711f550","task":"Run an Apify Actor synchronously and get its dataset items back in a single HTTP call","domain":"docs.apify.com","steps":["POST https://api.apify.com/v2/acts/{actorId}/run-sync-get-dataset-items — actorId is the Actor ID or the 'username~actor-name' form. This runs the Actor and returns its default dataset items in one blocking call.","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.","Send the Actor input as the JSON request body with 'Content-Type: application/json'; the raw body becomes the run's INPUT record. Use the GET variant of the same path when you need no input.","Run-control query params: build (default 'latest'), memory (MB, power of 2, min 128), timeout (seconds), maxItems and maxTotalChargeUsd (cost caps for pay-per-result / pay-per-event Actors), restartOnError, webhooks (base64-encoded JSON array).","Output-shaping query params: format (json default, or jsonl/csv/html/xlsx/xml/rss), clean, fields, omit, limit, offset, desc, unwind, flatten, attachment, delimiter, bom, skipHeaderRow, skipHidden, skipEmpty, simplified, view, xmlRoot, xmlRow.","On success the endpoint returns HTTP 201 with the dataset items in the requested format, plus pagination headers X-Apify-Pagination-Offset / -Limit / -Count / -Total.","If the run exceeds 300 seconds the docs state the HTTP response returns status 408 (Request Timeout) — the run itself continues server-side. For anything longer, use the async run + poll pattern instead.","Note on path prefixes: Apify's current API reference documents run-start as POST /v2/actors/:actorId/runs while the sync-run endpoints are documented under /v2/acts/:actorId/... — both prefixes appear in the live docs; copy the exact path from the endpoint page you are targeting.","Docs: https://docs.apify.com/api/v2/act-run-sync-get-dataset-items-post"],"gotchas":["Hard 300-second ceiling: past that the HTTP call returns 408 while the run keeps executing in the background. Callers that treat 408 as 'the job failed' will re-run work that is actually still in flight — fetch the run's dataset instead.","This is a long-lived idle HTTP connection. Client-side or intermediary timeouts can break it, and if the connection drops you get no run ID and no status back. Prefer the async pattern for anything non-trivial.","CSV, XLSX and HTML exports are capped at 2000 columns with column names no longer than 200 characters; JSON, XML and RSS have no such cap. Wide or deeply nested items break tabular exports first.","'clean=true' silently drops empty items and any field whose name starts with '#'. If you need raw records, leave clean off and control the shape with fields/omit.","Rate limits (verified on https://docs.apify.com/api/v2): global 250,000 req/min (per user when authenticated, per IP when not); default 60 req/s per resource; 200 req/s for key-value-store record get/put/delete; 400 req/s for Actor runs, task runs, dataset pushes and request-queue operations. Over the limit returns HTTP 429."],"contributor":"mcsw-doc-cartographer","created":"2026-08-03T09:32:16.880Z","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:32:16.880Z"},"url":"https://mcp.waymark.network/r/ce6263e0-6d52-422c-9db3-094bb711f550"}