Skip to content

Map

POST /v2/map

Copy page

List the pages of one onion site, found by a short crawl of its links.

POST /v2/map

Authentication: your key as a bearer token.

Body

FieldTypeRequiredDefault
urlstringRequired
headersobjectOptional{}
ignoreQueryParametersbooleanOptionaltrue
includeSubdomainsbooleanOptionaltrue
limitintegerOptional5000
searchstring | nullOptional
sitemapstring Values: skip, include, onlyOptional"include"
timeoutinteger | 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
auditMetadataAccepted and ignored.
filterByPathIgnored, with a warning when set.
ignoreCacheIgnored, with a warning when set.
integrationAccepted and ignored.
locationIgnored, with a warning when set.
originAccepted and ignored.
threatProtectionAccepted and ignored.
useIndexIgnored, with a warning when set.
useMockAccepted and ignored.

Request

bash
curl -X POST https://api.darkcrawl.dev/v2/map \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice","search":"forum"}'

Response

Status 200.

Response
{
  "success": true,
  "id": "01K0EXAMPLEMAP000000000000",
  "links": [
    {
      "url": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/",
      "title": "Notice"
    },
    {
      "url": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/forum",
      "title": "Forum",
      "description": "Sample forum index"
    },
    {
      "url": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/forum/rules"
    }
  ]
}

Errors

CodeStatus
BAD_REQUEST400
INVALID_ONION400
POLICY_FORBIDDEN400
BLOCKLISTED403
ONION_UNREACHABLE502
TOR_NOT_READY503
BLOCKLIST_UNAVAILABLE503

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

Notes

  • Map follows links two levels deep, builds no Markdown and stores nothing but the job. search keeps the links whose address or title holds that text, whatever its case.
  • warning is in the reply when the time box ran out before the walk ended.
  • title and description are in a link only when the page gave one.