Making requests

Send JSON arrays of up to 100 tasks, set per-task controls, and understand request-level and task-level limits.
Open as Markdown
On this page

Task arrays

DataForSEO-shaped routes (SERP, Pages, AI answers, my_business_info) take a POST with a JSON array of task objects. Each task is independent: it's validated, run, billed and reported on its own.

curl -X POST "https://api.dataforgaio.com/v1/serp/google/organic/task_post" \
  -u "api:$DATAFORGAIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    { "keyword": "trail running shoes", "location_code": 2840, "language_code": "en", "tag": "kw-1" },
    { "keyword": "waterproof hiking boots", "location_code": 2826, "language_code": "en", "tag": "kw-2" }
  ]'
  • Up to 100 tasks per request. More returns 40006 (HTTP 400) and nothing runs.
  • A single object works too. We treat {...} as [{...}].
  • tasks comes back in the order you sent. Each entry echoes your task in data, so you can match them without relying on order.
  • One bad task doesn't sink the rest. A task with an invalid field comes back with 40501 and cost: 0; the others run.
  • live and task_post routes need POST. A GET on them returns 40503 with HTTP 405.

Request controls

Every task on a compatible route accepts four optional fields on top of the endpoint's own:

FieldTypeDefaultWhat it does
auto_upgradebooleantrueLets a blocked request move to a higher fetch level, billed at that level's price. false stays at the included level.
max_levelstandard | rendered | protectedprotectedThe highest fetch level the task may use.
max_costnumber (USD)noneThe most this task may cost. We never upgrade past it.
max_ageinteger (seconds, 0 to 86400)the endpoint's cache windowHow old a cached result may be. 0 always fetches fresh.

A bad value (for example "max_level": "turbo") fails that task with 40501 and an exact message. These are explained in Fetch levels and Auto-upgrade and Caching and max_age.

On the Scale SERP, Outscraper and Apify routes, send the same four fields as query parameters or in the JSON body. On the Crawl API, auto_upgrade, max_level and max_cost go in the request body; max_age doesn't apply.

Other request shapes

RouteMethodBody
/v1/business/google/productsGETScale SERP query parameters (data_cid, hl)
/v1/business/google/photosGETOutscraper query parameters (query, photosLimit, tag, language, region)
/v1/ads/meta, /v1/ads/yelpPOSTOne Apify actor input object
/v1/crawls, /v1/crawls/batch, /v1/map, /v1/serpPOSTOne JSON object
tasks_ready, task_get, /v1/account/..., locations, languages, modelsGETNone, or query parameters

Encoding

  • Send Content-Type: application/json and UTF-8 JSON. A body that isn't valid JSON returns 40503 ("POST Data Is Invalid").
  • Request bodies are limited to 20 MB.
  • Keywords are plain text up to 700 characters on SERP routes. Don't URL-encode them inside JSON.
  • URLs (url on Pages and Crawl API routes) must be absolute http or https URLs, at most 2,000 characters, on a public host.
  • Money fields in responses are JSON numbers in USD ("cost": 0.00054). Receipts on the Crawl API use numbers too.
  • Timestamps: compatible routes use DataForSEO's "2026-12-03 09:00:00 +00:00" in datetime, plus an ISO 8601 fetched_at ("2026-12-03T09:00:00Z"). Crawl API routes use ISO 8601 throughout.

Limits at a glance

LimitValueWhere it's set
Tasks per POST on compatible routes100Making requests
Targets per Crawl API batch100Working with large batches
Requests per minute120 per API keyRate limits and concurrency
Inline Crawl API requests in flight10 per organizationRate limits and concurrency
max_age0 to 86,400 secondsCaching and max_age
Organic SERP depth1 to 200POSTGoogle Organic SERP: Live Advanced
Stored task results30 daysData retention
Tip:

Live requests run every task before responding, one after another. A live request with 100 SERP tasks can take minutes. For more than a handful of tasks, use task_post and collect results as they finish. See Choosing a mode.