Skip to content

SDKs

SDKs

Copy page

Use the official Firecrawl SDKs with DarkCrawl by changing only the base URL.

Firecrawl SDK compatible

DarkCrawl speaks a subset of the Firecrawl v2 API. The official Firecrawl SDKs work with it when you change only the base URL: your code, your calls and your options stay as they are.

python
# pip install firecrawl
import os
from firecrawl import Firecrawl

firecrawl = Firecrawl(
    api_key=os.environ["DARKCRAWL_API_KEY"],
    api_url="https://api.darkcrawl.dev",
)
doc = firecrawl.scrape("http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice", formats=["markdown"])
print(doc.markdown)

The samples read your key from DARKCRAWL_API_KEY. The base URL of the hosted API is https://api.darkcrawl.dev.

  • Python: the firecrawl package.
  • Node: the firecrawl package for JavaScript.
  • Plain HTTP: any client that can send JSON.

DarkCrawl’s tests run both SDKs through scrape, crawl, start crawl, status with paging through next, cancel, map, every /v2/monitor call and the agent calls. Parse works from both. Each SDK’s page lists what it drops or sends for you.

  • Endpoints. DarkCrawl has /v2/scrape, /v2/crawl, /v2/batch/scrape, /v2/map, /v2/search, /v2/parse, /v2/monitor and /v2/agent. The agent’s list, trace, skill and snapshot routes, browser sessions, usage and credits, and the whole v1 API are not implemented and answer 404.
  • Extract. /v2/extract answers 501 NOT_IMPLEMENTED: Firecrawl deprecated it. Use the agent, which does its work.
  • Formats. branding, menu and deterministicJson answer 400 NOT_IMPLEMENTED.
  • Browser options. actions answers 400 NOT_IMPLEMENTED.
  • The open web. Clear-web URLs are refused, Cookie and Authorization headers are not available, and search answers from onion services only.
  • Credits. creditsUsed is always 0.

Options DarkCrawl ignores are accepted and named in a warning, so an SDK call does not fail on shape. A field Firecrawl does not have is 400 BAD_REQUEST.

Every request goes over Tor, so allow more time than for the open web. Working with onion sites says what to expect.