Skip to main content
A batch of 10,000 URLs on a noisy network is a different problem from a batch of 10. This guide covers the end-to-end patterns that keep large batches reliable: idempotency, webhook delivery, resuming after disconnects, and handling partial failures.

The five pillars

  1. Idempotency key on the /v1/read POST, so retries don’t create duplicate jobs.
  2. Track the job ID in your own database immediately after submission.
  3. Webhooks as the primary completion signal, so a restart doesn’t strand the job.
  4. Poll as a fallback, in case the webhook was dropped.
  5. Retry failed URLs rather than restarting the whole batch.

Submission

The x-idempotency-key is critical. If your request times out but Reader already accepted it, your retry with the same key returns the original job ID, not a new job. Without it, you’d submit the batch twice.

Completion via webhook

Hydrating results (the slow part)

Fallback polling

Webhooks can get lost: configuration mistakes, your endpoint being down when all three retries happen, a DNS outage. As a safety net, run a periodic job that polls Reader for any batches that have been submitted for more than some threshold:

Retrying failed URLs

When a batch completes with some failed URLs, you have two options:
  • Accept the failures (your data has error fields for those rows) and move on
  • Retry the failed subset with POST /v1/jobs/{id}/retry
Reader re-queues just the URLs that errored. You’ll get another job.completed webhook when the retry finishes.

Monitoring

Track in your own metrics:
  • Submission rate (batches / minute)
  • Completion time (webhook received - submitted)
  • Per-batch failure rate (failed URLs / total URLs)
  • Webhook delivery failures (via deliveryStats)
If any of these drift, you’ll know before your users do.

Next