# Introduction

> What DarkCrawl is, how to get it, and how to send a first request.

DarkCrawl is an API that reads `.onion` sites over Tor. It returns each page as Markdown, links and metadata, with the indicators it found and an evidence record of the capture.

It speaks a subset of the Firecrawl v2 API, so the official Firecrawl SDKs work with it when you change only the base URL.

There are two ways to get it. The hosted API is by application: [ask for access](https://app.darkcrawl.dev/apply). Or [run it yourself](https://darkcrawl.dev/docs/run-it-yourself/) on your own machine, with Docker (a licence is needed).

## Start here

- Add DarkCrawl to an AI client with a [quick-start](https://darkcrawl.dev/docs/quickstart/claude-code/).
- Read one page with the [Scrape guide](https://darkcrawl.dev/docs/endpoints/scrape/).
- Use a Firecrawl SDK from [SDKs](https://darkcrawl.dev/docs/sdks/).
- Look up a route in the [API Reference](https://darkcrawl.dev/docs/api-reference/).

## First request

Send the address you want read to `POST /v2/scrape`. The key is read from the `DARKCRAWL_API_KEY` environment variable. The page comes back as Markdown in `data.markdown`.

**curl**

```bash
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","html"],"onlyMainContent":true,"timeout":120000}'
```

**Python**

```python
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", "html"],
        "onlyMainContent": True,
        "timeout": 120000,
    },
    timeout=150,
)
print(resp.json())
```

**Node**

```javascript
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",
      "html"
    ],
    "onlyMainContent": true,
    "timeout": 120000
  }),
  signal: AbortSignal.timeout(150000),
});
console.log(await resp.json());
```

## Ways to call it

**HTTP**

Send JSON to the API with any HTTP client.

**SDK**

Point a Firecrawl SDK at the DarkCrawl base URL.

**CLI**

Run `darkcrawl` commands from a terminal. See the [CLI](https://darkcrawl.dev/docs/cli/) page.

**MCP**

Give an AI client DarkCrawl as tools. See the [MCP server](https://darkcrawl.dev/docs/mcp/) page.

| Endpoint                | What it does                                                                           |
| ----------------------- | -------------------------------------------------------------------------------------- |
| `POST /v2/scrape`       | Reads one page                                                                         |
| `POST /v2/crawl`        | Reads a site, page by page                                                             |
| `POST /v2/batch/scrape` | Reads many pages as one job                                                            |
| `POST /v2/map`          | Lists a site’s URLs                                                                    |
| `POST /v2/search`       | Searches the pages DarkCrawl has stored, and Ahmia when the server is set up to ask it |
| `POST /v2/parse`        | Reads the text of a file you upload                                                    |
| `POST /v2/agent`        | Asks Kipp, the agent, to answer a prompt                                               |
| `POST /v2/monitor`      | Watches pages for changes                                                              |

> **Note:** Every request goes over Tor, so a page can take longer to answer than on the open web. [Working with onion sites](https://darkcrawl.dev/docs/onion-sites/) says what to expect.
