Making requests
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[{...}]. taskscomes back in the order you sent. Each entry echoes your task indata, 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
40501andcost: 0; the others run. liveandtask_postroutes needPOST. AGETon them returns40503with HTTP 405.
Request controls
Every task on a compatible route accepts four optional fields on top of the endpoint's own:
| Field | Type | Default | What it does |
|---|---|---|---|
auto_upgrade | boolean | true | Lets a blocked request move to a higher fetch level, billed at that level's price. false stays at the included level. |
max_level | standard | rendered | protected | protected | The highest fetch level the task may use. |
max_cost | number (USD) | none | The most this task may cost. We never upgrade past it. |
max_age | integer (seconds, 0 to 86400) | the endpoint's cache window | How 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
| Route | Method | Body |
|---|---|---|
/v1/business/google/products | GET | Scale SERP query parameters (data_cid, hl) |
/v1/business/google/photos | GET | Outscraper query parameters (query, photosLimit, tag, language, region) |
/v1/ads/meta, /v1/ads/yelp | POST | One Apify actor input object |
/v1/crawls, /v1/crawls/batch, /v1/map, /v1/serp | POST | One JSON object |
tasks_ready, task_get, /v1/account/..., locations, languages, models | GET | None, or query parameters |
Encoding
- Send
Content-Type: application/jsonand UTF-8 JSON. A body that isn't valid JSON returns40503("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 (
urlon Pages and Crawl API routes) must be absolutehttporhttpsURLs, 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"indatetime, plus an ISO 8601fetched_at("2026-12-03T09:00:00Z"). Crawl API routes use ISO 8601 throughout.
Limits at a glance
| Limit | Value | Where it's set |
|---|---|---|
Tasks per POST on compatible routes | 100 | Making requests |
| Targets per Crawl API batch | 100 | Working with large batches |
| Requests per minute | 120 per API key | Rate limits and concurrency |
| Inline Crawl API requests in flight | 10 per organization | Rate limits and concurrency |
max_age | 0 to 86,400 seconds | Caching and max_age |
Organic SERP depth | 1 to 200 | POSTGoogle Organic SERP: Live Advanced |
| Stored task results | 30 days | Data retention |
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.