Skip to content

Search

POST /v2/search

Copy page

Search the pages DarkCrawl has stored, and Ahmia for what is missing when the server is set up to ask it.

POST /v2/search

Authentication: your key as a bearer token.

Body

FieldTypeRequiredDefault
querystringRequired
includeClonesbooleanOptionalfalse
limitintegerOptional5
scrapeOptionsobject | nullOptional
scrapeOptions.checkPromptInjectionboolean | nullOptional
scrapeOptions.excludeTagsstring[]Optional[]
scrapeOptions.formats(string | object)[]Optional["markdown"]
scrapeOptions.headersobjectOptional{}
scrapeOptions.includeTagsstring[]Optional[]
scrapeOptions.maxTextBytesinteger | nullOptional
scrapeOptions.onlyMainContentbooleanOptionaltrue
scrapeOptions.parsers(string | object)[]Optional
scrapeOptions.redactPIIboolean | objectOptional
scrapeOptions.renderstring Values: auto, never, alwaysOptional"auto"
scrapeOptions.skipTlsVerificationbooleanOptionalfalse
scrapeOptions.timeoutinteger | nullOptional
scrapeOptions.waitForintegerOptional0
siteCategoriesstring[] | nullOptional
sources(string | object)[] | nullOptional
sources[].typestringRequired
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
categoriesIgnored, with a warning when set.
countryIgnored, with a warning when set.
domainToolsIgnored, with a warning when set.
enterpriseIgnored, with a warning when set.
excludeDomainsIgnored, with a warning when set.
highlightsIgnored, with a warning when set.
ignoreInvalidURLsIgnored, with a warning when set.
includeDomainsIgnored, with a warning when set.
integrationAccepted and ignored.
locationIgnored, with a warning when set.
originAccepted and ignored.
scrapeOptions.actionsAnswers 400 NOT_IMPLEMENTED when not empty.
scrapeOptions.auditMetadataAccepted and ignored.
scrapeOptions.blockAdsIgnored, with a warning when not Firecrawl's default.
scrapeOptions.domainToolsAccepted and ignored.
scrapeOptions.fastModeIgnored, with a warning when not Firecrawl's default.
scrapeOptions.integrationAccepted and ignored.
scrapeOptions.locationIgnored, with a warning when not Firecrawl's default.
scrapeOptions.lockdownAnswers 400 BAD_REQUEST when true.
scrapeOptions.maxAgeIgnored, with a warning when not Firecrawl's default.
scrapeOptions.minAgeAnswers 400 BAD_REQUEST when set.
scrapeOptions.mobileIgnored, with a warning when not Firecrawl's default.
scrapeOptions.onlyCleanContentIgnored, with a warning when not Firecrawl's default.
scrapeOptions.originAccepted and ignored.
scrapeOptions.profileIgnored, with a warning when not Firecrawl's default.
scrapeOptions.proxyIgnored, with a warning when not Firecrawl's default.
scrapeOptions.removeBase64ImagesAccepted and ignored.
scrapeOptions.safeModeIgnored, with a warning when not Firecrawl's default.
scrapeOptions.storeInCacheIgnored, with a warning when not Firecrawl's default.
scrapeOptions.threatProtectionAccepted and ignored.
scrapeOptions.toolDetailAccepted and ignored.
scrapeOptions.useMockAccepted and ignored.
scrapeOptions.zeroDataRetentionIgnored, with a warning when not Firecrawl's default.
tbsIgnored, with a warning when set.
threatProtectionIgnored, with a warning when set.
toolDetailIgnored, with a warning when set.

Request

bash
curl -X POST https://api.darkcrawl.dev/v2/search \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"debian mirror","limit":5}'

Response

Status 200.

Response
{
  "success": true,
  "data": {
    "web": [
      {
        "url": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/mirrors",
        "title": "Mirror list",
        "description": "A plainly fictional list of mirrors.",
        "position": 1,
        "captureId": "01K0EXAMPLECAPTURE0000000A",
        "fetchedAt": "2026-11-26T10:00:00+00:00"
      },
      {
        "url": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/forum/thread/1",
        "title": "Sample thread",
        "description": "Nothing real here.",
        "position": 2
      }
    ]
  }
}

Errors

CodeStatus
BAD_REQUEST400
SEARCH_UNAVAILABLE503
SCRAPE_TIMEOUT408
TOR_NOT_READY503
BLOCKLIST_UNAVAILABLE503

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

Notes

  • Stored pages come first, best match first. A stored result also has captureId and fetchedAt; a result from Ahmia never does.
  • With scrapeOptions each result is scraped, and the call reserves its pages first, as a crawl does. Rate limits says how.
  • warning is one string when there is something to say, for example that results were dropped.
  • The query is read for matching terms and quoted phrases. See the Search guide.