# QuanticData API reference

> QuanticData API reference: 96 endpoints with parameters, request and response examples in cURL, Python, Node.js and PHP, error codes, rate limits per tier and…

Base URL `https://api.quanticdata.io/v1` · Auth `Authorization: Bearer qd_live_…` · HTML: https://quanticdata.io/docs/ · OpenAPI: https://quanticdata.io/docs/openapi.json · All endpoints: https://quanticdata.io/docs/llms.txt · This file: https://quanticdata.io/docs/index.md

_Generated from openapi.json v2026-10-29 on 2026-10-19; prices and limits as of 2026-10-19_

## Authentication

Every request carries an API key in the `Authorization` header:

```http
Authorization: Bearer qd_live_…
```

`Authorization: Bearer qd_live_YOUR_API_KEY`. Keys are `qd_live_`/`qp_live_` followed by 64 hex characters and are created on the dashboard API keys page. Only this header is read: there is no `x-api-key` fallback and keys are never accepted in the query string. A disabled, expired or unknown key, or a banned account, answers 401. After a 402 `INSUFFICIENT_FUNDS`, the same header may carry `Payment <credential>` instead of the key, to pay a balance top-up with a Stripe Shared Payment Token (see that response and the Agents tag).

Keys are created on the [API keys page](https://app.quanticdata.io/api-keys) of the dashboard; [register](https://app.quanticdata.io/register) if you do not have an account. Keys are shown once; keep them in an environment variable, never in client-side code.

Base URL: `https://api.quanticdata.io/v1` (same API on the dashboard host: `https://app.quanticdata.io/api/v1`, without the short aliases).

Machine-readable formats: [openapi.json](https://quanticdata.io/docs/openapi.json) · [openapi.yaml](https://quanticdata.io/docs/openapi.yaml) · [index.md](https://quanticdata.io/docs/index.md) (this reference as Markdown) · [llms.txt](https://quanticdata.io/docs/llms.txt).

## Buy and use proxies via the API

Four calls take a script or an agent from an API key to working proxies, paid from the wallet balance. Top up the balance in the dashboard first: the API pays from the balance only (0% VAT).

| Step | Call | What you keep |
| --- | --- | --- |
| 1. Pick a plan | `GET /public/plans?planType=residentialpremium` | `plans[].id`, `amount` (USD) |
| 2. Check the balance | `GET /public/balance` | `balance` (USD) |
| 3. Buy | `POST /public/purchase` with `{"planId": "…"}` | `order.id` |
| 4. Get proxy lines | `POST /public/proxies/generate` with `{"orderId": "…"}` | `proxies[]` |
| 5. Use them | any HTTP client | |

The purchase charges the balance and activates the plan in the same call. Responses to handle: 400 `Insufficient balance` (nothing charged, top up), 422 `NOT_DELIVERED_REFUNDED` (not delivered, the amount is back on the balance, buy again), 409 `PAYMENT_UNDER_REVIEW` (do not buy again, contact support). Do not resend a purchase that timed out: look for it in `GET /public/orders` first. Location values for step 4 (state, city, ISP slugs) come from the endpoints under Proxy locations.

```bash
API=https://api.quanticdata.io/v1
KEY=qd_live_YOUR_API_KEY

# 1. plans of one type, cheapest first
curl -s "$API/public/plans?planType=residentialpremium" -H "Authorization: Bearer $KEY"

# 2. balance
curl -s "$API/public/balance" -H "Authorization: Bearer $KEY"

# 3. buy: charges the balance, returns order.id
curl -s -X POST "$API/public/purchase" -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" -d '{"planId":"PLAN_ID"}'

# 4. two sticky US lines, same IP for 10 minutes each
curl -s -X POST "$API/public/proxies/generate" -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"orderId":"ORDER_ID","country":"us","rotation":"sticky","sessionTime":10,"quantity":2,"format":"http://user:pass@host:port"}'

# 5. use a line
curl -x "PROXY_LINE" https://ipinfo.io/json
```

The same flow in Python, stopping before the purchase when the balance is too low:

```python
import os
import requests

API = "https://api.quanticdata.io/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['API_KEY']}"}

def call(method, path, **kwargs):
    r = requests.request(method, API + path, headers=HEADERS, timeout=120, **kwargs)
    body = r.json()
    if body.get("type") == "error":
        raise RuntimeError(f"{r.status_code} {body['message']} {body.get('payload')}")
    return body["payload"]

plans = call("GET", "/public/plans", params={"planType": "residentialpremium"})["plans"]
plan = min(plans, key=lambda p: p["bandwidthGB"])
if call("GET", "/public/balance")["balance"] < plan["amount"]:
    raise SystemExit("Top up the balance in the dashboard first.")

order_id = call("POST", "/public/purchase", json={"planId": plan["id"]})["order"]["id"]

lines = call("POST", "/public/proxies/generate", json={
    "orderId": order_id, "country": "us", "rotation": "sticky",
    "sessionTime": 10, "quantity": 2, "format": "http://user:pass@host:port",
})["proxies"]

proxy = lines[0]
print(requests.get("https://ipinfo.io/json", proxies={"http": proxy, "https": proxy}, timeout=30).json())
```

Keep `order_id`: it is the plan's id for later `generate` and whitelist calls (`GET /public/proxies` lists it with the bandwidth left). Buying again creates a new plan with new credentials; adding GB or renewing is done in the dashboard. Premium ISP dedicated IPs follow their own flow with an `Idempotency-Key` (see Premium ISP).

## Agent registration (verified email)

An AI agent can open an account and get an API key by itself, with the person it works for only reading a 6-digit code from their mailbox. No password, no browser, no captcha. The machine-readable description is the `agent_auth` block of `https://app.quanticdata.io/.well-known/oauth-authorization-server`; the plain-text version is `https://quanticdata.io/auth.md`.

| Step | Call | What you keep |
| --- | --- | --- |
| 1. Discover | `GET https://app.quanticdata.io/.well-known/oauth-authorization-server` | `agent_auth.register_uri`, `agent_auth.claim_uri` |
| 2. Register | `POST /agent/auth` with `{"method":"verified_email","email":"…","agent":{"name":"…"}}` | `claim_uri`, `expires_in` (600 s) |
| 3. Ask the user | The code is in their mailbox, subject "… is your QuanticData verification code — an AI agent asked to register" | the 6 digits |
| 4. Claim | `POST /agent/auth/claim` with `{"email":"…","code":"……"}` | `api_key` (shown once) |

Before step 2, tell the user which service you are registering with. The answer to step 2 is the same whether or not the email already has an account: the code goes to the mailbox owner, and the claim adds a key to the existing account instead of opening a new one (`account_status: "existing"`). A new account starts on the standard pay-as-you-go tier with the free monthly allowance; the person signs in to the dashboard through the password reset link.

```bash
APP=https://app.quanticdata.io/api/v1

# 2. register: sends the code
curl -s -X POST "$APP/agent/auth" -H "Content-Type: application/json" \
  -d '{"method":"verified_email","email":"user@example.com","agent":{"name":"Research agent","url":"https://example.com/agent"}}'

# 4. claim: returns the key once
curl -s -X POST "$APP/agent/auth/claim" -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","code":"482913"}'
```

Responses to handle: 400 `invalid_code` (ask again, `attempts_remaining` says how many tries are left), 410 `claim_expired` (start again at step 2), 422 `invalid_email` (temporary mailbox: ask for a permanent address), 428 `human_verification_required` and 503 `agent_registration_disabled` (ask the person to register at `register_human` and hand you a key from the API keys page), 429 `rate_limited` (wait `retry_after` seconds). Store the key in an environment variable and never print it; the person can rotate or revoke it on the dashboard at any time.

## Agent checkout (UCP)

An agent can buy a proxy plan for its user in the Universal Commerce Protocol shape (ucp.dev, capability `dev.ucp.shopping.checkout`, REST binding): it opens a checkout session for one plan, reads the real total, and either pays it from the account balance or hands the person a link to pay by card, PayPal or crypto on the dashboard. Discovery: `https://api.quanticdata.io/.well-known/ucp` (also on the dashboard host and the site). The plainer, non-UCP way to do the same from the balance is `POST /public/purchase` (see "Buy and use proxies via the API").

| Step | Call | What you keep |
| --- | --- | --- |
| 1. Pick a plan | `GET /public/plans?planType=residentialpremium` | `plans[].id`, `amount` (USD) |
| 2. Open a session | `POST /agent/ucp/checkout-sessions` with `{"line_items":[{"item":{"id":"…"},"quantity":1}],"payment_method":"BALANCE"}` and an `Idempotency-Key` header | `id`, `status`, `totals`, `continue_url` |
| 3a. Balance covers it (`ready_for_complete`) | `POST /agent/ucp/checkout-sessions/{id}/complete` with `{"payment":{"instruments":[{"handler_id":"balance","type":"account_balance","selected":true}]}}` | `order.id` |
| 3b. It does not (`requires_escalation`) | Give the person `continue_url`; poll `GET /agent/ucp/checkout-sessions/{id}` until `completed` | `order.id` |
| 4. Get proxy lines | `POST /public/proxies/generate` with `{"orderId":"…"}` | `proxies[]` |

Totals are USD cents. VAT follows the same rule as the human checkout: 0% when the session is paid from the balance or in crypto, 22% when a person pays by card or PayPal (declare `payment_method` `PAYPAL` or `PAYPAL_CARD` to see that total in advance). One session holds one plan with quantity 1; ISP plans are configured per order and are sold through the Premium ISP endpoints or the dashboard. Sessions expire after 6 hours; a completed session keeps answering 200 with its order, so a retry never buys twice.

```bash
API=https://api.quanticdata.io/v1
KEY=qd_live_YOUR_API_KEY

# 2. open the session (idempotent on the key)
curl -s -X POST "$API/agent/ucp/checkout-sessions" -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" -H "Idempotency-Key: order-2026-10-26-001" \
  -d '{"line_items":[{"item":{"id":"PLAN_ID"},"quantity":1}],"payment_method":"BALANCE"}'

# 3a. pay from the balance when status is ready_for_complete
curl -s -X POST "$API/agent/ucp/checkout-sessions/SESSION_ID/complete" -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"payment":{"instruments":[{"handler_id":"balance","type":"account_balance","selected":true}]}}'

# 3b. otherwise poll after the person has paid at continue_url
curl -s "$API/agent/ucp/checkout-sessions/SESSION_ID" -H "Authorization: Bearer $KEY"
```

Read `messages[]` on every document: `balance_available` means you can complete, `requires_buyer_review` means a person has to pay, `payment_failed` means the balance no longer covers the total (nothing was charged), `order_created` confirms the purchase. Never ask the person for card details: the agent never handles a card, the dashboard does.

## Errors and status codes

Status codes used by this API and what each one means (collected from every endpoint below). Error bodies are JSON with `type: "error"`; read `message` for the reason.
| Status | Meaning | Returned by |
| --- | --- | --- |
| `400` | Malformed input. `message` names the parameter and the rule it broke. | 59 endpoints |
| `401` | Missing, malformed, unknown, disabled or expired API key; or the account is not active. | 88 endpoints |
| `402` | The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. | 17 endpoints |
| `402` | The wallet balance cannot cover the total. Nothing was created or charged: top up in the dashboard and send the request again. | `POST /public/ipv6/orders` |
| `402` | The wallet balance cannot cover the total. Nothing was created or charged: top up in the dashboard and send the request again. | `POST /public/premium-isp/orders`, `POST /public/premium-isp/orders/{orderId}/renewal`, `POST /public/premium-isp/orders/{orderId}/replacements` |
| `403` | No exit pool for the requested tier (e.g. no mobile unlocker GB on the account). | 22 endpoints |
| `403` | No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account). | 10 endpoints |
| `403` | Your own API key is required (keyless and pay-per-call access cannot buy), or the key was created by a connected app and cannot spend the balance. | `GET /public/ipv6/plans`, `POST /public/ipv6/quote`, `GET /public/ipv6/orders`, `POST /public/ipv6/orders`, `GET /public/ipv6/orders/{orderId}` |
| `403` | The plan was disabled by support: it is no longer listed by `GET /public/proxies` and its credentials, endpoints and whitelist are not handed out. Contact support. | `POST /public/proxies/generate`, `GET /public/proxies/whitelist-ip`, `POST /public/proxies/whitelist-ip`, `DELETE /public/proxies/whitelist-ip` |
| `404` | `presetId` does not resolve to one of your presets. | 48 endpoints |
| `409` | The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so. | 14 endpoints |
| `409` | The cell is not sold, the price moved above your `maxTotal`, the Idempotency-Key was reused for another body, the checkout is closed, or the payment needs a human look. Nothing was charged unless the message says otherwise. | `POST /public/ipv6/quote`, `POST /public/ipv6/orders` |
| `409` | This plan type has no rotation in place (`ROTATION_NOT_SUPPORTED`). `reason`: `new_string_only` — request a new sticky string with `generate`; `static_ips` — ISP plans have dedicated static IPs; `gateway_managed` — the gateway assigns the IP. Also `LINK_LIMIT_REACHED` on link creation (1,000 active links per plan). | `POST /public/proxies/{orderId}/rotate`, `GET /public/proxies/{orderId}/rotation-links`, `POST /public/proxies/{orderId}/rotation-links`, `DELETE /public/proxies/{orderId}/rotation-links/{linkId}`, `GET /public/rotate/{token}`, `POST /public/rotate/{token}` |
| `410` | `PLAN_EXPIRED`: the plan has expired. | `POST /public/proxies/{orderId}/rotate`, `POST /public/proxies/{orderId}/rotation-links`, `GET /public/rotate/{token}`, `POST /public/rotate/{token}`, `POST /agent/auth/claim` |
| `422` | Input that can never resolve (documentation placeholder, undelegated TLD) — before or after the run; retrying the same input cannot help. Not billed. | `POST /scraper/collectors/{slug}/run`, `POST /public/premium-isp/orders`, `POST /public/purchase`, `POST /scraper/video`, `POST /agent/auth` |
| `422` | The plan could not be delivered and the amount is back on your balance: you have not been charged. Send the purchase again with a new Idempotency-Key. | `POST /public/ipv6/orders` |
| `424` | The run failed at the source (blocked, timed out, layout changed). JSON body with `run_id` and `error`; not billed, safe to retry. | `POST /scraper/collectors/{slug}/run` |
| `428` | A person has to finish this registration in the browser. | `POST /agent/auth` |
| `429` | Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After. | 84 endpoints |
| `429` | `RATE_LIMITED`: one rotation every 10 seconds per session (`scope: session`), 1,200 rotations an hour per account (`scope: account`), or too many unknown links from one address (`scope: ip`, link only). API-key calls also count against the key's hourly window. Back off on Retry-After. | `POST /public/proxies/{orderId}/rotate`, `GET /public/rotate/{token}`, `POST /public/rotate/{token}` |
| `500` | Extraction failed on our side or timed out (70 s budget). Never billed. | 45 endpoints |
| `502` | Only with `failOnBlock: true`: every tier came back blocked. Same diagnostics as the 200 form; the GB moved are debited. | 8 endpoints |
| `503` | The Data API group is switched off for non-admin keys (early-access kill switch). | 43 endpoints |
| `503` | IPv6 speed plans are not available through the API on this account yet, the grid cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds. | `GET /public/ipv6/plans`, `POST /public/ipv6/quote`, `GET /public/ipv6/orders`, `POST /public/ipv6/orders`, `GET /public/ipv6/orders/{orderId}` |
| `503` | Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds. | 13 endpoints |
| `503` | `SERVICE_UNAVAILABLE`: rotation is temporarily unavailable. Retry after Retry-After. | `POST /public/proxies/{orderId}/rotate`, `GET /public/proxies/{orderId}/rotation-links`, `POST /public/proxies/{orderId}/rotation-links`, `DELETE /public/proxies/{orderId}/rotation-links/{linkId}`, `GET /public/rotate/{token}`, `POST /public/rotate/{token}` |
| `504` | The read timed out. Pass `start`/`end` to read a shorter window. Not billed. | `POST /scraper/video` |

Response headers related to limits: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`, `Retry-After`, `X-RateLimit-Scope`, `X-RateLimit-Plan`.

## Rate limits and tiers

Limits per tier (live values as of 2026-10-19):
| Tier | Monthly | Free usage / month | Requests / minute | Batch concurrency | Unit price discount |
| --- | --- | --- | --- | --- | --- |
| Pay as you go | $0 | $2 | 20 | 5 | 0% |
| Starter | $19/month | $15 | 300 | 10 | 10% |
| Growth | $79/month | $50 | 600 | 20 | 20% |
| Scale | $299/month | $250 | 1200 | 20 | 30% |
- Per API key. Two windows apply: the tier's requests/minute (tiers.json → rateLimitPerMin) and an hourly window of max(1000, rateLimitPerMin × 60). The hourly window counts every call made with the key, on every endpoint: Data API, proxy, plan and Premium ISP calls share one counter, so a large scraping job can use up the hour your proxy scripts need. The per-minute budget is per account and counts write calls (POST, PUT, PATCH, DELETE) only. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (hourly window); a 429 also carries Retry-After. Plan-level limiters (per-minute budget, browser-render concurrency) add X-RateLimit-Scope and X-RateLimit-Plan to their 429s.
- rateLimitPerMin is enforced per API key; the key also has an hourly window = max(1000, rateLimitPerMin × 60) requests.
- A pay-as-you-go account in real-balance billing mode gets balance_mode_rate_limit_per_min (pricing.json) instead of its tier cap.
- 429 responses carry X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and Retry-After.
- Real-balance billing mode: 300 requests/minute instead of the tier cap.

## Pricing per endpoint

Every pay-as-you-go account includes $2 of free usage per month. Only successful calls are billed; a blocked page, a target `4xx`/`5xx`, a timeout or an error on our side costs nothing. Prices below are the list of 2026-10-19; `GET /scraper/billing` returns the live list applied to your key. LLM tokens used by the AI endpoints are billed at provider cost × 2.
| Endpoint | Price keys |
| --- | --- |
| `POST /scraper/extract` | `extract` $0.0015 per call + $3/GB, max $0.02 per call<br>`extract_render` $0.0025 per call + $4/GB, max $0.05 per call<br>`ai_extract` $0.005 per call, max $1.50 per call |
| `POST /scraper/serp` | `serp` $0.0009 per call<br>`serp_render` $0.002 per call |
| `POST /scraper/serp/bulk` | `serp_render` $0.002 per call<br>`serp` $0.0009 per call |
| `POST /scraper/map` | `map` $0.003 per call |
| `POST /scraper/crawl` | `crawl_page` $0.0003 per call<br>`extract_render` $0.0025 per call + $4/GB, max $0.05 per call |
| `POST /scraper/batch` | `batch_url` $0.0004 per call<br>`extract_render` $0.0025 per call + $4/GB, max $0.05 per call |
| `POST /scraper/unlock` | `unlock_request` $2.40/GB of transferred data |
| `POST /scraper/ai` | `ai_extract` $0.005 per call, max $1.50 per call<br>`extract` $0.0015 per call + $3/GB, max $0.02 per call<br>`serp` $0.0009 per call<br>`map` $0.003 per call |
| `POST /scraper/places-ai` | `places_ai` $0.005 per call, max $3 per call<br>`serp_render` $0.002 per call |
| `POST /scraper/shopping-ai` | `shopping_ai` $0.005 per call, max $3 per call<br>`serp_render` $0.002 per call |
| `POST /scraper/ai-visibility` | `ai_visibility` $0.01 per call<br>`ai_visibility_citation` $0.01 per call<br>`serp` $0.0009 per call |
| `POST /scraper/seo-audit` | `seo_audit` $0.003 per call<br>`extract` $0.0015 per call + $3/GB, max $0.02 per call |
| `POST /scraper/collectors/{slug}/run` | `collector_result` — by collector, table below |
| `POST /scraper/datasets` | `dataset_row` $0.03 per call<br>`dataset_row_refresh` $0.01 per call |
| `POST /scraper/parser/generate` | `parser_generate` $0.02 per call |
| `POST /scraper/parser/presets/{id}/heal` | `parser_generate` $0.02 per call |
| `POST /scraper/video` | `video` $0.02 per call |
**Collector results** (`POST /scraper/collectors/{slug}/run`, per delivered result):

| Collector price key | Per delivered result |
| --- | --- |
| `collector_ai_readiness` | $0.003 |
| `collector_airbnb_stays` | $0.001 |
| `collector_aliexpress_search` | $0.001 |
| `collector_amazon_product` | $0.008 |
| `collector_amazon_reviews` | $0.002 |
| `collector_amazon_search` | $0.001 |
| `collector_app_store_apps` | $0.0008 |
| `collector_app_store_reviews` | $0.0005 |
| `collector_arxiv_papers` | $0.0004 |
| `collector_asos_search` | $0.001 |
| `collector_autotrader_search` | $0.001 |
| `collector_bbb_businesses` | $0.002 |
| `collector_bestbuy_product` | $0.002 |
| `collector_booking_stays` | $0.02 |
| `collector_business_directory` | $0.001 |
| `collector_capterra_products` | $0.01 |
| `collector_carvana_cars` | $0.001 |
| `collector_certificate_transparency` | $0.0004 |
| `collector_clinical_trials` | $0.0005 |
| `collector_coingecko_coins` | $0.0002 |
| `collector_company_profile` | $0.03 |
| `collector_coursera_courses` | $0.001 |
| `collector_crates_io` | $0.0003 |
| `collector_defillama` | $0.0003 |
| `collector_dns_records` | $0.001 |
| `collector_docker_hub` | $0.001 |
| `collector_doordash_restaurants` | $0.003 |
| `collector_ebay_catalog` | $0.006 |
| `collector_ebay_product` | $0.006 |
| `collector_ebay_search` | $0.003 |
| `collector_exchange_rates` | $0.0002 |
| `collector_flipkart_search` | $0.001 |
| `collector_g2_products` | $0.001 |
| `collector_github_repos` | $0.0005 |
| `collector_gleif_lei` | $0.0004 |
| `collector_google_autocomplete` | $0.0002 |
| `collector_google_events` | $0.002 |
| `collector_google_flights` | $0.003 |
| `collector_google_jobs` | $0.001 |
| `collector_google_lens` | $0.004 |
| `collector_google_maps_places` | $0.001 |
| `collector_google_news` | $0.0005 |
| `collector_google_play_apps` | $0.006 |
| `collector_google_shopping` | $0.001 |
| `collector_google_trends` | $0.0005 |
| `collector_hacker_news` | $0.0003 |
| `collector_healthgrades_doctors` | $0.001 |
| `collector_hotels` | $0.02 |
| `collector_idealista_search` | $0.001 |
| `collector_indeed_jobs` | $0.001 |
| `collector_instagram_profile` | $0.006 |
| `collector_itunes_search` | $0.0004 |
| `collector_keyword_ideas` | $0.0002 |
| `collector_kleinanzeigen_search` | $0.001 |
| `collector_linkedin_company` | $0.005 |
| `collector_linkedin_company_posts` | $0.001 |
| `collector_linkedin_jobs` | $0.001 |
| `collector_linkedin_profile` | $0.005 |
| `collector_local_business_leads` | $0.01 |
| `collector_marketwatch_quote` | $0.003 |
| `collector_miodottore_doctors` | $0.001 |
| `collector_nike_products` | $0.001 |
| `collector_npm_packages` | $0.0003 |
| `collector_nvd_cve` | $0.0004 |
| `collector_openalex` | $0.0004 |
| `collector_openfda` | $0.0004 |
| `collector_openlibrary_books` | $0.0004 |
| `collector_paginegialle_profiles` | $0.002 |
| `collector_place_reviews` | $0.001 |
| `collector_product_offers` | $0.002 |
| `collector_producthunt_posts` | $0.001 |
| `collector_pypi_packages` | $0.0003 |
| `collector_reddit_comments` | $0.002 |
| `collector_reddit_posts` | $0.0005 |
| `collector_redfin_search` | $0.0008 |
| `collector_rottentomatoes_movies` | $0.001 |
| `collector_search_images` | $0.0003 |
| `collector_search_videos` | $0.0004 |
| `collector_sec_filings` | $0.0005 |
| `collector_site_contacts` | $0.02 |
| `collector_site_documents` | $0.005 |
| `collector_stackoverflow` | $0.0003 |
| `collector_steam` | $0.0008 |
| `collector_subito_search` | $0.001 |
| `collector_target_product` | $0.0006 |
| `collector_tech_stack` | $0.005 |
| `collector_tiktok_profile` | $0.004 |
| `collector_tiktok_video` | $0.004 |
| `collector_tripadvisor_search` | $0.001 |
| `collector_trustpilot_reviews` | $0.06 |
| `collector_udemy_courses` | $0.001 |
| `collector_walmart_product` | $0.0015 |
| `collector_walmart_search` | $0.002 |
| `collector_wayback_machine` | $0.0003 |
| `collector_weather_forecast` | $0.0002 |
| `collector_web_search` | $0.0005 |
| `collector_wellfound_jobs` | $0.001 |
| `collector_whois_domain` | $0.005 |
| `collector_wikidata` | $0.0003 |
| `collector_wikipedia_articles` | $0.0005 |
| `collector_world_bank` | $0.0002 |
| `collector_x_user_tweets` | $0.0003 |
| `collector_yahoo_finance` | $0.001 |
| `collector_youtube_autocomplete` | $0.0002 |
| `collector_youtube_channel` | $0.0008 |
| `collector_youtube_comments` | $0.0003 |
| `collector_youtube_search` | $0.0008 |
| `collector_youtube_transcript` | $0.002 |
| `collector_youtube_video` | $0.005 |
| `collector_zalando_search` | $0.001 |
| `collector_zillow_property` | $0.005 |
| `collector_zillow_search` | $0.001 |

## MCP server

The same API is available as an MCP server for Claude, Cursor, ChatGPT and any MCP client. Product page: [quanticdata.io/mcp-server/](https://quanticdata.io/mcp-server/).

**Remote server (OAuth 2.1, no key to paste):** `https://api.quanticdata.io/mcp`

OAuth metadata: [authorization server](https://app.quanticdata.io/.well-known/oauth-authorization-server) · [protected resource](https://api.quanticdata.io/.well-known/oauth-protected-resource/mcp)

Claude Code (remote, OAuth):

```bash
claude mcp add --transport http quanticdata https://api.quanticdata.io/mcp
```

**Local server (npx, API key in the environment):**

```bash
QUANTICDATA_API_KEY=qd_live_… npx -y quanticdata-mcp
```

Claude Code (local):

```bash
claude mcp add quanticdata -e QUANTICDATA_API_KEY=qd_live_… -- npx -y quanticdata-mcp
```

Clients without native remote MCP support can bridge through `npx -y quanticdata-mcp-remote`.

Trial limits for keyless use are published by `GET /mcp/trial-config` (see Account).

Tools exposed by the remote server (as of 2026-10-19) and the REST endpoint behind each one:

| MCP tool | Endpoint |
| --- | --- |
| `scrape` | `POST /scraper/extract` |
| `search` | `POST /scraper/serp` |
| `search_and_read` | `POST /scraper/serp + POST /scraper/extract` |
| `search_bulk` | `POST /scraper/serp/bulk` |
| `search_bulk_status` | `GET /scraper/serp/bulk/{jobId}` |
| `map` | `POST /scraper/map` |
| `crawl` | `POST /scraper/crawl` |
| `crawl_status` | `GET /scraper/crawl/{jobId}` |
| `batch` | `POST /scraper/batch` |
| `batch_status` | `GET /scraper/batch/{jobId}` |
| `unlock` | `POST /scraper/unlock` |
| `ai_visibility` | `POST /scraper/ai-visibility` |
| `seo_audit` | `POST /scraper/seo-audit` |
| `list_collectors` | `GET /scraper/collectors` |
| `run_collector` | `POST /scraper/collectors/{slug}/run` |
| `collector_run_status` | `GET /scraper/collectors/runs/{runId}` |
| `create_dataset` | `POST /scraper/datasets` |
| `dataset_status` | `GET /scraper/datasets/{jobId}` |
| `generate_parser` | `POST /scraper/parser/generate` |
| `list_parser_presets` | `GET /scraper/parser/presets` |
| `save_parser_preset` | `POST /scraper/parser/presets` |
| `heal_parser_preset` | `POST /scraper/parser/presets/{id}/heal` |
| `parser_preset_stats` | `GET /scraper/parser/presets/{id}/stats` |
| `list_proxies` | `GET /public/proxies` |
| `generate_proxies` | `POST /public/proxies/generate` |
| `proxy_locations` | `GET /public/generator/{residential-premium|mobile|datacenter}/targeting-options` |
| `whitelist_ip` | `POST /public/proxies/whitelist-ip` |
| `report` | `(MCP only: usage report of the session)` |

### Skills for AI agents

5 Agent Skills (`SKILL.md`, the open [Agent Skills](https://agentskills.io/specification) format) teach Claude Code, Claude.ai, Codex, Cursor, Gemini CLI and any agent that reads `SKILL.md` how to use this API and the MCP server: the agent loads the one it needs when the task calls for it. They are published at [quanticdata.io/.well-known/agent-skills/index.json](https://quanticdata.io/.well-known/agent-skills/index.json) and installed in one command with the [`skills` CLI](https://github.com/vercel-labs/skills):

```bash
npx skills add https://quanticdata.io
```

Source and Claude Code plugin: [github.com/quantumproxies/quanticdata-skills](https://github.com/quantumproxies/quanticdata-skills) (`npx skills add quantumproxies/quanticdata-skills`, or copy `skills/<name>` into `~/.claude/skills/`).

- [`use-data-api`](https://quanticdata.io/.well-known/agent-skills/use-data-api/SKILL.md): Call the REST Data API: authentication, response envelope, async jobs, references
- [`use-mcp-server`](https://quanticdata.io/.well-known/agent-skills/use-mcp-server/SKILL.md): Connect any MCP client: hosted OAuth endpoint or local npm package, tool presets
- [`scrape-to-markdown`](https://quanticdata.io/.well-known/agent-skills/scrape-to-markdown/SKILL.md): One URL to clean Markdown or structured fields; batch, map and crawl for many
- [`generate-proxies`](https://quanticdata.io/.well-known/agent-skills/generate-proxies/SKILL.md): Proxy strings from your plans: geo-targeting, sticky sessions, IP whitelists
- [`find-business-leads`](https://quanticdata.io/.well-known/agent-skills/find-business-leads/SKILL.md): Business lists and datasets: Collectors, AI Places Finder, dataset builder

## Data API

Markdown for this group only: https://quanticdata.io/docs/data-api.md

### Scrape

One URL in, Markdown/HTML/text out, with optional structured and AI extraction.

#### Scrape one URL

`POST /scraper/extract`

**Price:** `extract` $0.0015 per call + $3/GB, max $0.02 per call · `extract_render` $0.0025 per call + $4/GB, max $0.05 per call · `ai_extract` $0.005 per call, max $1.50 per call. `extract` when the TLS/fetch tier served the page, `extract_render` when the browser did; both carry a perGb meter and a capUsd ceiling (pricing.json → meters). `ai_extract` + LLM tokens × ai_token_markup when ai_prompt/ai_schema is used. The pre-check reserves the worst case (render price unless engine is pinned to tls/fetch without render). _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `POST https://api.quanticdata.io/v1/scrape` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Fetches one page through the residential pool and returns it as Markdown, HTML or text. Starts on a TLS-fingerprint tier (fast, cheap) and, with `engine: auto`, escalates to a stealth headless browser only when the target blocks; `render: true` (or `engine: render`, `screenshot`, `xhr`, `reveal_hidden`) forces the browser. Binary documents (PDF, DOCX, XLSX, CSV) are converted to text. Optional structured extraction (`extract` CSS schema or a stored `presetId`) and AI extraction (`ai_prompt`/`ai_schema`) run on the same fetch. Pass `html` instead of `url` to convert markup you already have (no fetch, no proxy bandwidth). What it does not do: it does not solve interactive captchas, and `mode: summary` returns no page content (so it cannot be combined with AI extraction). Billed per successful page by the engine that served it, plus a per-GB bandwidth component with a per-call cap; AI extraction adds the `ai_extract` fee plus marked-up LLM tokens. A page flagged as blocked or a target status ≥ 400 is not charged.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | no | http/https URL to scrape. Required unless `html` is given. |
| `html` | string | no | Markup to convert instead of fetching (max 5 MB). |
| `format` | string: `markdown`, `html`, `text`, `raw` | no | `raw` is an alias of `html`. Defaults to markdown (also when AI extraction is requested). Default `"markdown"`. |
| `formats` | array of string: `markdown`, `html`, `text` | no | Extra formats returned together under `payload.formats`. |
| `data_format` | string: `markdown`, `screenshot` | no | Compatibility alias: `markdown` sets format, `screenshot` sets `screenshot: fullPage`. |
| `engine` | string: `auto`, `tls`, `fetch`, `render` | no | `auto` starts on the TLS tier and escalates to the browser on a block; `tls`/`fetch` never escalate; `render` forces the browser. Default `"auto"`. |
| `autoEscalate` | boolean | no | Allow/forbid the auto engine's escalation to the browser (ignored once the plan's render budget is spent). |
| `tlsProfile` | string | no | TLS fingerprint profile for the TLS tier (opaque to the API; see /scraper/unlock for the known names). |
| `render` | boolean | no | Force the stealth headless browser (JS execution). Bills the render rate. Default `false`. |
| `mobile` | boolean | no | Mobile viewport and user agent. Default `false`. |
| `waitMs` | number | no | Extra wait after load before capture, render tier (clamped by the service, max 15000). |
| `waitForSelector` | string | no | Wait until this CSS selector appears (render tier). |
| `scrollToBottom` | boolean | no | Auto-scroll to trigger lazy-loaded content (render tier). Default `false`. |
| `actions` | array of object (PageAction) | no |  |
| `screenshot` | boolean \\| string: `fullPage` | no | `true` = viewport PNG, `fullPage` = whole page; forces render. Returned base64 under `screenshot`. |
| `xhr` | boolean | no | Record the page's XHR/fetch traffic under `xhr` (forces render). Use it to discover which API to target with a `fetchResource` action. |
| `expect` | object | no | Assertion that the page is the real one: `element` (CSS selector, ≤512 chars) and/or `text` (≤512 chars) must be present, otherwise the fetch is treated as blocked and retried. |
| `expect.element` | string | no |  |
| `expect.text` | string | no |  |
| `extract` | object (ExtractSchema) | no | Structured-extraction schema: field name → CSS selector, or an object with `selector`, optional `attr` (attribute to read instead of text) and `all` (true = every match as an array). |
| `presetId` | string | no | Run a stored parser preset instead of an inline `extract` schema; the run is scored per field for self-healing. 404 if the preset is not yours. |
| `contentMode` | string: `smart`, `article`, `full` | no | `smart` = whole page minus nav/footer/cookie chrome; `article` = Readability main article; `full` = entire body. Alias `content_mode`. Default `"smart"`. |
| `content_modes` | array of string: `smart`, `article`, `full` | no | Return several content modes at once under `contents`. Alias `contentModes`. |
| `fullPage` | boolean | no | Legacy: `true` = contentMode full. |
| `mode` | string: `full`, `summary` | no | `summary` drops the content and returns only metadata (title, description, canonical, contentLength, engine, bytes) — the light view for audits over many pages. Default `"full"`. |
| `include_links` | boolean | no | Also return de-duplicated absolute links under `links`. Alias `includeLinks`. Default `false`. |
| `app_state` | boolean \\| string: `auto`, `raw` | no | Mine the page's own hydration state (Next/Nuxt/JSON islands) into `metadata.appState`. `true`/`auto` = pruned to the informative parts; `raw` = full blobs. Alias `appState`. |
| `parser` | object | no | Caller CSS rules: `include` (scope the content), `exclude` (drop site-specific chrome), `keep` (protect sections from smart stripping). Each an array of ≤25 selectors, ≤200 chars each. |
| `parser.include` | array of string | no |  |
| `parser.exclude` | array of string | no |  |
| `parser.keep` | array of string | no |  |
| `reveal_hidden` | boolean | no | Render tier: open `<details>`/accordions and click through tabs, capturing every panel. Alias `revealHidden`. |
| `output` | object | no | Markdown shaping; every key also accepted flat (snake_case) at the top level, flat wins. |
| `output.frontmatter` | boolean | no |  |
| `output.toc` | boolean | no |  |
| `output.linksMode` | string: `inline`, `footnote`, `strip` | no |  |
| `output.maxTokens` | number | no |  |
| `output.imagesMode` | string: `inline`, `alt`, `strip` | no |  |
| `output.query` | string | no | Relevance filter for LLM-oriented output. |
| `output.highlights` | integer | no | Most query-relevant passages to return (requires `query`). |
| `output.summarySections` | boolean | no |  |
| `output.chunk` | object | no |  |
| `frontmatter` | boolean | no |  |
| `links_mode` | string: `inline`, `footnote`, `strip` | no |  |
| `toc` | boolean | no |  |
| `max_tokens` | number | no |  |
| `images_mode` | string: `inline`, `alt`, `strip` | no |  |
| `query` | string | no |  |
| `highlights` | integer | no |  |
| `chunk` | object | no |  |
| `summary_sections` | boolean | no |  |
| `ai_prompt` | string | no | Natural-language instruction: the LLM turns the page into structured JSON under `payload.ai.data`. |
| `ai_schema` | object | no | JSON Schema the AI output must follow (deterministic shape). Either `ai_prompt` or `ai_schema` (or both) enables AI extraction. |
| `headers` | object \\| string | no | Extra headers replayed to the target. Either a JSON object (name → value) or a raw `Header: Value` block, one per line (lines starting with `//` or `#` are ignored). Max 32 headers, names must be RFC 7230 tokens, values ≤ 4096 characters; hop-by-hop and framing headers (host, content-length, transfer-encoding, connection, …) are rejected. |
| `cookies` | object | no | name → value cookies sent to the target. |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `state` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `city` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `rotation` | string: `rotating`, `sticky` | no | New exit IP per request, or keep one IP for the session. Any other value is treated as `rotating`. Default `"rotating"`. |
| `sessionId` | string | no | Sticky session id (generated if omitted). |
| `sessionDuration` | number | no | Sticky session lifetime in minutes (clamped by the proxy layer, 3–1440, default 10). |

Example:

```json
{
  "url": "https://example.com/pricing",
  "format": "markdown",
  "country": "us",
  "extract": {
    "title": "h1",
    "price": ".price"
  }
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/extract' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com/pricing","format":"markdown","country":"us","extract":{"title":"h1","price":".price"}}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/extract',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "url": "https://example.com/pricing",
        "format": "markdown",
        "country": "us",
        "extract": {
            "title": "h1",
            "price": ".price"
        }
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/extract", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "url": "https://example.com/pricing",
    "format": "markdown",
    "country": "us",
    "extract": {
      "title": "h1",
      "price": ".price"
    }
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/extract');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'url' => 'https://example.com/pricing',
    'format' => 'markdown',
    'country' => 'us',
    'extract' => [
      'title' => 'h1',
      'price' => '.price'
    ]
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Page fetched. `engine` says which tier served it and therefore which price applied.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account).
- `404` — `presetId` does not resolve to one of your presets.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Extraction failed on our side or timed out (70 s budget). Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Extraction successful",
  "payload": {
    "url": "https://example.com/pricing",
    "finalUrl": "https://example.com/pricing",
    "status": 200,
    "contentType": "text/html; charset=utf-8",
    "format": "markdown",
    "title": "Pricing — Example",
    "metadata": {
      "description": "Simple, transparent pricing.",
      "canonical": "https://example.com/pricing",
      "language": "en"
    },
    "content": "# Pricing\n\nStarter — $9/month …",
    "data": {
      "title": "Pricing",
      "price": "$9"
    },
    "engine": "tls",
    "attempts": 1,
    "escalated": false,
    "bytes": 48213,
    "durationMs": 1240,
    "geo": {
      "country": "us",
      "state": null,
      "city": null,
      "rotation": "rotating"
    },
    "usage": {
      "cost_usd": 0.0015,
      "free_usd": 0.0015,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Scraper API is not available: no proxy credentials found. Contact support or purchase a residential, datacenter or IPv6 plan."
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Preset not found",
  "payload": {
    "url": "https://example.com/"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Extraction timed out",
  "payload": {
    "url": "https://example.com/"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Search

Structured search-engine results (Google, Bing, DuckDuckGo) and async multi-page jobs.

#### Structured search results

`POST /scraper/serp`

**Price:** `serp` $0.0009 per call · `serp_render` $0.002 per call. Google (except autocomplete/reviews): `serp` when search_metadata.path is `http`, `serp_render` otherwise; Bing/DuckDuckGo: always `serp`. The pre-check reserves `serp_render` for Google. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `POST https://api.quanticdata.io/v1/serp` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

One search on Google, Bing or DuckDuckGo through the residential pool, returned as JSON in the common SERP-API shape: organic results, ads, People Also Ask, related searches, knowledge panels, AI Overview and 17 Google verticals (`search_type`). `render: true` asks for the rendered Google page (People Also Ask, related questions, ads), `render: false` pins the cheaper HTTP tier, and without `render` the service picks: the HTTP tier for Google web search, a browser for the verticals that need one. Identical requests are served from a 24h cache for free (`search_metadata.from_cache`). It does not paginate on your behalf: request one `page` at a time and read `pagination.available_pages`/`has_next`, or use `/scraper/serp/bulk`. Billed per successful search by the tier that served it (`search_metadata.path`); blocked searches answer 429 and cost nothing; `autocomplete` and `reviews` always bill the request price.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | no | Search query. Required except for ID-addressed verticals: `place_details` with `place_id`/`data_id`, `product` with `product_id`, `flights`, `lens`, `trends` (no query = trending searches), `reviews` with `data_id`. |
| `engine` | string: `google`, `bing`, `duckduckgo` | no |  Default `"google"`. |
| `search_type` | string: `search`, `shopping`, `images`, `news`, `places`, `maps`, `videos`, `scholar`, `jobs`, `autocomplete`, `place_details`, `hotels`, `flights`, `events`, `product`, `lens`, `reviews`, `trends` | no | Vertical. Alias `type`; Google aliases `tbm` (shop/isch/nws/lcl/vid) and `udm` (28/2/12/1/7) are mapped too. Default `"search"`. |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `lang` | string | no | UI language, e.g. `en`, `it`. Alias `hl`. |
| `num` | number | no | Results to request (clamped to 1–100 by the service; Google serves ~10 per page and merges pages — see `search_metadata.paging`). |
| `page` | number | no | Result page, 1-based. |
| `start` | number | no | Result offset (alternative to `page`). |
| `device` | string: `desktop`, `mobile`, `ios`, `android` | no | Device to search as. `desktop` (default) gets the computer page; `mobile`, `ios` and `android` get the phone page. Google web, news and videos are fetched as Edge: on an Android phone for every phone value, on Windows or macOS for `desktop`. Every page of one query (`num` above 10, every page of a bulk job) comes from the same device and browser; identities rotate between queries, among current versions and phone models. `search_metadata.served_device` says which page came back (phone or computer layout), `served_platform` and `served_browser` which device and browser fetched it. Desktop and phone results are cached separately. Also accepted as `brd_mobile`: `1` (mobile), `ios` or `android`. Default `"desktop"`. |
| `render` | boolean | no | Forwarded as sent. `true` asks for the rendered Google page (People Also Ask, related questions, ads; billed `serp_render` when a rendered tier answers), `false` pins the cheaper HTTP tier, unset lets the service pick (the HTTP tier for Google web search, a browser for the verticals that need one). Bing/DuckDuckGo never render by default. |
| `browser` | string: `chrome`, `firefox`, `safari` | no | Browser to search as: `chrome`, `firefox` or `safari` (Safari is iPhone or macOS, Chrome is Android or desktop, Firefox desktop only). Bing and DuckDuckGo fetch as that browser; Google web, news and videos always fetch as Edge (`search_metadata.served_browser`). Without it the browser rotates between queries. Alias `brd_browser`. |
| `safe` | string: `active`, `off` | no | SafeSearch. |
| `nfpr` | boolean \\| integer: `1` | no | Disable auto-corrected results. |
| `location` | string | no | Human-readable search location ("Milan, Italy"), encoded to uule server-side. For `places`/`maps` it sets the map center: where Google puts that name (a region or a country gives its centre). `gps_coordinates` and `uule` win over it. |
| `uule` | string | no | Encoded uule token OR raw `lat,lon[,radius]`. For `places`/`maps` it sets the map center (coordinates, or the place a `w+` token names) and wins over `location`. |
| `google_params` | object | no | Escape hatch: extra Google URL params (keys ≤40 chars of letters, digits, `.`, `-`, `_`; values strings ≤512 chars or numbers). |
| `jobs` | boolean | no | Jobs box on the main SERP. Alias `ibp: "htl;jobs"`. |
| `place_id` | string | no | `place_details`. |
| `data_id` | string | no | `place_details` / `reviews` (feature id 0x…:0x…). |
| `product_id` | string \\| number | no | `product`: the seller list of one shopping result. |
| `departure_id` | string | no | `flights`: airport/city code. |
| `arrival_id` | string | no |  |
| `outbound_date` | string | no | YYYY-MM-DD. |
| `return_date` | string | no |  |
| `check_in_date` | string | no | `hotels`. |
| `check_out_date` | string | no |  |
| `adults` | number | no | `hotels`, clamped 1–30. |
| `children_ages` | array of number | no |  |
| `free_cancellation` | boolean | no |  |
| `accommodation_type` | string: `hotels`, `vacation_rentals` | no |  |
| `currency` | string | no | `hotels`/`flights` price currency (USD, EUR…). |
| `gps_coordinates` | string | no | `maps`/`places`: map center `lat,lon[,zoom]`. Wins over `uule` and `location`. |
| `image_url` | string | no | `lens`: http(s) URL of the image to search by. |
| `exact_matches` | boolean | no | `lens`. |
| `sort_by` | string: `relevance`, `newest`, `highest_rating`, `lowest_rating` | no | `reviews`. |
| `filter` | string | no | `reviews`: keyword filter. |
| `next_page_token` | string | no | `reviews`: continuation token from `serpapi_pagination`. |
| `wait_for` | string | no | Render tier: CSS selector to wait for before capture. |
| `include_html` | boolean | no | Also return the page HTML under `html` (scripts stripped). |
| `product_ids` | boolean | no | `shopping`: resolve product ids for each result (slower). |

Example:

```json
{
  "query": "best coffee grinder",
  "engine": "google",
  "country": "us",
  "lang": "en",
  "num": 10
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/serp' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"query":"best coffee grinder","engine":"google","country":"us","lang":"en","num":10}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/serp',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "query": "best coffee grinder",
        "engine": "google",
        "country": "us",
        "lang": "en",
        "num": 10
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/serp", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "query": "best coffee grinder",
    "engine": "google",
    "country": "us",
    "lang": "en",
    "num": 10
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/serp');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'query' => 'best coffee grinder',
    'engine' => 'google',
    'country' => 'us',
    'lang' => 'en',
    'num' => 10
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Search succeeded. The envelope's `pagination` mirrors `payload.pagination`.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account).
- `429` — Key/plan rate limit, or the engine blocked every attempt (retryable, never billed). When the engine blocked every attempt, `payload` also says what was tried: `code` (the block, e.g. `bing-decoy`: Bing answered with results for another query), `attempts`, and `retries`, one entry per attempt with `attempt`, `tier`, `outcome`, `reason`, `error`, `time_taken` and `page` where known. A block met on every tier is not fixed by an immediate retry: retry later, or use another engine.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "SERP successful",
  "payload": {
    "search_metadata": {
      "status": "Success",
      "engine": "google",
      "search_url": "https://www.google.com/search?q=best+coffee+grinder&gl=us&hl=en",
      "created_at": "2026-10-07T09:12:44.000Z",
      "total_time_taken": 2.8,
      "attempts": 1,
      "bytes": 212544,
      "path": "http"
    },
    "search_parameters": {
      "engine": "google",
      "q": "best coffee grinder",
      "search_type": "search",
      "device": "desktop",
      "country": "us",
      "language": "en",
      "page": 1
    },
    "organic": [
      {
        "rank": 1,
        "title": "The 6 Best Coffee Grinders of 2026",
        "link": "https://example.com/reviews/coffee-grinders",
        "display_link": "example.com › reviews",
        "source": "example.com",
        "description": "We tested 24 burr grinders…",
        "date": "12 Sep 2026"
      }
    ],
    "ads": [],
    "people_also_ask": [
      {
        "question": "Is a burr grinder worth it?"
      }
    ],
    "related_searches": [
      {
        "query": "best coffee grinder under 100"
      }
    ],
    "ai_overview": null,
    "knowledge_graph": null,
    "pagination": {
      "current": 1,
      "next": 2,
      "total_pages": null,
      "other_pages": {
        "2": "https://www.google.com/search?q=best+coffee+grinder&start=10"
      },
      "available_pages": [
        1,
        2,
        3,
        4,
        5
      ],
      "has_next": true
    },
    "usage": {
      "cost_usd": 0.0009,
      "free_usd": 0.0009,
      "paid_usd": 0
    }
  },
  "pagination": {
    "current": 1,
    "next": 2,
    "total_pages": null,
    "available_pages": [
      1,
      2,
      3,
      4,
      5
    ],
    "has_next": true
  }
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Scraper API is not available: no proxy credentials found. Contact support or purchase a residential, datacenter or IPv6 plan."
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Start a multi-page search job

`POST /scraper/serp/bulk`

**Price:** `serp_render` $0.002 per call · `serp` $0.0009 per call. Google: `serp_render` × max_pages up front; Bing/DuckDuckGo: `serp` × max_pages. Unfetched pages refunded at settlement. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `POST https://api.quanticdata.io/v1/serp/bulk` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Paginates one query across up to 10 result pages asynchronously, riding real pagination on one session. Returns a job id immediately; poll `GET /scraper/serp/bulk/{jobId}` for the merged, de-duplicated organic results as pages land, or pass a `webhook` to receive the finished job. Only web-type verticals (search, news, videos, images, shopping) are supported here. Charged up front for `max_pages`; pages the query does not have are refunded when the job settles.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | yes |  |
| `engine` | string: `google`, `bing`, `duckduckgo` | no |  Default `"google"`. |
| `search_type` | string: `search`, `news`, `videos`, `images`, `shopping` | no | Alias `type`. Default `"search"`. |
| `max_pages` | integer | no |  Default `5`. |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `lang` | string | no | Alias `hl`. |
| `device` | string: `desktop`, `mobile`, `ios`, `android` | no | Device to search as. `desktop` (default) gets the computer page; `mobile`, `ios` and `android` get the phone page. Google web, news and videos are fetched as Edge: on an Android phone for every phone value, on Windows or macOS for `desktop`. Every page of one query (`num` above 10, every page of a bulk job) comes from the same device and browser; identities rotate between queries, among current versions and phone models. `search_metadata.served_device` says which page came back (phone or computer layout), `served_platform` and `served_browser` which device and browser fetched it. Desktop and phone results are cached separately. Also accepted as `brd_mobile`: `1` (mobile), `ios` or `android`. |
| `render` | boolean | no |  |
| `wait_for` | string | no |  |
| `browser` | string: `chrome`, `firefox`, `safari` | no | Browser to search as: `chrome`, `firefox` or `safari` (Safari is iPhone or macOS, Chrome is Android or desktop, Firefox desktop only). Bing and DuckDuckGo fetch as that browser; Google web, news and videos always fetch as Edge (`search_metadata.served_browser`). Without it the browser rotates between queries. Alias `brd_browser`. |
| `safe` | string: `active`, `off` | no |  |
| `nfpr` | boolean \\| integer: `1` | no |  |
| `uule` | string | no |  |
| `location` | string | no |  |
| `google_params` | object | no |  |
| `webhook` | string | no | Public http(s) URL that receives the finished job by POST. |

Example:

```json
{
  "query": "best coffee grinder",
  "engine": "google",
  "country": "us",
  "max_pages": 3
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/serp/bulk' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"query":"best coffee grinder","engine":"google","country":"us","max_pages":3}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/serp/bulk',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "query": "best coffee grinder",
        "engine": "google",
        "country": "us",
        "max_pages": 3
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/serp/bulk", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "query": "best coffee grinder",
    "engine": "google",
    "country": "us",
    "max_pages": 3
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/serp/bulk');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'query' => 'best coffee grinder',
    'engine' => 'google',
    'country' => 'us',
    'max_pages' => 3
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Job accepted.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Bulk SERP started",
  "payload": {
    "id": "sb_4d1e9c",
    "status": "running",
    "query": "best coffee grinder",
    "total": 3,
    "completed": 0,
    "statusUrl": "/api/v1/scraper/serp/bulk/sb_4d1e9c",
    "usage": {
      "cost_usd": 0.006,
      "free_usd": 0.006,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Scraper API is not available: no proxy credentials found. Contact support or purchase a residential, datacenter or IPv6 plan."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Poll a multi-page search job

`GET /scraper/serp/bulk/{jobId}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `GET https://api.quanticdata.io/v1/serp/bulk/{jobId}` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Progress and merged organic results of a bulk search job you own. Pass the previous response's `nextCursor` as `since` to receive only new rows. Jobs are kept about an hour after they finish. Free to poll.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |
| `since` | query | integer | no | Organic cursor from the previous poll's `nextCursor`. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/serp/bulk/job_8f2c1a' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/serp/bulk/job_8f2c1a',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/serp/bulk/job_8f2c1a", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/serp/bulk/job_8f2c1a');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Job view.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Bulk SERP status",
  "payload": {
    "id": "sb_4d1e9c",
    "status": "completed",
    "query": "best coffee grinder",
    "total": 3,
    "completed": 3,
    "failed": 0,
    "pages": [
      {
        "page": 1,
        "organic_count": 10,
        "bytes": 210331,
        "path": "http"
      },
      {
        "page": 2,
        "organic_count": 10,
        "bytes": 198002,
        "path": "http"
      },
      {
        "page": 3,
        "organic_count": 9,
        "bytes": 190114,
        "path": "http"
      }
    ],
    "organic": [
      {
        "rank": 1,
        "title": "The 6 Best Coffee Grinders of 2026",
        "link": "https://example.com/reviews/coffee-grinders",
        "display_link": "example.com",
        "description": "…"
      }
    ],
    "related_searches": [],
    "ai_overview": null,
    "nextCursor": 29,
    "createdAt": 1759828364000,
    "finishedAt": 1759828391000
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Cancel a multi-page search job

`DELETE /scraper/serp/bulk/{jobId}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `DELETE https://api.quanticdata.io/v1/serp/bulk/{jobId}` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Stops a running bulk search job you own. Pages never fetched are refunded at settlement.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |

##### Examples

**curl**

```bash
curl -X DELETE 'https://api.quanticdata.io/v1/scraper/serp/bulk/job_8f2c1a' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.delete(
    'https://api.quanticdata.io/v1/scraper/serp/bulk/job_8f2c1a',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/serp/bulk/job_8f2c1a", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/serp/bulk/job_8f2c1a');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Cancelled.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Bulk SERP cancelled",
  "payload": {
    "id": "sb_4d1e9c",
    "status": "cancelled"
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Map & Crawl

URL discovery for a whole site and asynchronous site crawls.

#### Discover a site's URLs

`POST /scraper/map`

**Price:** `map` $0.003 per call _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `POST https://api.quanticdata.io/v1/map` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Merges robots.txt sitemaps, /sitemap.xml (nested indexes included) and same-domain homepage links into one de-duplicated list, synchronously. Returns up to `limit` URLs plus the site-wide `total` and a per-section `summary`; `group_by: path` returns the path tree instead of the list. It does not fetch page bodies — pair it with /scraper/batch for that. One flat price per call.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | Seed URL. |
| `limit` | number | no | Max URLs to return (service cap 5000). Default `100`. |
| `search` | string | no | Only return URLs containing this substring. |
| `includeSubdomains` | boolean | no |  Default `false`. |
| `sitemapOnly` | boolean | no | Skip the homepage link scrape. Default `false`. |
| `group_by` | string: `path` | no | Return the path tree with counts instead of the URL list. Alias `groupBy`. |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |

Example:

```json
{
  "url": "https://example.com",
  "limit": 100,
  "search": "blog"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/map' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com","limit":100,"search":"blog"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/map',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "url": "https://example.com",
        "limit": 100,
        "search": "blog"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/map", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "url": "https://example.com",
    "limit": 100,
    "search": "blog"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/map');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'url' => 'https://example.com',
    'limit' => 100,
    'search' => 'blog'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — URLs discovered.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Map successful",
  "payload": {
    "url": "https://example.com",
    "links": [
      "https://example.com/blog/",
      "https://example.com/blog/how-to-scrape"
    ],
    "count": 100,
    "total": 2417,
    "summary": {
      "/blog": 1988,
      "/docs": 240,
      "/": 1
    },
    "sources": {
      "sitemap": 2410,
      "homepage": 42
    },
    "durationMs": 3120,
    "geo": {
      "country": null
    },
    "usage": {
      "cost_usd": 0.003,
      "free_usd": 0.003,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Scraper API is not available: no proxy credentials found. Contact support or purchase a residential, datacenter or IPv6 plan."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Start a site crawl

`POST /scraper/crawl`

**Price:** `crawl_page` $0.0003 per call · `extract_render` $0.0025 per call + $4/GB, max $0.05 per call. `crawl_page` × min(limit, 500) up front, or `extract_render` × pages when render is true. Refund of the unfetched share at settlement. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `POST https://api.quanticdata.io/v1/crawl` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Breadth-first crawl from a seed URL through the residential pool, each page converted to the requested format. Returns a job id immediately; poll `GET /scraper/crawl/{jobId}`. Charged up front on `limit` pages (render price per page with `render: true`); unfetched or failed pages are refunded when the job settles. A render crawl takes one browser-render token at submission and its pages then queue on the plan's render concurrency.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | Seed URL. |
| `limit` | number | no | Max pages (cap 500). Billed on this up front. Default `50`. |
| `depth` | number | no | Max link depth from the seed (cap 10). Default `3`. |
| `format` | string: `markdown`, `html`, `text` | no |  Default `"markdown"`. |
| `contentMode` | string: `smart`, `article`, `full` | no | Alias `content_mode`. Default `"smart"`. |
| `render` | boolean | no | Render every page with the stealth browser (slower, rendered rate). Default `false`. |
| `sameDomain` | boolean | no |  Default `true`. |
| `allowSubdomains` | boolean | no |  Default `false`. |
| `include` | array of string | no | URL substrings/globs to include, e.g. ["/guides/*"]. |
| `exclude` | array of string | no |  |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |

Example:

```json
{
  "url": "https://docs.example.com",
  "limit": 50,
  "depth": 3,
  "include": [
    "/guides/*"
  ]
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/crawl' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://docs.example.com","limit":50,"depth":3,"include":["/guides/*"]}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/crawl',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "url": "https://docs.example.com",
        "limit": 50,
        "depth": 3,
        "include": [
            "/guides/*"
        ]
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/crawl", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "url": "https://docs.example.com",
    "limit": 50,
    "depth": 3,
    "include": [
      "/guides/*"
    ]
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/crawl');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'url' => 'https://docs.example.com',
    'limit' => 50,
    'depth' => 3,
    'include' => ['/guides/*']
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Crawl started.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Crawl started",
  "payload": {
    "id": "cr_d5b8a1",
    "status": "running",
    "seed": "https://docs.example.com/",
    "limit": 50,
    "depth": 3,
    "format": "markdown",
    "pagesCrawled": 0,
    "pagesQueued": 1,
    "statusUrl": "/api/v1/scraper/crawl/cr_d5b8a1",
    "usage": {
      "cost_usd": 0.015,
      "free_usd": 0.015,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Scraper API is not available: no proxy credentials found. Contact support or purchase a residential, datacenter or IPv6 plan."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Poll a crawl job

`GET /scraper/crawl/{jobId}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `GET https://api.quanticdata.io/v1/crawl/{jobId}` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Progress and crawled pages of a job you own. Use `since` (the previous `nextCursor`) to page a large crawl and `include_content=false` for cheap status checks. Jobs are kept about an hour after they finish. Free to poll.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |
| `since` | query | integer | no | Page cursor from the previous poll's `nextCursor`. |
| `include_content` | query | string: `true`, `false` | no | Omit to get the full job; `false` strips page content. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/crawl/job_8f2c1a' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/crawl/job_8f2c1a',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/crawl/job_8f2c1a", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/crawl/job_8f2c1a');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Job view.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Crawl status",
  "payload": {
    "id": "cr_d5b8a1",
    "status": "completed",
    "seed": "https://docs.example.com/",
    "limit": 50,
    "depth": 3,
    "format": "markdown",
    "pagesCrawled": 37,
    "pagesQueued": 0,
    "pages": [
      {
        "url": "https://docs.example.com/guides/getting-started",
        "status": 200,
        "title": "Getting started",
        "depth": 1,
        "content": "# Getting started\n…"
      }
    ],
    "nextCursor": 37,
    "hasMore": false,
    "createdAt": 1759828364000,
    "finishedAt": 1759828512000
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Cancel a crawl job

`DELETE /scraper/crawl/{jobId}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `DELETE https://api.quanticdata.io/v1/crawl/{jobId}` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Stops a running crawl you own; pages never fetched are refunded at settlement.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |

##### Examples

**curl**

```bash
curl -X DELETE 'https://api.quanticdata.io/v1/scraper/crawl/job_8f2c1a' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.delete(
    'https://api.quanticdata.io/v1/scraper/crawl/job_8f2c1a',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/crawl/job_8f2c1a", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/crawl/job_8f2c1a');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Cancelled.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Crawl cancelled",
  "payload": {
    "id": "cr_d5b8a1",
    "status": "cancelled"
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Batch

Many known URLs scraped asynchronously.

#### Scrape many URLs asynchronously

`POST /scraper/batch`

**Price:** `batch_url` $0.0004 per call · `extract_render` $0.0025 per call + $4/GB, max $0.05 per call. `batch_url` × urls up front (or `extract_render` × urls when rendering). Failed URLs refunded at settlement. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `POST https://api.quanticdata.io/v1/batch` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Up to 5,000 URLs you already know, with shared options, run concurrently through the residential pool. Returns a job id immediately; poll `GET /scraper/batch/{jobId}` or pass a `webhook` to receive the finished job by POST. Charged up front per URL (render price with `render: true` or `engine: render`); the failed/blocked share is refunded when the job settles. A render batch takes one browser-render token at submission.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `urls` | array of string | yes |  |
| `format` | string: `markdown`, `html`, `text` | no |  Default `"markdown"`. |
| `engine` | string: `auto`, `tls`, `fetch`, `render` | no |  Default `"auto"`. |
| `render` | boolean | no | Force the headless browser for every URL. Default `false`. |
| `extract` | object (ExtractSchema) | no | Structured-extraction schema: field name → CSS selector, or an object with `selector`, optional `attr` (attribute to read instead of text) and `all` (true = every match as an array). |
| `contentMode` | string: `smart`, `article`, `full` | no | Alias `content_mode`. Default `"smart"`. |
| `fullPage` | boolean | no | Legacy: contentMode full. |
| `mode` | string: `full`, `summary` | no | `summary` stores per-URL metadata only (title, description, canonical, contentLength). Default `"full"`. |
| `concurrency` | number | no | Simultaneous fetches (clamped 1–20; your tier's batch concurrency also applies). Default `5`. |
| `webhook` | string | no | Public http(s) URL that receives the finished job by POST. |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |

Example:

```json
{
  "urls": [
    "https://example.com/a",
    "https://example.com/b"
  ],
  "format": "markdown",
  "mode": "summary"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/batch' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"urls":["https://example.com/a","https://example.com/b"],"format":"markdown","mode":"summary"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/batch',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "urls": [
            "https://example.com/a",
            "https://example.com/b"
        ],
        "format": "markdown",
        "mode": "summary"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/batch", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "urls": [
      "https://example.com/a",
      "https://example.com/b"
    ],
    "format": "markdown",
    "mode": "summary"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/batch');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'urls' => ['https://example.com/a', 'https://example.com/b'],
    'format' => 'markdown',
    'mode' => 'summary'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Batch started.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Batch started",
  "payload": {
    "id": "bt_91ac07",
    "status": "running",
    "total": 2,
    "completed": 0,
    "failed": 0,
    "statusUrl": "/api/v1/scraper/batch/bt_91ac07",
    "usage": {
      "cost_usd": 0.0004,
      "free_usd": 0.0004,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Scraper API is not available: no proxy credentials found. Contact support or purchase a residential, datacenter or IPv6 plan."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Poll a batch job

`GET /scraper/batch/{jobId}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `GET https://api.quanticdata.io/v1/batch/{jobId}` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Progress and per-URL results of a job you own. Polls return metadata only unless `include_content=true`; pass the previous `nextCursor` as `since` to receive only newer items. Jobs are kept about an hour after they finish. Free to poll.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |
| `since` | query | integer | no | Item cursor from the previous poll's `nextCursor`. |
| `include_content` | query | string: `true`, `false` | no | `true` includes each item's page content. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/batch/job_8f2c1a' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/batch/job_8f2c1a',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/batch/job_8f2c1a", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/batch/job_8f2c1a');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Job view.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Batch status",
  "payload": {
    "id": "bt_91ac07",
    "status": "completed",
    "total": 2,
    "completed": 2,
    "failed": 0,
    "contentTruncated": false,
    "items": [
      {
        "url": "https://example.com/a",
        "status": 200,
        "title": "Page A",
        "description": "…",
        "canonical": "https://example.com/a",
        "contentLength": 5120,
        "engine": "tls",
        "bytes": 31870
      },
      {
        "url": "https://example.com/b",
        "status": 200,
        "title": "Page B",
        "description": null,
        "canonical": null,
        "contentLength": 2210,
        "engine": "tls",
        "bytes": 12003
      }
    ],
    "nextCursor": 2,
    "hasMore": false,
    "createdAt": 1759828364000,
    "finishedAt": 1759828370000
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Cancel a batch job

`DELETE /scraper/batch/{jobId}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `DELETE https://api.quanticdata.io/v1/batch/{jobId}` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Stops a running batch you own; URLs never fetched are refunded at settlement.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |

##### Examples

**curl**

```bash
curl -X DELETE 'https://api.quanticdata.io/v1/scraper/batch/job_8f2c1a' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.delete(
    'https://api.quanticdata.io/v1/scraper/batch/job_8f2c1a',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/batch/job_8f2c1a", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/batch/job_8f2c1a');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Cancelled.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Batch cancelled",
  "payload": {
    "id": "bt_91ac07",
    "status": "cancelled"
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Video

A YouTube video as text and pictures for a model: the transcript in the spoken language with timestamps, the author's chapters and small storyboard frames placed at the moments that matter, in one timeline.

#### Read a YouTube video for a model

`POST /scraper/video`

**Price:** `video` $0.02 per call. `video` per successful read, whatever the length; a window (`start`/`end`) or a transcript-only read (`max_frames: 0`) costs the same. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

One YouTube URL in; out come the metadata, the transcript in the language that is spoken with `[m:ss]` timestamps (never a translated track: a translation adds the translator's errors on top of the captioner's, and the reading model translates better from the original), the chapters the author wrote, and small storyboard frames picked where the words point at the screen ("as you can see", "come vedete"), where a price is said, at each chapter start and every so often in between, so no stretch goes unseen. `content` interleaves all of it in one Markdown timeline the model reads in order; the frames are base64 JPEGs you attach to the prompt next to their `[frame N]` marker. No model runs on our side. Use `start`/`end` to read a part of a long video and `max_tokens` to bound the text; `max_frames: 0` returns the transcript alone. Reads that the platform refuses from a datacenter address are retried through a residential exit automatically. Pay per success: a video that cannot be read (removed, private, sign-in gated, live not started) answers a stable `payload.code` and is never billed. The MCP server exposes the same call as the `read_video` tool.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | YouTube URL: watch, youtu.be, shorts, embed or live. |
| `languages` | array of string | no | Caption languages to prefer, e.g. `["en"]`. Leave it out to get the language spoken in the video (recommended: more accurate than a translated track). |
| `max_frames` | integer | no | Frames to include; 0 = transcript only. Default `12`. |
| `frames` | boolean | no | false = the frame list without image data (positions, reasons and quotes only). Default `true`. |
| `start` | number \\| string | no | Read from this point: seconds or `m:ss` / `h:mm:ss`. |
| `end` | number \\| string | no | Read up to this point: seconds or `m:ss` / `h:mm:ss`, after `start`. |
| `max_tokens` | integer | no | Budget for `content` (estimator chars/4). When the text is trimmed, `tokens.truncated` is true and a note says so: pass `start`/`end` to read the rest. |
| `segments` | boolean | no | true = also return the raw timed cues under `transcript.segments`. Default `false`. |

Example:

```json
{
  "url": "https://www.youtube.com/watch?v=aircAruvnKk",
  "max_frames": 6,
  "max_tokens": 4000
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/video' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://www.youtube.com/watch?v=aircAruvnKk","max_frames":6,"max_tokens":4000}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/video',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "url": "https://www.youtube.com/watch?v=aircAruvnKk",
        "max_frames": 6,
        "max_tokens": 4000
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/video", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "url": "https://www.youtube.com/watch?v=aircAruvnKk",
    "max_frames": 6,
    "max_tokens": 4000
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/video');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'url' => 'https://www.youtube.com/watch?v=aircAruvnKk',
    'max_frames' => 6,
    'max_tokens' => 4000
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The video, read.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — The video needs a signed-in viewer (age or membership gated) and cannot be read. Not billed.
- `404` — The video was removed, is private, or the id is wrong. Not billed.
- `422` — Not readable in this version: a live stream that has not started (`video_live_offline`) or a platform other than YouTube (`video_platform_unsupported`). Not billed.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `502` — The video platform did not answer in a readable way, on the direct attempt and through a residential exit (`video_platform_error`, `video_captions_error`, `video_bad_payload`, `video_unplayable`). Try again in a minute. Not billed.
- `503` — The Video API is switched off for this key (`PRODUCT_DISABLED`), or the Data API group is switched off for non-admin keys.
- `504` — The read timed out. Pass `start`/`end` to read a shorter window. Not billed.

Example `200` response:

```json
{
  "type": "response",
  "message": "Video read successful",
  "payload": {
    "video": {
      "platform": "youtube",
      "id": "aircAruvnKk",
      "url": "https://www.youtube.com/watch?v=aircAruvnKk",
      "title": "But what is a neural network? | Deep learning chapter 1",
      "channel": "3Blue1Brown",
      "channel_id": "UCYO_jab_esuFRV4b17AJtAw",
      "duration_seconds": 1120,
      "view_count": 24894419,
      "keywords": [
        "neural network",
        "deep learning"
      ],
      "is_live": false,
      "thumbnail": "https://i.ytimg.com/vi/aircAruvnKk/hqdefault.jpg"
    },
    "transcript": {
      "source": "captions",
      "language": "en",
      "available": [
        {
          "code": "en",
          "kind": "manual"
        },
        {
          "code": "it",
          "kind": "manual"
        }
      ]
    },
    "chapters": [
      {
        "start": 0,
        "title": "Introduction example"
      },
      {
        "start": 67,
        "title": "Series preview"
      },
      {
        "start": 162,
        "title": "What are neurons?"
      }
    ],
    "frames": [
      {
        "n": 1,
        "t": 130,
        "at": "2:10",
        "reason": "cue",
        "quote": "and in recent years there's been sort of a boom in research towards these variants",
        "width": 160,
        "height": 90,
        "mime": "image/jpeg",
        "data": "/9j/4AAQSkZJRgABAQAAAQABAAD…"
      },
      {
        "n": 2,
        "t": 165,
        "at": "2:45",
        "reason": "chapter",
        "quote": "What are neurons?",
        "width": 160,
        "height": 90,
        "mime": "image/jpeg",
        "data": "/9j/4AAQSkZJRgABAQAAAQABAAD…"
      }
    ],
    "frame_size": {
      "width": 160,
      "height": 90,
      "interval": 10
    },
    "format": "markdown",
    "content": "# But what is a neural network? | Deep learning chapter 1\nChannel: 3Blue1Brown · Duration: 18:40 · Views: 24894419\nURL: https://www.youtube.com/watch?v=aircAruvnKk\nTranscript: en (captions), original language, timestamps [m:ss]\nFrames: 6 storyboard frames of 160×90 px, marked [frame N · m:ss · why]; low resolution — scenes and objects are visible, small text is not\n\n## Description\nWhat are the neurons, why are there layers, and what is the math underlying it?\n…\n\n## Timeline\n## [0:00] Introduction example\n\n[0:04] This is a 3. It's sloppily written and rendered at an extremely low resolution of 28x28 pixels, but your brain has no trouble recognizing it as a 3. …\n[frame 1 · 2:10 · the speaker points at the screen]\n[2:12] but in these two introductory videos you and I are just going to look at the simplest plain vanilla form …\n\n## [2:42] What are neurons?\n\n[frame 2 · 2:45 · chapter start]\n[2:42] So let's start by looking at an example of a neuron …",
    "tokens": {
      "estimated": 3996,
      "full": 5780,
      "truncated": true,
      "estimator": "chars/4 heuristic"
    },
    "notes": [
      "content trimmed to max_tokens: pass start/end to read the rest of the video"
    ],
    "meta": {
      "bytes": 502969,
      "via_proxy": false
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "This video needs a signed-in viewer (age or membership gated) and cannot be read.",
  "payload": {
    "url": "https://www.youtube.com/watch?v=xxxxxxxxxxx",
    "code": "video_login_required"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Video not found: it was removed, is private, or the id is wrong.",
  "payload": {
    "url": "https://www.youtube.com/watch?v=xxxxxxxxxxx",
    "code": "video_unavailable"
  }
}
```

Example `422`:

```json
{
  "type": "error",
  "message": "This live stream has not started yet.",
  "payload": {
    "url": "https://www.youtube.com/watch?v=xxxxxxxxxxx",
    "code": "video_live_offline"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `502`:

```json
{
  "type": "error",
  "message": "The video platform did not answer. Try again in a minute.",
  "payload": {
    "url": "https://www.youtube.com/watch?v=aircAruvnKk",
    "code": "video_platform_error"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "The Video API is not open yet. Ask support for early access, or read videos with the read_video tool of the MCP server.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Example `504`:

```json
{
  "type": "error",
  "message": "Video read timed out. Pass start/end to read a shorter window.",
  "payload": {
    "url": "https://www.youtube.com/watch?v=aircAruvnKk",
    "code": null
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Web Unlocker

Replay any HTTP request through a residential exit with a real browser fingerprint; prepaid per GB.

The same engine answers in two ways: the REST call below (`POST /scraper/unlock`, API key, JSON in and out) and a **forward proxy** you point an existing HTTP client or scraper at. Both spend the same prepaid Web Unlocker GB, one balance per tier (`premium` = residential exits, `mobile` = mobile exits). The GB are bought on the Web Unlocker tab of the [plans page](https://app.quanticdata.io/plans?network=UNLOCK), paid from the wallet balance, and are separate from the Data API free credit.

Use the REST call when you can change the code that sends the request. Use the forward proxy when the code already speaks to a proxy (host, port, user, password) and should keep working unchanged.

## Forward proxy

| | |
|---|---|
| Host | `unlock.quanticdata.io` |
| Port | `9000` (HTTP proxy) |
| Authentication | `Proxy-Authorization: Basic` with a **proxy user**: username `unlock-<12 hex>`, 32-character password. Your API key is not accepted by the proxy. |
| Targets | `http://` and `https://` URLs. HTTP/1.1 inside a CONNECT tunnel. |
| Limits | Request body up to 8 MB. Text responses up to 5 MB, binary up to 25 MB. At most 8 redirects are followed. |

### Proxy users

Create, rotate and delete proxy users on the [Web Unlocker page](https://app.quanticdata.io/unlock) of the dashboard, up to 20 per account. The password is shown when the user is created or rotated. The proxy caches a successful login for 60 seconds, so a rotated or deleted password can keep working for up to a minute. The same page builds ready-made proxy strings with the targeting below.

### Three ways to send a request

**1. HTTPS target through CONNECT** — the normal proxy setting of any client. The proxy re-issues your request itself, so it terminates TLS with its own certificate: trust the interception CA (`GET /scraper/unlock/ca`) or turn verification off (`curl -k`, `verify=False`).

```bash
curl -x http://unlock.quanticdata.io:9000 -U 'unlock-xxxxxxxxxxxx:PROXY_PASSWORD' \
  --cacert qp-unlocker-ca.pem 'https://example.com/'
```

```python
import requests

proxy = "http://unlock-xxxxxxxxxxxx-country-us:PROXY_PASSWORD@unlock.quanticdata.io:9000"
r = requests.get("https://example.com/", proxies={"http": proxy, "https": proxy}, verify="qp-unlocker-ca.pem")
print(r.status_code, r.headers.get("x-qp-unlocker-attempts"))
```

**2. Direct mode, no certificate** — send the target in `x-qp-url` and address the proxy itself with plain HTTP. The proxy makes the TLS connection to the site, so nothing has to be installed. The method and body of your call are forwarded; `x-qp-method` overrides the method.

```bash
curl -x http://unlock.quanticdata.io:9000 -U 'unlock-xxxxxxxxxxxx:PROXY_PASSWORD' \
  -H 'x-qp-url: https://example.com/api/search' \
  -H 'content-type: application/json' -d '{"q":"shoes"}' http://unlock/
```

**3. Plain-HTTP target** — an absolute-URI request (`GET http://example.com/ HTTP/1.1`), what any client sends for an `http://` URL through a proxy. No certificate involved.

### Targeting in the username

Append options to the proxy user, each as `-name-value`: `unlock-xxxxxxxxxxxx-country-us-session-abc123-ttl-30`. Unknown options are ignored.

| Option | Values | Effect |
|---|---|---|
| `country-xx` | 2-letter country code | Exit country. Without it: the country of a 2-letter domain ending (`.de`, `.fr`), otherwise US. |
| `state-<slug>`, `city-<slug>` | letters, digits, `_` (up to 32) | Exit region and city, e.g. `-state-new_york-city-new_york`. |
| `session-<id>` (or `sid-<id>`) | letters and digits (up to 32) | Keeps the same exit IP across requests and connections. |
| `ttl-<minutes>` | 3 to 1440 | How long that session's exit is kept; only together with `session`. |
| `profile-<name>` | `chrome` (default), `firefox`, `safari`, `safari_ios`, `edge`, `brave`, `mobile` | Browser fingerprint. Other values fall back to the default. |
| `mobile` | — | Mobile browser fingerprint on the same exits. It does not switch to the mobile network. |
| `tier-<name>` | `premium` (default), `mobile` | Product: exit network and GB balance the request is billed on. |
| `policy-<name>` | `browser` (default), `passthrough` | `passthrough` sends your own identity headers instead of the fingerprint's. |

### Control headers

Optional request headers, read by the proxy and removed before the request reaches the site (any other header, including other `x-qp-*` names, is forwarded). They work on every way of sending a request, inside a CONNECT tunnel too. True values: `1`, `true`, `yes`, `on`; false: `0`, `false`, `no`, `off`, `none` or empty. An invalid value is ignored and reported in `x-qp-warning`. The header names used by other unlocker services for the same options are accepted as aliases, so existing code keeps working.

| Header | Values | Effect |
|---|---|---|
| `x-qp-url` | absolute `http(s)` URL | Target in direct mode; wins over the request line. |
| `x-qp-method` | HTTP verb | Method sent to the site. |
| `x-qp-country` (or `x-qp-geo`) | 2-letter code | Exit country for this request. |
| `x-qp-session` (or `x-qp-session-id`) | letters and digits (up to 32) | Exit session for this request. |
| `x-qp-rotation` | `sticky`, `rotating` | Session behaviour. |
| `x-qp-profile` (or `x-qp-tls-profile`) | profile name | Browser fingerprint. |
| `x-qp-keep-headers` | true/false | Send your own identity headers verbatim. |
| `x-qp-render` | `html` or true, `png`, false | Run the page in a headless browser (GET/HEAD); false turns the browser off, escalation included. |
| `x-qp-auto-render` (or `x-qp-escalate`) | true/false | Browser escalation of a blocked GET (on by default). |
| `x-qp-success-status` | comma-separated codes, 100 to 599 | Origin statuses relayed as success, never retried. |
| `x-qp-timeout` | milliseconds | Per-attempt timeout at the site. |
| `x-qp-wait-for` (or `x-qp-wait-for-selector`) | CSS selector (up to 256) | Browser waits for this element before capturing. |
| `x-qp-wait-ms` (or `x-qp-wait`) | 0 to 15000 | Extra settle time in the browser. |
| `x-qp-return-cookies` | true | Return the site's cookie jar in `x-qp-cookies`. |

### Response headers

The site's status, headers and body are relayed (the body decompressed, `Set-Cookie` lines from every redirect kept), plus:

| Header | Meaning |
|---|---|
| `x-qp-request-id` | Id of this exchange, to quote to support. |
| `x-qp-unlocker-attempts` | Attempts across every tier. |
| `x-qp-unlocker-profile` | Fingerprint that served the response. |
| `x-qp-session` | Exit session used. |
| `x-qp-country` | Exit country used. |
| `x-qp-final-url` | URL after redirects. |
| `x-qp-unlocker-rendered`, `x-qp-unlocker-escalated` | `1` when the headless browser served it, or was reached by escalation. |
| `x-qp-clearance` | `hit`, `miss`, `minted`, `stale` or `off`. |
| `x-qp-unlocker-blocked` | Block reason, when every attempt came back blocked. |
| `x-qp-block-class` | `js_challenge`, `captcha`, `access_denied`, `rate_limited`, `fingerprint`, `geo`, `timeout` or `unknown`. |
| `x-qp-vendor` | Anti-bot vendor, when recognised. |
| `x-qp-hint` | Suggestion when blocked, e.g. try the `mobile` tier. |
| `x-qp-origin-status` | The site's real status, when the proxy changed it (a block page that came back as 2xx/3xx is relayed as 502). |
| `x-qp-cookies` | URL-encoded JSON cookie jar, with `x-qp-return-cookies`. |
| `x-qp-ratelimit-limit`, `x-qp-ratelimit-remaining` | Requests per minute and what is left. |
| `x-qp-warning` | A control header or option that was ignored, and why. |

### Retries and sessions

GET, HEAD and OPTIONS are retried up to three times on a new exit with a different fingerprint, then escalated to a headless browser that can start in parallel. Any other method gets exactly one attempt and no browser fallback: a response means the site saw the request, and replaying a POST could submit it twice. With a `session` in the username the exit cannot change, so there is one normal attempt; the browser fallback still runs.

### Errors from the proxy itself

Errors generated by the proxy (not relayed from the site) are JSON, `{"error":{"code":"…","message":"…"}}`, with the code repeated in the `x-qp-unlocker` header. A CONNECT that is refused gets no body: the status line plus `X-Qp-Unlocker` (code) and, for 402, `X-Qp-Unlocker-Message` (curl prints "Received HTTP code 402 from proxy after CONNECT").

| Status | Code | When |
|---|---|---|
| 400 | `bad_target`, `not_a_proxy_request` | Malformed or non-absolute target URL, credentials in the URL, or a request that is neither proxy-shaped nor direct mode. |
| 402 | `no_credit` | The tier has no usable GB: never bought, used up or expired. The message says which and links the plans page. After buying, a cached 402 can last up to 30 seconds. |
| 403 | `target_forbidden`, `target_denied` | Private or internal address, or a destination that is not reachable through the unlocker (banking, payments, login providers, crypto sites). |
| 407 | `proxy_auth_required`, `proxy_auth_invalid` | Missing or wrong proxy user, or a suspended account. Comes with `Proxy-Authenticate: Basic`. |
| 413 | `body_too_large` | Request body over 8 MB. |
| 429 | `rate_limited`, `too_many_connections`, `sensitive_rate_limited`, `auth_rate_limited` | Requests per minute, concurrent connections, non-GET requests to login-like paths, or more than 30 failed logins per minute from one IP. `retry-after` says when to retry. Not billed. |
| 502, 504 | `upstream_failed`, `render_failed` | The site could not be reached in time, or the browser render failed. |
| 503 | `no_exit_pool` | The tier has no exit network for this account (e.g. `tier-mobile` without mobile GB). |

### Billing and limits

Every byte the exit network carries for your request is debited from the tier's GB: retries, blocked pages, failed attempts and the browser's page load included (request bodies and response bodies; headers are not counted). 1 GB = 10^9 bytes. 429 responses and failed logins are not billed. The balance is checked when the proxy logs you in, so a session can run for up to a minute past the end of the GB. Requests per minute and concurrent connections follow the account's Data API tier (see Rate limits and tiers).

#### Replay a request through the Web Unlocker

`POST /scraper/unlock`

**Price:** `unlock_request` $2.40/GB of transferred data. Flat base is 0; the whole charge is the `unlock_request` perGb meter applied to `usage.bytes`, debited from the prepaid unlocker GB of the chosen tier. No wallet charge, no free tier. 402 when the tier has no usable GB (never bought, used up or expired). _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

Send a request the way your own HTTP client would (url, method, headers, body) and get it back replayed through a residential (or mobile) exit under a real browser TLS fingerprint. GET/HEAD/OPTIONS retry on a fresh exit IP under a different fingerprint when blocked and finally escalate to a headless browser that answers JavaScript challenges; any other method gets exactly one attempt (a response means the target saw it, and replaying a POST could double-submit). A still-blocked page is returned with `blocked: true`, `blockClass` and `vendor`, never as a silent success; `failOnBlock: true` turns that into a 502. It does not solve interactive captchas. This is the same engine as the forward proxy (documented at the top of this section), without the proxy protocol — no certificate to install. Billing is different from every other Data API call: it is metered in bytes against the tier's prepaid Web Unlocker GB (`premium` = residential exits, `mobile` = mobile exits), not the wallet, and every attempt counts — retries, a blocked page, the browser escalation's page load.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes |  |
| `method` | string | no |  Default `"GET"`. |
| `headers` | object \\| string | no | Extra headers replayed to the target. Either a JSON object (name → value) or a raw `Header: Value` block, one per line (lines starting with `//` or `#` are ignored). Max 32 headers, names must be RFC 7230 tokens, values ≤ 4096 characters; hop-by-hop and framing headers (host, content-length, transfer-encoding, connection, …) are rejected. |
| `body` | string | no | Request body as UTF-8 text (JSON, form data…). Use this OR `bodyBase64`. |
| `bodyBase64` | string | no | Request body as base64 for binary payloads. Max 8 MB decoded. |
| `tier` | string: `premium`, `mobile` | no | Which prepaid pool pays and which exits are used. Anything other than `mobile` is `premium`. Default `"premium"`. |
| `tlsProfile` | string: `chrome`, `firefox`, `safari`, `safari_ios`, `edge`, `brave`, `mobile` | no |  Default `"chrome"`. |
| `mobile` | boolean | no | Mobile Safari fingerprint (fingerprint only — the product tier is `tier`). Default `false`. |
| `render` | string: `html`, `png` \\| boolean | no | `html`/`png` (or `true` = html) runs the page in a headless browser instead of the TLS tier, GET/HEAD only, one render token. `false` pins the TLS tier: a blocked page is returned as-is, never escalated. |
| `autoRender` | boolean | no | Escalate a blocked GET to the browser. Default `true`. |
| `keepHeaders` | boolean | no |  Default `false`. |
| `successStatusCodes` | array of integer | no | Origin statuses to accept as success — never treated as a block, never retried. |
| `timeoutMs` | integer | no | Per-attempt timeout at the target (capped by the service's 90 s total budget). |
| `failOnBlock` | boolean | no | 502 instead of a 200 with `blocked: true`. GB are debited either way. Default `false`. |
| `waitForSelector` | string | no | Browser tier: CSS selector to wait for before capture. |
| `waitMs` | integer | no |  |
| `returnCookies` | boolean | no | Return the origin's cookie jar under `cookies`. Default `false`. |
| `cookies` | object | no | Cookies merged into the Cookie header sent to the target (e.g. a clearance obtained earlier). |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `state` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `city` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `rotation` | string: `rotating`, `sticky` | no |  Default `"rotating"`. |
| `sessionId` | string | no | Sticky session id — reuse it across calls to keep one exit IP. |
| `sessionDuration` | number | no | Sticky session lifetime in minutes. |

Example:

```json
{
  "url": "https://example.com/api/search?q=shoes",
  "method": "GET",
  "headers": {
    "Accept": "application/json"
  },
  "country": "us",
  "tier": "premium"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/unlock' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com/api/search?q=shoes","method":"GET","headers":{"Accept":"application/json"},"country":"us","tier":"premium"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/unlock',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "url": "https://example.com/api/search?q=shoes",
        "method": "GET",
        "headers": {
            "Accept": "application/json"
        },
        "country": "us",
        "tier": "premium"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/unlock", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "url": "https://example.com/api/search?q=shoes",
    "method": "GET",
    "headers": {
      "Accept": "application/json"
    },
    "country": "us",
    "tier": "premium"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/unlock');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'url' => 'https://example.com/api/search?q=shoes',
    'method' => 'GET',
    'headers' => [
      'Accept' => 'application/json'
    ],
    'country' => 'us',
    'tier' => 'premium'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The origin's response (possibly a block page, see `blocked`).
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The tier has no usable Web Unlocker GB: never bought, used up or expired. `message` says which and ends with the link to buy GB (paid from the wallet, separate from the Data API free credit); `payload.code` is `UNLOCK_NO_CREDIT`, `payload.reason` is `never_bought`, `used_up` or `expired`, and `payload.buy_url` is the same link.
- `403` — No exit pool for the requested tier (e.g. no mobile unlocker GB on the account).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `502` — Only with `failOnBlock: true`: every tier came back blocked. Same diagnostics as the 200 form; the GB moved are debited.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Unlocker request successful",
  "payload": {
    "status": 200,
    "headers": {
      "content-type": "application/json; charset=utf-8",
      "cache-control": "no-store"
    },
    "body": "{\"results\":[{\"id\":1,\"name\":\"Runner\"}]}",
    "bodyBase64": "eyJyZXN1bHRzIjpbeyJpZCI6MSwibmFtZSI6IlJ1bm5lciJ9XX0=",
    "finalUrl": "https://example.com/api/search?q=shoes",
    "contentType": "application/json; charset=utf-8",
    "profile": "chrome",
    "attempts": 1,
    "blocked": false,
    "clearance": "miss",
    "exitSessionId": "s_2f91",
    "strategy": {
      "startTier": "tls",
      "hedged": false
    },
    "rendered": false,
    "escalated": false,
    "tier": "premium",
    "geo": {
      "country": "us",
      "state": null,
      "city": null,
      "rotation": "rotating"
    },
    "usage": {
      "bytes": 18432,
      "unlock_gb_remaining": 4.98,
      "unlock_gb_purchased": 5
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "This account has no residential Web Unlocker GB yet. The unlocker is prepaid per GB, separate from the Data API free credit, and paid from your wallet balance. Buy GB, then retry, your API key stays the same: https://app.quanticdata.io/plans?network=UNLOCK&utm_source=api&utm_medium=402&utm_campaign=web-unlocker",
  "payload": {
    "code": "UNLOCK_NO_CREDIT",
    "reason": "never_bought",
    "tier": "premium",
    "unlock_gb_remaining": 0,
    "unlock_gb_purchased": 0,
    "expires_at": null,
    "expired": false,
    "buy_url": "https://app.quanticdata.io/plans?network=UNLOCK&utm_source=api&utm_medium=402&utm_campaign=web-unlocker"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `502`:

```json
{
  "type": "error",
  "message": "Target blocked the request: js_challenge",
  "payload": {
    "status": 403,
    "blockReason": "js_challenge",
    "blockClass": "js_challenge",
    "vendor": "cloudflare",
    "attempts": 3,
    "rendered": true,
    "escalated": true,
    "usage": {
      "bytes": 90112,
      "unlock_gb_remaining": 4.97,
      "unlock_gb_purchased": 5
    }
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Download the unlocker CA certificate

`GET /scraper/unlock/ca`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/data-api.md)

The interception CA used by the Web Unlocker forward proxy (CONNECT mode). The proxy terminates your TLS to read and rewrite the request, so an HTTP client that keeps certificate verification on must trust this file for the target host (`curl --proxy-cacert qp-unlocker-ca.pem --cacert qp-unlocker-ca.pem …`). Not needed for POST /scraper/unlock, nor for the proxy's direct mode. Public by nature, kept behind the key so downloads are attributable. Free.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/unlock/ca' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/unlock/ca',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
r.raise_for_status()
open("response.out", "wb").write(r.content)
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/unlock/ca", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const bytes = Buffer.from(await res.arrayBuffer());
require("node:fs").writeFileSync("response.out", bytes);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/unlock/ca');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
file_put_contents('response.out', $raw);
```

##### Responses

- `200` — PEM certificate (attachment `qp-unlocker-ca.pem`, cacheable 1h).
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — The certificate could not be fetched from the unlocker service right now.

Example `200` response:

```json
"-----BEGIN CERTIFICATE-----\nMIIB…\n-----END CERTIFICATE-----\n"
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Unlocker certificate is temporarily unavailable"
}
```

Try it: https://app.quanticdata.io/data-api/playground

## AI

Markdown for this group only: https://quanticdata.io/docs/ai.md

### AI extraction

Natural-language agents that drive the scraper and return JSON.

#### Natural-language scraping agent

`POST /scraper/ai`

**Price:** `ai_extract` $0.005 per call, max $1.50 per call · `extract` $0.0015 per call + $3/GB, max $0.02 per call · `serp` $0.0009 per call · `map` $0.003 per call. ai_extract + steps × extract + searches × serp + mapped × map + tokens × ai_token_markup, capped at meters.ai_extract.capUsd. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/ai.md)

Describe a task in plain English; a model drives the scraper API as a tool — formats the request, fetches the page(s) through residential proxies, can search and map when the task needs it, and returns the extracted JSON under `data` with the pages it visited under `steps`. Use it when you do not want to write selectors or a schema; use /scraper/extract with `extract`/`ai_schema` when you already know the page. Not deterministic and not the cheapest path for repeated layouts (see /scraper/parser/generate). Billed as the `ai_extract` base fee plus one `extract` per page fetched, `serp` per search, `map` per map, plus LLM tokens × ai_token_markup, capped at the `ai_extract` meter's capUsd; the pre-check reserves that cap.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `task` | string | yes | Plain-English instruction, e.g. "get every product with its name and price from this page". |
| `url` | string | no | Starting URL, if the task does not already contain one. |

Example:

```json
{
  "task": "Get every plan and its monthly price",
  "url": "https://example.com/pricing"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/ai' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"task":"Get every plan and its monthly price","url":"https://example.com/pricing"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/ai',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "task": "Get every plan and its monthly price",
        "url": "https://example.com/pricing"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/ai", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "task": "Get every plan and its monthly price",
    "url": "https://example.com/pricing"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/ai');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'task' => 'Get every plan and its monthly price',
    'url' => 'https://example.com/pricing'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Extraction finished.
- `400` — Missing task, or the agent reported a client-side problem (bad URL, page unusable).
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Agent failure or the AI agent is not configured on this instance. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "AI extraction successful",
  "payload": {
    "data": {
      "plans": [
        {
          "name": "Starter",
          "price_usd": 9
        },
        {
          "name": "Growth",
          "price_usd": 29
        }
      ]
    },
    "steps": [
      {
        "url": "https://example.com/pricing",
        "status": 200,
        "engine": "tls"
      }
    ],
    "searches": 0,
    "mapped": 0,
    "model": "gpt-4o-mini",
    "bytes": 48213,
    "usage": {
      "input_tokens": 3120,
      "output_tokens": 180,
      "cost_usd": 0.0019,
      "free_usd": 0.0019,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### AI Places Finder

`POST /scraper/places-ai`

**Price:** `places_ai` $0.005 per call, max $3 per call · `serp_render` $0.002 per call. places_ai + searches × serp_render + tokens × ai_token_markup, capped at meters.places_ai.capUsd. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/ai.md)

Describe what you are looking for ("find every car repair shop in Naples"); the model crafts the Google local queries, paginates, de-duplicates and returns the aggregated businesses, optionally enriched from each knowledge panel (phone, website, hours, full address). For a deterministic, per-row-priced alternative use the `google_maps_places` collector. Billed as the `places_ai` base plus `serp_render` per search run plus LLM tokens × ai_token_markup, capped at the `places_ai` meter's capUsd; the pre-check reserves that cap.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `task` | string | yes |  |
| `country` | string | no | ISO country override for the proxy exit and `gl`. |
| `enrich` | boolean | no | Fill phone/website/hours/address from each business's knowledge panel. Default `true`. |
| `max_enrich` | number | no | Knowledge-panel lookups budget (cap 30). Default `15`. |

Example:

```json
{
  "task": "find every car repair shop in Naples",
  "country": "it",
  "max_enrich": 10
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/places-ai' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"task":"find every car repair shop in Naples","country":"it","max_enrich":10}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/places-ai',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "task": "find every car repair shop in Naples",
        "country": "it",
        "max_enrich": 10
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/places-ai", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "task": "find every car repair shop in Naples",
    "country": "it",
    "max_enrich": 10
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/places-ai');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'task' => 'find every car repair shop in Naples',
    'country' => 'it',
    'max_enrich' => 10
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Places found.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Finder failure or not configured on this instance. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Places search successful",
  "payload": {
    "places": [
      {
        "name": "Autofficina Esposito",
        "rating": 4.6,
        "reviews": 212,
        "address": "Via Toledo 12, 80134 Napoli NA",
        "phone": "+39 081 000 0000",
        "website": "https://example.it"
      }
    ],
    "total": 38,
    "enriched": 10,
    "queries": [
      "autofficina Napoli",
      "meccanico Napoli"
    ],
    "summary": "38 repair shops across central Naples.",
    "model": "gpt-4o-mini",
    "usage": {
      "input_tokens": 9800,
      "output_tokens": 2200,
      "cost_usd": 0.0218,
      "free_usd": 0.0218,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### AI Shopping Finder

`POST /scraper/shopping-ai`

**Price:** `shopping_ai` $0.005 per call, max $3 per call · `serp_render` $0.002 per call. shopping_ai + searches × serp_render + tokens × ai_token_markup, capped at meters.shopping_ai.capUsd. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/ai.md)

Describe the product ("find the cheapest Nintendo Switch OLED in Italy"); the model crafts Google Shopping queries, paginates, de-duplicates and returns the aggregated products with merchant and price. For a deterministic alternative use /scraper/serp with `search_type: shopping` or the `google_shopping` collector. Billed as the `shopping_ai` base plus `serp_render` per search plus LLM tokens × ai_token_markup, capped at the `shopping_ai` meter's capUsd; the pre-check reserves that cap.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `task` | string | yes |  |
| `country` | string | no | ISO country override for the proxy exit, `gl` and currency. |

Example:

```json
{
  "task": "cheapest Nintendo Switch OLED",
  "country": "it"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/shopping-ai' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"task":"cheapest Nintendo Switch OLED","country":"it"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/shopping-ai',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "task": "cheapest Nintendo Switch OLED",
        "country": "it"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/shopping-ai", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "task": "cheapest Nintendo Switch OLED",
    "country": "it"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/shopping-ai');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'task' => 'cheapest Nintendo Switch OLED',
    'country' => 'it'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Products found.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Finder failure or not configured on this instance. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Shopping search successful",
  "payload": {
    "products": [
      {
        "title": "Nintendo Switch OLED Bianco",
        "price": "€ 299,00",
        "merchant": "Example Store",
        "link": "https://example.it/p/switch-oled"
      }
    ],
    "total": 24,
    "queries": [
      "Nintendo Switch OLED prezzo"
    ],
    "searches": [
      {
        "query": "Nintendo Switch OLED prezzo",
        "results": 24
      }
    ],
    "summary": "Lowest price €299 at Example Store.",
    "model": "gpt-4o-mini",
    "usage": {
      "input_tokens": 7100,
      "output_tokens": 900,
      "cost_usd": 0.0121,
      "free_usd": 0.0121,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

### AI visibility

Can AI assistants read and cite a page?

#### AI visibility audit

`POST /scraper/ai-visibility`

**Price:** `ai_visibility` $0.01 per call · `ai_visibility_citation` $0.01 per call · `serp` $0.0009 per call. ai_visibility + answered (query × engine) × ai_visibility_citation + (2 retrieval + 5 offsite) × serp, only for SERPs that answered. Pre-check reserves the worst case. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/ai.md)

Answers one question about a page — can an AI assistant read it, and does it cite it? — on two levels. On-page (always): AI crawler access from the real robots.txt (24 bots), Content-Signal, a fetch that identifies itself as an AI crawler, noindex/nosnippet/noai directives, text without JavaScript, structured data and resolvable entities, citable form (questions, opening answer, lists/tables, numbers, chunk-sized sections), dated and authored content — scored per pillar with blockers that cap the total and the evidence behind every check. Citations (only when `queries` is given): the questions are really asked to Perplexity, ChatGPT, Claude, Google AI Overview, Bing Copilot and a DeepSeek-over-Google-SERP engine, and the answer reports who is cited or at least mentioned, plus share of voice against `competitors`. It does not change the page and the citation panel is capped at 10 queries per call and a daily per-account cap on LLM engine calls. Billed as the on-page audit fee plus one `ai_visibility_citation` per (query × engine) that actually answered, plus `serp` for the 2 retrievability SERPs and the 5 offsite SERPs when run.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes |  |
| `queries` | array of string | no | Questions to ask the engines. Absent = on-page audit only. |
| `engines` | array of string: `perplexity`, `openai`, `anthropic`, `aio`, `copilot`, `deepseek` | no | Subset of engines for the citation panel; default all six. `deepseek` = our Google top-10 handed to DeepSeek (cheapest). |
| `competitors` | array of string | no | Domains to name explicitly in the share of voice. |
| `brand` | string | no | Name to look for in answer text ("mentioned"). |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `no_render` | boolean | no | Skip the rendered pass (cheaper). Alias `noRender`. Default `false`. |
| `no_bot_fetch` | boolean | no | Skip the extra request that identifies as an AI crawler. Alias `noBotFetch`. Default `false`. |
| `no_retrieval` | boolean | no | Skip the 2 retrievability SERPs (rank for the page's own H1 question, index status). Alias `noRetrieval`. Default `false`. |
| `offsite` | boolean | no | Also search the brand on YouTube, Reddit, Wikipedia, LinkedIn and review sites (5 SERPs). Default `false`. |

Example:

```json
{
  "url": "https://example.com/blog/how-to-choose-a-proxy",
  "queries": [
    "how do I choose a residential proxy provider?"
  ],
  "engines": [
    "perplexity",
    "aio"
  ],
  "brand": "Example"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/ai-visibility' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com/blog/how-to-choose-a-proxy","queries":["how do I choose a residential proxy provider?"],"engines":["perplexity","aio"],"brand":"Example"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/ai-visibility',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "url": "https://example.com/blog/how-to-choose-a-proxy",
        "queries": [
            "how do I choose a residential proxy provider?"
        ],
        "engines": [
            "perplexity",
            "aio"
        ],
        "brand": "Example"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/ai-visibility", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "url": "https://example.com/blog/how-to-choose-a-proxy",
    "queries": [
      "how do I choose a residential proxy provider?"
    ],
    "engines": [
      "perplexity",
      "aio"
    ],
    "brand": "Example"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/ai-visibility');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'url' => 'https://example.com/blog/how-to-choose-a-proxy',
    'queries' => ['how do I choose a residential proxy provider?'],
    'engines' => ['perplexity', 'aio'],
    'brand' => 'Example'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Audit finished. `billing` says how many citation calls and SERPs were charged.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account).
- `429` — Key/plan rate limit, or the account's daily cap on external AI-engine calls (payload: limit, remaining, reset_at, requested).
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "AI visibility audit successful",
  "payload": {
    "url": "https://example.com/blog/how-to-choose-a-proxy",
    "finalUrl": "https://example.com/blog/how-to-choose-a-proxy",
    "domain": "example.com",
    "score": {
      "overall": 71,
      "pillars": {
        "access": 90,
        "content": 68,
        "structure": 60,
        "citability": 66
      },
      "scoredPillars": [
        "access",
        "content",
        "structure",
        "citability"
      ],
      "blockers": [],
      "uncapped": 71
    },
    "checks": [
      {
        "id": "robots_gptbot",
        "pillar": "access",
        "status": "pass",
        "weight": 8,
        "title": "GPTBot allowed",
        "detail": "robots.txt does not disallow GPTBot.",
        "evidence": {
          "rule": null
        }
      }
    ],
    "topFixes": [
      {
        "id": "author_resolvable",
        "status": "fail",
        "title": "Author not resolvable",
        "fix": "Add an author Person node with url or sameAs."
      }
    ],
    "access": {
      "robotsTxtFound": true,
      "robotsTxtUrl": "https://example.com/robots.txt",
      "blockedCritical": [],
      "sitemaps": [
        "https://example.com/sitemap.xml"
      ],
      "llmsTxt": false
    },
    "content": {
      "contentOnlyInJs": false,
      "fkGrade": 9.1
    },
    "structure": {
      "jsonldTypes": [
        "Article"
      ],
      "hasAuthor": true,
      "authorResolvable": false
    },
    "citations": {
      "rows": [
        {
          "query": "how do I choose a residential proxy provider?",
          "engine": "perplexity",
          "cited": false,
          "mentioned": true,
          "rank": null,
          "citedDomains": [
            "competitor.example"
          ]
        }
      ],
      "usage": {
        "perplexity": {
          "searches": 1
        }
      }
    },
    "geo": {
      "country": null
    },
    "billing": {
      "citation_calls_billed": 2,
      "offsite_serps_billed": 2
    },
    "usage": {
      "cost_usd": 0.023,
      "free_usd": 0.023,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Scraper API is not available: no proxy credentials found. Contact support or purchase a residential, datacenter or IPv6 plan."
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

### SEO audit

No-JS vs rendered view of a page and the diff between them.

#### No-JS vs rendered SEO audit

`POST /scraper/seo-audit`

**Price:** `seo_audit` $0.003 per call · `extract` $0.0015 per call + $3/GB, max $0.02 per call. seo_audit when the render pass ran; extract when no_render is true or the render pass errored. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
**Short alias:** `POST https://api.quanticdata.io/v1/seo-audit` (same handler, primary host only)  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/ai.md)

Fetches a URL twice — once as a pure HTTP bot (no JavaScript) and once fully rendered — and returns what search engines see in each view, the diff (title/description changes, H1 or content only after JS, missing canonical) and the bot-facing meta (robots, OpenGraph, JSON-LD types). It is a page-level technical check, not a site crawl or a keyword tool. The full audit takes one browser-render token; with `no_render` only the no-JS view is produced and the call bills the plain scrape price. If the render pass fails on our side you still get the no-JS view at the plain scrape price.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes |  |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `no_render` | boolean | no | Skip the rendered pass. Alias `noRender`. Default `false`. |

Example:

```json
{
  "url": "https://example.com"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/seo-audit' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/seo-audit',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "url": "https://example.com"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/seo-audit", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "url": "https://example.com"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/seo-audit');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'url' => 'https://example.com'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Audit finished.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "SEO audit successful",
  "payload": {
    "url": "https://example.com",
    "finalUrl": "https://example.com/",
    "noJs": {
      "status": 200,
      "title": "Example Domain",
      "description": null,
      "canonical": null,
      "h1": "Example Domain",
      "wordCount": 28,
      "hasContent": false
    },
    "render": {
      "status": 200,
      "title": "Example Domain",
      "description": null,
      "canonical": null,
      "h1": "Example Domain",
      "wordCount": 28,
      "hasContent": false
    },
    "diff": {
      "titleChanged": false,
      "descriptionChanged": false,
      "h1OnlyInRender": false,
      "canonicalMissingNoJs": true,
      "contentOnlyInJs": false
    },
    "meta": {
      "robots": null,
      "ogTitle": null,
      "ogUrl": null,
      "twitterCard": null,
      "jsonldTypes": []
    },
    "durationMs": 4210,
    "geo": {
      "country": null
    },
    "usage": {
      "cost_usd": 0.0012,
      "free_usd": 0.0012,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Scraper API is not available: no proxy credentials found. Contact support or purchase a residential, datacenter or IPv6 plan."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

## Collectors & datasets

Markdown for this group only: https://quanticdata.io/docs/collectors-datasets.md

### Collectors

Ready-made, versioned scrapers on a semantic input; billed per delivered row. The catalog is dynamic: read it from GET /scraper/collectors.

#### Collector catalog

`GET /scraper/collectors`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Every ready-made collector with its identity and version, semantic `input_schema` (JSON Schema — what to POST to `run_url`), full `output_schema`, examples, hourly health probe and YOUR price per delivered result (list price × tier discount). The catalog is the source of truth: collectors are added and versioned without an API change, so read it rather than hard-coding slugs. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `category` | query | string: `search`, `seo`, `social`, `apps`, `real_estate`, `local`, `jobs`, `news`, `ecommerce`, `travel`, `leads`, `company`, `classifieds`, `finance`, `dev`, `knowledge`, `gaming`, `osint`, `research` | no | Only collectors of this category. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/collectors' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/collectors',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/collectors", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/collectors');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Catalog.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Collectors",
  "payload": {
    "collectors": [
      {
        "slug": "google_maps_places",
        "name": "Google Maps places",
        "version": "1.1.0",
        "category": "local",
        "category_label": "Local & Maps",
        "tagline": "Businesses for a keyword in a location — name, rating, address, phone, website, coordinates.",
        "description": "Searches Google's local results for a keyword in a location and delivers de-duplicated place records with contact and geo fields.",
        "unit": "place",
        "engines": [
          "serp"
        ],
        "price": {
          "list_usd": 0.001,
          "your_usd": 0.001,
          "price_key": "collector_google_maps_places",
          "per_1k_usd": 1,
          "min_billable_results": 0,
          "min_run_usd": 0
        },
        "max_results": 300,
        "input_schema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "title": "Keyword",
              "minLength": 2,
              "maxLength": 120,
              "examples": [
                "pizza restaurants"
              ]
            },
            "location": {
              "type": "string",
              "title": "Location",
              "minLength": 2,
              "maxLength": 120,
              "examples": [
                "Brooklyn, NY"
              ]
            },
            "country": {
              "type": "string",
              "format": "country"
            },
            "lang": {
              "type": "string",
              "format": "lang"
            },
            "max_results": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 300
            },
            "enrich_details": {
              "type": "boolean",
              "default": true
            }
          },
          "required": [
            "query",
            "location"
          ],
          "additionalProperties": false
        },
        "output_schema": {
          "fields": [
            {
              "name": "rank",
              "type": "integer",
              "description": "1-based position across the merged pages."
            },
            {
              "name": "name",
              "type": "string",
              "description": "Business name."
            },
            {
              "name": "rating",
              "type": "number",
              "nullable": true,
              "description": "Star rating (1–5)."
            },
            {
              "name": "place_id",
              "type": "string",
              "nullable": true,
              "description": "Google place id."
            }
          ]
        },
        "examples": [
          {
            "title": "Pizza in Brooklyn",
            "input": {
              "query": "pizza restaurants",
              "location": "Brooklyn, NY",
              "country": "us",
              "max_results": 20
            }
          }
        ],
        "health_input": {
          "query": "pizza",
          "location": "Brooklyn, NY",
          "country": "us",
          "max_results": 10
        },
        "health": {
          "status": "healthy",
          "checked_at": "2026-10-07T08:00:12.000Z",
          "latency_ms": 6210,
          "result_count": 10,
          "error": null,
          "success_rate_24h": 1,
          "last_ok_at": "2026-10-07T08:00:12.000Z"
        },
        "run_url": "/api/v1/scraper/collectors/google_maps_places/run"
      }
    ],
    "billing": {
      "enabled": true,
      "discount_multiplier": 1
    }
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### One collector

`GET /scraper/collectors/{slug}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

The catalog entry of one collector plus its changelog and the last 24 health probes. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `slug` | path | string | yes | Collector slug from the catalog. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/collectors/google_maps_places' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/collectors/google_maps_places',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/collectors/google_maps_places", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/collectors/google_maps_places');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Collector.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown slug.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Collector",
  "payload": {
    "collector": {
      "slug": "google_maps_places",
      "name": "Google Maps places",
      "version": "1.1.0",
      "category": "local",
      "category_label": "Local & Maps",
      "tagline": "Businesses for a keyword in a location.",
      "description": "…",
      "unit": "place",
      "engines": [
        "serp"
      ],
      "price": {
        "list_usd": 0.001,
        "your_usd": 0.001,
        "price_key": "collector_google_maps_places",
        "per_1k_usd": 1,
        "min_billable_results": 0,
        "min_run_usd": 0
      },
      "max_results": 300,
      "input_schema": {
        "type": "object",
        "properties": {},
        "required": [
          "query",
          "location"
        ],
        "additionalProperties": false
      },
      "output_schema": {
        "fields": []
      },
      "examples": [],
      "health_input": {},
      "health": {
        "status": "healthy",
        "checked_at": "2026-10-07T08:00:12.000Z",
        "latency_ms": 6210,
        "result_count": 10,
        "error": null,
        "success_rate_24h": 1,
        "last_ok_at": "2026-10-07T08:00:12.000Z"
      },
      "run_url": "/api/v1/scraper/collectors/google_maps_places/run",
      "changelog": [
        {
          "version": "1.1.0",
          "date": "2026-08-21",
          "notes": "Paginates past offset 240."
        }
      ],
      "health_history": [
        {
          "checked_at": "2026-10-07T08:00:12.000Z",
          "ok": true,
          "latency_ms": 6210,
          "result_count": 10,
          "error": null
        }
      ]
    }
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Unknown collector \"foo\""
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Run a collector

`POST /scraper/collectors/{slug}/run`

**Price:** `collector_result` per delivered result, price by collector (see the collector price table). Per delivered row: pricing.json key `collector_<slug>` when it exists, else `collector_result`. GET /scraper/collectors returns the resolved key and your discounted price for every collector. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

The body is the collector's semantic input exactly as published in its `input_schema` (flat, or wrapped as `{"input": {...}}`), plus runner options: `async: true` forces background processing (also `mode: "async"` or `wait: false`). Short runs answer synchronously with the rows; long ones (the collector decides from the input size) answer 202 with a `statusUrl` to poll. Identical input re-sent inside the dedup window returns the existing run (`deduplicated: true`) — nothing new is created or charged. Per-account brakes (runs per hour, concurrent runs, failure streak) answer 429 with Retry-After. Billed per DELIVERED row at the collector's unit price × your tier discount (some collectors have a small per-run floor, see `price.min_billable_results`); zero rows = zero charge, failed runs are never billed. The worst case (unit × max_results) must be covered by free tier + balance or the run is refused with 402.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `slug` | path | string | yes | Collector slug from the catalog. |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `async` | boolean | no | Force background processing (202 + statusUrl). Default `false`. |
| `mode` | string: `async` | no | Alias of `async: true`. |
| `wait` | boolean | no | `false` = alias of `async: true`. |
| `input` | object | no | Optional wrapper for the collector input. |

Example:

```json
{
  "query": "pizza restaurants",
  "location": "Brooklyn, NY",
  "country": "us",
  "max_results": 20
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/collectors/google_maps_places/run' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"query":"pizza restaurants","location":"Brooklyn, NY","country":"us","max_results":20}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/collectors/google_maps_places/run',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "query": "pizza restaurants",
        "location": "Brooklyn, NY",
        "country": "us",
        "max_results": 20
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/collectors/google_maps_places/run", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "query": "pizza restaurants",
    "location": "Brooklyn, NY",
    "country": "us",
    "max_results": 20
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/collectors/google_maps_places/run');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'query' => 'pizza restaurants',
    'location' => 'Brooklyn, NY',
    'country' => 'us',
    'max_results' => 20
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Synchronous run finished with rows.
- `202` — Run queued (or an identical run already in progress): poll `statusUrl`.
- `400` — Input does not match the collector's `input_schema` (`payload.errors`).
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `404` — Unknown slug.
- `422` — Input that can never resolve (documentation placeholder, undelegated TLD) — before or after the run; retrying the same input cannot help. Not billed.
- `424` — The run failed at the source (blocked, timed out, layout changed). JSON body with `run_id` and `error`; not billed, safe to retry.
- `429` — Key/plan rate limit, or a per-account collector brake (`payload.code`: RUNS_PER_HOUR, CONCURRENT_RUNS, FAIL_STREAK, USER_PAUSED) with Retry-After.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Collector run complete",
  "payload": {
    "run_id": "cmgfq2x1b0001",
    "slug": "google_maps_places",
    "version": "1.1.0",
    "status": "done",
    "input": {
      "query": "pizza restaurants",
      "location": "Brooklyn, NY",
      "country": "us",
      "max_results": 20
    },
    "count": 20,
    "partial": false,
    "cost": {
      "usd": 0.02,
      "unit_usd": 0.001,
      "unit": "place",
      "billed": true
    },
    "error": null,
    "results": [
      {
        "rank": 1,
        "name": "Joe's Pizza",
        "rating": 4.5,
        "reviews": 3120,
        "category": "Pizza restaurant",
        "address": "7 Carmine St, New York, NY 10014",
        "phone": "+1 212-366-1182",
        "website": "joespizzanyc.com",
        "latitude": 40.7306,
        "longitude": -74.0027,
        "place_id": "ChIJ…",
        "data_id": "0x89c259…:0x…",
        "found_by": "pizza restaurants Brooklyn, NY"
      }
    ],
    "notes": [],
    "created_at": "2026-10-07T09:20:01.000Z",
    "started_at": "2026-10-07T09:20:01.000Z",
    "finished_at": "2026-10-07T09:20:14.000Z",
    "usage": {
      "cost_usd": 0.02,
      "free_usd": 0.02,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid input: location is required",
  "payload": {
    "errors": [
      "location is required"
    ]
  }
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `422`:

```json
{
  "type": "error",
  "message": "Invalid input: example.com is a documentation placeholder",
  "payload": {
    "errors": [
      "example.com is a documentation placeholder"
    ],
    "error_kind": "input"
  }
}
```

Example `424`:

```json
{
  "type": "error",
  "message": "Collector run failed",
  "payload": {
    "run_id": "cmgfq2x1b0002",
    "slug": "google_maps_places",
    "version": "1.1.0",
    "status": "failed",
    "input": {},
    "count": 0,
    "partial": false,
    "cost": {
      "usd": 0,
      "unit_usd": 0.001,
      "unit": "place",
      "billed": false
    },
    "error": "source timed out after 3 attempts",
    "created_at": "2026-10-07T09:20:01.000Z",
    "started_at": "2026-10-07T09:20:01.000Z",
    "finished_at": "2026-10-07T09:21:01.000Z"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Too many collector runs this hour.",
  "payload": {
    "code": "RUNS_PER_HOUR",
    "limit": 60,
    "in_last_hour": 60,
    "retry_after": 900,
    "plan": "payg"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Your collector runs

`GET /scraper/collectors/runs`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Newest first, without result rows. Page with `next_cursor`. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  Default `20`. |
| `cursor` | query | string | no | `next_cursor` from the previous page. |
| `slug` | query | string | no | Only runs of this collector. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/collectors/runs' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/collectors/runs',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/collectors/runs", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/collectors/runs');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Runs.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Collector runs",
  "payload": {
    "runs": [
      {
        "run_id": "cmgfq2x1b0001",
        "slug": "google_maps_places",
        "version": "1.1.0",
        "status": "done",
        "input": {
          "query": "pizza restaurants",
          "location": "Brooklyn, NY"
        },
        "count": 20,
        "partial": false,
        "cost": {
          "usd": 0.02,
          "unit_usd": 0.001,
          "unit": "place",
          "billed": true
        },
        "error": null,
        "created_at": "2026-10-07T09:20:01.000Z",
        "started_at": "2026-10-07T09:20:01.000Z",
        "finished_at": "2026-10-07T09:20:14.000Z"
      }
    ],
    "next_cursor": null
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### One run with its rows

`GET /scraper/collectors/runs/{runId}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

The run you own with its delivered results. `format=csv` streams the rows as CSV (columns follow the collector's `output_schema`). Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `runId` | path | string | yes | Collector run id (10–40 alphanumeric characters). |
| `format` | query | string: `csv` | no | `csv` returns a file instead of the JSON envelope. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/collectors/runs/cmgfq2x1b0001' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/collectors/runs/cmgfq2x1b0001',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/collectors/runs/cmgfq2x1b0001", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/collectors/runs/cmgfq2x1b0001');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Run view (JSON) or CSV file.
- `400` — Malformed run id.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Collector run",
  "payload": {
    "run_id": "cmgfq2x1b0001",
    "slug": "google_maps_places",
    "version": "1.1.0",
    "status": "done",
    "input": {
      "query": "pizza restaurants",
      "location": "Brooklyn, NY",
      "country": "us",
      "max_results": 20
    },
    "count": 20,
    "partial": false,
    "cost": {
      "usd": 0.02,
      "unit_usd": 0.001,
      "unit": "place",
      "billed": true
    },
    "error": null,
    "results": [
      {
        "rank": 1,
        "name": "Joe's Pizza"
      }
    ],
    "created_at": "2026-10-07T09:20:01.000Z",
    "started_at": "2026-10-07T09:20:01.000Z",
    "finished_at": "2026-10-07T09:20:14.000Z",
    "usage": {
      "cost_usd": 0.02,
      "free_usd": 0.02,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Datasets

Prompt-driven dataset builder: one prompt, a validated table.

#### Your recent dataset runs

`GET /scraper/datasets`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

The last 20 runs, newest first, with status reconciled against the live job for runs still marked running, the settled cost, and whether the rows are still stored. Free.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/datasets' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/datasets',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/datasets", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/datasets');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Datasets.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Datasets",
  "payload": {
    "datasets": [
      {
        "id": "cmgf0",
        "jobId": "ds_7a1c22",
        "name": null,
        "prompt": "Car rental companies in Bologna with phone and website",
        "columns": "[{\"name\":\"company\",\"type\":\"string\"},{\"name\":\"phone\",\"type\":\"phone\"},{\"name\":\"website\",\"type\":\"url\"}]",
        "country": "it",
        "status": "completed",
        "rowCount": 42,
        "billableRows": 40,
        "refresh": false,
        "createdAt": "2026-10-06T14:02:11.000Z",
        "completedAt": "2026-10-06T14:09:40.000Z",
        "purgedAt": null,
        "costUsd": 1.86,
        "stored": true,
        "storedRows": 42,
        "storedBytes": 18311,
        "purged": false,
        "dropped": null
      }
    ]
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Build a dataset from a prompt

`POST /scraper/datasets`

**Price:** `dataset_row` $0.03 per call · `dataset_row_refresh` $0.01 per call. max_cost_usd charged up front, refunded down to actual spend. Actual spend = delivered validated rows × dataset_row (dataset_row_refresh on refresh) + premium field fees + metered pipeline units (serp/map/extract/AI). _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

One plain-language prompt → a structured dataset. The service plans queries, searches, maps and scrapes, extracts the requested columns and returns validated rows; `refresh: true` re-reads a known URL set (`refreshUrls`) without discovery at a reduced row fee. Returns a job id immediately; poll `GET /scraper/datasets/{jobId}`, download the file, or pass a `webhook` (public host only, delivered after settlement with the hygiene filters applied). Billing is value-based: the run's budget `limits.max_cost_usd` (default $5, max $500, min $0.05) is charged up front and the unspent share is refunded at settlement, so you pay only for delivered, validated records (`dataset_row`, or `dataset_row_refresh` on a refresh) plus premium columns found (email, phone, deep) plus the pipeline units consumed. Low-confidence rows, off-target pages and blocked pages are never billed.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `prompt` | string | yes | What the dataset is. |
| `columns` | array of object | no | Omit to let the planner infer columns from the prompt. |
| `columns[].name` | string | yes |  |
| `columns[].type` | string: `string`, `number`, `email`, `phone`, `url`, `boolean`, `deep` | no | `email`, `phone` and `deep` are premium (billed only when found). |
| `columns[].description` | string | no |  |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |
| `sources` | object | no | Domain allow/deny lists. |
| `sources.include` | array of string | no |  |
| `sources.exclude` | array of string | no |  |
| `limits` | object | no |  |
| `limits.max_rows` | integer | no |  |
| `limits.max_pages` | integer | no |  |
| `limits.max_cost_usd` | number | no |  Default `5`. |
| `webhook` | string | no | Public http(s) URL that receives the finished, filtered dataset by POST. |
| `refresh` | boolean | no |  Default `false`. |
| `refreshUrls` | array of string | no | Required with `refresh: true`. |

Example:

```json
{
  "prompt": "Car rental companies in Bologna with phone and website",
  "columns": [
    {
      "name": "company",
      "type": "string"
    },
    {
      "name": "phone",
      "type": "phone"
    },
    {
      "name": "website",
      "type": "url"
    }
  ],
  "country": "it",
  "limits": {
    "max_rows": 50,
    "max_cost_usd": 3
  }
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/datasets' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"prompt":"Car rental companies in Bologna with phone and website","columns":[{"name":"company","type":"string"},{"name":"phone","type":"phone"},{"name":"website","type":"url"}],"country":"it","limits":{"max_rows":50,"max_cost_usd":3}}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/datasets',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "prompt": "Car rental companies in Bologna with phone and website",
        "columns": [
            {
                "name": "company",
                "type": "string"
            },
            {
                "name": "phone",
                "type": "phone"
            },
            {
                "name": "website",
                "type": "url"
            }
        ],
        "country": "it",
        "limits": {
            "max_rows": 50,
            "max_cost_usd": 3
        }
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/datasets", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "prompt": "Car rental companies in Bologna with phone and website",
    "columns": [
      {
        "name": "company",
        "type": "string"
      },
      {
        "name": "phone",
        "type": "phone"
      },
      {
        "name": "website",
        "type": "url"
      }
    ],
    "country": "it",
    "limits": {
      "max_rows": 50,
      "max_cost_usd": 3
    }
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/datasets');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'prompt' => 'Car rental companies in Bologna with phone and website',
    'columns' => [[
      'name' => 'company',
      'type' => 'string'
    ], [
      'name' => 'phone',
      'type' => 'phone'
    ], [
      'name' => 'website',
      'type' => 'url'
    ]],
    'country' => 'it',
    'limits' => [
      'max_rows' => 50,
      'max_cost_usd' => 3
    ]
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Dataset job started.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is off for your key, or the dataset builder is not enabled on this instance (configuration, not a transient error).

Example `200` response:

```json
{
  "type": "response",
  "message": "Dataset started",
  "payload": {
    "id": "ds_7a1c22",
    "status": "running",
    "prompt": "Car rental companies in Bologna with phone and website",
    "columns": [
      {
        "name": "company",
        "type": "string"
      },
      {
        "name": "phone",
        "type": "phone"
      },
      {
        "name": "website",
        "type": "url"
      }
    ],
    "limits": {
      "max_rows": 50,
      "max_pages": 200,
      "max_cost_usd": 3
    },
    "statusUrl": "/api/v1/scraper/datasets/ds_7a1c22",
    "usage": {
      "cost_usd": 3,
      "free_usd": 2,
      "paid_usd": 1,
      "balance": 9
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Scraper API is not available: no proxy credentials found. Contact support or purchase a residential, datacenter or IPv6 plan."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Poll a dataset job

`GET /scraper/datasets/{jobId}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Progress, the collection trace (`steps`) and the rows so far, filtered for you (removal list, your exclusion list, rows already delivered to you). A run the service has already forgotten (about an hour after it finishes) is served from storage (`source: storage`, no progress/steps). Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |
| `since` | query | integer | no | Row cursor from the previous poll's `nextCursor`. |
| `mode` | query | string: `summary` | no | `summary` omits rows. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Job view.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Dataset status",
  "payload": {
    "id": "ds_7a1c22",
    "status": "completed",
    "prompt": "Car rental companies in Bologna with phone and website",
    "columns": [
      {
        "name": "company",
        "type": "string"
      },
      {
        "name": "phone",
        "type": "phone"
      },
      {
        "name": "website",
        "type": "url"
      }
    ],
    "files": null,
    "progress": {
      "queries_run": 6,
      "sites_mapped": 12,
      "pages_scraped": 58,
      "pages_failed": 3,
      "rows": 42,
      "dropped_offtarget": 4,
      "cost_so_far_usd": 1.86
    },
    "limits": {
      "max_rows": 50,
      "max_pages": 200,
      "max_cost_usd": 3
    },
    "entity": "car rental company",
    "billable": {
      "row_fees_usd": 1.62,
      "unit_usd": 0.24
    },
    "steps": [
      {
        "phase": "plan",
        "detail": "entity: car rental company; 6 queries",
        "ts": 1759759331000
      }
    ],
    "rows": [
      {
        "fields": {
          "company": "Bologna Rent",
          "phone": "+39 051 000000",
          "website": "https://example.it"
        },
        "_source_url": "https://example.it/contatti",
        "_fetched_at": "2026-10-06T14:05:10.000Z",
        "confidence": 0.93,
        "billed_fields": [
          "phone"
        ],
        "fee_usd": 0.05
      }
    ],
    "row_count": 42,
    "billable_rows": 40,
    "nextCursor": 42,
    "createdAt": 1759759331000,
    "finishedAt": 1759759780000
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Cancel a dataset job

`DELETE /scraper/datasets/{jobId}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Stops a running job you own; the unspent budget is refunded at settlement. To delete the stored record of a finished run use `DELETE /scraper/datasets/{jobId}/record`.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |

##### Examples

**curl**

```bash
curl -X DELETE 'https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.delete(
    'https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Cancelled.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Dataset cancelled",
  "payload": {
    "id": "ds_7a1c22",
    "status": "cancelled"
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Download a dataset file

`GET /scraper/datasets/{jobId}/download`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

The run's rows as CSV or JSON, partial runs included (rows collected before an interruption are delivered too). Always built from rows that passed the list-hygiene filter. 404 while the run is still going or when it produced no rows. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |
| `format` | query | string: `csv`, `json` | no |  Default `"csv"`. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/download' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/download',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
r.raise_for_status()
open("response.out", "wb").write(r.content)
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/download", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const bytes = Buffer.from(await res.arrayBuffer());
require("node:fs").writeFileSync("response.out", bytes);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/download');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
file_put_contents('response.out', $raw);
```

##### Responses

- `200` — File attachment `dataset-{jobId}.csv\|json`.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown job, not yours, or file not ready (run not finished or no rows).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "columns": [
    {
      "name": "company",
      "type": "string"
    }
  ],
  "rows": [
    {
      "company": "Bologna Rent",
      "_source_url": "https://example.it/contatti"
    }
  ],
  "rowCount": 1
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "File not ready — the run has not finished or produced no rows"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Rename a dataset run

`PATCH /scraper/datasets/{jobId}/record`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Sets the run's label (max 120 characters); an empty string or null clears it and the prompt becomes the label again. The prompt itself is never rewritten. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no |  |

Example:

```json
{
  "name": "Bologna car rentals — October"
}
```

##### Examples

**curl**

```bash
curl -X PATCH 'https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/record' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Bologna car rentals — October"}'
```

**Python (requests)**

```python
import requests

r = requests.patch(
    'https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/record',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "name": "Bologna car rentals — October"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/record", {
  method: "PATCH",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "name": "Bologna car rentals — October"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/record');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'PATCH',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'name' => 'Bologna car rentals — October'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Renamed.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Dataset renamed",
  "payload": {
    "jobId": "ds_7a1c22",
    "name": "Bologna car rentals — October",
    "prompt": "Car rental companies in Bologna with phone and website"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Delete a dataset run's stored record

`DELETE /scraper/datasets/{jobId}/record`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Permanently removes the record and its stored rows. A run still in flight must be cancelled first (400). Irreversible. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `jobId` | path | string | yes | Job id returned by the POST that started it. |

##### Examples

**curl**

```bash
curl -X DELETE 'https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/record' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.delete(
    'https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/record',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/record", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/datasets/job_8f2c1a/record');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Deleted.
- `400` — The run is still running — cancel it first.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Dataset deleted",
  "payload": {
    "jobId": "ds_7a1c22"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Cancel the run before deleting it."
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Parser presets

Generate CSS selectors once with an LLM, replay them for free, let them self-heal.

#### Generate CSS selectors with an LLM, once

`POST /scraper/parser/generate`

**Price:** `parser_generate` $0.02 per call. parser_generate, only when coverage > 0. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Looks at a page once with a model and returns CSS selectors (`parser`) that extract the fields you asked for — ready to pass as `extract` on every later scrape of that layout, where no model is involved and the plain scrape price applies. Every selector is run against the page before it is returned: `report`, `missed` and `coverage` tell you which fields are reliable. Give `url` (fetched through the pool, `render: true` for SPA pages) or `html` you already have (max 3 MB, no proxy bandwidth). Charged once as a setup step, and only when the parser extracts something (`coverage` > 0).

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | no | Required unless `html` is given. |
| `html` | string | no |  |
| `fields` | object | no | field name → what it is. Required unless `prompt` is given. |
| `prompt` | string | no | Free-text alternative to `fields` (the model names them). |
| `render` | boolean | no |  Default `false`. |
| `country` | string | no | Country code or place name: letters, digits, spaces, dots, hyphens, underscores; max 56 characters. `all` means no targeting. |

Example:

```json
{
  "url": "https://example.com/products/42",
  "fields": {
    "title": "product name",
    "price": "current price with currency",
    "sku": "SKU code"
  }
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/parser/generate' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com/products/42","fields":{"title":"product name","price":"current price with currency","sku":"SKU code"}}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/parser/generate',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "url": "https://example.com/products/42",
        "fields": {
            "title": "product name",
            "price": "current price with currency",
            "sku": "SKU code"
        }
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/parser/generate", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "url": "https://example.com/products/42",
    "fields": {
      "title": "product name",
      "price": "current price with currency",
      "sku": "SKU code"
    }
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/parser/generate');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'url' => 'https://example.com/products/42',
    'fields' => [
      'title' => 'product name',
      'price' => 'current price with currency',
      'sku' => 'SKU code'
    ]
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Parser generated (message says when no usable selector could be produced; then not charged).
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `403` — No proxy pool is available to serve the call (no house plan and no residential/datacenter/IPv6 plan on the account).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — Data API off for your key, or the generator's model is not configured.

Example `200` response:

```json
{
  "type": "response",
  "message": "Parser generated",
  "payload": {
    "parser": {
      "title": "h1.product-title",
      "price": {
        "selector": "span.price",
        "attr": null
      },
      "sku": "dd.sku"
    },
    "report": [
      {
        "field": "title",
        "selector": "h1.product-title",
        "sample": "Trail Runner 2",
        "missed": false
      },
      {
        "field": "price",
        "selector": "span.price",
        "sample": "€ 129,00",
        "missed": false
      },
      {
        "field": "sku",
        "selector": "dd.sku",
        "sample": "TR2-42",
        "missed": false
      }
    ],
    "missed": [],
    "coverage": 1,
    "repaired": false,
    "usage": {
      "cost_usd": 0.02,
      "free_usd": 0.02,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Scraper API is not available: no proxy credentials found. Contact support or purchase a residential, datacenter or IPv6 plan."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List your presets

`GET /scraper/parser/presets`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Every stored parser of your account with its stats and version history. Free.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/parser/presets' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/parser/presets',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/parser/presets", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/parser/presets');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Presets.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Presets",
  "payload": {
    "presets": [
      {
        "id": "pst_7Qk3",
        "name": "example-product",
        "sourceUrl": "https://example.com/products/42",
        "fields": {
          "title": "product name",
          "price": "current price"
        },
        "render": false,
        "parser": {
          "title": "h1.product-title",
          "price": "span.price"
        },
        "version": 1,
        "autoHeal": true,
        "createdAt": 1759759331000,
        "updatedAt": 1759759331000,
        "lastHealAt": null,
        "stats": {
          "runs": 12,
          "lastRunAt": 1759830000000,
          "fields": {
            "title": {
              "hits": 12,
              "misses": 0
            },
            "price": {
              "hits": 11,
              "misses": 1
            }
          },
          "recent": [
            1,
            1,
            0.5,
            1
          ]
        },
        "history": [
          {
            "version": 1,
            "parser": {
              "title": "h1.product-title",
              "price": "span.price"
            },
            "at": 1759759331000,
            "reason": "created",
            "coverage": 1
          }
        ]
      }
    ]
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Save a parser as a preset

`POST /scraper/parser/presets`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Stores a parser (usually the one /scraper/parser/generate just returned) under a name. Scrape with `presetId` instead of an inline `extract` schema and every run is scored per field; when the recent success rate decays and `autoHeal` is on, the preset regenerates itself from `sourceUrl` and bumps its version. Ownership is server-side: a client-supplied tenant is ignored. Free to store.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes |  |
| `parser` | object (ExtractSchema) | yes | Structured-extraction schema: field name → CSS selector, or an object with `selector`, optional `attr` (attribute to read instead of text) and `all` (true = every match as an array). |
| `sourceUrl` | string | no | Page the parser was learned from — self-healing refetches it. |
| `fields` | object | no | field → description, so a heal can regenerate the same shape. |
| `render` | boolean | no |  Default `false`. |
| `autoHeal` | boolean | no |  |

Example:

```json
{
  "name": "example-product",
  "parser": {
    "title": "h1.product-title",
    "price": "span.price"
  },
  "sourceUrl": "https://example.com/products/42",
  "fields": {
    "title": "product name",
    "price": "current price"
  },
  "autoHeal": true
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/parser/presets' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"example-product","parser":{"title":"h1.product-title","price":"span.price"},"sourceUrl":"https://example.com/products/42","fields":{"title":"product name","price":"current price"},"autoHeal":true}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/parser/presets',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "name": "example-product",
        "parser": {
            "title": "h1.product-title",
            "price": "span.price"
        },
        "sourceUrl": "https://example.com/products/42",
        "fields": {
            "title": "product name",
            "price": "current price"
        },
        "autoHeal": true
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/parser/presets", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "name": "example-product",
    "parser": {
      "title": "h1.product-title",
      "price": "span.price"
    },
    "sourceUrl": "https://example.com/products/42",
    "fields": {
      "title": "product name",
      "price": "current price"
    },
    "autoHeal": true
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/parser/presets');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'name' => 'example-product',
    'parser' => [
      'title' => 'h1.product-title',
      'price' => 'span.price'
    ],
    'sourceUrl' => 'https://example.com/products/42',
    'fields' => [
      'title' => 'product name',
      'price' => 'current price'
    ],
    'autoHeal' => true
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Created.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Preset created",
  "payload": {
    "id": "pst_7Qk3",
    "name": "example-product",
    "sourceUrl": "https://example.com/products/42",
    "fields": {
      "title": "product name",
      "price": "current price"
    },
    "render": false,
    "parser": {
      "title": "h1.product-title",
      "price": "span.price"
    },
    "version": 1,
    "autoHeal": true,
    "createdAt": 1759759331000,
    "updatedAt": 1759759331000,
    "lastHealAt": null,
    "stats": {
      "runs": 0,
      "lastRunAt": null,
      "fields": {},
      "recent": []
    },
    "history": [
      {
        "version": 1,
        "parser": {
          "title": "h1.product-title",
          "price": "span.price"
        },
        "at": 1759759331000,
        "reason": "created"
      }
    ]
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Read a preset

`GET /scraper/parser/presets/{id}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Parser, stats and version history. A preset belonging to someone else answers 404. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Preset id returned when it was created. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Preset.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Preset",
  "payload": {
    "id": "pst_7Qk3",
    "name": "example-product",
    "parser": {
      "title": "h1.product-title",
      "price": "span.price"
    },
    "version": 1,
    "autoHeal": true,
    "createdAt": 1759759331000,
    "updatedAt": 1759759331000,
    "lastHealAt": null,
    "stats": {
      "runs": 12,
      "lastRunAt": 1759830000000,
      "fields": {},
      "recent": []
    },
    "history": []
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Update a preset

`PUT /scraper/parser/presets/{id}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Rename, replace the parser (bumps the version), toggle `autoHeal`, update `fields`/`sourceUrl`. Only the keys you send change. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Preset id returned when it was created. |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no |  |
| `parser` | object (ExtractSchema) | no | Structured-extraction schema: field name → CSS selector, or an object with `selector`, optional `attr` (attribute to read instead of text) and `all` (true = every match as an array). |
| `autoHeal` | boolean | no |  |
| `fields` | object | no |  |
| `sourceUrl` | string | no |  |

Example:

```json
{
  "autoHeal": false
}
```

##### Examples

**curl**

```bash
curl -X PUT 'https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"autoHeal":false}'
```

**Python (requests)**

```python
import requests

r = requests.put(
    'https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "autoHeal": false
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3", {
  method: "PUT",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "autoHeal": false
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'autoHeal' => false
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Updated.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Preset updated",
  "payload": {
    "id": "pst_7Qk3",
    "name": "example-product",
    "parser": {
      "title": "h1.product-title",
      "price": "span.price"
    },
    "version": 1,
    "autoHeal": false,
    "createdAt": 1759759331000,
    "updatedAt": 1759840000000,
    "lastHealAt": null,
    "stats": {
      "runs": 12,
      "lastRunAt": 1759830000000,
      "fields": {},
      "recent": []
    },
    "history": []
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Delete a preset

`DELETE /scraper/parser/presets/{id}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Removes the preset and its version history. Scrapes that still send its `presetId` answer 404 afterwards. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Preset id returned when it was created. |

##### Examples

**curl**

```bash
curl -X DELETE 'https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.delete(
    'https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Deleted.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Preset deleted",
  "payload": {
    "ok": true
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Regenerate a preset's parser now

`POST /scraper/parser/presets/{id}/heal`

**Price:** `parser_generate` $0.02 per call. parser_generate only when healed is true. _(list of 2026-10-19)_  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

The manual trigger of the repair that runs automatically when a preset decays: refetches `sourceUrl`, asks the model for fresh selectors and adopts them only if they extract more of the page than the current ones. `force: true` bypasses the cooldown between heals. Billed like a generation, and only when a new version was actually produced (`healed: true`).

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Preset id returned when it was created. |

##### Request body

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `force` | boolean | no |  Default `false`. |

Example:

```json
{
  "force": false
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3/heal' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"force":false}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3/heal',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "force": false
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3/heal", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "force": false
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3/heal');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'force' => false
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Heal attempted (message says whether a new version was adopted).
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The free tier plus wallet balance cannot cover the worst-case estimate of this call (`INSUFFICIENT_FUNDS`), or the account's monthly spend cap is reached (`BUDGET_REACHED`). Nothing was run or charged. When the missing credit is more than one top-up may add, or on `BUDGET_REACHED`, the envelope also carries `escalation` (`type` `contact`): an agent asks for a higher limit at `contact_api` (`POST /agent/contact`, same API key), a person uses `contact_url`. When card top-ups for agents are enabled on this host, `INSUFFICIENT_FUNDS` answered to an API key also carries `WWW-Authenticate: Payment …` (`method="stripe"`): an agent holding a Stripe Shared Payment Token can repeat the same request with `Authorization: Payment <credential>` and pay a balance top-up by itself, $0.50 to $1,000 of credit per request plus 22% VAT on a numbered invoice; the call then runs from the balance at list price. `BUDGET_REACHED` carries no challenge. Step by step: tag Agents, "How an agent pays a top-up without a human".
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — Data API off for your key, or the generator's model is not configured.

Example `200` response:

```json
{
  "type": "response",
  "message": "Preset healed",
  "payload": {
    "healed": true,
    "reason": "coverage improved",
    "version": 2,
    "coverageBefore": 0.5,
    "coverageAfter": 1,
    "parser": {
      "title": "h1[itemprop=name]",
      "price": "span.price-now"
    },
    "usage": {
      "cost_usd": 0.02,
      "free_usd": 0.02,
      "paid_usd": 0
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your free tier for this month is used up and your balance can't cover this call (estimated $0.002). Add pay-as-you-go credit or pick a plan — your API key stays the same: https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
  "payload": {
    "code": "INSUFFICIENT_FUNDS",
    "balance": 0,
    "free_remaining": 0,
    "estimated_cost": 0.002,
    "plans_url": "https://app.quanticdata.io/plans?utm_source=api&utm_medium=402&utm_campaign=free-tier",
    "billing_mode": "free_first"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### How well a preset still works

`GET /scraper/parser/presets/{id}/stats`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/collectors-datasets.md)

Lifetime success rate per field, mean coverage over the recent window and whether the preset now counts as decayed (the signal that triggers self-healing). Free — it is the health check of a parser you already paid to build.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Preset id returned when it was created. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3/stats' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3/stats',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3/stats", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/parser/presets/pst_7Qk3/stats');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Stats.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `503` — The Data API group is switched off for non-admin keys (early-access kill switch).

Example `200` response:

```json
{
  "type": "response",
  "message": "Preset stats",
  "payload": {
    "id": "pst_7Qk3",
    "name": "example-product",
    "version": 2,
    "runs": 12,
    "lastRunAt": 1759830000000,
    "successRateByField": {
      "title": 1,
      "price": 0.917
    },
    "recentCoverage": 0.96,
    "decayed": false,
    "autoHeal": true,
    "lastHealAt": 1759840000000
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "This API is temporarily unavailable while we finalize pricing. Contact support for early access."
}
```

Try it: https://app.quanticdata.io/data-api/playground

## Proxies

Markdown for this group only: https://quanticdata.io/docs/proxies.md

### Proxies

List your proxy plans, generate endpoint strings, manage IP whitelists, and get a new IP on demand. Limits: `generate` returns 1 to 10000 lines per call; the number of whitelisted IPs per plan is the plan's `whitelistSlots`; `ip-info` shares a lookup budget of about 45 calls a minute. Every call also counts in the hourly window of your API key (see Rate limits and tiers).

**New IP on demand.** A rotating string changes IP on every request. A sticky string keeps one IP for its session (`sessionTime` in `generate`). On Residential Basic and Datacenter traffic plans you can restart a sticky session at any time: the same string leaves from a new IP on its next request, so a saved anti-detect profile or a script keeps its proxy settings. Call `POST /public/proxies/{orderId}/rotate` with your API key, or create a rotation link: a URL with no key and no header that anti-detect browsers and scripts can call directly.

| Plan type (`planType`) | Rotating strings | Sticky strings | New IP on demand |
|---|---|---|---|
| `residentialbasic`, `datacentertraffic` | New IP per request | Same IP for `sessionTime` | `rotate` or a rotation link: same string, new IP |
| `residentialpremium`, `resiprivate`, `mobile_v2`, `mobile`, `ipv6` | New IP per request | Same IP for `sessionTime` | Request a new sticky string with `generate` |
| `datacenter` | Assigned by the gateway | Assigned by the gateway | Not applicable |
| `isp`, `isppremium` | Static IPs | Static IPs | Not applicable: dedicated static IPs |

**Super sticky and UDP.** On Residential Premium and Mobile, `superSticky: true` in `generate` keeps one IP per string for up to 24 hours (it is `sessionTime: 1440`). On Residential Basic, `udp: true` with `protocol: "socks5"` adds UDP relay (SOCKS5 UDP ASSOCIATE) to the strings, rotating or sticky.

Build proxy strings with `generate` and use them as returned; do not edit them by hand.

#### List your proxy plans

`GET /public/proxies`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Every proxy service on the account (residential basic/premium/private, ISP, premium ISP, datacenter, datacenter traffic, IPv6, mobile, mobile v2) with credentials, bandwidth left, expiry and the `orderId` the generate and whitelist endpoints take. Free; no Data API billing. Plans disabled by support are not listed. Premium ISP plans (`planType: isppremium`, bought in the dashboard or with `POST /public/premium-isp/orders`) are both the ready-made pool plans and the city plans (City and carrier, Fraud score 0). They have no plan-level login (`username` and `password` are empty strings): every dedicated IP has its own login, returned by `POST /public/proxies/generate`, and `ips` is the number of IPs. IP whitelisting and credential changes are not available on Premium ISP plans. City plans report `region` as `premium-isp-city`, or `premium-isp-city-fraud-score-0` for Fraud score 0 plans. Premium ISP IPs reach only ports 80 and 443. Pool plans also cannot open banking, payment or government sites; city plans (Fraud score 0 included) have no site blocks (see the Terms of Service).

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  Default `50`. |
| `offset` | query | integer | no |  Default `0`. |
| `planType` | query | string: `residentialbasic`, `residentialpremium`, `resiprivate`, `isp`, `isppremium`, `datacenter`, `datacentertraffic`, `ipv6`, `mobile`, `mobile_v2` | no |  |
| `active` | query | string: `true`, `false` | no | Filter by expiry; omit for all. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/proxies' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/proxies',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/proxies", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/proxies');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Plans.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "proxies": [
      {
        "id": "prx_1",
        "orderId": "ord_8c21",
        "planName": "Residential Premium 5 GB",
        "planType": "residentialpremium",
        "planTypeName": "Residential Premium",
        "username": "user_8c21",
        "password": "p4ssw0rd",
        "bandwidth": 5,
        "bandwidthGB": 5,
        "bandwidthLeft": 3.2,
        "bandwidthLeftGB": 3.2,
        "bandwidthUsed": 1.8,
        "bandwidthUsedGB": 1.8,
        "bandwidthUsagePercent": 36,
        "isUnlimited": false,
        "expiry": "2026-11-06T00:00:00.000Z",
        "expiresAt": "2026-11-06T00:00:00.000Z",
        "isActive": true,
        "isExpired": false,
        "daysRemaining": 30,
        "hoursRemaining": 720,
        "ips": 0,
        "whitelistSlots": 0,
        "whitelistedIPs": [],
        "region": "Global",
        "speed": null,
        "highConcurrency": false,
        "highPriority": false,
        "createdAt": "2026-10-06T10:00:00.000Z"
      }
    ],
    "pagination": {
      "total": 1,
      "limit": 50,
      "offset": 0,
      "hasMore": false
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Generate proxy strings for a plan

`POST /public/proxies/generate`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Ready-to-use endpoint strings (credentials included) for one order, in HTTP or SOCKS5 and several formats, with the targeting the plan supports: country/state/city for residential and mobile, ISP code for Residential Premium and Mobile V2, ASN for Residential Basic and traffic-based Datacenter, static gateways for Datacenter. `rotation: sticky` keeps one IP for `sessionTime` minutes; `static` (IPv6 only) is a fixed session with no TTL. Mobile V2 can alternatively return the IP-auth proxy list for a whitelisted `ip`. Premium ISP orders still being provisioned answer 202 with `pending: true`. Premium ISP plans (pool and city) return one line per dedicated IP, each with its own login, and ignore targeting and rotation; `quantity` caps the number of lines (default 10), so pass the plan's `ips` to get every IP. `ipAddresses` holds the exit IP of each line, in the same order as `proxies`. City plans use one port for both HTTP and SOCKS5, and the host of a city line is a connection server that can change: generate the lines again instead of storing the host. The username of each line carries its targeting and session: generate new lines to change them instead of editing the strings by hand. `superSticky: true` keeps one IP per string for up to 24 hours on Residential Premium and Mobile; `udp: true` makes Residential Basic SOCKS5 strings relay UDP too. On Residential Basic, `os` picks exit IPs from devices running Windows, Android, iOS or macOS, and `gateway` picks the entry host of the strings in Europe (default), the United States or Asia, for a shorter route from your servers: the exit country still follows `country`. Which parameters apply depends on the plan type: unsupported ones are ignored, not rejected, except `superSticky`, `udp` and `os`, which answer 400 on a plan (or protocol) that cannot honour them; an unknown `os` value, or an unknown `gateway` on Residential Basic, is a 400 too. Free; no Data API billing (the plan's own bandwidth is consumed when you use the proxies).

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderId` | string | yes | From GET /public/proxies. |
| `protocol` | string: `http`, `socks5` | no |  Default `"http"`. |
| `format` | string: `user:pass@host:port`, `host:port:user:pass`, `http://user:pass@host:port`, `socks5://user:pass@host:port` | no | `ip:port:user:pass` and the `…@ip:port` spellings are accepted as aliases. Default `"user:pass@host:port"`. |
| `quantity` | integer | no |  Default `10`. |
| `country` | string | no | Lowercase country code (e.g. `us`); `all` = none. |
| `state` | string | no | Region slug (Residential Premium / Mobile V2: from the location tree). Alias `region`. |
| `city` | string | no | City slug. |
| `rotation` | string: `rotating`, `sticky`, `static` | no | `static` is IPv6 only. Default `"rotating"`. |
| `sessionTime` | integer | no | Sticky session minutes (Residential Basic / Datacenter traffic: min 3 enforced by the gateway). Default `10`. |
| `superSticky` | boolean | no | Residential Premium and Mobile: each string keeps one exit IP for up to 24 hours. Same as `rotation: "sticky"` with `sessionTime: 1440`, the longest session these plans accept, and it overrides both. Other plans answer 400 (use `sessionTime` there). Not with the Mobile V2 `ip` flow: whitelist the IP with `sticky: true` and `ttl: 86400` instead. Default `false`. |
| `udp` | boolean | no | Residential Basic with `protocol: "socks5"`: the strings also relay UDP (SOCKS5 UDP ASSOCIATE), for DNS, QUIC, VoIP and games. Works with rotating and sticky strings on the usual SOCKS5 ports. Your client must support UDP ASSOCIATE and keep the TCP connection it opened for the association open while it sends UDP. Other plans, or `protocol: "http"`, answer 400. Default `false`. |
| `isp` | string | no | ISP code (Residential Premium / Mobile V2) or carrier ASN (Mobile). |
| `asn` | string | no | ASN, e.g. `AS12345` (Residential Basic / Datacenter traffic). |
| `strict` | boolean | no | Residential/Datacenter Basic: `true` allows location fallback. Default `false`. |
| `os` | string: `any`, `windows`, `android`, `ios`, `macos` | no | Residential Basic: exit IPs from devices running this operating system (`mac` is accepted for `macos`). `any`, or no `os`, gives the largest pool. Works with every targeting and with rotating and sticky strings. Other plans answer 400. Default `"any"`. |
| `filter` | string: `speed`, `speed-quality`, `quality` | no | Residential Premium / Mobile V2 pool filter (default: max pool). |
| `isExtension` | boolean | no | Rewrite hostnames with a unique prefix so a browser extension cannot cache the proxy (needs the wildcard DNS of the gateway). Default `false`. |
| `ip` | string | no | Mobile V2: a whitelisted IP — returns the IP-auth proxy list instead of user:pass strings. |
| `gateway` | string: `ww`, `us`, `eu`, `as` | no | Mobile V2: region gateway. Residential Basic: entry host of the user:pass strings, `eu` (default; `ww` means `eu`), `us` or `as`. Pick the one closest to where your traffic starts; the exit country still follows `country`, and the same credentials and ports work on all three. Other values answer 400 on Residential Basic. Default `"ww"`. |

Example:

```json
{
  "orderId": "ord_8c21",
  "protocol": "http",
  "format": "user:pass@host:port",
  "quantity": 2,
  "country": "us",
  "rotation": "sticky",
  "sessionTime": 10
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/proxies/generate' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"orderId":"ord_8c21","protocol":"http","format":"user:pass@host:port","quantity":2,"country":"us","rotation":"sticky","sessionTime":10}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/proxies/generate',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "orderId": "ord_8c21",
        "protocol": "http",
        "format": "user:pass@host:port",
        "quantity": 2,
        "country": "us",
        "rotation": "sticky",
        "sessionTime": 10
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/proxies/generate", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "orderId": "ord_8c21",
    "protocol": "http",
    "format": "user:pass@host:port",
    "quantity": 2,
    "country": "us",
    "rotation": "sticky",
    "sessionTime": 10
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/proxies/generate');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'orderId' => 'ord_8c21',
    'protocol' => 'http',
    'format' => 'user:pass@host:port',
    'quantity' => 2,
    'country' => 'us',
    'rotation' => 'sticky',
    'sessionTime' => 10
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Proxy strings. Example: two sticky US lines of a Residential Premium plan.
- `202` — Premium ISP order still being provisioned.
- `400` — Missing orderId, expired plan, inactive sub-user, a plan type that cannot generate, `superSticky` / `udp` / `os` on a plan or protocol that does not support them, or an unknown `os` or Residential Basic `gateway` value.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — The plan was disabled by support: it is no longer listed by `GET /public/proxies` and its credentials, endpoints and whitelist are not handed out. Contact support.
- `404` — Order (or its proxy) not found on this account.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.
- `502` — The plan's network did not answer; retry.

Example `200` response:

```json
{
  "type": "response",
  "message": "success",
  "payload": {
    "orderId": "ord_8c21",
    "quantity": 2,
    "protocol": "http",
    "format": "user:pass@host:port",
    "rotation": "sticky",
    "sessionTime": 10,
    "superSticky": false,
    "udp": false,
    "geoTargeting": {
      "country": "us",
      "state": null,
      "city": null
    },
    "proxies": [
      "user_8c21-country-us-sid-k3f9a1b2c3d4-ttl-10m:p4ssw0rd@residentialpremium.quanticdata.io:8080",
      "user_8c21-country-us-sid-q7w2e5r8t1y4-ttl-10m:p4ssw0rd@residentialpremium.quanticdata.io:8080"
    ],
    "bandwidth": 5,
    "bandwidthLeft": 3.2,
    "whitelist": []
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Proxy has expired"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "This plan is not available. Contact support."
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Order or proxy not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Example `502`:

```json
{
  "type": "error",
  "message": "Unable to generate proxies. Please try again."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Geolocate an IP

`GET /public/proxies/ip-info`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Country, region, city, coordinates, timezone, ISP and ASN of an IP address — useful to verify where a sticky session actually exits. Served by a third-party geolocation source with its own fair-use limit (about 45 lookups/minute shared). Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ip` | query | string | yes |  |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/proxies/ip-info?ip=203.0.113.7' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/proxies/ip-info?ip=203.0.113.7',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/proxies/ip-info?ip=203.0.113.7", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/proxies/ip-info?ip=203.0.113.7');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — IP information.
- `400` — Missing `ip`, or the lookup source refused the address (private range, malformed).
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "ip": "203.0.113.7",
    "country": "United States",
    "countryCode": "US",
    "flag": "🇺🇸",
    "region": "California",
    "regionCode": "CA",
    "city": "Los Angeles",
    "zip": "90001",
    "lat": 34.05,
    "lon": -118.24,
    "timezone": "America/Los_Angeles",
    "isp": "Example Telecom",
    "org": "Example Telecom LLC",
    "as": "AS64496 Example Telecom"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "IP address is required. Use ?ip=x.x.x.x"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Where your IP is, as Cloudflare sees it

`GET /public/ip-echo`

**Price:** No charge.  
**Rate limit:** None of its own; the edge's limits apply.  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Returns the IP the request comes from and where Cloudflare places it: the country, and when available the region, city, postal code, timezone and coordinates. Most sites sit behind Cloudflare and locate visitors the same way, so sending this request through one of your proxies shows the exit as those sites see it (for example `curl -x http://USER:PASS@HOST:PORT https://api.quanticdata.io/v1/public/ip-echo`). It does not look up another address and gives no network or ISP name: for those use Geolocate an IP. No API key, never cached. Free.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/ip-echo'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/ip-echo',
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/ip-echo", {
  method: "GET"
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/ip-echo');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The caller's IP and Cloudflare's location for it.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "ip": "203.0.113.10",
    "countryCode": "US",
    "country": "United States",
    "region": "New York",
    "regionCode": "NY",
    "city": "New York",
    "postalCode": "10001",
    "timezone": "America/New_York",
    "latitude": 40.7128,
    "longitude": -74.006,
    "continent": "NA",
    "tor": false,
    "precision": "city",
    "viaCloudflare": true,
    "source": "cloudflare"
  },
  "pagination": {}
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List whitelisted IPs of an order

`GET /public/proxies/whitelist-ip`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

The IPs allowed to use an IP-auth plan without credentials. Mobile V2 plans also return the detailed upstream entries (ports, geo, sticky) under `entries`. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | query | string | yes |  |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/proxies/whitelist-ip?orderId=ORDERID' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/proxies/whitelist-ip?orderId=ORDERID',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/proxies/whitelist-ip?orderId=ORDERID", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/proxies/whitelist-ip?orderId=ORDERID');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Whitelist.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — The plan was disabled by support: it is no longer listed by `GET /public/proxies` and its credentials, endpoints and whitelist are not handed out. Contact support.
- `404` — Order not found on this account.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "orderId": "ord_8c21",
    "whitelist_ip": [
      "203.0.113.7"
    ]
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "This plan is not available. Contact support."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Whitelist an IP

`POST /public/proxies/whitelist-ip`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Allows an IPv4 address to use the plan by IP authentication. Supported on Residential Basic, Datacenter (both kinds), ISP (`planType: isp`), IPv6 and Mobile V2; Residential Premium/Private and Premium ISP (`isppremium`, pool and city plans) authenticate by user:pass only and answer 200 with `whitelisted: false` and the message `Whitelist not required for this proxy type (use username:password auth).` Mobile V2 accepts extra port/targeting options and `action: update` to edit an existing entry. Free.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderId` | string | yes |  |
| `ip` | string | yes | IPv4 address. |
| `action` | string: `add`, `update` | no | Mobile V2 only: `update` edits an existing entry's settings. Default `"add"`. |
| `ports_count` | integer | no | Mobile V2: ports to allocate. |
| `protocol` | string: `HTTP`, `SOCKS5` | no | Mobile V2. |
| `country` | string | no | Mobile V2 geo targeting for the allocated ports. |
| `region` | string | no | Mobile V2. |
| `city` | string | no | Mobile V2. |
| `isp` | string | no | Mobile V2. |
| `sticky` | boolean | no | Mobile V2: keep the same IP per port. |
| `ttl` | integer | no | Mobile V2: sticky session TTL in seconds. |

Example:

```json
{
  "orderId": "ord_8c21",
  "ip": "203.0.113.7"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/proxies/whitelist-ip' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"orderId":"ord_8c21","ip":"203.0.113.7"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/proxies/whitelist-ip',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "orderId": "ord_8c21",
        "ip": "203.0.113.7"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/proxies/whitelist-ip", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "orderId": "ord_8c21",
    "ip": "203.0.113.7"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/proxies/whitelist-ip');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'orderId' => 'ord_8c21',
    'ip' => '203.0.113.7'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Whitelisted (or not applicable to this plan type).
- `400` — Missing fields, malformed IP, or the plan's network refused the entry.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — The plan was disabled by support: it is no longer listed by `GET /public/proxies` and its credentials, endpoints and whitelist are not handed out. Contact support.
- `404` — Order not found on this account (or its residential sub-user is missing).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.

Example `200` response:

```json
{
  "type": "response",
  "message": "IP whitelisted successfully",
  "payload": {
    "ip": "203.0.113.7",
    "whitelisted": true,
    "whitelist_ip": [
      "203.0.113.7"
    ]
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid IP address format"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "This plan is not available. Contact support."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Remove a whitelisted IP

`DELETE /public/proxies/whitelist-ip`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Removes the IP from the plan's IP-auth list (Mobile V2 also accepts the entry `id`). Plans that authenticate by user:pass (Residential Premium/Private, Premium ISP) answer 200 with `removed: false`. Free.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderId` | string | yes |  |
| `ip` | string | yes |  |
| `id` | string | no | Mobile V2 entry id (alternative handle). |

Example:

```json
{
  "orderId": "ord_8c21",
  "ip": "203.0.113.7"
}
```

##### Examples

**curl**

```bash
curl -X DELETE 'https://api.quanticdata.io/v1/public/proxies/whitelist-ip' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"orderId":"ord_8c21","ip":"203.0.113.7"}'
```

**Python (requests)**

```python
import requests

r = requests.delete(
    'https://api.quanticdata.io/v1/public/proxies/whitelist-ip',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "orderId": "ord_8c21",
        "ip": "203.0.113.7"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/proxies/whitelist-ip", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "orderId": "ord_8c21",
    "ip": "203.0.113.7"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/proxies/whitelist-ip');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'orderId' => 'ord_8c21',
    'ip' => '203.0.113.7'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Removed (or not applicable).
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — The plan was disabled by support: it is no longer listed by `GET /public/proxies` and its credentials, endpoints and whitelist are not handed out. Contact support.
- `404` — Order not found on this account.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.

Example `200` response:

```json
{
  "type": "response",
  "message": "IP removed from whitelist",
  "payload": {
    "ip": "203.0.113.7",
    "removed": true,
    "whitelist_ip": []
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "This plan is not available. Contact support."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Rotate a sticky session (new IP, same string)

`POST /public/proxies/{orderId}/rotate`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Restarts one sticky session of a Residential Basic or Datacenter traffic plan: the same proxy string leaves from a new IP on its next request. Send the sticky string as `generate` returned it (`proxy`), or its `sessionId` with `protocol`. Wait for the 200 before the next request. One rotation every 10 seconds per session and 1,200 rotations an hour per account (shared with rotation links), on top of the key's hourly window. Other plan types answer 409 `ROTATION_NOT_SUPPORTED` with a `reason` that says what to do instead. Errors carry a stable `payload.code`. Free; no Data API billing.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | Order id of the plan (`orderId` in `GET /public/proxies`). |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `proxy` | string | no | A sticky proxy string of this plan, exactly as `generate` returned it (any format). |
| `sessionId` | string | no | Instead of `proxy`: the session of your sticky string. |
| `protocol` | string: `http`, `socks5` | no | With `sessionId`: the protocol of your sticky string. Default `"http"`. |
| `port` | integer | no | With `sessionId`, instead of `protocol`: the port of your sticky string. |

Example:

```json
{
  "proxy": "user_8c21-country-us-session-a1b2c3-time-10:p4ssw0rd@residential-ww.quanticdata.io:9999"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotate' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"proxy":"user_8c21-country-us-session-a1b2c3-time-10:p4ssw0rd@residential-ww.quanticdata.io:9999"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotate',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "proxy": "user_8c21-country-us-session-a1b2c3-time-10:p4ssw0rd@residential-ww.quanticdata.io:9999"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotate", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "proxy": "user_8c21-country-us-session-a1b2c3-time-10:p4ssw0rd@residential-ww.quanticdata.io:9999"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotate');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'proxy' => 'user_8c21-country-us-session-a1b2c3-time-10:p4ssw0rd@residential-ww.quanticdata.io:9999'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Session restarted.
- `400` — `VALIDATION_ERROR` (missing or malformed input), `SESSION_REQUIRED` (a rotating string: it already changes IP on every request) or `SESSION_NOT_IN_PLAN` (the string belongs to another plan).
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — `KEY_REQUIRED`: call with your own API key (keyless and pay-per-call access cannot rotate). `PLAN_UNAVAILABLE`: the plan was disabled; contact support.
- `404` — `ORDER_NOT_FOUND`: no such order on this account.
- `409` — This plan type has no rotation in place (`ROTATION_NOT_SUPPORTED`). `reason`: `new_string_only` — request a new sticky string with `generate`; `static_ips` — ISP plans have dedicated static IPs; `gateway_managed` — the gateway assigns the IP. Also `LINK_LIMIT_REACHED` on link creation (1,000 active links per plan).
- `410` — `PLAN_EXPIRED`: the plan has expired.
- `429` — `RATE_LIMITED`: one rotation every 10 seconds per session (`scope: session`), 1,200 rotations an hour per account (`scope: account`), or too many unknown links from one address (`scope: ip`, link only). API-key calls also count against the key's hourly window. Back off on Retry-After.
- `502` — `ROTATION_FAILED`: the session could not be restarted this time. The proxy string keeps working with its current IP. Retry after Retry-After.
- `503` — `SERVICE_UNAVAILABLE`: rotation is temporarily unavailable. Retry after Retry-After.

Example `200` response:

```json
{
  "type": "response",
  "message": "Session rotated. The next request on this proxy string gets a new IP.",
  "payload": {
    "rotated": true,
    "orderId": "ord_8c21",
    "sessionId": "a1b2c3",
    "port": 9999,
    "protocol": "http",
    "rotatedAt": "2026-10-19T14:05:00.000Z",
    "nextAllowedAt": "2026-10-19T14:05:10.000Z"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "This is a rotating proxy string: it already gets a new IP on every request. Rotation works on sticky strings (rotation: \"sticky\" in generate).",
  "payload": {
    "code": "SESSION_REQUIRED"
  }
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Rotation needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Order not found.",
  "payload": {
    "code": "ORDER_NOT_FOUND"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "Rotation links are not available for this plan. For a new IP, request a new sticky proxy string with POST /v1/public/proxies/generate: each string has its own session.",
  "payload": {
    "code": "ROTATION_NOT_SUPPORTED",
    "planType": "residentialpremium",
    "reason": "new_string_only"
  }
}
```

Example `410`:

```json
{
  "type": "error",
  "message": "This plan has expired.",
  "payload": {
    "code": "PLAN_EXPIRED",
    "planType": "residentialbasic"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "This session was rotated less than 10 seconds ago. Try again in 7 s.",
  "payload": {
    "code": "RATE_LIMITED",
    "scope": "session",
    "retryAfter": 7
  }
}
```

Example `502`:

```json
{
  "type": "error",
  "message": "The IP could not be rotated right now. Your proxy string still works. Try again in a few seconds.",
  "payload": {
    "code": "ROTATION_FAILED"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Rotation links are temporarily unavailable. Please try again later.",
  "payload": {
    "code": "SERVICE_UNAVAILABLE"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List rotation links of a plan

`GET /public/proxies/{orderId}/rotation-links`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

The plan's rotation links, newest first, without their tokens (only the last 4 characters, `tokenHint`): a link URL is shown once, when it is created. Revoked links are left out unless `includeRevoked=true`. Works on expired plans too, so you can revoke their links. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | Order id of the plan (`orderId` in `GET /public/proxies`). |
| `includeRevoked` | query | boolean | no | Include revoked links. Default `false`. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Rotation links.
- `400` — `VALIDATION_ERROR`: malformed orderId.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — `KEY_REQUIRED`: call with your own API key (keyless and pay-per-call access cannot rotate). `PLAN_UNAVAILABLE`: the plan was disabled; contact support.
- `404` — `ORDER_NOT_FOUND`: no such order on this account.
- `409` — This plan type has no rotation in place (`ROTATION_NOT_SUPPORTED`). `reason`: `new_string_only` — request a new sticky string with `generate`; `static_ips` — ISP plans have dedicated static IPs; `gateway_managed` — the gateway assigns the IP. Also `LINK_LIMIT_REACHED` on link creation (1,000 active links per plan).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — `SERVICE_UNAVAILABLE`: rotation is temporarily unavailable. Retry after Retry-After.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "orderId": "ord_8c21",
    "planType": "residentialbasic",
    "links": [
      {
        "id": "rlk_3f9a1c7e5b2d4a6c8e0f1a2b",
        "sessionId": "a1b2c3",
        "port": 9999,
        "protocol": "http",
        "label": "Profile 12",
        "tokenHint": "1d0e",
        "useCount": 14,
        "lastUsedAt": "2026-10-19T14:05:00.000Z",
        "createdAt": "2026-10-19T14:05:00.000Z",
        "revoked": false,
        "revokedAt": null
      }
    ],
    "limits": {
      "activeLinksPerPlan": 1000,
      "cooldownSeconds": 10
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "A valid orderId is required.",
  "payload": {
    "code": "VALIDATION_ERROR"
  }
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Rotation needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Order not found.",
  "payload": {
    "code": "ORDER_NOT_FOUND"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "Rotation links are not available for this plan. For a new IP, request a new sticky proxy string with POST /v1/public/proxies/generate: each string has its own session.",
  "payload": {
    "code": "ROTATION_NOT_SUPPORTED",
    "planType": "residentialpremium",
    "reason": "new_string_only"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Rotation links are temporarily unavailable. Please try again later.",
  "payload": {
    "code": "SERVICE_UNAVAILABLE"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Create rotation links

`POST /public/proxies/{orderId}/rotation-links`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Creates one rotation link per sticky session of a Residential Basic or Datacenter traffic plan: a URL that restarts the session when called, with no API key and no header, for anti-detect browsers and scripts. Send one sticky string (`proxy`), up to 100 (`proxies`), or a `sessionId` with `protocol`. The `url` and `token` appear in this answer only: store them now. Only a hash of the token is kept. Up to 1,000 active links per plan; creating another link for the same session leaves the earlier ones working until you revoke them. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | Order id of the plan (`orderId` in `GET /public/proxies`). |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `proxy` | string | no | A sticky proxy string of this plan, exactly as `generate` returned it (any format). |
| `sessionId` | string | no | Instead of `proxy`: the session of your sticky string. |
| `protocol` | string: `http`, `socks5` | no | With `sessionId`: the protocol of your sticky string. Default `"http"`. |
| `port` | integer | no | With `sessionId`, instead of `protocol`: the port of your sticky string. |
| `proxies` | array of string | no | Several sticky proxy strings of this plan: one link per string. |
| `label` | string | no | Optional name stored on every link created by this call: letters, digits, spaces and . _ : # / - |

Example:

```json
{
  "proxy": "user_8c21-country-us-session-a1b2c3-time-10:p4ssw0rd@residential-ww.quanticdata.io:9999",
  "label": "Profile 12"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"proxy":"user_8c21-country-us-session-a1b2c3-time-10:p4ssw0rd@residential-ww.quanticdata.io:9999","label":"Profile 12"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "proxy": "user_8c21-country-us-session-a1b2c3-time-10:p4ssw0rd@residential-ww.quanticdata.io:9999",
        "label": "Profile 12"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "proxy": "user_8c21-country-us-session-a1b2c3-time-10:p4ssw0rd@residential-ww.quanticdata.io:9999",
    "label": "Profile 12"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'proxy' => 'user_8c21-country-us-session-a1b2c3-time-10:p4ssw0rd@residential-ww.quanticdata.io:9999',
    'label' => 'Profile 12'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `201` — Links created. Each `url` is shown once.
- `400` — `VALIDATION_ERROR` (missing or malformed input), `SESSION_REQUIRED` (a rotating string: it already changes IP on every request) or `SESSION_NOT_IN_PLAN` (the string belongs to another plan).
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — `KEY_REQUIRED`: call with your own API key (keyless and pay-per-call access cannot rotate). `PLAN_UNAVAILABLE`: the plan was disabled; contact support.
- `404` — `ORDER_NOT_FOUND`: no such order on this account.
- `409` — This plan type has no rotation in place (`ROTATION_NOT_SUPPORTED`). `reason`: `new_string_only` — request a new sticky string with `generate`; `static_ips` — ISP plans have dedicated static IPs; `gateway_managed` — the gateway assigns the IP. Also `LINK_LIMIT_REACHED` on link creation (1,000 active links per plan).
- `410` — `PLAN_EXPIRED`: the plan has expired.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — `SERVICE_UNAVAILABLE`: rotation is temporarily unavailable. Retry after Retry-After.

Example `201` response:

```json
{
  "type": "response",
  "message": "Rotation links created. Save each url now: it is not shown again.",
  "payload": {
    "orderId": "ord_8c21",
    "links": [
      {
        "id": "rlk_3f9a1c7e5b2d4a6c8e0f1a2b",
        "sessionId": "a1b2c3",
        "port": 9999,
        "protocol": "http",
        "label": "Profile 12",
        "tokenHint": "1d0e",
        "useCount": 0,
        "lastUsedAt": null,
        "createdAt": "2026-10-19T14:05:00.000Z",
        "revoked": false,
        "revokedAt": null,
        "url": "https://api.quanticdata.io/v1/public/rotate/rl_6f1c0e2b9a7d4c3e8f5a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e",
        "token": "rl_6f1c0e2b9a7d4c3e8f5a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e"
      }
    ]
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "This is a rotating proxy string: it already gets a new IP on every request. Rotation works on sticky strings (rotation: \"sticky\" in generate).",
  "payload": {
    "code": "SESSION_REQUIRED"
  }
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Rotation needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Order not found.",
  "payload": {
    "code": "ORDER_NOT_FOUND"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "Rotation links are not available for this plan. For a new IP, request a new sticky proxy string with POST /v1/public/proxies/generate: each string has its own session.",
  "payload": {
    "code": "ROTATION_NOT_SUPPORTED",
    "planType": "residentialpremium",
    "reason": "new_string_only"
  }
}
```

Example `410`:

```json
{
  "type": "error",
  "message": "This plan has expired.",
  "payload": {
    "code": "PLAN_EXPIRED",
    "planType": "residentialbasic"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Rotation links are temporarily unavailable. Please try again later.",
  "payload": {
    "code": "SERVICE_UNAVAILABLE"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Revoke a rotation link

`DELETE /public/proxies/{orderId}/rotation-links/{linkId}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Revokes the link at once: its URL answers 410 `LINK_REVOKED` from then on. The proxy string and the plan's other links keep working. Revoking a link twice answers the same revoked link. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | Order id of the plan (`orderId` in `GET /public/proxies`). |
| `linkId` | path | string | yes | Link id (`id` in the link list). |

##### Examples

**curl**

```bash
curl -X DELETE 'https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links/rlk_3f9a1c7e5b2d4a6c8e0f1a2b' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.delete(
    'https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links/rlk_3f9a1c7e5b2d4a6c8e0f1a2b',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links/rlk_3f9a1c7e5b2d4a6c8e0f1a2b", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/proxies/ord_8c21/rotation-links/rlk_3f9a1c7e5b2d4a6c8e0f1a2b');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Link revoked.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — `KEY_REQUIRED`: call with your own API key (keyless and pay-per-call access cannot rotate). `PLAN_UNAVAILABLE`: the plan was disabled; contact support.
- `404` — `LINK_NOT_FOUND`: no such link on this plan, or `ORDER_NOT_FOUND`.
- `409` — This plan type has no rotation in place (`ROTATION_NOT_SUPPORTED`). `reason`: `new_string_only` — request a new sticky string with `generate`; `static_ips` — ISP plans have dedicated static IPs; `gateway_managed` — the gateway assigns the IP. Also `LINK_LIMIT_REACHED` on link creation (1,000 active links per plan).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — `SERVICE_UNAVAILABLE`: rotation is temporarily unavailable. Retry after Retry-After.

Example `200` response:

```json
{
  "type": "response",
  "message": "Rotation link revoked.",
  "payload": {
    "link": {
      "id": "rlk_3f9a1c7e5b2d4a6c8e0f1a2b",
      "sessionId": "a1b2c3",
      "port": 9999,
      "protocol": "http",
      "label": "Profile 12",
      "tokenHint": "1d0e",
      "useCount": 14,
      "lastUsedAt": "2026-10-19T14:05:00.000Z",
      "createdAt": "2026-10-19T14:05:00.000Z",
      "revoked": true,
      "revokedAt": "2026-10-19T14:05:10.000Z"
    }
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Rotation needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Rotation link not found on this plan.",
  "payload": {
    "code": "LINK_NOT_FOUND"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "Rotation links are not available for this plan. For a new IP, request a new sticky proxy string with POST /v1/public/proxies/generate: each string has its own session.",
  "payload": {
    "code": "ROTATION_NOT_SUPPORTED",
    "planType": "residentialpremium",
    "reason": "new_string_only"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Rotation links are temporarily unavailable. Please try again later.",
  "payload": {
    "code": "SERVICE_UNAVAILABLE"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Call a rotation link

`GET /public/rotate/{token}`

**Price:** No charge.  
**Rate limit:** One rotation every 10 seconds per session and 1,200 rotations an hour per account, shared with the rotate endpoint. An address that sends 30 unknown links in 10 minutes is blocked for 10 minutes.  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

The rotation link itself, as returned in `url` by `POST /public/proxies/{orderId}/rotation-links`: no API key, no header, no body. Restarts the link's sticky session, so the same proxy string leaves from a new IP on its next request. GET and POST behave the same; HEAD answers 405 without rotating, so link previews do not trigger it. Treat the URL like a password: it can rotate that one session, nothing else (no credentials, no balance). Revoke it with `DELETE /public/proxies/{orderId}/rotation-links/{linkId}`. Errors carry a stable `payload.code`. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | path | string | yes | The token at the end of the link URL. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/rotate/rl_6f1c0e2b9a7d4c3e8f5a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/rotate/rl_6f1c0e2b9a7d4c3e8f5a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e',
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/rotate/rl_6f1c0e2b9a7d4c3e8f5a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e", {
  method: "GET"
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/rotate/rl_6f1c0e2b9a7d4c3e8f5a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Session restarted.
- `403` — `ACCOUNT_DISABLED`: the account that owns the link is disabled. `PLAN_UNAVAILABLE`: the plan was disabled.
- `404` — `LINK_NOT_FOUND`: unknown link, or `ORDER_NOT_FOUND` when the plan is no longer on the account.
- `409` — This plan type has no rotation in place (`ROTATION_NOT_SUPPORTED`). `reason`: `new_string_only` — request a new sticky string with `generate`; `static_ips` — ISP plans have dedicated static IPs; `gateway_managed` — the gateway assigns the IP. Also `LINK_LIMIT_REACHED` on link creation (1,000 active links per plan).
- `410` — `LINK_REVOKED`: the link was revoked; create a new one. `PLAN_EXPIRED`: the plan has expired.
- `429` — `RATE_LIMITED`: one rotation every 10 seconds per session (`scope: session`), 1,200 rotations an hour per account (`scope: account`), or too many unknown links from one address (`scope: ip`, link only). API-key calls also count against the key's hourly window. Back off on Retry-After.
- `502` — `ROTATION_FAILED`: the session could not be restarted this time. The proxy string keeps working with its current IP. Retry after Retry-After.
- `503` — `SERVICE_UNAVAILABLE`: rotation is temporarily unavailable. Retry after Retry-After.

Example `200` response:

```json
{
  "type": "response",
  "message": "Session rotated. The next request on this proxy string gets a new IP.",
  "payload": {
    "rotated": true,
    "orderId": "ord_8c21",
    "sessionId": "a1b2c3",
    "port": 9999,
    "protocol": "http",
    "rotatedAt": "2026-10-19T14:05:00.000Z",
    "nextAllowedAt": "2026-10-19T14:05:10.000Z",
    "linkId": "rlk_3f9a1c7e5b2d4a6c8e0f1a2b",
    "label": "Profile 12"
  },
  "pagination": {}
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "This account is disabled. Contact support.",
  "payload": {
    "code": "ACCOUNT_DISABLED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Rotation link not found. Check the URL, or create a new link.",
  "payload": {
    "code": "LINK_NOT_FOUND"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "Rotation links are not available for this plan. For a new IP, request a new sticky proxy string with POST /v1/public/proxies/generate: each string has its own session.",
  "payload": {
    "code": "ROTATION_NOT_SUPPORTED",
    "planType": "residentialpremium",
    "reason": "new_string_only"
  }
}
```

Example `410`:

```json
{
  "type": "error",
  "message": "This rotation link was revoked. Create a new one for this session.",
  "payload": {
    "code": "LINK_REVOKED"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "This session was rotated less than 10 seconds ago. Try again in 7 s.",
  "payload": {
    "code": "RATE_LIMITED",
    "scope": "session",
    "retryAfter": 7
  }
}
```

Example `502`:

```json
{
  "type": "error",
  "message": "The IP could not be rotated right now. Your proxy string still works. Try again in a few seconds.",
  "payload": {
    "code": "ROTATION_FAILED"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Rotation links are temporarily unavailable. Please try again later.",
  "payload": {
    "code": "SERVICE_UNAVAILABLE"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Call a rotation link (POST)

`POST /public/rotate/{token}`

**Price:** No charge.  
**Rate limit:** One rotation every 10 seconds per session and 1,200 rotations an hour per account, shared with the rotate endpoint. An address that sends 30 unknown links in 10 minutes is blocked for 10 minutes.  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Same as `GET /public/rotate/{token}`, for tools that can only send POST. No API key, no header, no body.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | path | string | yes | The token at the end of the link URL. |

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/rotate/rl_6f1c0e2b9a7d4c3e8f5a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/rotate/rl_6f1c0e2b9a7d4c3e8f5a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e',
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/rotate/rl_6f1c0e2b9a7d4c3e8f5a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e", {
  method: "POST"
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/rotate/rl_6f1c0e2b9a7d4c3e8f5a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Session restarted.
- `403` — `ACCOUNT_DISABLED`: the account that owns the link is disabled. `PLAN_UNAVAILABLE`: the plan was disabled.
- `404` — `LINK_NOT_FOUND`: unknown link, or `ORDER_NOT_FOUND` when the plan is no longer on the account.
- `409` — This plan type has no rotation in place (`ROTATION_NOT_SUPPORTED`). `reason`: `new_string_only` — request a new sticky string with `generate`; `static_ips` — ISP plans have dedicated static IPs; `gateway_managed` — the gateway assigns the IP. Also `LINK_LIMIT_REACHED` on link creation (1,000 active links per plan).
- `410` — `LINK_REVOKED`: the link was revoked; create a new one. `PLAN_EXPIRED`: the plan has expired.
- `429` — `RATE_LIMITED`: one rotation every 10 seconds per session (`scope: session`), 1,200 rotations an hour per account (`scope: account`), or too many unknown links from one address (`scope: ip`, link only). API-key calls also count against the key's hourly window. Back off on Retry-After.
- `502` — `ROTATION_FAILED`: the session could not be restarted this time. The proxy string keeps working with its current IP. Retry after Retry-After.
- `503` — `SERVICE_UNAVAILABLE`: rotation is temporarily unavailable. Retry after Retry-After.

Example `200` response:

```json
{
  "type": "response",
  "message": "Session rotated. The next request on this proxy string gets a new IP.",
  "payload": {
    "rotated": true,
    "orderId": "ord_8c21",
    "sessionId": "a1b2c3",
    "port": 9999,
    "protocol": "http",
    "rotatedAt": "2026-10-19T14:05:00.000Z",
    "nextAllowedAt": "2026-10-19T14:05:10.000Z",
    "linkId": "rlk_3f9a1c7e5b2d4a6c8e0f1a2b",
    "label": "Profile 12"
  },
  "pagination": {}
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "This account is disabled. Contact support.",
  "payload": {
    "code": "ACCOUNT_DISABLED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Rotation link not found. Check the URL, or create a new link.",
  "payload": {
    "code": "LINK_NOT_FOUND"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "Rotation links are not available for this plan. For a new IP, request a new sticky proxy string with POST /v1/public/proxies/generate: each string has its own session.",
  "payload": {
    "code": "ROTATION_NOT_SUPPORTED",
    "planType": "residentialpremium",
    "reason": "new_string_only"
  }
}
```

Example `410`:

```json
{
  "type": "error",
  "message": "This rotation link was revoked. Create a new one for this session.",
  "payload": {
    "code": "LINK_REVOKED"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "This session was rotated less than 10 seconds ago. Try again in 7 s.",
  "payload": {
    "code": "RATE_LIMITED",
    "scope": "session",
    "retryAfter": 7
  }
}
```

Example `502`:

```json
{
  "type": "error",
  "message": "The IP could not be rotated right now. Your proxy string still works. Try again in a few seconds.",
  "payload": {
    "code": "ROTATION_FAILED"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Rotation links are temporarily unavailable. Please try again later.",
  "payload": {
    "code": "SERVICE_UNAVAILABLE"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Premium ISP

Buy and manage Premium ISP dedicated IPs through the API, paid from the wallet balance: ready pools by country and category, or city plans where you pick the city and, optionally, the carrier (ASN). Catalog with live stock, quote, purchase, order status with the proxy lines, renewal and paid IP swaps.

#### List Premium ISP pools

`GET /public/premium-isp/pools`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Ready Premium ISP pools by country and site category: dedicated static IPs, unlimited bandwidth, 30-day plans. `available` tells whether a pool can be bought; `maxQuantity` caps one order (at most 200, lower when the pool is short of IPs, so read it again before a large order) and `stock` gives the IPs in stock when reported. Pools with `subnet: true` sell a whole /24 (256 IPs, one per order) and appear only while on sale. `fromPerIp` is the lowest price per IP. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `country` | query | string | no | ISO 3166-1 alpha-2 filter, e.g. `US`. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/premium-isp/pools' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/premium-isp/pools',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/pools", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/pools');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Pools.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "enabled": true,
    "days": 30,
    "currency": "USD",
    "pools": [
      {
        "id": "premium-us-retail",
        "country": "US",
        "countryName": "United States",
        "category": "retail",
        "categoryName": "Retail",
        "name": "Premium United States Retail ISP",
        "description": "Dedicated static IPs optimized for retail websites, with unlimited bandwidth.",
        "days": 30,
        "minQuantity": 1,
        "maxQuantity": 100,
        "available": true,
        "subnet": false,
        "stock": 1591,
        "features": {
          "dedicated": true,
          "unlimitedBandwidth": true,
          "udp": true,
          "maxSpeedGbps": 10,
          "cityChoice": false,
          "carrierChoice": false,
          "replacementWithin24hOnRequest": true,
          "subnetsOnRequest": true
        }
      }
    ]
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List Premium ISP cities with stock

`GET /public/premium-isp/cities`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

City plans of one type (`city`: City and carrier; `fraud-score-0`: every IP checked for a fraud score of 0 before delivery): the plan lengths on sale with their price per IP and quantity ranges, the carrier fee, and every country and city with the IPs in stock. Cached up to 2 minutes; the purchase reads the stock again. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `type` | query | string: `city`, `fraud-score-0` | no |  Default `"city"`. |
| `udp` | query | string: `0`, `1` | no | `1` for UDP-capable IPs. Default `"0"`. |
| `country` | query | string | no | ISO 3166-1 alpha-2 filter. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/premium-isp/cities' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/premium-isp/cities',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/cities", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/cities');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Catalog.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "enabled": true,
    "type": "city",
    "udp": false,
    "maxAgeSeconds": 120,
    "types": [
      {
        "id": "city",
        "name": "City and carrier",
        "available": true
      },
      {
        "id": "fraud-score-0",
        "name": "Fraud score 0",
        "available": true
      }
    ],
    "countries": [
      {
        "code": "US",
        "name": "United States",
        "stock": 1234,
        "cities": [
          {
            "location": "United States - New York City",
            "name": "New York City",
            "stock": 8
          }
        ]
      }
    ]
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List the carriers (ASN) of a city

`GET /public/premium-isp/cities/carriers`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Carriers with the IPs in stock in one city of the catalog. Pass one `asn` to the quote or the purchase to pin the carrier (a carrier fee per IP applies, at purchase and at every renewal). Each new city is a live read, so this call has its own hourly cap per account (60). Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `location` | query | string | yes | `location` from `GET /public/premium-isp/cities`. |
| `type` | query | string: `city`, `fraud-score-0` | no |  Default `"city"`. |
| `udp` | query | string: `0`, `1` | no |  Default `"0"`. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/premium-isp/cities/carriers?location=LOCATION' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/premium-isp/cities/carriers?location=LOCATION',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/cities/carriers?location=LOCATION", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/cities/carriers?location=LOCATION');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Carriers.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `409` — The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "location": "United States - New York City",
    "type": "city",
    "udp": false,
    "maxAgeSeconds": 120,
    "carriers": [
      {
        "asn": 7922,
        "name": "Comcast",
        "stock": 5
      }
    ]
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This city is not available right now.",
  "payload": {
    "code": "CITY_UNAVAILABLE"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Quote a Premium ISP selection

`POST /public/premium-isp/quote`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Server-side price of a pool or city selection paid from the balance, with VAT (0% on balance) and whether your balance covers it. Nothing is reserved: the purchase checks stock and price again before charging. Free (300 quotes an hour per account). `siteCheck` does not change the price.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `product` | string: `pool`, `city` | yes |  |
| `poolId` | string | no | Pool id from `GET /public/premium-isp/pools` (pool only). A `-subnet` pool buys a whole /24. |
| `type` | string: `city`, `fraud-score-0` | no | City plans only. `fraud-score-0`: every IP is checked for a fraud score of 0 before delivery. Default `"city"`. |
| `length` | string: `1_day`, `7_days`, `1_month`, `2_months`, `3_months` | no | City plans only; the lengths on sale are listed by the catalog. |
| `location` | string | no | City plans only: a `location` from the catalog, e.g. `United States - New York City`. Or just the country name from the catalog (e.g. `United States`) for IPs from any city in that country — full-country stock, and it always uses any carrier (no `asn`). |
| `asn` | integer | no | City plans only: carrier ASN from `GET /public/premium-isp/cities/carriers`; null = any carrier. Not allowed when `location` is a country name (any city). Default `null`. |
| `udp` | boolean | no | City plans only: UDP-capable IPs. Default `false`. |
| `ispNameCheck` | boolean | no | City plans only. Deprecated and currently ignored: this free beta is turned off, so the flag has no effect and no IPs are filtered — leave it out. (When on, it delivered only IPs an IP-lookup database lists under an internet provider.) Default `false`. |
| `siteCheck` | object | no | City plans only, optional. A site test before delivery: every IP must open `url` and answer `expectedStatus` (default 200); IPs that fail are not assigned. Fewer IPs qualify, so delivery can take longer, and when none passes the order fails and is refunded to the balance by itself. A swapped IP is not tested again. Payment-processor domains are blocked on these IPs and always fail. |
| `siteCheck.url` | string | yes | A full http or https address with a public host name, no credentials. |
| `siteCheck.expectedStatus` | integer | no |  Default `200`. |
| `replacements` | integer | no | City plans only: paid IP swaps bought with the plan (they cannot be added later). A swap changes a working IP, for example one a site blocks; an IP that goes offline is replaced free by auto-replace. Default `0`. |
| `quantity` | integer | yes | Number of IPs, within the length's or pool's minQuantity/maxQuantity: exactly 256 for a subnet pool. |
| `paymentMethod` | string: `BALANCE` | no |  Default `"BALANCE"`. |

Example:

```json
{
  "product": "city",
  "type": "city",
  "length": "1_month",
  "location": "United States - New York City",
  "asn": 7922,
  "udp": false,
  "replacements": 2,
  "quantity": 10
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/premium-isp/quote' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/premium-isp/quote',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/quote", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/quote');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Quote.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `409` — The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "product": "city",
    "type": "city",
    "length": "1_month",
    "days": 30,
    "location": "United States - New York City",
    "city": "New York City",
    "country": "United States",
    "asn": 7922,
    "carrierName": "Comcast",
    "udp": false,
    "quantity": 10,
    "replacements": 2,
    "vatRate": 0,
    "vat": 0,
    "currency": "USD",
    "paymentMethod": "BALANCE",
    "sufficientBalance": true,
    "reserved": false,
    "quotedAt": "2026-10-19T10:00:00.000Z"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This city is not available right now.",
  "payload": {
    "code": "CITY_UNAVAILABLE"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List Premium ISP orders

`GET /public/premium-isp/orders`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Your Premium ISP orders (pools and city plans), newest first, with their status. From our records only, no live reads. Renewals are not separate orders. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  Default `50`. |
| `offset` | query | integer | no |  Default `0`. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/premium-isp/orders' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/premium-isp/orders',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/orders", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/orders');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Orders.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "orders": [
      {
        "id": "ord_5f2a",
        "product": "city",
        "status": "active",
        "createdAt": "2026-10-19T10:00:00.000Z",
        "selection": {
          "type": "city",
          "length": "1_month",
          "location": "United States - New York City",
          "city": "New York City",
          "country": "United States",
          "asn": 7922,
          "carrierName": "Comcast",
          "udp": false,
          "replacements": 2
        },
        "quantity": 10,
        "days": 30,
        "region": "premium-isp-city",
        "expiresAt": "2026-11-18T10:00:00.000Z",
        "daysRemaining": 30,
        "invoice": {
          "id": "inv_77c1",
          "vat": 0,
          "vatRate": 0,
          "paid": true,
          "status": "PAID",
          "refunded": false
        },
        "replacements": {
          "bought": 2,
          "used": 0,
          "checking": 0,
          "left": 2
        }
      }
    ],
    "pagination": {
      "total": 1,
      "limit": 50,
      "offset": 0,
      "hasMore": false
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Buy Premium ISP IPs from the balance

`POST /public/premium-isp/orders`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Buys a pool or city selection and charges the wallet balance (VAT 0%). The `Idempotency-Key` header is required: a retry with the same key never charges twice and answers with the same order. `maxTotal` (optional) refuses the purchase if the price went above it. The balance is checked before anything is created. Answers: 201 delivered; 202 paid and being prepared (poll `GET /public/premium-isp/orders/{orderId}`, see `Location`); 200 `replayed: true` for a key already used; 422 not delivered and refunded to the balance. Coupons are not accepted through the API. Whole /24 subnets and the 24-hour replacement of pool IPs are arranged with support. 20 purchases an hour per account. A city selection may carry `siteCheck` (a URL and the status it must answer): only IPs that pass it are delivered; if none does, the order fails and the balance is refunded by itself.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | yes | Unique key per purchase or renewal, 16–128 letters, digits or dashes (a UUID works). Sending the same request again with the same key never charges twice: it answers with the order it already created. The same key with a different body answers 409 `IDEMPOTENCY_CONFLICT`. |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `product` | string: `pool`, `city` | yes |  |
| `poolId` | string | no | Pool id from `GET /public/premium-isp/pools` (pool only). A `-subnet` pool buys a whole /24. |
| `type` | string: `city`, `fraud-score-0` | no | City plans only. `fraud-score-0`: every IP is checked for a fraud score of 0 before delivery. Default `"city"`. |
| `length` | string: `1_day`, `7_days`, `1_month`, `2_months`, `3_months` | no | City plans only; the lengths on sale are listed by the catalog. |
| `location` | string | no | City plans only: a `location` from the catalog, e.g. `United States - New York City`. Or just the country name from the catalog (e.g. `United States`) for IPs from any city in that country — full-country stock, and it always uses any carrier (no `asn`). |
| `asn` | integer | no | City plans only: carrier ASN from `GET /public/premium-isp/cities/carriers`; null = any carrier. Not allowed when `location` is a country name (any city). Default `null`. |
| `udp` | boolean | no | City plans only: UDP-capable IPs. Default `false`. |
| `ispNameCheck` | boolean | no | City plans only. Deprecated and currently ignored: this free beta is turned off, so the flag has no effect and no IPs are filtered — leave it out. (When on, it delivered only IPs an IP-lookup database lists under an internet provider.) Default `false`. |
| `siteCheck` | object | no | City plans only, optional. A site test before delivery: every IP must open `url` and answer `expectedStatus` (default 200); IPs that fail are not assigned. Fewer IPs qualify, so delivery can take longer, and when none passes the order fails and is refunded to the balance by itself. A swapped IP is not tested again. Payment-processor domains are blocked on these IPs and always fail. |
| `siteCheck.url` | string | yes | A full http or https address with a public host name, no credentials. |
| `siteCheck.expectedStatus` | integer | no |  Default `200`. |
| `replacements` | integer | no | City plans only: paid IP swaps bought with the plan (they cannot be added later). A swap changes a working IP, for example one a site blocks; an IP that goes offline is replaced free by auto-replace. Default `0`. |
| `quantity` | integer | yes | Number of IPs, within the length's or pool's minQuantity/maxQuantity: exactly 256 for a subnet pool. |
| `paymentMethod` | string: `BALANCE` | no |  Default `"BALANCE"`. |
| `maxTotal` | number | no | Highest total you accept, in USD. Above it: 409 `PRICE_CHANGED`, nothing charged. |

Example:

```json
{
  "product": "city",
  "type": "city",
  "length": "1_month",
  "location": "United States - New York City",
  "asn": 7922,
  "udp": false,
  "replacements": 2,
  "quantity": 10
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/premium-isp/orders' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/premium-isp/orders',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/orders", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/orders');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Replayed: this Idempotency-Key was already used for this selection. Nothing new was charged.
- `201` — Delivered.
- `202` — Paid, the IPs are being prepared. Poll the order; do not buy again. If a city order cannot be filled, it is closed and the amount paid goes back to your balance: the order then reads `refunded`.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The wallet balance cannot cover the total. Nothing was created or charged: top up in the dashboard and send the request again.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `409` — The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so.
- `422` — The IPs could not be delivered and the amount is back on your balance: you have not been charged. Send the purchase again with a new Idempotency-Key.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "This purchase was already received.",
  "payload": {
    "replayed": true,
    "order": {
      "id": "ord_5f2a",
      "product": "city",
      "status": "active",
      "createdAt": "2026-10-19T10:00:00.000Z",
      "selection": {
        "type": "city",
        "length": "1_month",
        "location": "United States - New York City",
        "city": "New York City",
        "country": "United States",
        "asn": 7922,
        "carrierName": "Comcast",
        "udp": false,
        "replacements": 2
      },
      "quantity": 10,
      "days": 30,
      "region": "premium-isp-city",
      "expiresAt": "2026-11-18T10:00:00.000Z",
      "daysRemaining": 30,
      "invoice": {
        "id": "inv_77c1",
        "vat": 0,
        "vatRate": 0,
        "paid": true,
        "status": "PAID",
        "refunded": false
      },
      "replacements": {
        "bought": 2,
        "used": 0,
        "checking": 0,
        "left": 2
      }
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your balance is too low for this purchase. Top up in the dashboard and try again.",
  "payload": {
    "code": "INSUFFICIENT_BALANCE"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This city is not available right now.",
  "payload": {
    "code": "CITY_UNAVAILABLE"
  }
}
```

Example `422`:

```json
{
  "type": "error",
  "message": "The IPs could not be delivered. You have not been charged: the amount is back on your balance.",
  "payload": {
    "code": "NOT_DELIVERED_REFUNDED",
    "refunded": true,
    "newCheckoutRequired": true,
    "orderId": "ord_5f2a",
    "invoiceId": "inv_77c1"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Get a Premium ISP order and its proxy lines

`GET /public/premium-isp/orders/{orderId}`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Status of one order. With `include=lines` it also returns the proxy lines (one per dedicated IP, with its own login), read live: 120 reads an hour per account. While the IPs are being prepared it answers 202 `LINES_PENDING`. Premium ISP IPs reach only ports 80 and 443. Pool plans also cannot open banking, payment or government sites. City plans open banks and government sites, but payment-processor domains (Stripe and similar) are blocked. The free auto-replace state of a city plan is read from `GET .../auto-replace`. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | `id` of the order (from `POST /public/premium-isp/orders` or `GET /public/premium-isp/orders`). |
| `include` | query | string: `lines` | no |  |
| `protocol` | query | string: `http`, `socks5` | no |  Default `"http"`. |
| `format` | query | string: `host:port:user:pass`, `ip:port:user:pass`, `user:pass@host:port`, `http://user:pass@host:port`, `socks5://user:pass@host:port` | no |  Default `"host:port:user:pass"`. |
| `quantity` | query | integer | no | Return only the first N lines. |
| `server` | query | string | no | City plans: a connection server id from `lines.servers`. Default `auto` (the closest server); an id the plan does not offer is served as `auto`. The host can change, so generate the lines again instead of storing it. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Order (and lines).
- `202` — The IPs are being prepared: check again shortly.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `409` — The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "order": {
      "id": "ord_5f2a",
      "product": "city",
      "status": "active",
      "createdAt": "2026-10-19T10:00:00.000Z",
      "selection": {
        "type": "city",
        "length": "1_month",
        "location": "United States - New York City",
        "city": "New York City",
        "country": "United States",
        "asn": 7922,
        "carrierName": "Comcast",
        "udp": false,
        "replacements": 2
      },
      "quantity": 10,
      "days": 30,
      "region": "premium-isp-city",
      "expiresAt": "2026-11-18T10:00:00.000Z",
      "daysRemaining": 30,
      "invoice": {
        "id": "inv_77c1",
        "vat": 0,
        "vatRate": 0,
        "paid": true,
        "status": "PAID",
        "refunded": false
      },
      "replacements": {
        "bought": 2,
        "used": 0,
        "checking": 0,
        "left": 2
      }
    },
    "lines": {
      "protocol": "http",
      "format": "host:port:user:pass",
      "proxies": [
        "203.0.113.7:8000:u_1a2b:p_3c4d"
      ],
      "ipAddresses": [
        "203.0.113.7"
      ],
      "expiresAt": "2026-11-18T10:00:00.000Z",
      "servers": [
        {
          "id": "auto",
          "label": "Auto (closest server)"
        },
        {
          "id": "us-east",
          "label": "US East (Virginia)"
        },
        {
          "id": "de",
          "label": "Frankfurt"
        },
        {
          "id": "sg",
          "label": "Singapore"
        }
      ],
      "server": "auto"
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This city is not available right now.",
  "payload": {
    "code": "CITY_UNAVAILABLE"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Quote a Premium ISP renewal

`GET /public/premium-isp/orders/{orderId}/renewal`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Price of renewing the plan for its own term with the same IPs, paid from the balance (VAT 0%). Paid IP swaps are not renewed; the carrier fee is, when the plan has a carrier (`carrierFeePerIp` and `carrierTotal` in the quote, included in `subtotal`). A City and carrier plan that can also renew for a longer length lists every length it can take in `options` (its own term first, then the longer ones), each with its per-IP price and totals; renew for one of them by sending its `days` to the POST. Without `options` the plan renews for its own term only. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | `id` of the order (from `POST /public/premium-isp/orders` or `GET /public/premium-isp/orders`). |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/renewal' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/renewal',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/renewal", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/renewal');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Renewal quote.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `409` — The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "days": 30,
    "quantity": 10,
    "vatRate": 0,
    "vat": 0,
    "currency": "USD",
    "paymentMethod": "BALANCE",
    "currentExpiry": "2026-11-18T10:00:00.000Z",
    "sufficientBalance": true,
    "carrierFeePerIp": 0,
    "carrierTotal": 0
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This city is not available right now.",
  "payload": {
    "code": "CITY_UNAVAILABLE"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Renew a Premium ISP plan from the balance

`POST /public/premium-isp/orders/{orderId}/renewal`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Extends the plan by its own term with the same IPs and charges the balance (the carrier fee again, when the plan has a pinned carrier), or by `days` when the renewal quote lists that length in `options`. `Idempotency-Key` is required. 202 means the renewal is being verified: do not send it again, it completes or is refunded automatically. A `days` the plan cannot take is refused with 400 VALIDATION_ERROR before any charge. 20 renewals an hour per account.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | `id` of the order (from `POST /public/premium-isp/orders` or `GET /public/premium-isp/orders`). |
| `Idempotency-Key` | header | string | yes | Unique key per purchase or renewal, 16–128 letters, digits or dashes (a UUID works). Sending the same request again with the same key never charges twice: it answers with the order it already created. The same key with a different body answers 409 `IDEMPOTENCY_CONFLICT`. |

##### Request body

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `days` | integer | no | Optional. One of the `days` in the quote's `options`; without it, the plan's own term. |

Example:

```json
{
  "days": 30
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/renewal' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"days":30}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/renewal',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "days": 30
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/renewal", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "days": 30
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/renewal');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'days' => 30
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Renewed.
- `202` — Being verified: do not send it again.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The wallet balance cannot cover the total. Nothing was created or charged: top up in the dashboard and send the request again.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `409` — The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "renewed": true,
    "daysAdded": 30,
    "newExpiry": "2026-12-18T10:00:00.000Z"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your balance is too low for this purchase. Top up in the dashboard and try again.",
  "payload": {
    "code": "INSUFFICIENT_BALANCE"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This city is not available right now.",
  "payload": {
    "code": "CITY_UNAVAILABLE"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### IP swaps of a city plan

`GET /public/premium-isp/orders/{orderId}/replacements`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Replacements bought with a city plan: used, being confirmed and left; the swaps bought after the purchase (`paid`) and the price of one more (`paidSwapPrice`, from the balance, no limit on the number). Pools have no API replacements (their 24-hour replacement goes through support). Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | `id` of the order (from `POST /public/premium-isp/orders` or `GET /public/premium-isp/orders`). |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/replacements' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/replacements',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/replacements", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/replacements');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — IP swaps.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `409` — The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "bought": 2,
    "used": 0,
    "checking": 0,
    "left": 2,
    "paid": 0,
    "paidSwapPrice": 1.5
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This city is not available right now.",
  "payload": {
    "code": "CITY_UNAVAILABLE"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Replace one IP of a city plan

`POST /public/premium-isp/orders/{orderId}/replacements`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Swaps one IP of the plan for a new one in the same city, using one of the replacements bought with the plan. With none left, `pay: true` buys the swap from the balance at `paidSwapPrice` (0% VAT); without it nothing is charged and the 409 tells the price. 202 means the new IP is being prepared: it counts as used, do not send it again; a paid swap that never shows a new IP within 24 hours is refunded by itself. A 502 means nothing was used or charged. Offline IPs are replaced for free by auto-replace unless it was switched off (`.../auto-replace`). 30 replacements an hour per account.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | `id` of the order (from `POST /public/premium-isp/orders` or `GET /public/premium-isp/orders`). |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ip` | string | yes | One of the plan's exit IPs (`lines.ipAddresses`). |
| `pay` | boolean | no | With no prepaid swap left: `true` buys this swap from the wallet balance at `paidSwapPrice` (plans that offer it). Left out or `false`, the answer is 409 `NO_REPLACEMENTS_LEFT` with the price and nothing is charged. Default `false`. |

Example:

```json
{
  "ip": "203.0.113.7",
  "pay": false
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/replacements' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"ip":"203.0.113.7","pay":false}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/replacements',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "ip": "203.0.113.7",
        "pay": false
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/replacements", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "ip": "203.0.113.7",
    "pay": false
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/replacements');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'ip' => '203.0.113.7',
    'pay' => false
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Replaced.
- `202` — Being prepared: counts as used, do not send it again.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The wallet balance cannot cover the total. Nothing was created or charged: top up in the dashboard and send the request again.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `409` — The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `502` — The IP could not be swapped right now. No swap was used.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "IP replaced.",
  "payload": {
    "pending": false,
    "oldIp": "203.0.113.7",
    "newIp": "203.0.113.42",
    "bought": 2,
    "used": 1,
    "checking": 0,
    "left": 1
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your balance is too low for this purchase. Top up in the dashboard and try again.",
  "payload": {
    "code": "INSUFFICIENT_BALANCE"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This city is not available right now.",
  "payload": {
    "code": "CITY_UNAVAILABLE"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `502`:

```json
{
  "type": "error",
  "message": "The IP could not be swapped right now. No swap was used.",
  "payload": {
    "code": "REPLACEMENT_REFUSED"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Auto-replace setting of a city plan

`GET /public/premium-isp/orders/{orderId}/auto-replace`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Free auto-replace of a city plan: an IP that stays offline for more than 30 minutes is replaced by itself, same city, same login and password, and no paid swap is used. On by default; this reads its state for the plan's live IPs (`on`, `off`, or `mixed` while a change is half applied). Pools have no switch (`AUTO_REPLACE_NOT_AVAILABLE`): their carrier-removed IPs are replaced on their own. Free; 60 reads and changes an hour per account.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | `id` of the order (from `POST /public/premium-isp/orders` or `GET /public/premium-isp/orders`). |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/auto-replace' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/auto-replace',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/auto-replace", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/auto-replace');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The setting.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `409` — The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "available": true,
    "state": "on",
    "ips": 5
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This city is not available right now.",
  "payload": {
    "code": "CITY_UNAVAILABLE"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Switch auto-replace on or off

`POST /public/premium-isp/orders/{orderId}/auto-replace`

**Price:** No charge. Prices come from the catalog (`GET /public/premium-isp/cities`, `GET /public/premium-isp/pools`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Switches free auto-replace on or off for every live IP of a city plan, the same switch as the plan page. Switch it off to keep an IP that goes offline and swap it yourself (`POST .../replacements`) or wait for it. The choice stays with the plan: an IP received through a paid swap follows it. The answer is the state after the change; `mixed` means the supplier applied it to some IPs only, read it again in a minute. Nothing is charged and no swap is used.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | `id` of the order (from `POST /public/premium-isp/orders` or `GET /public/premium-isp/orders`). |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `enabled` | boolean | yes | `true` = replace offline IPs by itself; `false` = never replace an IP without a request. |

Example:

```json
{
  "enabled": false
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/auto-replace' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"enabled":false}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/auto-replace',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "enabled": false
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/auto-replace", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "enabled": false
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/premium-isp/orders/ORDERID/auto-replace');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'enabled' => false
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Changed.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), keys created by a connected app cannot spend the balance, or the plan was disabled by support.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `409` — The selection cannot be sold right now, or the request conflicts with an earlier one. Nothing was charged unless the code says so.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — Premium ISP is not available through the API on this account yet, a price or the catalog cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Auto-replace switched off.",
  "payload": {
    "available": true,
    "state": "off",
    "ips": 5
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Premium ISP needs your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This city is not available right now.",
  "payload": {
    "code": "CITY_UNAVAILABLE"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "Premium ISP is not available through the API yet. Use the dashboard to buy Premium ISP plans.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

### IPv6

Buy IPv6 speed plans through the API, paid from the wallet balance: traffic is not metered, the port speed is the cap. The grid of speeds (Mbps) and terms (1, 7 or 30 days) with the price of every cell, a quote, the purchase with an Idempotency-Key, order status. The endpoint strings of a bought plan come from `POST /public/proxies/generate` with the order id; per-GB IPv6 packs stay in `GET /public/plans` and `POST /public/purchase`. 1000 Mbps is a special plan sold on request (dashboard, Plans → IPv6 → Contact us).

#### List IPv6 speed plans

`GET /public/ipv6/plans`

**Price:** No charge. Prices come from the grid (`GET /public/ipv6/plans`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%. 1000 Mbps has no price: it is sold on request from the dashboard.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

The grid of IPv6 speed plans on sale: every speed (Mbps) with the terms (1, 7 or 30 days) sold for it and the price of each cell, in USD, paid from the balance with 0% VAT. Traffic is not metered for the whole term; the port speed is the cap. `from` is the cheapest cell; `onRequest` is the 1000 Mbps plan, sold without a listed price from the dashboard. Rotating or static sessions, HTTP and SOCKS5 and country selection work as on the per-GB IPv6 packs (those stay in `GET /public/plans`). Free (300 reads an hour per account).

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/ipv6/plans' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/ipv6/plans',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/ipv6/plans", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/ipv6/plans');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The grid.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), or the key was created by a connected app and cannot spend the balance.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — IPv6 speed plans are not available through the API on this account yet, the grid cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "currency": "USD",
    "paymentMethod": "BALANCE",
    "vatRate": 0,
    "terms": [
      1,
      7,
      30
    ],
    "speeds": [
      {
        "speedMbps": 30,
        "terms": [
          {
            "days": 1,
            "planName": "IPv6 Unlimited · 30 Mbps · 1 day"
          },
          {
            "days": 7,
            "planName": "IPv6 Unlimited · 30 Mbps · 7 days"
          },
          {
            "days": 30,
            "planName": "IPv6 Unlimited · 30 Mbps · 30 days"
          }
        ]
      },
      {
        "speedMbps": 60,
        "terms": [
          {
            "days": 1,
            "planName": "IPv6 Unlimited · 60 Mbps · 1 day"
          },
          {
            "days": 7,
            "planName": "IPv6 Unlimited · 60 Mbps · 7 days"
          },
          {
            "days": 30,
            "planName": "IPv6 Unlimited · 60 Mbps · 30 days"
          }
        ]
      },
      {
        "speedMbps": 120,
        "terms": [
          {
            "days": 1,
            "planName": "IPv6 Unlimited · 120 Mbps · 1 day"
          },
          {
            "days": 7,
            "planName": "IPv6 Unlimited · 120 Mbps · 7 days"
          },
          {
            "days": 30,
            "planName": "IPv6 Unlimited · 120 Mbps · 30 days"
          }
        ]
      },
      {
        "speedMbps": 200,
        "terms": [
          {
            "days": 1,
            "planName": "IPv6 Unlimited · 200 Mbps · 1 day"
          },
          {
            "days": 7,
            "planName": "IPv6 Unlimited · 200 Mbps · 7 days"
          },
          {
            "days": 30,
            "planName": "IPv6 Unlimited · 200 Mbps · 30 days"
          }
        ]
      }
    ],
    "from": {
      "speedMbps": 30,
      "days": 1
    },
    "onRequest": {
      "speedMbps": 1000,
      "price": null,
      "availability": "contact",
      "how": "Ask for it in the dashboard: Plans → IPv6 → 1000 Mbps → Contact us. We reply by e-mail with the price."
    }
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "IPv6 speed plans need your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "IPv6 speed plans are not available through the API yet. Use the dashboard to buy them.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Quote an IPv6 speed plan

`POST /public/ipv6/quote`

**Price:** No charge. Prices come from the grid (`GET /public/ipv6/plans`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%. 1000 Mbps has no price: it is sold on request from the dashboard.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Server-side price of one speed × term cell paid from the balance, with VAT (0% on balance) and whether your balance covers it. Nothing is reserved: the purchase reads the grid again before charging. A speed or term that is not sold answers 409 with the cells that are; 1000 Mbps answers `CONTACT_REQUIRED`. Free (300 quotes an hour per account).

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `speedMbps` | integer | yes | A speed of the grid (`GET /public/ipv6/plans`). 1000 answers `CONTACT_REQUIRED`. |
| `days` | integer: `1`, `7`, `30` | yes | The term. Traffic is not metered for the whole term. |
| `paymentMethod` | string: `BALANCE` | no |  Default `"BALANCE"`. |

Example:

```json
{
  "speedMbps": 200,
  "days": 7
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/ipv6/quote' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"speedMbps":200,"days":7}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/ipv6/quote',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "speedMbps": 200,
        "days": 7
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/ipv6/quote", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "speedMbps": 200,
    "days": 7
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/ipv6/quote');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'speedMbps' => 200,
    'days' => 7
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Quote.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), or the key was created by a connected app and cannot spend the balance.
- `409` — The cell is not sold, the price moved above your `maxTotal`, the Idempotency-Key was reused for another body, the checkout is closed, or the payment needs a human look. Nothing was charged unless the message says otherwise.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — IPv6 speed plans are not available through the API on this account yet, the grid cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "speedMbps": 200,
    "days": 7,
    "planName": "IPv6 Unlimited · 200 Mbps · 7 days",
    "trafficMetered": false,
    "vatRate": 0,
    "vat": 0,
    "currency": "USD",
    "paymentMethod": "BALANCE",
    "sufficientBalance": true,
    "reserved": false,
    "quotedAt": "2026-10-20T09:00:00.000Z"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "IPv6 speed plans need your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This speed is not sold. Available: 30 Mbps, 60 Mbps, 120 Mbps, 200 Mbps; 1000 Mbps on request.",
  "payload": {
    "code": "SPEED_UNAVAILABLE",
    "speeds": [
      30,
      60,
      120,
      200
    ]
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "IPv6 speed plans are not available through the API yet. Use the dashboard to buy them.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List IPv6 speed orders

`GET /public/ipv6/orders`

**Price:** No charge. Prices come from the grid (`GET /public/ipv6/plans`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%. 1000 Mbps has no price: it is sold on request from the dashboard.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Status of the account's IPv6 speed orders, newest first, from our records only: dashboard and API purchases alike (`channel`). Per-GB IPv6 packs are not here: they are plans in `GET /public/proxies`. Free (120 reads an hour per account).

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  Default `50`. |
| `offset` | query | integer | no |  Default `0`. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/ipv6/orders' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/ipv6/orders',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/ipv6/orders", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/ipv6/orders');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Orders.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), or the key was created by a connected app and cannot spend the balance.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — IPv6 speed plans are not available through the API on this account yet, the grid cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "orders": [
      {
        "id": "ord_7a1c",
        "product": "ipv6-speed",
        "status": "active",
        "createdAt": "2026-10-20T09:00:00.000Z",
        "speedMbps": 200,
        "days": 7,
        "planName": "IPv6 Unlimited · 200 Mbps · 7 days",
        "trafficMetered": false,
        "expiresAt": "2026-10-27T09:00:00.000Z",
        "daysRemaining": 7,
        "channel": "api",
        "invoice": {
          "id": "inv_3b9e",
          "vat": 0,
          "vatRate": 0,
          "paid": true,
          "status": "PAID",
          "refunded": false
        }
      }
    ],
    "pagination": {
      "total": 1,
      "limit": 50,
      "offset": 0,
      "hasMore": false
    }
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "IPv6 speed plans need your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "IPv6 speed plans are not available through the API yet. Use the dashboard to buy them.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Buy an IPv6 speed plan

`POST /public/ipv6/orders`

**Price:** No charge. Prices come from the grid (`GET /public/ipv6/plans`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%. 1000 Mbps has no price: it is sold on request from the dashboard.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Buy one speed × term cell from the wallet balance. Send a unique `Idempotency-Key` with every purchase: the same key again answers with the order already created, never a second charge. The grid is read again at purchase time; `maxTotal` lets you refuse a price above what you quoted (409 `PRICE_CHANGED`, nothing charged). Answers: 201 delivered (the plan is active; generate the endpoint strings with `POST /public/proxies/generate` and the order id), 200 replayed for a key already paid, 422 not delivered and refunded to the balance. Keyless and pay-per-call access cannot buy; keys created by a connected app cannot spend. 20 purchases an hour per account.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | yes | Unique key per purchase or renewal, 16–128 letters, digits or dashes (a UUID works). Sending the same request again with the same key never charges twice: it answers with the order it already created. The same key with a different body answers 409 `IDEMPOTENCY_CONFLICT`. |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `speedMbps` | integer | yes | A speed of the grid (`GET /public/ipv6/plans`). 1000 answers `CONTACT_REQUIRED`. |
| `days` | integer: `1`, `7`, `30` | yes | The term. Traffic is not metered for the whole term. |
| `paymentMethod` | string: `BALANCE` | no |  Default `"BALANCE"`. |
| `maxTotal` | number | no | Refuse the purchase if the total is above this amount (USD). Nothing is charged then. |
| `idempotencyKey` | string | no | Alternative to the header. |

Example:

```json
{
  "speedMbps": 200,
  "days": 7,
  "maxTotal": 150
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/ipv6/orders' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"speedMbps":200,"days":7,"maxTotal":150}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/ipv6/orders',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "speedMbps": 200,
        "days": 7,
        "maxTotal": 150
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/ipv6/orders", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "speedMbps": 200,
    "days": 7,
    "maxTotal": 150
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/ipv6/orders');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'speedMbps' => 200,
    'days' => 7,
    'maxTotal' => 150
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Replayed: this Idempotency-Key was already paid. The order it created, no new charge.
- `201` — Delivered: the plan is active.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `402` — The wallet balance cannot cover the total. Nothing was created or charged: top up in the dashboard and send the request again.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), or the key was created by a connected app and cannot spend the balance.
- `409` — The cell is not sold, the price moved above your `maxTotal`, the Idempotency-Key was reused for another body, the checkout is closed, or the payment needs a human look. Nothing was charged unless the message says otherwise.
- `422` — The plan could not be delivered and the amount is back on your balance: you have not been charged. Send the purchase again with a new Idempotency-Key.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — IPv6 speed plans are not available through the API on this account yet, the grid cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "This purchase was already received.",
  "payload": {
    "replayed": true,
    "order": {
      "id": "ord_7a1c",
      "product": "ipv6-speed",
      "status": "active",
      "createdAt": "2026-10-20T09:00:00.000Z",
      "speedMbps": 200,
      "days": 7,
      "planName": "IPv6 Unlimited · 200 Mbps · 7 days",
      "trafficMetered": false,
      "expiresAt": "2026-10-27T09:00:00.000Z",
      "daysRemaining": 7,
      "channel": "api",
      "invoice": {
        "id": "inv_3b9e",
        "vat": 0,
        "vatRate": 0,
        "paid": true,
        "status": "PAID",
        "refunded": false
      }
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `402`:

```json
{
  "type": "error",
  "message": "Your balance is too low for this purchase. Top up in the dashboard and try again.",
  "payload": {
    "code": "INSUFFICIENT_BALANCE"
  }
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "IPv6 speed plans need your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "This speed is not sold. Available: 30 Mbps, 60 Mbps, 120 Mbps, 200 Mbps; 1000 Mbps on request.",
  "payload": {
    "code": "SPEED_UNAVAILABLE",
    "speeds": [
      30,
      60,
      120,
      200
    ]
  }
}
```

Example `422`:

```json
{
  "type": "error",
  "message": "The plan could not be delivered. You have not been charged: the amount is back on your balance.",
  "payload": {
    "code": "NOT_DELIVERED_REFUNDED",
    "refunded": true,
    "newCheckoutRequired": true,
    "orderId": "ord_7a1c",
    "invoiceId": "inv_3b9e"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "IPv6 speed plans are not available through the API yet. Use the dashboard to buy them.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Get an IPv6 speed order

`GET /public/ipv6/orders/{orderId}`

**Price:** No charge. Prices come from the grid (`GET /public/ipv6/plans`) or from a quote, in USD, and are charged to the wallet balance. VAT on balance payments is 0%. 1000 Mbps has no price: it is sold on request from the dashboard.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

One IPv6 speed order of this account: status, speed, term, expiry and invoice, from our records. The endpoint strings come from `POST /public/proxies/generate` with this order id (rotating, sticky or static sessions, country selection). 404 for an order of another account or of another product. Free (120 reads an hour per account).

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orderId` | path | string | yes | `id` of the order (from `POST /public/ipv6/orders` or `GET /public/ipv6/orders`). The same id goes to `POST /public/proxies/generate`. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/ipv6/orders/ORDERID' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/ipv6/orders/ORDERID',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/ipv6/orders/ORDERID", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/ipv6/orders/ORDERID');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The order.
- `400` — Malformed input. `message` names the parameter and the rule it broke.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Your own API key is required (keyless and pay-per-call access cannot buy), or the key was created by a connected app and cannot spend the balance.
- `404` — Unknown id — or an id that belongs to another account (ownership failures answer 404, never 403, so ids cannot be probed).
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `503` — IPv6 speed plans are not available through the API on this account yet, the grid cannot be read right now, or balance payments are switched off. Retry after the `Retry-After` seconds.

Example `200` response:

```json
{
  "type": "response",
  "message": "Success",
  "payload": {
    "order": {
      "id": "ord_7a1c",
      "product": "ipv6-speed",
      "status": "active",
      "createdAt": "2026-10-20T09:00:00.000Z",
      "speedMbps": 200,
      "days": 7,
      "planName": "IPv6 Unlimited · 200 Mbps · 7 days",
      "trafficMetered": false,
      "expiresAt": "2026-10-27T09:00:00.000Z",
      "daysRemaining": 7,
      "channel": "api",
      "invoice": {
        "id": "inv_3b9e",
        "vat": 0,
        "vatRate": 0,
        "paid": true,
        "status": "PAID",
        "refunded": false
      }
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Invalid format. Must be one of: markdown, html, text (or data_format markdown/screenshot, format raw)"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "IPv6 speed plans need your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Job not found"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `503`:

```json
{
  "type": "error",
  "message": "IPv6 speed plans are not available through the API yet. Use the dashboard to buy them.",
  "payload": {
    "code": "PRODUCT_DISABLED"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Plans & orders

Buy proxy plans from the wallet balance and read your orders, so a script or an agent can go from API key to working proxies without the dashboard: `GET /public/plans` → `POST /public/purchase` → `POST /public/proxies/generate` with the order id (step by step in the guide Buy and use proxies via the API). Purchases are paid from the balance only, with 0% VAT; the balance is topped up in the dashboard. The plans listed here have a fixed size (GB and days). Products you configure at checkout, such as ISP proxies or unlimited-bandwidth plans, are bought in the dashboard, and Premium ISP has its own endpoints (see Premium ISP). Buying a plan again creates a separate order with new credentials: adding GB to an existing plan or renewing it is done in the dashboard.

#### List the plans you can buy

`GET /public/plans`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Active plans with their size, duration and list price (`amount`, USD), cheapest first, also grouped by `planType` in `groupedPlans`. `planTypes` describes every plan type the API knows, including types that have no plan on sale. Use a plan's `id` as `planId` in `POST /public/purchase`. Products you configure at checkout (ISP proxies, unlimited-bandwidth plans) are not listed: they are bought in the dashboard, Premium ISP through its own endpoints. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `planType` | query | string: `residentialbasic`, `residentialpremium`, `resiprivate`, `isp`, `isppremium`, `datacenter`, `datacentertraffic`, `ipv6`, `mobile`, `mobile_v2` | no | Only plans of this type. An unknown value returns an empty list. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/plans?planType=residentialpremium' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/plans?planType=residentialpremium',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/plans?planType=residentialpremium", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/plans?planType=residentialpremium');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Plans on sale.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Unexpected error; retry.

Example `200` response:

```json
{
  "type": "response",
  "message": "success",
  "payload": {
    "plans": [
      {
        "id": "pln_3e7a",
        "name": "Residential - Quark (5GB)",
        "planType": "residentialpremium",
        "planTypeName": "Residential Premium",
        "bandwidth": 5,
        "bandwidthGB": 5,
        "isUnlimited": false,
        "duration": 90,
        "durationDays": 90,
        "ips": 0,
        "whitelistSlots": 0,
        "region": "Global",
        "speed": 0,
        "highConcurrency": false,
        "highPriority": false
      }
    ],
    "groupedPlans": {
      "residentialpremium": [
        {
          "id": "pln_3e7a",
          "name": "Residential - Quark (5GB)",
          "planType": "residentialpremium",
          "planTypeName": "Residential Premium",
          "bandwidth": 5,
          "bandwidthGB": 5,
          "isUnlimited": false,
          "duration": 90,
          "durationDays": 90,
          "ips": 0,
          "whitelistSlots": 0,
          "region": "Global",
          "speed": 0,
          "highConcurrency": false,
          "highPriority": false
        }
      ]
    },
    "planTypes": [
      {
        "key": "residentialpremium",
        "name": "Residential Premium",
        "description": "Residential premium proxies - Premium quality with high success rate",
        "features": [
          "Premium residential IPs",
          "Higher success rate",
          "Fast speeds",
          "Geo-targeting available"
        ]
      }
    ],
    "total": 1
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Internal server error"
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Buy a plan from the balance

`POST /public/purchase`

**Price:** No charge. The call itself is free; the plan costs its `amount` from `GET /public/plans` (less the coupon, if any), charged to the wallet balance in USD with 0% VAT.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Buys one plan from `GET /public/plans`, charges the wallet balance (0% VAT) and activates the plan in the same call. The answer carries the order, the invoice and the plan's credentials; pass `order.id` as `orderId` to `POST /public/proxies/generate`. The balance is checked before anything is created: a balance that does not cover the total answers 400 `Insufficient balance` and nothing is charged. If the plan cannot be activated after the charge, the amount goes back to the balance and the call answers 422 `NOT_DELIVERED_REFUNDED`: you have not been charged and can buy again. There is no idempotency key on this endpoint: do not resend a purchase that timed out, read `GET /public/orders` first. A coupon is valid once per account, on the brand that issued it. A payment that fails leaves an unpaid invoice; ten unpaid invoices in 24 hours block new purchases (429 `TOO_MANY_UNPAID_INVOICES`). Unknown body fields are refused. Requires your own API key.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `planId` | string | yes | `id` of a plan from `GET /public/plans`. |
| `coupon` | string | no | Coupon code (optional; empty string or null = none). |

Example:

```json
{
  "planId": "pln_3e7a"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/public/purchase' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"planId":"pln_3e7a"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/public/purchase',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "planId": "pln_3e7a"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/purchase", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "planId": "pln_3e7a"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/purchase');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'planId' => 'pln_3e7a'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Paid and active. Credentials in `payload.proxy`.
- `400` — Nothing was charged: invalid body (including a body that is not JSON), trial-only plan, invalid coupon, total below the minimum purchase, balance too low, balance payments switched off, or a payment that could not be confirmed.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `403` — Purchases need your own API key: keyless and pay-per-call access cannot spend a balance.
- `404` — No active plan with this `planId`.
- `409` — The plan was not activated and the automatic refund could not be confirmed. Do not buy again: contact support with the order and invoice ids.
- `422` — The plan could not be activated and the amount is back on your balance: you have not been charged. You can buy again.
- `429` — Ten or more unpaid invoices in the last 24 hours (`TOO_MANY_UNPAID_INVOICES`: pay or cancel one, or contact support), or the key rate limit (see TooManyRequests).
- `500` — Unexpected error. Check `GET /public/orders` before buying again.

Example `200` response:

```json
{
  "type": "response",
  "message": "success",
  "payload": {
    "order": {
      "id": "ord_8c21",
      "planId": "pln_3e7a",
      "planName": "Residential - Quark (5GB)",
      "createdAt": "2026-10-19T10:00:00.000Z"
    },
    "invoice": {
      "id": "inv_4b90",
      "vat": 0,
      "status": "PAID",
      "paid": true
    },
    "proxy": {
      "id": "prx_1",
      "orderId": "ord_8c21",
      "username": "user_8c21",
      "password": "p4ssw0rd",
      "proxyType": "RESIDENTIAL",
      "region": "",
      "bandwidth": 5,
      "bandwidthLeft": 5,
      "noOfIps": 0,
      "noOfWhitelistedIps": 1,
      "speed": 0,
      "autoRenewDays": 90,
      "highConcurrency": false,
      "highPriority": false,
      "autoRenew": false,
      "expiry": "2027-01-17T10:00:00.000Z",
      "autoRenewLastAt": null,
      "gbReclaimedAt": null,
      "createdAt": "2026-10-19T10:00:00.000Z",
      "updatedAt": "2026-10-19T10:00:00.000Z",
      "whitelist_ip": []
    }
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "validation error",
  "payload": [
    {
      "message": "\"planId\" is required",
      "path": [
        "planId"
      ],
      "type": "any.required",
      "context": {
        "label": "planId",
        "key": "planId"
      }
    }
  ]
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `403`:

```json
{
  "type": "error",
  "message": "Purchases need your own API key. Create one in the dashboard under API keys.",
  "payload": {
    "code": "KEY_REQUIRED"
  }
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "Plan not found or inactive"
}
```

Example `409`:

```json
{
  "type": "error",
  "message": "Proxy activation failed and the automatic refund could not be confirmed. Please contact support before purchasing again.",
  "payload": {
    "code": "PAYMENT_UNDER_REVIEW",
    "orderId": "ord_8c21",
    "invoiceId": "inv_4b90"
  }
}
```

Example `422`:

```json
{
  "type": "error",
  "message": "Proxy activation failed. You have not been charged — please try again or contact support.",
  "payload": {
    "code": "NOT_DELIVERED_REFUNDED",
    "refunded": true,
    "orderId": "ord_8c21",
    "invoiceId": "inv_4b90"
  }
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "You have too many unpaid invoices. Please pay at least one invoice or contact customer support to continue.",
  "payload": {
    "code": "TOO_MANY_UNPAID_INVOICES",
    "count": 10
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Internal server error"
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List your orders

`GET /public/orders`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Every order of the account, newest first, with the plan, the proxy credentials and the invoices: use it to find an order after a purchase that timed out, to check what was charged, or to get the `orderId` of an older plan. For the live state of a plan (bandwidth used, days left) use `GET /public/proxies`. Plans disabled by support are not listed. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  Default `50`. |
| `offset` | query | integer | no |  Default `0`. |
| `type` | query | string: `PROXY`, `TOPUP` | no | Only proxy plans (`PROXY`) or balance top-ups (`TOPUP`); omit for every order. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/orders' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/orders',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/orders", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/orders');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Orders.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Unexpected error (also a non-numeric `limit` or `offset`); retry.

Example `200` response:

```json
{
  "type": "response",
  "message": "success",
  "payload": {
    "orders": [
      {
        "id": "ord_8c21",
        "type": "PROXY",
        "createdAt": "2026-10-19T10:00:00.000Z",
        "plan": {
          "id": "pln_3e7a",
          "name": "Residential - Quark (5GB)",
          "planType": "residentialpremium",
          "planTypeName": "Residential Premium",
          "bandwidth": 5,
          "bandwidthGB": 5,
          "duration": 90,
          "ips": 0,
          "region": "Global"
        },
        "proxy": {
          "id": "prx_1",
          "username": "user_8c21",
          "password": "p4ssw0rd",
          "planType": "residentialpremium",
          "planTypeName": "Residential Premium",
          "bandwidth": 5,
          "bandwidthGB": 5,
          "bandwidthLeft": 3.2,
          "bandwidthLeftGB": 3.2,
          "isUnlimited": false,
          "expiry": "2027-01-17T10:00:00.000Z",
          "isActive": true,
          "ips": 0,
          "whitelistedIPs": [],
          "region": "Global"
        },
        "invoices": [
          {
            "id": "inv_4b90",
            "status": "PAID",
            "paid": true,
            "paidAt": "2026-10-19T10:00:01.000Z",
            "createdAt": "2026-10-19T10:00:00.000Z"
          }
        ]
      }
    ],
    "pagination": {
      "total": 1,
      "limit": 50,
      "offset": 0,
      "hasMore": false
    }
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Internal server error"
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Get the wallet balance

`GET /public/balance`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

The wallet balance in USD, the one `POST /public/purchase` and the Data API draw from, and the total spent on proxy plans. Read it before a purchase: a balance below the plan's `amount` answers 400 `Insufficient balance`. Top-ups are made in the dashboard. Free.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/balance' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/balance',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/balance", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/balance');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Balance.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — Unexpected error; retry.

Example `200` response:

```json
{
  "type": "response",
  "message": "success",
  "payload": {
    "balance": 42.5,
    "balanceUSD": 42.5,
    "totalSpent": 120,
    "totalSpentUSD": 120
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Internal server error"
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Proxy locations

The values `POST /public/proxies/generate` accepts as `country`, `state` (alias `region`), `city`, `isp` and `asn`. Which endpoint to read depends on the plan type:

| Plan type | Location values |
| --- | --- |
| `residentialpremium` | `GET /public/generator/residential-premium/targeting-options`: the whole tree (country, region, city, ISP) in one call |
| `mobile_v2` | `GET /public/generator/mobile/targeting-options`: the whole tree (country, region, city, carrier) in one call |
| `residentialbasic`, `datacentertraffic` | `GET /public/geo/countries`, `/geo/states`, `/geo/cities` and `/geo/asns`, one level per call (needs one of these plans on the account) |
| `ipv6` | `GET /public/geo/countries?planType=ipv6` |
| `datacenter` (static gateways) | `GET /public/generator/datacenter/targeting-options`: the gateway hosts and ports |

Locations follow the network and change over time: read them when you build a request instead of keeping a copy for months. All free.

#### List countries for a plan type

`GET /public/geo/countries`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Countries you can target with a plan type; send `code` as `country` to `POST /public/proxies/generate`. Residential Basic and traffic-based Datacenter return the live list of the network when the account has one of these plans, otherwise the general country list. Residential Premium and Mobile read the live tree, which also lists countries we added after testing them on our gateways (for example Guam, Puerto Rico, Kosovo and Jersey on Residential Premium; Montenegro and New Caledonia on Mobile): they take country targeting, and a region, city or ISP only where `GET /public/geo/states` or the tree lists one. IPv6 returns its own list, including `mix` (any country). ISP, Premium ISP and static-gateway Datacenter plans have their location fixed at purchase: for them this is the general country list, not a targeting option. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `planType` | query | string: `residentialbasic`, `residentialpremium`, `resiprivate`, `isp`, `isppremium`, `datacenter`, `datacentertraffic`, `ipv6`, `mobile`, `mobile_v2` | yes | Plan type whose countries you want. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/geo/countries?planType=residentialbasic' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/geo/countries?planType=residentialbasic',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/geo/countries?planType=residentialbasic", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/geo/countries?planType=residentialbasic');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Countries.
- `400` — Missing or unknown query parameter.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — The countries could not be read right now; retry.

Example `200` response:

```json
{
  "type": "response",
  "message": "success",
  "payload": {
    "countries": [
      {
        "code": "us",
        "name": "United States"
      },
      {
        "code": "de",
        "name": "Germany"
      }
    ],
    "planType": "residentialbasic"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "planType query parameter is required"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Failed to fetch countries. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List states or regions of a country

`GET /public/geo/states`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

States or regions of one country for a plan type; send `code` as `state` (alias `region`) to `POST /public/proxies/generate`. Available for Residential Basic and traffic-based Datacenter (live list, needs one of these plans on the account), Residential Premium and Mobile. Other plan types answer an empty list. For Residential Premium and Mobile V2 the targeting options return every level in one call. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `planType` | query | string: `residentialbasic`, `residentialpremium`, `resiprivate`, `isp`, `isppremium`, `datacenter`, `datacentertraffic`, `ipv6`, `mobile`, `mobile_v2` | yes | Plan type. |
| `country` | query | string | yes | Country code, either case. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/geo/states?planType=residentialpremium&country=AL' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/geo/states?planType=residentialpremium&country=AL',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/geo/states?planType=residentialpremium&country=AL", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/geo/states?planType=residentialpremium&country=AL');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — States.
- `400` — Missing or unknown query parameter.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Residential Basic / traffic-based Datacenter: the account has no plan of these types, so there is no location list to read.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — The states could not be read right now; retry.

Example `200` response:

```json
{
  "type": "response",
  "message": "success",
  "payload": {
    "states": [
      {
        "code": "durres",
        "state_code": "durres",
        "name": "Durres",
        "state": "Durres"
      }
    ],
    "country": "AL",
    "planType": "residentialpremium"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "planType query parameter is required"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "No active proxy plan found. Purchase a residential basic or datacenter traffic plan to use geo-targeting."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Failed to fetch states. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List cities of a country or state

`GET /public/geo/cities`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Cities of one country, optionally narrowed to a state, for a plan type; send the city as `city` to `POST /public/proxies/generate` (see `GeoCity` for which field). Residential Premium lists cities per state: pass `state`, or the list is empty. Residential Basic and traffic-based Datacenter need one of these plans on the account. Other plan types answer an empty list. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `planType` | query | string: `residentialbasic`, `residentialpremium`, `resiprivate`, `isp`, `isppremium`, `datacenter`, `datacentertraffic`, `ipv6`, `mobile`, `mobile_v2` | yes | Plan type. |
| `country` | query | string | yes | Country code, either case. |
| `state` | query | string | no | State `code` from `GET /public/geo/states` (Residential Basic also accepts the name). |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/geo/cities?planType=residentialpremium&country=AL&state=durres' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/geo/cities?planType=residentialpremium&country=AL&state=durres',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/geo/cities?planType=residentialpremium&country=AL&state=durres", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/geo/cities?planType=residentialpremium&country=AL&state=durres');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Cities.
- `400` — Missing or unknown query parameter.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Residential Basic / traffic-based Datacenter: the account has no plan of these types, so there is no location list to read.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — The cities could not be read right now; retry.

Example `200` response:

```json
{
  "type": "response",
  "message": "success",
  "payload": {
    "cities": [
      {
        "code": "durres",
        "name": "Durres"
      }
    ],
    "country": "AL",
    "state": "durres",
    "planType": "residentialpremium"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "planType query parameter is required"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "No active proxy plan found. Purchase a residential basic or datacenter traffic plan to use geo-targeting."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Failed to fetch cities. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### List ASNs for Residential Basic and Datacenter

`GET /public/geo/asns`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

Networks (autonomous systems) you can target with Residential Basic and traffic-based Datacenter plans, for one country or all of them; send `asn` as `asn` to `POST /public/proxies/generate` together with a `country` (ASN targeting needs a country). Needs one of these plans on the account. Other plan types answer 400. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `planType` | query | string: `residentialbasic`, `residentialpremium`, `resiprivate`, `isp`, `isppremium`, `datacenter`, `datacentertraffic`, `ipv6`, `mobile`, `mobile_v2` | yes | `residentialbasic` or `datacentertraffic`. |
| `country` | query | string | no | Country code; omit for every country. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/geo/asns?planType=residentialbasic&country=US' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/geo/asns?planType=residentialbasic&country=US',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/geo/asns?planType=residentialbasic&country=US", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/geo/asns?planType=residentialbasic&country=US');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — ASNs.
- `400` — Missing or unknown query parameter.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — The account has no Residential Basic or traffic-based Datacenter plan.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `500` — The ASNs could not be read right now; retry.

Example `200` response:

```json
{
  "type": "response",
  "message": "success",
  "payload": {
    "asns": [
      {
        "asn": "7922",
        "name": "Comcast Cable Communications, LLC"
      }
    ],
    "country": "US",
    "planType": "residentialbasic"
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "planType query parameter is required"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "type": "error",
  "message": "No active plan found for this plan type. Purchase a residential basic or datacenter (traffic-based) plan."
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Failed to fetch ASNs. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Residential Premium location tree (geo)

`GET /public/geo/locations`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

The whole Residential Premium location tree in one call: countries, regions, cities and the ISPs available at each level. The tree keys are the `country`, `state` and `city` values and `isps[].code` the `isp` value of `POST /public/proxies/generate`; `countries` is the flat country list. The tree also carries countries we added after testing them on our gateways (Guam, Puerto Rico, Kosovo, Jersey and others): most of them have no regions, so they take country targeting only. When the tree cannot be read the call still answers 200, with `success: false` and an empty `data`: retry. Same answer as `GET /public/generator/residential-premium/targeting-options`. Free.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `planType` | query | string: `residentialpremium` | no | Optional; only `residentialpremium` is accepted. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/geo/locations' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/geo/locations',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/geo/locations", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/geo/locations');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Location tree.
- `400` — `planType` other than `residentialpremium`.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.

Example `200` response:

```json
{
  "type": "response",
  "message": "Location data retrieved successfully",
  "payload": {
    "success": true,
    "message": "Location data retrieved successfully",
    "data": {
      "al": {
        "country_name": "Albania",
        "regions": {
          "durres": {
            "region_name": "Durres",
            "cities": {
              "durres": {
                "city_name": "Durres",
                "isps": [
                  {
                    "code": "abissnet_sh.a.",
                    "name": "Abissnet Sh.A."
                  }
                ]
              }
            }
          }
        }
      }
    },
    "countries": [
      {
        "code": "al",
        "name": "Albania"
      }
    ]
  },
  "pagination": {}
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "Only planType=residentialpremium is supported for locations"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Residential Premium targeting options

`GET /public/generator/residential-premium/targeting-options`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

The whole Residential Premium location tree in one call: countries, regions, cities and the ISPs available at each level. The tree keys are the `country`, `state` and `city` values and `isps[].code` the `isp` value of `POST /public/proxies/generate`; `countries` is the flat country list. The tree also carries countries we added after testing them on our gateways (Guam, Puerto Rico, Kosovo, Jersey and others): most of them have no regions, so they take country targeting only. When the tree cannot be read the call still answers 200, with `success: false` and an empty `data`: retry. The MCP tool `proxy_locations` reads it. Free.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/generator/residential-premium/targeting-options' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/generator/residential-premium/targeting-options',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/generator/residential-premium/targeting-options", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/generator/residential-premium/targeting-options');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Location tree.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.

Example `200` response:

```json
{
  "type": "response",
  "message": "Location data retrieved successfully",
  "payload": {
    "success": true,
    "message": "Location data retrieved successfully",
    "data": {
      "al": {
        "country_name": "Albania",
        "regions": {
          "durres": {
            "region_name": "Durres",
            "cities": {
              "durres": {
                "city_name": "Durres",
                "isps": [
                  {
                    "code": "abissnet_sh.a.",
                    "name": "Abissnet Sh.A."
                  }
                ]
              }
            }
          }
        }
      }
    },
    "countries": [
      {
        "code": "al",
        "name": "Albania"
      }
    ]
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Mobile targeting options

`GET /public/generator/mobile/targeting-options`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

The whole Mobile location tree in one call: countries, regions, cities and the carriers available in each city. The tree keys are the `country`, `state` (alias `region`) and `city` values and `isps[].code` the `isp` value of `POST /public/proxies/generate` for Mobile V2 plans (`planType: mobile_v2`); the same values serve the Mobile V2 whitelist options. A country without carriers in the tree is targeted at country, region or city level. The MCP tool `proxy_locations` reads it. Free.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/generator/mobile/targeting-options' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/generator/mobile/targeting-options',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/generator/mobile/targeting-options", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/generator/mobile/targeting-options');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Location tree.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.
- `502` — The tree could not be read right now; retry.

Example `200` response:

```json
{
  "type": "response",
  "message": "Mobile targeting options retrieved successfully",
  "payload": {
    "success": true,
    "message": "Use the tree keys as values for POST /api/v1/public/proxies/generate: country (top-level key), region (regions key), city (cities key), isp (isps[].code).",
    "data": {
      "us": {
        "country_name": "United States",
        "regions": {
          "ohio": {
            "region_name": "Ohio",
            "cities": {
              "cincinnati": {
                "city_name": "Cincinnati",
                "zipcodes": [],
                "isps": [
                  {
                    "code": "t_mobile_usa",
                    "name": "T-Mobile Usa"
                  },
                  {
                    "code": "verizon_wireless",
                    "name": "Verizon Wireless"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "countries": [
      {
        "code": "us",
        "name": "United States"
      }
    ]
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Example `502`:

```json
{
  "type": "error",
  "message": "Could not retrieve mobile targeting options. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Datacenter gateway locations

`GET /public/generator/datacenter/targeting-options`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/proxies.md)

The gateways of the static-gateway Datacenter plans (`planType: datacenter`): one host per country with its HTTP and SOCKS5 port. `POST /public/proxies/generate` returns one line per gateway for these plans; with the plan's username and password you can also build the lines yourself (`username:password@host:port`). Traffic-based Datacenter plans (`datacentertraffic`) are targeted by country, state, city and ASN instead: see `GET /public/geo/countries`. The MCP tool `proxy_locations` reads it. Free.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/public/generator/datacenter/targeting-options' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/public/generator/datacenter/targeting-options',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/public/generator/datacenter/targeting-options", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/public/generator/datacenter/targeting-options');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Gateways.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.

Example `200` response:

```json
{
  "type": "response",
  "message": "Datacenter (static gateways) targeting options retrieved successfully",
  "payload": {
    "success": true,
    "message": "Available locations for Datacenter (static gateways) plans. Use host + portHttp (9999) or portSocks5 (10000) with your proxy credentials.",
    "locations": [
      {
        "code": "us",
        "name": "United States",
        "host": "datacenter-us.quanticdata.io",
        "portHttp": 9999,
        "portSocks5": 10000
      },
      {
        "code": "ca",
        "name": "Canada",
        "host": "datacenter-ca.quanticdata.io",
        "portHttp": 9999,
        "portSocks5": 10000
      },
      {
        "code": "de",
        "name": "Germany",
        "host": "datacenter-de.quanticdata.io",
        "portHttp": 9999,
        "portSocks5": 10000
      },
      {
        "code": "gb",
        "name": "United Kingdom",
        "host": "datacenter-gb.quanticdata.io",
        "portHttp": 9999,
        "portSocks5": 10000
      },
      {
        "code": "nl",
        "name": "Netherlands",
        "host": "datacenter-nl.quanticdata.io",
        "portHttp": 9999,
        "portSocks5": 10000
      }
    ]
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

## Account

Markdown for this group only: https://quanticdata.io/docs/account.md

### Account

Usage, billing status and platform settings.

#### Per-day usage and cost

`GET /scraper/usage`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

Request counts (total and per query type), proxy bandwidth, AI token cost and billed vs free-tier spend per UTC day for the calling key's account, read from the daily aggregation. Free; not subject to the Data API kill switch.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `days` | query | integer | no |  Default `30`. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/usage' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/usage',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/usage", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/usage');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Usage report.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.

Example `200` response:

```json
{
  "type": "response",
  "message": "Scraper usage",
  "payload": {
    "days": [
      {
        "date": "2026-10-06",
        "requests": 143,
        "by_type": {
          "extract": 120,
          "google": 20,
          "map": 3
        },
        "proxy_kb": 61230,
        "ai_cost_usd": 0,
        "billed_usd": 0,
        "free_usd": 0.0375
      }
    ],
    "totals": {
      "requests": 143,
      "by_type": {
        "extract": 120,
        "google": 20,
        "map": 3
      },
      "proxy_kb": 61230,
      "billed_usd": 0,
      "free_usd": 0.0375
    },
    "period_days": 30
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Billing status and your price list

`GET /scraper/billing`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

Current price list with your tier's discount applied (keyed like pricing.json), monthly free allowance and what is left of it, wallet balance, active tier, billing mode and the per-minute limits each mode carries. Lets a client or an agent budget its calls without a dashboard round-trip. Free; not subject to the Data API kill switch.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/scraper/billing' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/scraper/billing',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/scraper/billing", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/scraper/billing');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Billing status.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — Key rate limit (hourly window), plan per-minute budget, browser-render concurrency, or pool capacity. Back off on Retry-After.

Example `200` response:

```json
{
  "type": "response",
  "message": "Billing status",
  "payload": {
    "billing_enabled": true,
    "billed": true,
    "balance": 12.5,
    "tier": {
      "key": "payg",
      "name": "Pay as you go",
      "discount_pct": 0,
      "rate_limit_per_min": 20
    },
    "billing_mode": {
      "preference": "free_first",
      "effective": "free_first",
      "available": true,
      "free_first_rate_limit_per_min": 20,
      "balance_rate_limit_per_min": 300,
      "effective_rate_limit_per_min": 20
    },
    "free_monthly_usd": 2,
    "free_remaining_usd": 1.62,
    "ai_token_markup": 2,
    "prices_usd": {
      "extract": 0.0015,
      "extract_render": 0.0025,
      "serp": 0.0009,
      "serp_render": 0.002,
      "map": 0.003,
      "seo_audit": 0.003,
      "crawl_page": 0.0003,
      "batch_url": 0.0004,
      "collector_result": 0.002
    }
  },
  "pagination": {}
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Rate limit exceeded. Resets in 23 minutes.",
  "payload": {
    "rateLimit": 1200,
    "requestCount": 1200,
    "resetAt": "2026-10-07T15:00:00.000Z"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### No-key MCP trial settings

`GET /mcp/trial-config`

**Price:** No charge.  
**Rate limit:** No rate limit.  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

What the keyless trial of the hosted MCP endpoint allows right now for a brand: whether it is on, calls per client address per UTC day, calls across all addresses per day, and which tools it may run. Read by the hosted MCP servers once a minute; nothing secret in it, so it needs no API key and is cacheable for 60 s. The brand comes from `?brand=` or, failing that, from the request host.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `brand` | query | string: `QP`, `QD` | no | QP = QuantumProxies, QD = QuanticData. Defaults to the brand of the host you call. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/mcp/trial-config'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/mcp/trial-config',
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/mcp/trial-config", {
  method: "GET"
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/mcp/trial-config');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Trial settings.

Example `200` response:

```json
{
  "type": "response",
  "message": "ok",
  "payload": {
    "brand": "QD",
    "enabled": true,
    "perIpPerDay": 5,
    "perDay": 300,
    "tools": [
      "scrape",
      "search",
      "search_and_read",
      "map",
      "seo_audit",
      "list_collectors",
      "collector_run_status",
      "proxy_locations"
    ]
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

### Agents

Endpoints for an AI agent acting for a person: self-registration with a verified email (no browser, no password, no captcha; the person only reads a 6-digit code from their mailbox) and a checkout in the Universal Commerce Protocol (UCP) shape to buy a proxy plan, paid from the account balance by the agent or finished by the person on the dashboard. Discovery documents: `agent_auth` in `https://app.quanticdata.io/.well-known/oauth-authorization-server`, the UCP profile at `https://api.quanticdata.io/.well-known/ucp` (also on the dashboard host and the site), and the plain-text guide at `https://quanticdata.io/auth.md`. Registration and claim answer OAuth-style JSON (`error`, `error_description`), not the Data API envelope; the checkout answers UCP documents.

**How an agent pays a top-up without a human (MPP, Stripe).** Every call made with an API key that answers 402 `INSUFFICIENT_FUNDS` (free allowance plus balance below the call's worst-case estimate) also carries a payment challenge in the HTTP Payment authentication scheme (paymentauth.org drafts draft-httpauth-payment-01 and draft-stripe-charge-00; method `stripe`, intent `charge`). The payment buys credit on the account balance, never the single call: no price changes, and the call is then billed from the balance at list price like any other.

1. The 402 carries `WWW-Authenticate: Payment id="…", realm="api.quanticdata.io", method="stripe", intent="charge", request="<base64url JSON {amount, currency:"usd", decimals:2, methodDetails:{networkId, paymentMethodTypes}}>", expires="<RFC 3339>", description="…", opaque="…"`. `amount` is in cents and already includes 22% VAT (a $5.00 credit reads `"610"`). The body is the usual error envelope with `estimated_cost`, `balance` and `free_remaining`.
2. The credit offered is the call's shortfall rounded up to the cent, never below $0.50 and never above $1,000 per request. Above $1,000 the challenge offers $1,000 and the envelope also carries `escalation`: the agent asks for a higher limit at `POST /agent/contact`.
3. The agent obtains a Stripe Shared Payment Token (`spt_…`) for that amount from its payment provider and repeats the same request with `Authorization: Payment <credential>` (or `Payment-Authorization: Payment <credential>`), where `<credential>` is base64url JSON `{"challenge": {…the challenge parameters, id to opaque, unchanged…}, "payload": {"spt": "spt_…"}}`. The challenge is valid 5 minutes and single use.
4. QuanticData charges the token at once, credits the balance, writes a numbered top-up invoice (the credit as taxable amount, 22% VAT, total = the amount charged) and emails it to the account, then runs the call from the balance. The response, whatever the call's own status, carries `Payment-Receipt` (base64url JSON `{status:"success", method:"stripe", reference:"pi_…", timestamp}`), `X-MPP-Credited` (credit added, in cents) and `X-MPP-Invoice` (the invoice id). The credit stays on the balance even if the call itself fails: a failed call is not billed.
5. If the credit cannot be added after the charge, the payment is refunded in full. Payment errors come back as `application/problem+json` (`type` under `https://paymentauth.org/problems/`): 402 `payment-expired` and `verification-failed` (a declined token) with a fresh challenge to pay, `malformed-credential`, `invalid-payload` and `invalid-challenge` (repeat the request with the API key to get a new challenge), `payment-action-required` (the token needs a step an agent cannot do); 403 `invalid-challenge` for a credential already used; 429 `mpp_limit` with `Retry-After` beyond 30 payments a minute or 2,000 a day per account, or 60 a minute per IP.

No challenge without an API key (there is no account to credit), none on `BUDGET_REACHED` (the monthly spend cap the person set: a top-up would not lift it) and none on a plan purchase's `INSUFFICIENT_BALANCE`, where the checkout's `continue_url` remains the way. The person sees every top-up, invoice and ledger row on the dashboard and can revoke the key at any time.

**When a 402 carries `escalation`.** `POST /agent/contact` (same API key) reaches the team when a 402 carries `escalation` (credit above the top-up limit, monthly budget cap reached) or when the person wants an enterprise plan or a dataset; the team answers that person by email, nothing is charged.

#### Register an agent with a verified email (step 1 of 2)

`POST /agent/auth`

**Price:** No charge.  
**Rate limit:** Per IP: 5 registrations an hour, 20 a day. Per email: 3 codes an hour. Per registrable email domain: 10 a day. A global daily cap across both brands. Exceeded limits answer 429 `rate_limited` with `Retry-After`.  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

Starts the registration of an account for the person the agent works for (the `register_uri` of the `agent_auth` block in the OAuth metadata). The agent sends that person's email address; QuanticData emails them a 6-digit code (subject "… is your QuanticData verification code — an AI agent asked to register"); the person reads it to the agent; the agent exchanges it at `POST /agent/auth/claim` for an API key. No password, no browser, no captcha. Tell the user which service you are registering with before calling. The answer is the same `pending` document whether or not an account already exists for that email: the code goes to the mailbox owner, and a confirmed claim adds a key to the existing account instead of opening a new one. The code lives 10 minutes; 5 wrong codes cancel the registration; at most 3 codes per email per hour. Not offered: anonymous registration (400 `anonymous_not_enabled`) and identity assertions (ID-JAG, 400). Temporary or unreachable mailboxes answer 422 `invalid_email`. A registration that the risk checks want a person to finish answers 428 `human_verification_required` with `register_human`: ask the user to register in the browser and hand you a key from the API keys page. When the switch is off the endpoint answers 503 `agent_registration_disabled`. Also served at `https://app.quanticdata.io/api/v1/agent/auth`. Errors are OAuth-style JSON (`error`, `error_description`), not the Data API envelope. No API key: this call creates one.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `method` | string: `verified_email` | no | The only method offered. `{"type": "service_auth", "login_hint": "…"}` is accepted as an alias of `{"method": "verified_email", "email": "…"}`. Default `"verified_email"`. |
| `email` | string (email) | yes | The person's permanent email address: it receives the code, and later invoices and API alerts. |
| `agent` | object | no | Who is registering (optional). Shown in the verification email and in the key's name on the dashboard. |
| `agent.name` | string | no | Printable characters only; trimmed to a short label. |
| `agent.url` | string (uri) | no | http(s) URL of the agent or its operator. |

Example:

```json
{
  "method": "verified_email",
  "email": "user@example.com",
  "agent": {
    "name": "Research agent",
    "url": "https://example.com/agent"
  }
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/agent/auth' \
  -H 'Content-Type: application/json' \
  -d '{"method":"verified_email","email":"user@example.com","agent":{"name":"Research agent","url":"https://example.com/agent"}}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/agent/auth',
    json={
        "method": "verified_email",
        "email": "user@example.com",
        "agent": {
            "name": "Research agent",
            "url": "https://example.com/agent"
        }
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/agent/auth", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "method": "verified_email",
    "email": "user@example.com",
    "agent": {
      "name": "Research agent",
      "url": "https://example.com/agent"
    }
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/agent/auth');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'method' => 'verified_email',
    'email' => 'user@example.com',
    'agent' => [
      'name' => 'Research agent',
      'url' => 'https://example.com/agent'
    ]
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Code sent. Ask the user for the 6 digits, then call `claim_uri`.
- `400` — Missing or invalid field, or a method that is not offered (`anonymous_not_enabled`, identity assertions).
- `422` — Temporary or unreachable mailbox.
- `428` — A person has to finish this registration in the browser.
- `429` — A cap was reached; wait `retry_after` seconds.
- `503` — Agent registration is switched off (`agent_registration_disabled`), or the code email could not be sent right now (`temporarily_unavailable`).

Example `200` response:

```json
{
  "status": "pending",
  "registration_type": "verified_email",
  "claim_uri": "https://app.quanticdata.io/api/v1/agent/auth/claim",
  "expires_in": 600,
  "interval": 0,
  "message": "A 6-digit verification code was emailed to user@example.com. Ask your user for it, then POST {\"email\": \"user@example.com\", \"code\": \"<6 digits>\"} to claim_uri. The API key is returned once, in that response."
}
```

Example `400`:

```json
{
  "error": "anonymous_not_enabled",
  "error_description": "Anonymous registration is not offered: register with a verified email (method \"verified_email\").",
  "auth_md": "https://quanticdata.io/auth.md"
}
```

Example `422`:

```json
{
  "error": "invalid_email",
  "error_description": "Temporary or unreachable mailboxes are not accepted. Register with a permanent email address that can receive invoices and API alerts.",
  "register_human": "https://app.quanticdata.io/register"
}
```

Example `428`:

```json
{
  "error": "human_verification_required",
  "error_description": "This registration needs a person to complete it. Ask your user to open register_human, create the account and an API key in the dashboard, then give you the key.",
  "register_human": "https://app.quanticdata.io/register",
  "auth_md": "https://quanticdata.io/auth.md"
}
```

Example `429`:

```json
{
  "error": "rate_limited",
  "error_description": "Too many agent registrations from this address. Retry after 3600 seconds.",
  "retry_after": 3600
}
```

Example `503`:

```json
{
  "error": "agent_registration_disabled",
  "error_description": "Automated agent registration is switched off right now. A person can register at register_human and create an API key in the dashboard.",
  "register_human": "https://app.quanticdata.io/register",
  "auth_md": "https://quanticdata.io/auth.md"
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Exchange the emailed code for an API key (step 2 of 2)

`POST /agent/auth/claim`

**Price:** No charge.  
**Rate limit:** 30 claim attempts per IP an hour (429 `rate_limited` with `Retry-After`); 5 wrong codes per registration.  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

The `claim_uri` of the `agent_auth` block. With the right code the pending registration is consumed before anything is created, so two concurrent claims yield one key. A new account is born verified, on the standard pay-as-you-go tier, with a random password nobody knows: the person signs in to the dashboard through the password reset link. An existing account simply gets a new key. The key is returned once in this response and is never emailed; the person can see, rotate or revoke it on the API keys page. Codes: 6 digits, spaces and dashes ignored (`user_code` accepted as an alias of `code`). A wrong code answers 400 `invalid_code` with `attempts_remaining`; the fifth wrong code cancels the registration (429 `too_many_attempts`); no pending registration, an expired code or a second claim answers 410 `claim_expired`: start again at `POST /agent/auth`. Also served at `https://app.quanticdata.io/api/v1/agent/auth/claim`. OAuth-style error bodies.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string (email) | yes | The same address as in step 1. |
| `code` | string | yes | The 6 digits from the email. |

Example:

```json
{
  "email": "user@example.com",
  "code": "482913"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/agent/auth/claim' \
  -H 'Content-Type: application/json' \
  -d '{"email":"user@example.com","code":"482913"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/agent/auth/claim',
    json={
        "email": "user@example.com",
        "code": "482913"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/agent/auth/claim", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "email": "user@example.com",
    "code": "482913"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/agent/auth/claim');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'email' => 'user@example.com',
    'code' => '482913'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The API key, once.
- `400` — Wrong code (`invalid_code`, with the attempts left) or a malformed body (`invalid_request`).
- `410` — No pending registration for this email, the code expired, or the registration was already claimed.
- `429` — Fifth wrong code (`too_many_attempts`, the registration is cancelled) or too many claims from this IP (`rate_limited`).
- `503` — Agent registration is switched off.

Example `200` response:

```json
{
  "credential_type": "api_key",
  "api_key": "qd_live_0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "key_prefix": "qd_live_0123",
  "account_status": "created",
  "email": "user@example.com",
  "usage": {
    "header": "Authorization: Bearer <api_key>",
    "api_base": "https://api.quanticdata.io/v1"
  },
  "docs": "https://quanticdata.io/docs/",
  "auth_md": "https://quanticdata.io/auth.md",
  "note": "This key is shown once and is not sent by email. Store it in an environment variable. Your user can see, rotate or revoke it from the dashboard (API keys page)."
}
```

Example `400`:

```json
{
  "error": "invalid_code",
  "error_description": "Wrong verification code.",
  "attempts_remaining": 4
}
```

Example `410`:

```json
{
  "error": "claim_expired",
  "error_description": "No pending registration for this email, or the code expired. Start again at register_uri.",
  "register_uri": "https://app.quanticdata.io/api/v1/agent/auth"
}
```

Example `429`:

```json
{
  "error": "too_many_attempts",
  "error_description": "Too many wrong codes: this registration was cancelled. Start again at register_uri.",
  "register_uri": "https://app.quanticdata.io/api/v1/agent/auth"
}
```

Example `503`:

```json
{
  "error": "agent_registration_disabled",
  "error_description": "Automated agent registration is switched off right now. A person can register at register_human and create an API key in the dashboard.",
  "register_human": "https://app.quanticdata.io/register",
  "auth_md": "https://quanticdata.io/auth.md"
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### UCP discovery profile

`GET /agent/ucp`

**Price:** No charge.  
**Rate limit:** No rate limit.  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

The Universal Commerce Protocol profile of QuanticData (ucp.dev, version 2026-08-25): the `dev.ucp.shopping` service with its REST endpoint, the `dev.ucp.shopping.checkout` capability, and the one payment handler an agent can use by itself, the prepaid account balance (`balance`). The same document is served at `https://api.quanticdata.io/.well-known/ucp`, `https://app.quanticdata.io/.well-known/ucp` and `https://quanticdata.io/.well-known/ucp`, with `Cache-Control: public`. The flat aliases at the root (`protocol_version`, `services`, `capabilities`, `endpoints`) repeat the `ucp` block for scanners that read them there. No key needed.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/agent/ucp'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/agent/ucp',
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/agent/ucp", {
  method: "GET"
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/agent/ucp');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The profile.

Example `200` response:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "services": {
      "dev.ucp.shopping": [
        {
          "version": "2026-08-25",
          "spec": "https://ucp.dev/2026-08-25/specification/overview/",
          "schema": "https://ucp.dev/2026-08-25/services/shopping/rest.openapi.json",
          "transport": "rest",
          "endpoint": "https://api.quanticdata.io/v1/agent/ucp"
        }
      ]
    },
    "capabilities": {
      "dev.ucp.shopping.checkout": [
        {
          "version": "2026-08-25",
          "spec": "https://ucp.dev/2026-08-25/specification/shopping/checkout/",
          "schema": "https://ucp.dev/2026-08-25/schemas/shopping/checkout.json"
        }
      ]
    },
    "payment_handlers": {
      "io.quanticdata.io.balance": [
        {
          "id": "balance",
          "version": "2026-10-08",
          "schema": "https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json",
          "available_instruments": [
            {
              "type": "account_balance",
              "currency": "USD"
            }
          ]
        }
      ]
    }
  },
  "keys": [],
  "endpoints": {
    "checkout_sessions": "https://api.quanticdata.io/v1/agent/ucp/checkout-sessions",
    "openapi": "https://api.quanticdata.io/openapi.json",
    "catalog": "https://api.quanticdata.io/v1/public/plans",
    "docs": "https://quanticdata.io/docs/"
  }
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### JSON Schema of the balance payment instrument

`GET /agent/ucp/handlers/balance.json`

**Price:** No charge.  
**Rate limit:** No rate limit.  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

The instrument an agent passes to complete a checkout from the account balance: `{"handler_id": "balance", "type": "account_balance"}`. No credential travels with it, the API key of the request is the authorization. Linked from the UCP profile. No key needed.

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json',
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json", {
  method: "GET"
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — JSON Schema (draft 2020-12).

Example `200` response:

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json",
  "title": "QuanticData account balance payment instrument",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "handler_id": {
      "type": "string",
      "const": "balance"
    },
    "type": {
      "type": "string",
      "const": "account_balance"
    },
    "selected": {
      "type": "boolean"
    }
  },
  "required": [
    "handler_id",
    "type"
  ]
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Create a checkout session for one plan

`POST /agent/ucp/checkout-sessions`

**Price:** No charge. Creating a session is free; the plan costs its `amount` from `GET /public/plans`, charged only when the session is completed.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

Create Checkout of the UCP REST binding. The agent names one public plan (`line_items[0].item.id` from `GET /public/plans`, quantity 1) and gets back the real price: list price from the catalog, VAT by the same rule as the human checkout (0% for `BALANCE` and `NOWPAYMENTS`, 22% for `PAYPAL` and `PAYPAL_CARD`). The declared `payment_method` only decides the VAT in the quote. Status on creation: `ready_for_complete` when the method is `BALANCE` and the balance covers the total (complete it with `POST /agent/ucp/checkout-sessions/{id}/complete`), otherwise `requires_escalation` with a `continue_url` where the person pays on the dashboard; poll `GET /agent/ucp/checkout-sessions/{id}` until `completed`. A session expires after 6 hours. ISP plans are configured per order and are not sold here (400 `plan_not_sellable_here`: use the dashboard or the Premium ISP and IPv6 endpoints); trial-only and custom plans are not public (404 `plan_not_found`). Send an `Idempotency-Key` header (8–128 letters, digits, `_ . : -`) to make retries safe: the same key answers 200 with the session already created. The plainer alternative without the UCP shape is `POST /public/purchase`. Authentication: the API key of the buying account, as `Authorization: Bearer` or `X-API-Key`. Errors are UCP documents.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | no | Optional. 8–128 characters among letters, digits, `_`, `.`, `:` and `-`. The same key from the same account answers 200 with the existing session instead of creating another. |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `line_items` | array of object | yes |  |
| `line_items[].item` | object | yes |  |
| `line_items[].quantity` | integer | no |  Default `1`. |
| `buyer` | object | no |  |
| `buyer.email` | string (email) | no | Optional, echoed in the document. |
| `payment_method` | string: `BALANCE`, `NOWPAYMENTS`, `PAYPAL`, `PAYPAL_CARD` | no | What the quote assumes. `BALANCE` is the only one the agent can complete; the others are paid by a person at `continue_url`. Default `"BALANCE"`. |

Example:

```json
{
  "line_items": [
    {
      "item": {
        "id": "pln_3e7a"
      },
      "quantity": 1
    }
  ],
  "buyer": {
    "email": "user@example.com"
  },
  "payment_method": "BALANCE"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/agent/ucp/checkout-sessions' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"line_items":[{"item":{"id":"pln_3e7a"},"quantity":1}],"buyer":{"email":"user@example.com"},"payment_method":"BALANCE"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/agent/ucp/checkout-sessions',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "line_items": [
            {
                "item": {
                    "id": "pln_3e7a"
                },
                "quantity": 1
            }
        ],
        "buyer": {
            "email": "user@example.com"
        },
        "payment_method": "BALANCE"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/agent/ucp/checkout-sessions", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "line_items": [
      {
        "item": {
          "id": "pln_3e7a"
        },
        "quantity": 1
      }
    ],
    "buyer": {
      "email": "user@example.com"
    },
    "payment_method": "BALANCE"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/agent/ucp/checkout-sessions');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'line_items' => [[
      'item' => [
        'id' => 'pln_3e7a'
      ],
      'quantity' => 1
    ]],
    'buyer' => [
      'email' => 'user@example.com'
    ],
    'payment_method' => 'BALANCE'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — Replay of an `Idempotency-Key` already used: the existing session.
- `201` — Session created.
- `400` — Malformed request: `invalid_json`, `one_item_only`, `invalid_item`, `quantity_not_supported`, `invalid_payment_method`, `plan_not_sellable_here` (ISP plans).
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — No public plan with that id.
- `503` — The checkout store is not available on this host (`not_provisioned`).

Example `200` response:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "success",
    "capabilities": {
      "dev.ucp.shopping.checkout": [
        {
          "version": "2026-08-25",
          "spec": "https://ucp.dev/2026-08-25/specification/shopping/checkout/",
          "schema": "https://ucp.dev/2026-08-25/schemas/shopping/checkout.json"
        }
      ]
    },
    "payment_handlers": {
      "io.quanticdata.io.balance": [
        {
          "id": "balance",
          "version": "2026-10-08",
          "spec": "https://quanticdata.io/docs/#section/Agent-checkout-(UCP)",
          "schema": "https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json",
          "available_instruments": [
            {
              "type": "account_balance",
              "currency": "USD"
            }
          ]
        }
      ]
    }
  },
  "id": "chk_7d3f0a9b2c4e1f6a8b9c0d1e",
  "status": "ready_for_complete",
  "currency": "USD",
  "expires_at": "2026-10-26T18:00:00.000Z",
  "line_items": [
    {
      "id": "li_pln_3e7a",
      "item": {
        "id": "pln_3e7a",
        "title": "Residential - Quark (5GB)",
        "price": 1200
      },
      "quantity": 1,
      "totals": [
        {
          "type": "subtotal",
          "amount": 1200
        },
        {
          "type": "total",
          "amount": 1200
        }
      ]
    }
  ],
  "totals": [
    {
      "type": "subtotal",
      "amount": 1200
    },
    {
      "type": "total",
      "amount": 1200
    }
  ],
  "payment": {
    "instruments": [
      {
        "id": "balance",
        "handler_id": "balance",
        "type": "account_balance",
        "selected": true
      }
    ],
    "declared_method": "BALANCE"
  },
  "continue_url": "https://app.quanticdata.io/plans?network=RESIDENTIAL&utm_source=agent&utm_medium=ucp&utm_campaign=checkout-session&agent_checkout=chk_7d3f0a9b2c4e1f6a8b9c0d1e",
  "links": [
    {
      "type": "privacy_policy",
      "url": "https://quanticdata.io/privacy"
    },
    {
      "type": "terms_of_service",
      "url": "https://quanticdata.io/terms"
    }
  ],
  "messages": [
    {
      "type": "info",
      "code": "balance_available",
      "content": "The account balance covers this checkout. Complete it with POST /checkout-sessions/chk_7d3f0a9b2c4e1f6a8b9c0d1e/complete and payment.instruments[0].handler_id = \"balance\" (0% VAT)."
    },
    {
      "type": "info",
      "code": "vat_rule",
      "content": "Totals carry 0% VAT (balance or crypto). Paying by card or PayPal on the dashboard adds 22% VAT."
    }
  ],
  "created_at": "2026-10-26T12:00:00.000Z",
  "updated_at": "2026-10-26T12:00:00.000Z"
}
```

Example `400`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "plan_not_sellable_here",
      "content": "ISP plans are configured per order (IPs, region, days): buy them on the dashboard.",
      "severity": "fatal",
      "path": "$.line_items[0].item.id"
    }
  ]
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "plan_not_found",
      "content": "No public plan with that id.",
      "severity": "fatal",
      "path": "$.line_items[0].item.id"
    }
  ]
}
```

Example `503`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "not_provisioned",
      "content": "Agent checkout sessions are not provisioned on this host yet.",
      "severity": "fatal"
    }
  ]
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Read a checkout session

`GET /agent/ucp/checkout-sessions/{id}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

Get Checkout. Reading refreshes the state: if the person has paid that plan on the dashboard since the session was created, the session becomes `completed` with the `order`; if the 6 hours have passed, it becomes `canceled`. Poll this after handing `continue_url` to the person. Authentication: the API key of the buying account, as `Authorization: Bearer` or `X-API-Key`.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Session id (`chk_` + 24 hex). A session of another account answers 404. |

##### Examples

**curl**

```bash
curl -X GET 'https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.get(
    'https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID", {
  method: "GET",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The session document.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown session, or not this account's.

Example `200` response:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "success",
    "capabilities": {
      "dev.ucp.shopping.checkout": [
        {
          "version": "2026-08-25",
          "spec": "https://ucp.dev/2026-08-25/specification/shopping/checkout/",
          "schema": "https://ucp.dev/2026-08-25/schemas/shopping/checkout.json"
        }
      ]
    },
    "payment_handlers": {
      "io.quanticdata.io.balance": [
        {
          "id": "balance",
          "version": "2026-10-08",
          "spec": "https://quanticdata.io/docs/#section/Agent-checkout-(UCP)",
          "schema": "https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json",
          "available_instruments": [
            {
              "type": "account_balance",
              "currency": "USD"
            }
          ]
        }
      ]
    }
  },
  "id": "chk_7d3f0a9b2c4e1f6a8b9c0d1e",
  "status": "ready_for_complete",
  "currency": "USD",
  "expires_at": "2026-10-26T18:00:00.000Z",
  "line_items": [
    {
      "id": "li_pln_3e7a",
      "item": {
        "id": "pln_3e7a",
        "title": "Residential - Quark (5GB)",
        "price": 1200
      },
      "quantity": 1,
      "totals": [
        {
          "type": "subtotal",
          "amount": 1200
        },
        {
          "type": "total",
          "amount": 1200
        }
      ]
    }
  ],
  "totals": [
    {
      "type": "subtotal",
      "amount": 1200
    },
    {
      "type": "total",
      "amount": 1200
    }
  ],
  "payment": {
    "instruments": [
      {
        "id": "balance",
        "handler_id": "balance",
        "type": "account_balance",
        "selected": true
      }
    ],
    "declared_method": "BALANCE"
  },
  "continue_url": "https://app.quanticdata.io/plans?network=RESIDENTIAL&utm_source=agent&utm_medium=ucp&utm_campaign=checkout-session&agent_checkout=chk_7d3f0a9b2c4e1f6a8b9c0d1e",
  "links": [
    {
      "type": "privacy_policy",
      "url": "https://quanticdata.io/privacy"
    },
    {
      "type": "terms_of_service",
      "url": "https://quanticdata.io/terms"
    }
  ],
  "messages": [
    {
      "type": "info",
      "code": "balance_available",
      "content": "The account balance covers this checkout. Complete it with POST /checkout-sessions/chk_7d3f0a9b2c4e1f6a8b9c0d1e/complete and payment.instruments[0].handler_id = \"balance\" (0% VAT)."
    },
    {
      "type": "info",
      "code": "vat_rule",
      "content": "Totals carry 0% VAT (balance or crypto). Paying by card or PayPal on the dashboard adds 22% VAT."
    }
  ],
  "created_at": "2026-10-26T12:00:00.000Z",
  "updated_at": "2026-10-26T12:00:00.000Z"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "not_found",
      "content": "Unknown checkout session.",
      "severity": "fatal"
    }
  ]
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Change the declared payment method or the buyer email

`PUT /agent/ucp/checkout-sessions/{id}`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

Update Checkout (whole-document replacement, as the REST binding). The only things that can change are `payment_method` (which recomputes VAT and the status) and `buyer.email`. The plan is locked: a different `line_items[0].item.id` answers 400 `plan_locked`, open another session instead. A `completed` or `canceled` session answers 409 `session_closed`. Authentication: the API key of the buying account, as `Authorization: Bearer` or `X-API-Key`.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Session id (`chk_` + 24 hex). A session of another account answers 404. |

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `line_items` | array of object | no |  |
| `line_items[].item` | object | no |  |
| `buyer` | object | no |  |
| `buyer.email` | string (email) | no |  |
| `payment_method` | string: `BALANCE`, `NOWPAYMENTS`, `PAYPAL`, `PAYPAL_CARD` | no |  |

Example:

```json
{
  "payment_method": "PAYPAL_CARD",
  "buyer": {
    "email": "user@example.com"
  }
}
```

##### Examples

**curl**

```bash
curl -X PUT 'https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"payment_method":"PAYPAL_CARD","buyer":{"email":"user@example.com"}}'
```

**Python (requests)**

```python
import requests

r = requests.put(
    'https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "payment_method": "PAYPAL_CARD",
        "buyer": {
            "email": "user@example.com"
        }
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID", {
  method: "PUT",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "payment_method": "PAYPAL_CARD",
    "buyer": {
      "email": "user@example.com"
    }
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'payment_method' => 'PAYPAL_CARD',
    'buyer' => [
      'email' => 'user@example.com'
    ]
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The updated session.
- `400` — `plan_locked`, `invalid_payment_method` or `invalid_json`.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown session.
- `409` — The session is completed or canceled.

Example `200` response:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "success",
    "capabilities": {
      "dev.ucp.shopping.checkout": [
        {
          "version": "2026-08-25",
          "spec": "https://ucp.dev/2026-08-25/specification/shopping/checkout/",
          "schema": "https://ucp.dev/2026-08-25/schemas/shopping/checkout.json"
        }
      ]
    },
    "payment_handlers": {
      "io.quanticdata.io.balance": [
        {
          "id": "balance",
          "version": "2026-10-08",
          "spec": "https://quanticdata.io/docs/#section/Agent-checkout-(UCP)",
          "schema": "https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json",
          "available_instruments": [
            {
              "type": "account_balance",
              "currency": "USD"
            }
          ]
        }
      ]
    }
  },
  "id": "chk_7d3f0a9b2c4e1f6a8b9c0d1e",
  "status": "ready_for_complete",
  "currency": "USD",
  "expires_at": "2026-10-26T18:00:00.000Z",
  "line_items": [
    {
      "id": "li_pln_3e7a",
      "item": {
        "id": "pln_3e7a",
        "title": "Residential - Quark (5GB)",
        "price": 1200
      },
      "quantity": 1,
      "totals": [
        {
          "type": "subtotal",
          "amount": 1200
        },
        {
          "type": "total",
          "amount": 1200
        }
      ]
    }
  ],
  "totals": [
    {
      "type": "subtotal",
      "amount": 1200
    },
    {
      "type": "total",
      "amount": 1200
    }
  ],
  "payment": {
    "instruments": [
      {
        "id": "balance",
        "handler_id": "balance",
        "type": "account_balance",
        "selected": true
      }
    ],
    "declared_method": "BALANCE"
  },
  "continue_url": "https://app.quanticdata.io/plans?network=RESIDENTIAL&utm_source=agent&utm_medium=ucp&utm_campaign=checkout-session&agent_checkout=chk_7d3f0a9b2c4e1f6a8b9c0d1e",
  "links": [
    {
      "type": "privacy_policy",
      "url": "https://quanticdata.io/privacy"
    },
    {
      "type": "terms_of_service",
      "url": "https://quanticdata.io/terms"
    }
  ],
  "messages": [
    {
      "type": "info",
      "code": "balance_available",
      "content": "The account balance covers this checkout. Complete it with POST /checkout-sessions/chk_7d3f0a9b2c4e1f6a8b9c0d1e/complete and payment.instruments[0].handler_id = \"balance\" (0% VAT)."
    },
    {
      "type": "info",
      "code": "vat_rule",
      "content": "Totals carry 0% VAT (balance or crypto). Paying by card or PayPal on the dashboard adds 22% VAT."
    }
  ],
  "created_at": "2026-10-26T12:00:00.000Z",
  "updated_at": "2026-10-26T12:00:00.000Z"
}
```

Example `400`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "plan_locked",
      "content": "The plan of a session cannot change: create a new session.",
      "severity": "fatal",
      "path": "$.line_items[0].item.id"
    }
  ]
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "not_found",
      "content": "Unknown checkout session.",
      "severity": "fatal"
    }
  ]
}
```

Example `409`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "session_closed",
      "content": "Session is completed.",
      "severity": "fatal"
    }
  ]
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Pay the session from the account balance

`POST /agent/ucp/checkout-sessions/{id}/complete`

**Price:** No charge. Charges the plan's `amount` to the balance, 0% VAT. Nothing is charged on a failed outcome.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

Complete Checkout. The only instrument an agent holds is the prepaid balance of the account that owns the API key: pass `payment.instruments[0].handler_id = "balance"`. The session is then paid through the same path as `POST /public/purchase`: the balance is charged (0% VAT), the order and the paid invoice are created and the plan is activated in the same call; `order.id` is the `orderId` for `POST /public/proxies/generate`. Outcomes, all with HTTP 200 and the session document: `completed` with `order` and the message `order_created`; `ready_for_complete` again with an `error` message `payment_failed` (the balance no longer covers the total: top up at the dashboard or hand `continue_url` to the person) or `purchase_failed` (recoverable, `content` says why); unchanged with `payment_instrument_unavailable` when another handler was passed (card, PayPal and crypto are paid by a person at `continue_url`). A session that is already `completed` answers 200 with the same order, so retrying is safe; a `canceled` one answers 409 `session_closed`. Authentication: the API key of the buying account, as `Authorization: Bearer` or `X-API-Key`.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Session id (`chk_` + 24 hex). A session of another account answers 404. |

##### Request body

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payment` | object | no |  |
| `payment.instruments` | array of object | no |  |

Example:

```json
{
  "payment": {
    "instruments": [
      {
        "handler_id": "balance",
        "type": "account_balance",
        "selected": true
      }
    ]
  }
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID/complete' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"payment":{"instruments":[{"handler_id":"balance","type":"account_balance","selected":true}]}}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID/complete',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "payment": {
            "instruments": [
                {
                    "handler_id": "balance",
                    "type": "account_balance",
                    "selected": true
                }
            ]
        }
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID/complete", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "payment": {
      "instruments": [
        {
          "handler_id": "balance",
          "type": "account_balance",
          "selected": true
        }
      ]
    }
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID/complete');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'payment' => [
      'instruments' => [[
        'handler_id' => 'balance',
        'type' => 'account_balance',
        'selected' => true
      ]]
    ]
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The session after the attempt: `completed` with `order`, or back to `ready_for_complete` with an `error` message.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown session.
- `409` — The session is canceled.

Example `200` response:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "success",
    "capabilities": {
      "dev.ucp.shopping.checkout": [
        {
          "version": "2026-08-25",
          "spec": "https://ucp.dev/2026-08-25/specification/shopping/checkout/",
          "schema": "https://ucp.dev/2026-08-25/schemas/shopping/checkout.json"
        }
      ]
    },
    "payment_handlers": {
      "io.quanticdata.io.balance": [
        {
          "id": "balance",
          "version": "2026-10-08",
          "spec": "https://quanticdata.io/docs/#section/Agent-checkout-(UCP)",
          "schema": "https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json",
          "available_instruments": [
            {
              "type": "account_balance",
              "currency": "USD"
            }
          ]
        }
      ]
    }
  },
  "id": "chk_7d3f0a9b2c4e1f6a8b9c0d1e",
  "status": "completed",
  "currency": "USD",
  "expires_at": "2026-10-26T18:00:00.000Z",
  "line_items": [
    {
      "id": "li_pln_3e7a",
      "item": {
        "id": "pln_3e7a",
        "title": "Residential - Quark (5GB)",
        "price": 1200
      },
      "quantity": 1,
      "totals": [
        {
          "type": "subtotal",
          "amount": 1200
        },
        {
          "type": "total",
          "amount": 1200
        }
      ]
    }
  ],
  "totals": [
    {
      "type": "subtotal",
      "amount": 1200
    },
    {
      "type": "total",
      "amount": 1200
    }
  ],
  "payment": {
    "instruments": [
      {
        "id": "balance",
        "handler_id": "balance",
        "type": "account_balance",
        "selected": true
      }
    ],
    "declared_method": "BALANCE"
  },
  "continue_url": "https://app.quanticdata.io/plans?network=RESIDENTIAL&utm_source=agent&utm_medium=ucp&utm_campaign=checkout-session&agent_checkout=chk_7d3f0a9b2c4e1f6a8b9c0d1e",
  "links": [
    {
      "type": "privacy_policy",
      "url": "https://quanticdata.io/privacy"
    },
    {
      "type": "terms_of_service",
      "url": "https://quanticdata.io/terms"
    }
  ],
  "messages": [
    {
      "type": "info",
      "code": "vat_rule",
      "content": "Totals carry 0% VAT (balance or crypto). Paying by card or PayPal on the dashboard adds 22% VAT."
    },
    {
      "type": "info",
      "code": "order_created",
      "content": "Paid from the account balance. The proxy plan is active: see the order permalink."
    }
  ],
  "created_at": "2026-10-26T12:00:00.000Z",
  "updated_at": "2026-10-26T12:01:00.000Z",
  "order": {
    "id": "ord_8c21",
    "permalink_url": "https://app.quanticdata.io/proxies"
  }
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "not_found",
      "content": "Unknown checkout session.",
      "severity": "fatal"
    }
  ]
}
```

Example `409`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "session_closed",
      "content": "Session is canceled.",
      "severity": "fatal"
    }
  ]
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Cancel a checkout session

`POST /agent/ucp/checkout-sessions/{id}/cancel`

**Price:** No charge.  
**Rate limit:** Per API key, by tier (see Rate limits and tiers).  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

Cancel Checkout. A `completed` session cannot be cancelled (409 `already_completed`); cancelling twice is harmless. Nothing is refunded here because nothing was charged. Authentication: the API key of the buying account, as `Authorization: Bearer` or `X-API-Key`.

##### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Session id (`chk_` + 24 hex). A session of another account answers 404. |

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID/cancel' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID/cancel',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID/cancel", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY"
  }
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/agent/ucp/checkout-sessions/ID/cancel');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY'],
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `200` — The session, now `canceled`.
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `404` — Unknown session.
- `409` — Already completed.

Example `200` response:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "success",
    "capabilities": {
      "dev.ucp.shopping.checkout": [
        {
          "version": "2026-08-25",
          "spec": "https://ucp.dev/2026-08-25/specification/shopping/checkout/",
          "schema": "https://ucp.dev/2026-08-25/schemas/shopping/checkout.json"
        }
      ]
    },
    "payment_handlers": {
      "io.quanticdata.io.balance": [
        {
          "id": "balance",
          "version": "2026-10-08",
          "spec": "https://quanticdata.io/docs/#section/Agent-checkout-(UCP)",
          "schema": "https://api.quanticdata.io/v1/agent/ucp/handlers/balance.json",
          "available_instruments": [
            {
              "type": "account_balance",
              "currency": "USD"
            }
          ]
        }
      ]
    }
  },
  "id": "chk_7d3f0a9b2c4e1f6a8b9c0d1e",
  "status": "canceled",
  "currency": "USD",
  "expires_at": "2026-10-26T18:00:00.000Z",
  "line_items": [
    {
      "id": "li_pln_3e7a",
      "item": {
        "id": "pln_3e7a",
        "title": "Residential - Quark (5GB)",
        "price": 1200
      },
      "quantity": 1,
      "totals": [
        {
          "type": "subtotal",
          "amount": 1200
        },
        {
          "type": "total",
          "amount": 1200
        }
      ]
    }
  ],
  "totals": [
    {
      "type": "subtotal",
      "amount": 1200
    },
    {
      "type": "total",
      "amount": 1200
    }
  ],
  "payment": {
    "instruments": [
      {
        "id": "balance",
        "handler_id": "balance",
        "type": "account_balance",
        "selected": true
      }
    ],
    "declared_method": "BALANCE"
  },
  "continue_url": "https://app.quanticdata.io/plans?network=RESIDENTIAL&utm_source=agent&utm_medium=ucp&utm_campaign=checkout-session&agent_checkout=chk_7d3f0a9b2c4e1f6a8b9c0d1e",
  "links": [
    {
      "type": "privacy_policy",
      "url": "https://quanticdata.io/privacy"
    },
    {
      "type": "terms_of_service",
      "url": "https://quanticdata.io/terms"
    }
  ],
  "messages": [],
  "created_at": "2026-10-26T12:00:00.000Z",
  "updated_at": "2026-10-26T12:00:00.000Z"
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `404`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "not_found",
      "content": "Unknown checkout session.",
      "severity": "fatal"
    }
  ]
}
```

Example `409`:

```json
{
  "ucp": {
    "version": "2026-08-25",
    "status": "error"
  },
  "messages": [
    {
      "type": "error",
      "code": "already_completed",
      "content": "A completed checkout cannot be canceled.",
      "severity": "fatal"
    }
  ]
}
```

Try it: https://app.quanticdata.io/data-api/playground

#### Contact the team as an agent (higher credit limit, enterprise, dataset)

`POST /agent/contact`

**Price:** No charge.  
**Rate limit:** Per API key: 3 requests an hour and 10 a day. Per IP address: 10 a day. Beyond that 429 with `Retry-After` and `payload.code` `rate_limited`; the earlier message is already with the team, do not resend it.  
[Try it in the Playground](https://app.quanticdata.io/data-api/playground) · [Markdown for this group](https://quanticdata.io/docs/account.md)

The contact gate for agents. Call it when a 402 carries an `escalation` object (`reason` `amount_above_limit`: the call needs more credit than one card top-up may add, `limit_usd`; `budget_reached`: the account's monthly spend cap is reached), or when the person you work for wants an enterprise plan or a dataset. Send that person's email address: the team answers there by email with a scope and a limit; nothing is charged and nothing changes on the account until they agree. Same API key as every other call (the one created by the agent registration too); no captcha, no browser signals. The message reaches the same inbox as the contact form on the site, marked as coming from an AI agent together with the account and API key ids, so quote the `payload` of the 402 and the numbers you need. One request is enough: a second one with the same content is not answered faster, and the limits below are low on purpose. Errors use the Data API envelope; success is a small receipt document (`202`). Also served at `https://app.quanticdata.io/api/v1/agent/contact`. A person can make the same request at `https://quanticdata.io/enterprise/contact/`.

##### Request body (required)

`Content-Type: application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string (email) | yes | The email address of the person you work for: the team answers there, never to the agent. Temporary mailboxes are refused (400 `invalid_email`). |
| `name` | string | yes | Name of the person, or of the agent acting for them. |
| `subject` | string | yes |  |
| `message` | string | yes | What is needed, with numbers: calls or rows per day, GB per month, countries, deadline. Quote the `payload` of the 402 when there is one. |
| `company` | string | no |  |
| `company_url` | string (uri) | no | http(s) URL of the company. |
| `expected_monthly_usd` | number | no | Expected monthly spend, USD. Helps the team size the limit. |
| `need` | string: `credit_limit`, `enterprise`, `dataset`, `other` | no | `credit_limit` after a 402 with `escalation`; `enterprise` for volumes, SLAs or invoicing; `dataset` for a ready-made or custom dataset. |

Example:

```json
{
  "email": "dana.rossi@example.com",
  "name": "Research agent (for Dana Rossi)",
  "subject": "Higher top-up limit for a weekly SERP job",
  "message": "Weekly job: about 40,000 Google searches in IT and DE, run on Mondays. The 402 estimated $1,812.50 against a balance of $12.50; one top-up is capped at $1,000. Expected monthly spend about $3,500. Please set a limit that lets the job run in one call.",
  "company": "Acme Ltd",
  "company_url": "https://acme.example",
  "expected_monthly_usd": 3500,
  "need": "credit_limit"
}
```

##### Examples

**curl**

```bash
curl -X POST 'https://api.quanticdata.io/v1/agent/contact' \
  -H 'Authorization: Bearer qd_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"email":"dana.rossi@example.com","name":"Research agent (for Dana Rossi)","subject":"Higher top-up limit for a weekly SERP job","message":"Weekly job: about 40,000 Google searches in IT and DE, run on Mondays. The 402 estimated $1,812.50 against a balance of $12.50; one top-up is capped at $1,000. Expected monthly spend about $3,500. Please set a limit that lets the job run in one call.","company":"Acme Ltd","company_url":"https://acme.example","expected_monthly_usd":3500,"need":"credit_limit"}'
```

**Python (requests)**

```python
import requests

r = requests.post(
    'https://api.quanticdata.io/v1/agent/contact',
    headers={"Authorization": "Bearer qd_live_YOUR_API_KEY"},
    json={
        "email": "dana.rossi@example.com",
        "name": "Research agent (for Dana Rossi)",
        "subject": "Higher top-up limit for a weekly SERP job",
        "message": "Weekly job: about 40,000 Google searches in IT and DE, run on Mondays. The 402 estimated $1,812.50 against a balance of $12.50; one top-up is capped at $1,000. Expected monthly spend about $3,500. Please set a limit that lets the job run in one call.",
        "company": "Acme Ltd",
        "company_url": "https://acme.example",
        "expected_monthly_usd": 3500,
        "need": "credit_limit"
    },
    timeout=120,
)
data = r.json()
if data["type"] != "response":
    raise SystemExit(data["message"])
print(data["payload"])
```

**Node (fetch)**

```javascript
const res = await fetch("https://api.quanticdata.io/v1/agent/contact", {
  method: "POST",
  headers: {
    Authorization: "Bearer qd_live_YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "email": "dana.rossi@example.com",
    "name": "Research agent (for Dana Rossi)",
    "subject": "Higher top-up limit for a weekly SERP job",
    "message": "Weekly job: about 40,000 Google searches in IT and DE, run on Mondays. The 402 estimated $1,812.50 against a balance of $12.50; one top-up is capped at $1,000. Expected monthly spend about $3,500. Please set a limit that lets the job run in one call.",
    "company": "Acme Ltd",
    "company_url": "https://acme.example",
    "expected_monthly_usd": 3500,
    "need": "credit_limit"
  })
});
const data = await res.json();
if (data.type !== "response") throw new Error(data.message);
console.log(data.payload);
```

**PHP (curl)**

```php
<?php
$ch = curl_init('https://api.quanticdata.io/v1/agent/contact');
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Authorization: Bearer qd_live_YOUR_API_KEY', 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'email' => 'dana.rossi@example.com',
    'name' => 'Research agent (for Dana Rossi)',
    'subject' => 'Higher top-up limit for a weekly SERP job',
    'message' => 'Weekly job: about 40,000 Google searches in IT and DE, run on Mondays. The 402 estimated $1,812.50 against a balance of $12.50; one top-up is capped at $1,000. Expected monthly spend about $3,500. Please set a limit that lets the job run in one call.',
    'company' => 'Acme Ltd',
    'company_url' => 'https://acme.example',
    'expected_monthly_usd' => 3500,
    'need' => 'credit_limit'
  ]),
]);
$raw = curl_exec($ch);
curl_close($ch);
$data = json_decode($raw, true);
if ($data['type'] !== 'response') { throw new RuntimeException($data['message']); }
print_r($data['payload']);
```

##### Responses

- `202` — Received. The team answers the person by email; nothing is charged.
- `400` — Missing or invalid field (`payload.code` `invalid_request`, `payload.field` names it), or a temporary mailbox (`invalid_email`).
- `401` — Missing, malformed, unknown, disabled or expired API key; or the account is not active.
- `429` — A contact cap was reached (per key or per IP). The earlier message is already with the team.
- `500` — Our side: the scraper service is unavailable or the call timed out. Never billed.

Example `202` response:

```json
{
  "type": "response",
  "reference": "cmhcontact0001x9k2agent001",
  "message": "Request received by the QuanticData team (reference cmhcontact0001x9k2agent001).",
  "what_happens_next": "The team answers by email to dana.rossi@example.com with a scope; nothing is charged."
}
```

Example `400`:

```json
{
  "type": "error",
  "message": "\"subject\" must be at most 140 characters.",
  "payload": {
    "code": "invalid_request",
    "field": "subject"
  }
}
```

Example `401`:

```json
{
  "type": "error",
  "message": "Missing or invalid Authorization header. Use: Authorization: Bearer qd_live_YOUR_API_KEY"
}
```

Example `429`:

```json
{
  "type": "error",
  "message": "Too many contact requests (3 per hour per API key). The team already has your earlier message and answers by email; do not resend it. Retry after 1800 seconds if you have something new to add.",
  "payload": {
    "code": "rate_limited",
    "scope": "per hour per API key",
    "limit": 3,
    "reset_at": "2026-10-29T18:30:00.000Z",
    "retry_after": 1800
  }
}
```

Example `500`:

```json
{
  "type": "error",
  "message": "Scraper service unavailable. Please try again later."
}
```

Try it: https://app.quanticdata.io/data-api/playground
