Dataloom Docs

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:

ParameterTypeDefaultDescription
datasetstringall-insightsWhich dataset to compute for every domain — see datasets & fields.
waitint 0–300Long-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:

FieldTypeRequiredDescription
urlsstring[]yes1 to 10,000 domains or URLs.
callback_urlstringnoHTTPS 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 index is the position of the item's first occurrence in your list; the url field 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_DOMAIN error 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:

StatusMeaning
queuedAccepted, waiting for a worker.
runningBeing processed.
cancellingCancel was requested; stops scheduling new fetches. Transient.
completedEvery domain succeeded.
partialSome succeeded, some failed.
failedEvery domain failed.
cancelledCancelled 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"
ParameterTypeDefaultDescription
offsetint0Result index to start from.
limitint 1–500100Max 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_offset is set. Once the batch is terminal, next_offset is null on the last page.
  • status is "success" or "error" — the same marker the single-URL endpoint's items carry — and a row's data is byte-identical to what the single-URL endpoint returns for that domain, so one parser serves both surfaces.
  • error is non-null exactly for failed items — data and error are never both set. data has the shape of the dataset you chose (see datasets & fields).
  • A retryable: true error (transient upstream failure) is worth resubmitting as a new batch later; retryable: false is 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 cancelling and lands cancelled as 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 retrievable7 days from completion — expires_at on the batch object
Batch record afterwardskept 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.

On this page