Guides
Scrape
Copy page
Read one onion page and get Markdown, links, metadata, indicators and an evidence record.
POST /v2/scrape reads one .onion page over Tor and returns it in the formats you ask for, with the indicators found in it and a record of the capture. Send your key as a bearer token; see Authentication.
curl -X POST https://api.darkcrawl.dev/v2/scrape \
-H "Authorization: Bearer $DARKCRAWL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice","formats":["markdown","links"],"onlyMainContent":true,"timeout":120000}'import os
import requests
resp = requests.post(
"https://api.darkcrawl.dev/v2/scrape",
headers={"Authorization": "Bearer " + os.environ["DARKCRAWL_API_KEY"]},
json={
"url": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice",
"formats": ["markdown", "links"],
"onlyMainContent": True,
"timeout": 120000,
},
timeout=150,
)
print(resp.json())const resp = await fetch("https://api.darkcrawl.dev/v2/scrape", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.DARKCRAWL_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice",
"formats": [
"markdown",
"links"
],
"onlyMainContent": true,
"timeout": 120000
}),
signal: AbortSignal.timeout(150000),
});
console.log(await resp.json());Options
Section titled “Options”Send only url, or add any of these. An option DarkCrawl does not know is a 400 BAD_REQUEST.
| Option | What it does |
|---|---|
formats |
What to return. markdown is the default. Also html (cleaned), rawHtml (sanitized, not byte-exact), links, images, attributes, product and changeTracking. json, summary, question, highlights and query ask a model, and answer 503 AI_UNAVAILABLE when the server has no model provider. |
onlyMainContent |
true by default. false keeps navigation and footers. |
includeTags, excludeTags |
Keep or drop parts of the page by tag. |
headers |
Extra request headers. Cookie and Authorization are not available. |
timeout |
Milliseconds, 1000 to 300000, 120000 by default. It starts when the request arrives and covers the wait for a free fetch slot, the fetch and every retry. |
maxAge, minAge, lockdown, storeInCache |
Serve a stored copy instead of fetching. By default a scrape is always fresh. Working with onion sites explains maxAge. |
redactPII, checkPromptInjection |
Mask personal data, or refuse a page written to hijack an AI. Both are off unless you ask, and Working with onion sites describes them. |
parsers |
Read PDF and Office documents (on by default), and OCR scanned PDF pages with mode auto or ocr. |
skipTlsVerification |
A strict boolean, false by default. Many onion services use a self-signed certificate, which a normal check refuses with 502 ONION_UNREACHABLE. This turns the check off for .onion hops only. |
mobile, location, proxy (every request goes over Tor) and blockAds are accepted and ignored, with a warning in the reply.
Only valid v3 .onion addresses are read. A clear-web host is refused with 400 POLICY_FORBIDDEN, a malformed onion address with 400 INVALID_ONION, and a malformed URL or a scheme other than http or https with 400 BAD_REQUEST.
The reply is {"success": true, "data": {...}}. data holds one key for each format you asked for, and always:
metadata: Firecrawl’s fields (title,description,language,url,sourceURL,statusCode,contentType,scrapeId) plus DarkCrawl’sonion,evidence(the full evidence record, withcaptureIdandsha256Raw),cacheStateandcachedAt.indicators: a list of{type, value, count}for emails, IPs, domains, hashes, CVEs, wallets, onion addresses and similar.resources: the images, videos and files the page names, with what the page says about each. DarkCrawl lists them and does not fetch their bytes.warning, when there is one.
{
"success": true,
"data": {
"markdown": "# Notice\n\nSample page text.\n\nContact: sales@example.invalid\n",
"links": [
"http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/about",
"http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/contact"
],
"metadata": {
"title": "Notice",
"description": "",
"language": "en",
"sourceURL": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice",
"url": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice",
"statusCode": 200,
"contentType": "text/html",
"scrapeId": "01K0EXAMPLECAPTURE0000000A",
"onion": {
"host": "exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion",
"valid": true,
"version": 3
},
"evidence": {
"captureId": "01K0EXAMPLECAPTURE0000000A",
"fetchedAt": "2026-11-26T10:00:00+00:00",
"sha256Raw": "9f2c000000000000000000000000000000000000000000000000000000000000"
},
"cacheState": "miss",
"cachedAt": "2026-11-26T10:00:00+00:00"
},
"indicators": [
{
"type": "email",
"value": "sales@example.invalid",
"count": 1
}
],
"resources": [
{
"category": "image",
"element": "img",
"url": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/logo.png",
"label": "Logo",
"title": "",
"filename": "logo.png",
"type": "image/png",
"size": null,
"download": {
"status": "metadata_only"
}
}
]
}
}The reply is trimmed to the fields above. A page DarkCrawl cannot return comes back as an error: 502 ONION_UNREACHABLE when the site does not answer, 502 GATED behind an anti-DDoS queue or a CAPTCHA, 408 SCRAPE_TIMEOUT when the time runs out, and 503 TOR_NOT_READY when Tor is down. See Errors.
Limits
Section titled “Limits”A scrape counts as one request and, when it serves a page, one page. It can reach the plan’s requests a minute, requests a day, pages a day and pages in total. A model format also counts toward the day’s AI use. The values are on Rate limits.
Reference
Section titled “Reference”- POST /v2/scrape
- Crawl reads a whole site with the same options.