Skip to content

Batch scrape

POST /v2/batch/scrape

Copy page

Scrape many onion pages as one job, with the same options for each.

POST /v2/batch/scrape

Authentication: your key as a bearer token.

Body

FieldTypeRequiredDefault
urlsstring[]Required
checkPromptInjectionboolean | nullOptional
excludeTagsstring[]Optional[]
formats(string | object)[]Optional["markdown"]
formats[].typestringRequired
headersobjectOptional{}
ignoreInvalidURLsbooleanOptionaltrue
includeTagsstring[]Optional[]
maxAgeinteger | nullOptional
maxConcurrencyinteger | nullOptional
maxTextBytesinteger | nullOptional
onlyMainContentbooleanOptionaltrue
parsers(string | object)[]Optional
redactPIIboolean | objectOptional
renderstring Values: auto, never, alwaysOptional"auto"
skipTlsVerificationbooleanOptionalfalse
storeInCacheboolean | nullOptional
timeoutinteger | nullOptional
waitForintegerOptional0
webhookstring | object | nullOptional
webhook.urlstringRequired
webhook.eventsstring[] | null Values: started, page, completed, failed, crawl.started, crawl.page, crawl.completed, crawl.failed, batch_scrape.started, batch_scrape.page, batch_scrape.completed, batch_scrape.failedOptional
webhook.headersobject | nullOptional
webhook.metadataobject | nullOptional
Firecrawl compatibility fields

Firecrawl fields DarkCrawl does not offer. It takes them so the Firecrawl SDKs keep working, then ignores or refuses each one as the table says.

FieldWhat DarkCrawl does
actionsAnswers 400 NOT_IMPLEMENTED when not empty.
appendToIdAnswers 400 NOT_IMPLEMENTED when set.
auditMetadataAccepted and ignored.
blockAdsIgnored, with a warning when not Firecrawl's default.
domainToolsAccepted and ignored.
fastModeIgnored, with a warning when not Firecrawl's default.
integrationAccepted and ignored.
locationIgnored, with a warning when not Firecrawl's default.
lockdownAnswers 400 BAD_REQUEST when true.
minAgeAnswers 400 BAD_REQUEST when set.
mobileIgnored, with a warning when not Firecrawl's default.
onlyCleanContentIgnored, with a warning when not Firecrawl's default.
originAccepted and ignored.
profileIgnored, with a warning when not Firecrawl's default.
proxyIgnored, with a warning when not Firecrawl's default.
removeBase64ImagesAccepted and ignored.
safeModeIgnored, with a warning when not Firecrawl's default.
threatProtectionAccepted and ignored.
toolDetailAccepted and ignored.
useMockAccepted and ignored.
zeroDataRetentionIgnored, with a warning when not Firecrawl's default.

Request

bash
curl -X POST https://api.darkcrawl.dev/v2/batch/scrape \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"urls":["http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice","http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/about"],"formats":["markdown","links"],"maxConcurrency":2}'

Response

Status 200.

Response
{
  "success": true,
  "id": "01K0EXAMPLEBATCH0000000000A",
  "url": "https://api.darkcrawl.dev/v2/batch/scrape/01K0EXAMPLEBATCH0000000000A",
  "invalidURLs": []
}

Errors

CodeStatus
BAD_REQUEST400
INVALID_ONION400
POLICY_FORBIDDEN400
BLOCKLISTED403
BLOCKLIST_UNAVAILABLE503
SECRETS_UNAVAILABLE503
AI_UNAVAILABLE503
QUOTA_EXCEEDED402
RATE_LIMITED429
NOT_IMPLEMENTED400

What each code means, and what to do about it: Errors.

Notes

  • urls holds up to 1000 addresses. One that a scrape would refuse is left out and listed in invalidURLs. With ignoreInvalidURLs set to false, any such address refuses the whole batch with 400 BAD_REQUEST, and details.invalidURLs lists them.
  • A batch reserves a page for each address, all or nothing: fewer pages left than addresses is 402 QUOTA_EXCEEDED.
  • The scrape options go at the top level, as on scrape. Links are never followed.
  • The call reserves the job's pages before it stores anything, and charges the pages the job read when it ends. Rate limits has what can refuse it.
  • A webhook sends the job's events to your receiver, which must be https. See Webhooks.