# SDKs

> 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**

```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)
```

**Node**

```javascript
// npm install firecrawl
import { Firecrawl } from 'firecrawl';

const firecrawl = new Firecrawl({
  apiKey: process.env.DARKCRAWL_API_KEY,
  apiUrl: 'https://api.darkcrawl.dev',
});
const doc = await firecrawl.scrape('http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice', { formats: ['markdown'] });
console.log(doc.markdown);
```

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

## Choose a page

- [Python](https://darkcrawl.dev/docs/sdks/python/): the `firecrawl` package.
- [Node](https://darkcrawl.dev/docs/sdks/node/): the `firecrawl` package for JavaScript.
- [Plain HTTP](https://darkcrawl.dev/docs/sdks/http/): any client that can send JSON.

## What works

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.

## What does not

- **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](https://darkcrawl.dev/docs/endpoints/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](https://darkcrawl.dev/docs/endpoints/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](https://darkcrawl.dev/docs/onion-sites/) says what to expect.
