# GET /darkcrawl/v1/search

> Search the text of the captures DarkCrawl has stored.

GET `/darkcrawl/v1/search`

**Authentication:** your key as a [bearer token](https://darkcrawl.dev/docs/api-reference/authentication/).

## Query parameters

| Field     | Type                                 | Required | Default   |
| --------- | ------------------------------------ | -------- | --------- |
| `q`       | `string`                             | Required |           |
| `host`    | `string`                             | Optional |           |
| `since`   | `string`                             | Optional |           |
| `jobId`   | `string`                             | Optional |           |
| `limit`   | `integer`                            | Optional | `10`      |
| `offset`  | `integer`                            | Optional | `0`       |
| `source`  | `string` Values: `pages`, `telegram` | Optional | `"pages"` |
| `channel` | `string`                             | Optional |           |

## Request

**curl**

```bash
curl 'https://api.darkcrawl.dev/darkcrawl/v1/search?q=debian+mirror&limit=10' \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY"
```

**Python**

```python
import os
import requests

resp = requests.get(
    "https://api.darkcrawl.dev/darkcrawl/v1/search?q=debian+mirror&limit=10",
    headers={"Authorization": "Bearer " + os.environ["DARKCRAWL_API_KEY"]},
    timeout=330,
)
print(resp.json())
```

**Node**

```javascript
const resp = await fetch("https://api.darkcrawl.dev/darkcrawl/v1/search?q=debian+mirror&limit=10", {
  headers: {
    Authorization: "Bearer " + process.env.DARKCRAWL_API_KEY,
  },
  signal: AbortSignal.timeout(330000),
});
console.log(await resp.json());
```

## Response

Status `200`.

```json
{
  "results": [
    {
      "captureId": "01K0EXAMPLECAPTURE0000000A",
      "url": "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/mirrors",
      "title": "Mirror list",
      "snippet": "…a plainly fictional debian mirror list…",
      "host": "exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion",
      "fetchedAt": "2026-11-26T10:00:00+00:00",
      "jobId": null
    }
  ],
  "next": null,
  "truncated": false
}
```

## Errors

| Code                    | Status |
| ----------------------- | ------ |
| `BAD_REQUEST`           | 400    |
| `NOT_FOUND`             | 404    |
| `GONE`                  | 410    |
| `BLOCKLIST_UNAVAILABLE` | 503    |

What each code means, and what to do about it: [Errors](https://darkcrawl.dev/docs/api-reference/errors/).

## Notes

- Nothing is fetched, and nobody else sees the query. This is not `POST /v2/search`, which can ask Ahmia.
- One result for each page: the newest capture of its final address that holds the terms. `snippet` is the text around the terms.
- `next` is the offset of the following page, or `null`. `truncated` is `true` when the answer was cut because the terms are common: narrow the query.
- A blocked onion in the query is left out, and `warning` says so. `host` takes one exact onion host.
