Batch analysis
Submit up to 10,000 domains, poll for status, stream partial results, and download the finished set as NDJSON.
The batch API takes a list of domains and analyzes them in the background. You submit once, get a batch id back in milliseconds, then poll for status and page through results while the batch is still running — or wait for a signed webhook when it finishes (see webhooks).
The flow is always the same four steps:
POST /analysis → 202 with the batch object (billed here)
GET /analysis/{id}/status → progress counters (free)
GET /analysis/{id}/results → paginated per-domain results (free)
GET /analysis/{id}/download → NDJSON of every result (free, when finished)All batch endpoints sit under the same prefix as the rest of the API,
e.g. https://api.dataloom.dev/mavion-seo-insights/v2/analysis.
1. Submit a batch
curl "https://api.dataloom.dev/mavion-seo-insights/v2/analysis?dataset=all-insights" \
-X POST \
-H "Authorization: Bearer $DATALOOM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls": ["stripe.com", "github.com", "not-a-domain"]}'Query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
dataset | string | all-insights | Which dataset to compute for every domain — see datasets & fields. |
wait | int 0–30 | 0 | Long-poll: hold the response up to this many seconds for the batch to finish. Returns 200 with final results when it finishes in time, 202 otherwise. |
Body:
| Field | Type | Required | Description |
|---|---|---|---|
urls | string[] | yes | 1 to 10,000 domains or URLs. |
callback_url | string | no | HTTPS URL to POST a signed completion notification to — see webhooks. |
The response is the batch object (202 Accepted, or 200 when
wait caught the finish):
{
"id": "batch_9f2ce1a4d7b84c0eaf3122ee5a6d9c77",
"object": "batch",
"status": "queued",
"dataset": "all-insights",
"detail": "full",
"created_at": "2026-10-27T12:00:00.000000+00:00",
"completed_at": null,
"expires_at": null,
"summary": { "submitted": 3, "unique": 3, "duplicates": 0, "failed": 1, "pending": 2 },
"status_url": "/analysis/batch_9f2ce1a4d7b84c0eaf3122ee5a6d9c77/status",
"results_url": "/analysis/batch_9f2ce1a4d7b84c0eaf3122ee5a6d9c77/results"
}detail is always "full" — every batch is computed at maximum
verbosity (the full topical trust list and the duplicate link
classification). It is informational; there is no parameter to change
it.
Store the id — everything else keys off it.
Deduplication and item indexing
Items are deduplicated on their registered domain, so URL variants,
subdomains of the same root, and case differences collapse into one
item: https://www.GitHub.com/docs and GITHUB.COM are one entry.
- Each result row's
indexis the position of the item's first occurrence in your list; theurlfield echoes the item exactly as you submitted it. - Later duplicates are reported in the row's
duplicate_indexes, so you can map results back onto your original list positions. - Invalid items (not parseable as a domain) become immediate
INVALID_DOMAINerror rows at submit time and cost nothing.
Billing is 1 credit per unique valid domain, charged once at submission — duplicates and invalid items are free, and every status, results, download, and cancel call afterwards is free (0 credits). See billing.
Idempotent submissions
Send an Idempotency-Key header to make retries safe — a network
timeout after submit will never create a second batch:
-H "Idempotency-Key: my-cron-2026-10-27"- Same key + same body: the existing batch is returned, with no new work and no new charge.
- Same key + a different body:
409 IDEMPOTENCY_CONFLICT— nothing is processed. - Keys are remembered for 24 hours.
2. Poll status
curl "https://api.dataloom.dev/mavion-seo-insights/v2/analysis/batch_9f2ce1a4d7b84c0eaf3122ee5a6d9c77/status" \
-H "Authorization: Bearer $DATALOOM_API_KEY"The batch object's status moves through this lifecycle:
| Status | Meaning |
|---|---|
queued | Accepted, waiting for a worker. |
running | Being processed. |
cancelling | Cancel was requested; stops scheduling new fetches. Transient. |
completed | Every domain succeeded. |
partial | Some succeeded, some failed. |
failed | Every domain failed. |
cancelled | Cancelled by you. |
The summary counters tell you how far along it is:
{ "submitted": 3, "unique": 3, "duplicates": 0, "failed": 1, "pending": 2 }pending is what has not finished yet; failed counts every error row
including the submit-time invalid items. The completed_at and
expires_at timestamps are set once the batch reaches a terminal
status.
Poll at a reasonable interval — a few seconds is plenty. Crashed work
is detected and resumed automatically (in-progress results are kept), so
an occasional running status for longer than expected does not mean
the batch is lost.
3. Read results
Results are available while the batch is still running — you never have to wait for the whole list before acting on the first rows.
curl "https://api.dataloom.dev/mavion-seo-insights/v2/analysis/batch_9f2ce1a4d7b84c0eaf3122ee5a6d9c77/results?offset=0&limit=100" \
-H "Authorization: Bearer $DATALOOM_API_KEY"| Parameter | Type | Default | Description |
|---|---|---|---|
offset | int | 0 | Result index to start from. |
limit | int 1–500 | 100 | Max results per page. |
{
"id": "batch_9f2ce1a4d7b84c0eaf3122ee5a6d9c77",
"object": "batch.results",
"status": "running",
"offset": 0,
"limit": 100,
"next_offset": 2,
"results": [
{
"url": "stripe.com",
"index": 0,
"duplicate_indexes": [],
"attempts": 1,
"status": "success",
"data": { "metrics": { "trust_score": 91, "link_influence": 76 } },
"error": null
},
{
"url": "not-a-domain",
"index": 2,
"duplicate_indexes": [],
"attempts": 0,
"status": "error",
"data": null,
"error": {
"code": "INVALID_DOMAIN",
"message": "The submitted item is not a valid domain or URL.",
"retryable": false
}
}
]
}- Rows arrive in completion order while the batch runs; keep paging
while
next_offsetis set. Once the batch is terminal,next_offsetisnullon the last page. statusis"success"or"error"— the same marker the single-URL endpoint's items carry — and a row'sdatais byte-identical to what the single-URL endpoint returns for that domain, so one parser serves both surfaces.erroris non-null exactly for failed items —dataanderrorare never both set.datahas the shape of the dataset you chose (see datasets & fields).- A
retryable: trueerror (transient upstream failure) is worth resubmitting as a new batch later;retryable: falseis a bad item — see errors.
Python polling example
import time, requests
BASE = "https://api.dataloom.dev/mavion-seo-insights/v2"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
batch = requests.post(f"{BASE}/analysis",
params={"dataset": "all-insights"},
json={"urls": domains},
headers=HEADERS).json()
while batch["status"] not in ("completed", "partial", "failed", "cancelled"):
time.sleep(5)
batch = requests.get(f"{BASE}/analysis/{batch['id']}/status",
headers=HEADERS).json()
results, offset = [], 0
while offset is not None:
page = requests.get(f"{BASE}/analysis/{batch['id']}/results",
params={"offset": offset, "limit": 500},
headers=HEADERS).json()
results.extend(page["results"])
offset = page["next_offset"]4. Download everything at once
Once the batch is terminal, fetch every result as
NDJSON — one JSON result row per line,
sorted by submission index:
curl "https://api.dataloom.dev/mavion-seo-insights/v2/analysis/batch_9f2ce1a4d7b84c0eaf3122ee5a6d9c77/download" \
-H "Authorization: Bearer $DATALOOM_API_KEY"{"url": "stripe.com", "index": 0, "duplicate_indexes": [], "attempts": 1, "data": {...}, "error": null}
{"url": "github.com", "index": 1, "duplicate_indexes": [], "attempts": 1, "data": {...}, "error": null}
{"url": "not-a-domain", "index": 2, "duplicate_indexes": [], "attempts": 0, "data": null, "error": {...}}The download stream lines up with your original submission order —
line[N] corresponds to list position N (duplicated list positions
resolve to their first occurrence). Calling it before the batch is
terminal returns 409 BATCH_NOT_FINISHED.
Cancel a batch
curl -X POST "https://api.dataloom.dev/mavion-seo-insights/v2/analysis/batch_9f2ce1a4d7b84c0eaf3122ee5a6d9c77/cancel" \
-H "Authorization: Bearer $DATALOOM_API_KEY"- A queued batch is cancelled immediately — no work is done.
- A running batch moves to
cancellingand landscancelledas soon as workers stop scheduling new fetches. - Results fetched before the cancel remain retrievable until expiry.
- Billed credits are not refunded — billing happened at submission.
Cancelling an already-finished batch is a no-op that returns its status unchanged.
Retention
| Results retrievable | 7 days from completion — expires_at on the batch object |
| Batch record afterwards | kept 30 more days, then purged |
Past expires_at, every endpoint for that batch returns
410 BATCH_EXPIRED. Download long-lived data after processing; the
batch id is not an archive.
Throughput expectations
Domains are processed concurrently, and each one takes roughly 10–30
seconds (the same challenge-solving as the single-URL endpoint). Expect
a sustained rate of a few dozen domains per minute: a 1,000-domain batch
takes around half an hour, a full 10,000-domain batch a few hours. Use
the status counters and partial results to monitor progress, or let
the webhook tell you when it is done.
Dataloom Docs