# DataForGAIO API documentation

> SERP, Pages, AI answers, Business and Ads data APIs plus the Crawl API. Every task reports its fetch level, any upgrade and its reason, and the amount billed.

Base URL: `https://api.dataforgaio.com/v1`. Authenticate with HTTP Basic auth: any login, your `dg_` API key as the password.

## Guides

### Get started

- [Introduction](https://dataforgaio.com/docs/introduction.md): What the DataForGAIO API covers, how its endpoint families are organized, and how billing works.
- [Quickstart](https://dataforgaio.com/docs/quickstart.md): Create an API key, send your first Google SERP request with cURL, Python or Node, and read the response.
- [Authentication](https://dataforgaio.com/docs/authentication.md): Authenticate with your dg_ API key using Basic auth, a Bearer token or the X-API-Key header, and keep the key safe.
- [Base URLs and the v3 alias](https://dataforgaio.com/docs/base-urls.md): The /v1 base URL, how mirrored paths map to it, and the /v1/v3 alias for DataForSEO SDKs.
- [Making requests](https://dataforgaio.com/docs/making-requests.md): Send JSON arrays of up to 100 tasks, set per-task controls, and understand request-level and task-level limits.

### Concepts

- [Live and queued tasks](https://dataforgaio.com/docs/task-modes.md): The live, standard queue and priority queue modes, the task_post, tasks_ready and task_get flow, pingback and postback callbacks, and how long results are kept.
- [Fetch levels and Auto-upgrade](https://dataforgaio.com/docs/fetch-levels-and-auto-upgrade.md): The Standard, Rendered and Protected fetch levels, how Auto-upgrade moves a blocked request between them, what each level costs, and how auto_upgrade, max_level and max_cost cap it.
- [Caching and max_age](https://dataforgaio.com/docs/caching-and-max-age.md): The shared result cache, its default window per data type, how max_age overrides it, and how to tell a cached result from a fresh one.
- [Pricing and billing](https://dataforgaio.com/docs/pricing-and-billing.md): Published unit prices for every served endpoint, the cost fields on each response, when a request costs $0, the wallet, billing history and receipts.
- [Status codes and errors](https://dataforgaio.com/docs/errors.md): Every status code the API returns, whether it was billed, and how to handle each one, including retries with backoff.
- [Rate limits and concurrency](https://dataforgaio.com/docs/rate-limits.md): The per-key request rate, the per-organization limit on inline Crawl API requests, and how to stay under both.
- [Locations and languages](https://dataforgaio.com/docs/locations-and-languages.md): Country location codes, city targeting with location_name, map coordinates, language codes, and the free lists that enumerate them.
- [Receipts and fetch facts](https://dataforgaio.com/docs/receipts.md): What the receipt_id and fetch facts on every task record, and the full provenance receipt on Crawl API pages, including robots.txt and AI-use signals.
- [Data retention](https://dataforgaio.com/docs/data-retention.md): How long we keep queued task results, raw HTML, cached results, billing records and AI answers.

### Guides

- [Handling webhooks securely](https://dataforgaio.com/docs/webhooks.md): Receive pingback, postback and Crawl API batch webhooks, verify them by reading the result back with your key, and handle missed deliveries.
- [Retrying safely](https://dataforgaio.com/docs/retrying-safely.md): Which errors to retry, how to back off, and how to avoid paying twice for a request that timed out on your side.
- [Working with large batches](https://dataforgaio.com/docs/large-batches.md): Run thousands of SERP, profile or page tasks with task arrays, queues and callbacks while staying inside rate limits and your wallet.
- [Choosing a mode for cost vs speed](https://dataforgaio.com/docs/choosing-a-mode.md): When to use the standard queue, the priority queue or live, with worked costs for common workloads.

### Migrate

- [Migrate from DataForSEO](https://dataforgaio.com/docs/migrate-from-dataforseo.md): Move a DataForSEO v3 client to DataForGAIO by swapping the base URL and password, with the path mapping per family, what's served today, and the known differences.
- [Migrate from Scale SERP (place_products)](https://dataforgaio.com/docs/migrate-from-scale-serp.md): Move Scale SERP search_type=place_products calls to /v1/business/google/products, with parameter and response mapping.
- [Migrate from Outscraper (photos)](https://dataforgaio.com/docs/migrate-from-outscraper.md): Move Outscraper Google Maps Photos calls, including owner photos with tag=by_owner, to /v1/business/google/photos.
- [Migrate from Apify (Meta and Yelp ads actors)](https://dataforgaio.com/docs/migrate-from-apify.md): Move Apify Facebook Ads Library and Yelp actor runs to /v1/ads/meta and /v1/ads/yelp, with input and output field mapping.

### Recipes

- [Daily rank tracking with the standard queue](https://dataforgaio.com/docs/recipe-daily-rank-tracking.md): Track a domain's Google positions for a keyword list every day at the standard queue price, collecting results with tasks_ready and storing them in SQLite.
- [Local rank grid with Google Maps](https://dataforgaio.com/docs/recipe-local-rank-grid.md): Measure a business's Google Maps position across a grid of map points around its location, using location_coordinate and the standard queue.
- [LLM brand-mention tracking with llm_responses](https://dataforgaio.com/docs/recipe-llm-brand-mentions.md): Ask ChatGPT, Claude and Perplexity models the prompts your buyers ask, then measure how often your brand is mentioned and which sources are cited.
- [Monitoring competitor ads (Meta and Yelp)](https://dataforgaio.com/docs/recipe-competitor-ads.md): Pull competitors' active Meta Ad Library ads and Yelp sponsored placements on a schedule, and report what's new since the last run.
- [Crawling a site to Markdown for RAG](https://dataforgaio.com/docs/recipe-site-to-markdown.md): List a site's pages with /v1/map, crawl them to Markdown with /v1/crawls/batch, and save each page with its receipt for a retrieval index.
- [Google Business Profile audit](https://dataforgaio.com/docs/recipe-gbp-audit.md): Audit a Google Business Profile in three calls, combining my_business_info, owner photos and place products into one report.

### AI agents

- [Using the docs as an agent](https://dataforgaio.com/docs/docs-for-agents.md): Machine-readable versions of these docs for AI agents and coding assistants, including llms.txt, Markdown pages, the OpenAPI spec and the reference JSON.
- [MCP server](https://dataforgaio.com/docs/mcp-server.md): Connect Claude, LiteLLM or any MCP client to the hosted DataForGAIO MCP server, with its tools, connection settings, costs and limits.
- [SDKs](https://dataforgaio.com/docs/sdks.md): What the Python and TypeScript SDKs cover today (the Crawl API, POST /v1/serp and usage), how to install them, and how to call the compatible endpoints over HTTP.
- [Tool-calling tips](https://dataforgaio.com/docs/tool-calling-tips.md): How to give an AI agent DataForGAIO tools safely, with the cost controls it should always set, which mode to use, and how to handle errors and results.

## API reference

- [All endpoints](https://dataforgaio.com/docs/api.md)
- [Status codes](https://dataforgaio.com/docs/api/status-codes.md)
- [Support matrix](https://dataforgaio.com/docs/api/support-matrix.md)
- [OpenAPI spec](https://dataforgaio.com/openapi.json)
- [Reference JSON](https://dataforgaio.com/docs/api-reference.json)
