API Reference
API Reference
Copy page
Every route of the DarkCrawl API, with its fields, an example request and reply, and its errors.
The DarkCrawl API reads .onion sites over Tor and answers in JSON. Every route is under https://api.darkcrawl.dev. The routes that start with /v2 follow Firecrawl’s v2 API, so the Firecrawl SDKs reach them. The routes that start with /darkcrawl/v1 are DarkCrawl’s own. The routes that start with /api read your own company: its plan, usage and activity. GET /api/plans lists the plans on offer.
Start with these four pages. Each answers a question you will have on your first call.
| Page | What it covers |
|---|---|
| Authentication | How to send your key, and what a refused key looks like. |
| Errors | The shape of an error, every code, and what to do about each. |
| Rate limits | What your plan allows, what counts against it, and what a refused call looks like. |
| Webhooks | The events a crawl, a batch or a monitor sends to your receiver. |
Only valid v3 onion addresses are read. A clear-web address is refused with 400 POLICY_FORBIDDEN, and a malformed onion address with 400 INVALID_ONION.
Routes
Section titled “Routes”Each route has a page with its fields, a request in curl, Python and Node, an example reply, and the errors it can answer. GET /health needs no key and is on its own page.
Scrape
POST /: Read one onion page and get Markdown, links, metadata, indicators and an evidence record.v2/ scrape
Crawl
POST /: Start a crawl of one onion site. It returns a job id to read.v2/ crawl GET /: Read a crawl: its status, and the pages it has read so far.v2/ crawl/ {job_id} DELETE /: Cancel a crawl. Pages already read stay.v2/ crawl/ {job_id} GET /: List the pages of a crawl that failed or were skipped.v2/ crawl/ {job_id}/ errors
Batch scrape
POST /: Scrape many onion pages as one job, with the same options for each.v2/ batch/ scrape GET /: Read a batch: its status, and the pages it has read so far.v2/ batch/ scrape/ {job_id} DELETE /: Cancel a batch. Pages already read stay.v2/ batch/ scrape/ {job_id} GET /: List the pages of a batch that failed or were skipped.v2/ batch/ scrape/ {job_id}/ errors
Map
POST /: List the pages of one onion site, found by a short crawl of its links.v2/ map
Search
POST /: Search the pages DarkCrawl has stored, and Ahmia for what is missing when the server is set up to ask it.v2/ search
Stored captures
GET /: Search the text of the captures DarkCrawl has stored.darkcrawl/ v1/ search
Parse
POST /: Upload a PDF, an Office file or an image and get its text back. An image is read by OCR, only with the image parser on.v2/ parse GET /: List the file types parse reads.v2/ parse/ formats
Extract
POST /: Not offered: Firecrawl deprecated extract. This route always refuses.v2/ extract GET /: Not offered: Firecrawl deprecated extract. This route always refuses.v2/ extract/ {extract_id}
Agent
POST /: Start an agent run: it reads pages to answer a prompt, and cites them.v2/ agent GET /: Read an agent run: its status, its answer and the pages it cites.v2/ agent/ {job_id} DELETE /: Cancel an agent run.v2/ agent/ {job_id} GET /: Read a thread: the runs asked in it, oldest first.v2/ agent/ threads/ {thread_id}
Monitor
GET /: List your monitors, newest first.v2/ monitor POST /: Create a monitor: targets to read on a schedule, and a report of what changed.v2/ monitor GET /: Read one monitor.v2/ monitor/ {monitor_id} PATCH /: Change a monitor. Only the fields you send change.v2/ monitor/ {monitor_id} DELETE /: Delete a monitor and its checks. The captures it made stay.v2/ monitor/ {monitor_id} GET /: List the checks of a monitor, newest first.v2/ monitor/ {monitor_id}/ checks GET /: Read one check with its pages, and for a changed page its diff.v2/ monitor/ {monitor_id}/ checks/ {check_id} POST /: Run a check now, outside the schedule.v2/ monitor/ {monitor_id}/ run
Leak library
GET /: Is a company or a domain listed on a ransomware leak site?darkcrawl/ v1/ leaks/ check GET /: Which listings reach their deadline soon?darkcrawl/ v1/ leaks/ countdowns GET /: What was posted on the leak sites lately?darkcrawl/ v1/ leaks/ recent GET /: Which leak sites does a group have, and are they up?darkcrawl/ v1/ leaks/ sites
Watches
GET /: List your watches, oldest first.darkcrawl/ v1/ watches POST /: Create a watch: words to look for in new pages, and the channels to tell.darkcrawl/ v1/ watches GET /: Read one watch.darkcrawl/ v1/ watches/ {watch_id} PATCH /: Change a watch: its name, terms, channels or state.darkcrawl/ v1/ watches/ {watch_id} DELETE /: Delete a watch with its hits and alerts.darkcrawl/ v1/ watches/ {watch_id} GET /: List the pages a watch matched, newest first.darkcrawl/ v1/ watches/ {watch_id}/ hits
Alert channels
GET /: List your alert channels.darkcrawl/ v1/ channels POST /: Create an alert channel: a webhook, a Slack address or an email list.darkcrawl/ v1/ channels GET /: Read one alert channel.darkcrawl/ v1/ channels/ {channel_id} PATCH /: Change a channel. Only the fields you send change.darkcrawl/ v1/ channels/ {channel_id} DELETE /: Delete a channel and its deliveries.darkcrawl/ v1/ channels/ {channel_id} POST /: Make a new signing secret for a webhook channel.darkcrawl/ v1/ channels/ {channel_id}/ secret POST /: Send a test alert to a channel now.darkcrawl/ v1/ channels/ {channel_id}/ test
Alerts
GET /: List the alerts raised for your monitors and watches, newest first.darkcrawl/ v1/ alerts GET /: Read one alert.darkcrawl/ v1/ alerts/ {alert_id}
Your company
GET /: Your company: its plan, its limits and what it has used today.api/ org GET /: Your company's calls, newest first.api/ org/ activity GET /: What your company used, by day and by route.api/ org/ usage GET /: The plans DarkCrawl offers, with the limits of each.api/ plans