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 /
Authentication: your key as a bearer token.
Body
| Field | Type | Required | Default |
|---|---|---|---|
query | string | Required | |
includeClones | boolean | Optional | false |
limit | integer | Optional | 5 |
scrapeOptions | object | null | Optional | |
scrapeOptions. | boolean | null | Optional | |
scrapeOptions. | string[] | Optional | [] |
scrapeOptions. | (string | object)[] | Optional | ["markdown"] |
scrapeOptions. | object | Optional | {} |
scrapeOptions. | string[] | Optional | [] |
scrapeOptions. | integer | null | Optional | |
scrapeOptions. | boolean | Optional | true |
scrapeOptions. | (string | object)[] | Optional | |
scrapeOptions. | boolean | object | Optional | |
scrapeOptions. | string Values: auto, never, always | Optional | "auto" |
scrapeOptions. | boolean | Optional | false |
scrapeOptions. | integer | null | Optional | |
scrapeOptions. | integer | Optional | 0 |
siteCategories | string[] | null | Optional | |
sources | (string | object)[] | null | Optional | |
sources[]. | string | Required | |
timeout | integer | null | Optional |
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.
| Field | What DarkCrawl does |
|---|---|
categories | Ignored, with a warning when set. |
country | Ignored, with a warning when set. |
domainTools | Ignored, with a warning when set. |
enterprise | Ignored, with a warning when set. |
excludeDomains | Ignored, with a warning when set. |
highlights | Ignored, with a warning when set. |
ignoreInvalidURLs | Ignored, with a warning when set. |
includeDomains | Ignored, with a warning when set. |
integration | Accepted and ignored. |
location | Ignored, with a warning when set. |
origin | Accepted and ignored. |
scrapeOptions.actions | Answers 400 NOT_IMPLEMENTED when not empty. |
scrapeOptions.auditMetadata | Accepted and ignored. |
scrapeOptions.blockAds | Ignored, with a warning when not Firecrawl's default. |
scrapeOptions.domainTools | Accepted and ignored. |
scrapeOptions.fastMode | Ignored, with a warning when not Firecrawl's default. |
scrapeOptions.integration | Accepted and ignored. |
scrapeOptions.location | Ignored, with a warning when not Firecrawl's default. |
scrapeOptions.lockdown | Answers 400 BAD_REQUEST when true. |
scrapeOptions.maxAge | Ignored, with a warning when not Firecrawl's default. |
scrapeOptions.minAge | Answers 400 BAD_REQUEST when set. |
scrapeOptions.mobile | Ignored, with a warning when not Firecrawl's default. |
scrapeOptions.onlyCleanContent | Ignored, with a warning when not Firecrawl's default. |
scrapeOptions.origin | Accepted and ignored. |
scrapeOptions.profile | Ignored, with a warning when not Firecrawl's default. |
scrapeOptions.proxy | Ignored, with a warning when not Firecrawl's default. |
scrapeOptions.removeBase64Images | Accepted and ignored. |
scrapeOptions.safeMode | Ignored, with a warning when not Firecrawl's default. |
scrapeOptions.storeInCache | Ignored, with a warning when not Firecrawl's default. |
scrapeOptions.threatProtection | Accepted and ignored. |
scrapeOptions.toolDetail | Accepted and ignored. |
scrapeOptions.useMock | Accepted and ignored. |
scrapeOptions.zeroDataRetention | Ignored, with a warning when not Firecrawl's default. |
tbs | Ignored, with a warning when set. |
threatProtection | Ignored, with a warning when set. |
toolDetail | Ignored, with a warning when set. |
Request
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}'import os
import requests
resp = requests.post(
"https://api.darkcrawl.dev/v2/search",
headers={"Authorization": "Bearer " + os.environ["DARKCRAWL_API_KEY"]},
json={
"query": "debian mirror",
"limit": 5,
},
timeout=330,
)
print(resp.json())const resp = await fetch("https://api.darkcrawl.dev/v2/search", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.DARKCRAWL_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"query": "debian mirror",
"limit": 5
}),
signal: AbortSignal.timeout(330000),
});
console.log(await resp.json());Response
Status 200.
{
"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
| Code | Status |
|---|---|
BAD_REQUEST | 400 |
SEARCH_UNAVAILABLE | 503 |
SCRAPE_TIMEOUT | 408 |
TOR_NOT_READY | 503 |
BLOCKLIST_UNAVAILABLE | 503 |
What each code means, and what to do about it: Errors.
Notes
- Stored pages come first, best match first. A stored result also has
captureIdandfetchedAt; a result from Ahmia never does. - With
scrapeOptionseach result is scraped, and the call reserves its pages first, as a crawl does. Rate limits says how. warningis 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.