Use async crawling for large sites or jobs that should run in the background, up to 25,000 pages. For fewer than 500 pages when you need results in one response, use Crawl Sync.
POST /batch/submit. The API discovers linked pages and processes them as a background job. Save the batch ID, poll for completion, then read or download the results.
Submit a crawl
Choose cURL or install an SDK for your language. Each example creates its own client. Export an API key from the dashboard:202 with status: "queued" and an id. Save that ID before starting another job. Submission reserves credits immediately; see costs and limits before raising maxUrls.
Choose a new Idempotency-Key for each new crawl. Reuse the same key and body when retrying a submission to recover the original batch instead of creating a duplicate.
Control page discovery
Set these fields underinput.data.source.controls:
Use
input.data.format: "html" for HTML instead of Markdown. Per-page controls belong in input.data.options, including content selectors, rendering waits, and PDF parsing. maxAgeMs defaults to one day; set it to 0 to fetch pages fresh.
Start from a sitemap
Start from a sitemap
To scrape the URLs listed in a sitemap, submit a Sitemap batches scrape matching listed URLs without following links from those pages. Only
sitemap source:maxUrls and regex are supported in their controls; omit maxDepth and followSubdomains. A full URL in domain is reduced to its domain.Track progress
Replacebatch_9f2c8a with the ID returned by submission. For cURL, save it in BATCH_ID:
status is queued, running, or cancelling. Stop when it reaches completed, cancelled, or failed. Use the status, not a percentage of maxUrls, to decide whether the job has finished.
progress.succeeded and progress.failed count page outcomes. page_errors groups page failures by code; failure describes a batch-level failure. A completed batch can still contain failed pages.
You can also add webhookUrl to the submit body. Completion webhooks are attempted once, so keep polling as a fallback and save the signing secret returned at submission.
Read the results
After the batch reaches a final status, request its results as JSON:status before reading its content:
sample response
has_more is true, pass the returned next_cursor as cursor. Replace CURSOR_FROM_PREVIOUS_RESPONSE in the SDK examples, or set NEXT_CURSOR for cURL:
limit accepts 1 to 100 records and defaults to 25. A page can close early to stay under approximately 8 MB, so follow the cursor even when fewer than 100 records arrive.
For large imports, use the signed URLs in the retrieved batch’s results.files to download gzipped NDJSON. Set RESULT_URL to a file’s url, then stream its records:
results.expires_at; retrieve the batch again for fresh links. File order is not guaranteed.
Costs and limits
Each successfully scraped page costs 1 credit. A start-URL crawl reserves its page budget upfront:input.reserved_is_ceiling is true because the reachable page count is not yet known. A sitemap batch reserves for the exact accepted URL count instead.
Credits for pages that do not succeed, including unused crawl capacity, are refunded when the batch settles. If PDF OCR is enabled, each recovered PDF page costs 1 additional credit. OCR is off by default. Read credits.net after settlement for the final cost: reserved - refunded + ocr_charged.
Batch management uses a separate rate-limit bucket. Submission consumes 50 of its 1,000 units per minute; each poll, results request, or cancellation consumes 1. These management calls cost zero API credits, separate from the page credits reserved at submission.
Handle failures
Retry only the failed pages when practical, using a fixed URL batch. Keep successful content and inspect each failed record’serror_code and message before retrying.
To stop a crawl, call
POST /batch/{batch_id}/cancel. This prevents new pages from starting; pages already in progress finish. Continue polling until the job settles and unused credits are refunded.
Next steps
Crawl Sync
Collect a smaller site in one synchronous response.
Submit a batch
Review the full request schema and per-page options.
Build a RAG pipeline
Turn crawled Markdown into a searchable knowledge base.