> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.darknetsearch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord

> Search Discord servers used by hacking communities with rich per-message context

Search Discord servers used by hacking communities, with rich per-message context. Each match returns the surrounding text, the author, the channel, and the server, so you can read a hit the way it appeared in the chat.

This source is synchronous. One `GET` returns the matching messages in the same response.

### Search

```bash theme={"dark"}
curl "https://client-api.leak.center/api/service/create_discord_search/?q=acme.com&limit=50&context_chars=100" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

Pin a search to one community by passing `server_id` or `channel_id`. List the servers and channels available to filter on with [`retrieve_discord_servers`](https://client-api.leak.center/scalar-docs/#tag/discord-search/GET/service/retrieve_discord_servers/) — set `include_channels=true` to expand each server's channels:

```bash theme={"dark"}
curl "https://client-api.leak.center/api/service/retrieve_discord_servers/?include_channels=true&limit=100" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

Review prior searches with [`retrieve_discord_search_history`](https://client-api.leak.center/scalar-docs/#tag/discord-search/GET/service/retrieve_discord_search_history/):

```bash theme={"dark"}
curl "https://client-api.leak.center/api/service/retrieve_discord_search_history/?page=1&page_size=20" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

### Request parameters

[`create_discord_search`](https://client-api.leak.center/scalar-docs/#tag/discord-search/GET/service/create_discord_search/) takes these query parameters:

| Parameter       | Type    | Required | Notes                                                           |
| --------------- | ------- | -------- | --------------------------------------------------------------- |
| `q`             | string  | Yes      | Search term. Minimum 1 character.                               |
| `context_chars` | integer | No       | Characters of surrounding text per hit. 50–1000, default `100`. |
| `skip`          | integer | No       | Result offset for paging. Min `0`, default `0`.                 |
| `limit`         | integer | No       | Page size. 1–500, default `50`.                                 |
| `server_id`     | integer | No       | Restrict to one server.                                         |
| `channel_id`    | integer | No       | Restrict to one channel.                                        |
| `author_name`   | string  | No       | Restrict to one author.                                         |
| `date_from`     | date    | No       | Earliest message date (`YYYY-MM-DD`).                           |
| `date_to`       | date    | No       | Latest message date (`YYYY-MM-DD`).                             |

[`retrieve_discord_servers`](https://client-api.leak.center/scalar-docs/#tag/discord-search/GET/service/retrieve_discord_servers/) takes `skip` (min `0`, default `0`), `limit` (1–1000, default `100`), and `include_channels` (boolean, default `false`). [`retrieve_discord_search_history`](https://client-api.leak.center/scalar-docs/#tag/discord-search/GET/service/retrieve_discord_search_history/) takes `page` (min `1`, default `1`) and `page_size` (min `1`, default `20`).

Each search costs 0 credits. Rate limit: 1,000 requests/day, applied per endpoint.

### What comes back

The search response is an object with `results`, `total`, and `search_history_id`. Each item in `results` carries the message and its context.

Top-level fields:

* `results` — array of matching messages.
* `total` — total number of matches for the query.
* `search_history_id` — id of this search in your history, or `null` if it was not saved.

Each result:

* `content` — the full message text.
* `content_highlighted` — the same text with the matched term marked up.
* `text_preview` — a short preview of the message.
* `posted_at` — when the message was posted.
* `edited_at` — when it was last edited, or `null`.
* `is_pinned` — whether the message is pinned in its channel.
* `author` — the poster, as `{ name, id }`.
* `channel` — the channel it appeared in, as `{ name, id }`.
* `server` — the server it belongs to, as `{ name, id }`.
* `context` — the surrounding text, as `{ before, match, after, match_position }`.
* `embeds` — array of embed objects attached to the message.

```json theme={"dark"}
{
  "results": [
    {
      "content": "anyone got access to acme.com vpn? willing to pay",
      "content_highlighted": "anyone got access to <em>acme.com</em> vpn? willing to pay",
      "text_preview": "anyone got access to acme.com vpn?",
      "posted_at": "2026-05-14T09:21:03Z",
      "edited_at": null,
      "is_pinned": false,
      "author": { "name": "ghost_buyer", "id": 884213 },
      "channel": { "name": "access-market", "id": 5521 },
      "server": { "name": "Initial Access Brokers", "id": 412 },
      "context": {
        "before": "...thread on corp targets... ",
        "match": "anyone got access to acme.com vpn? willing to pay",
        "after": " ...DM with proof.",
        "match_position": 42
      },
      "embeds": []
    }
  ],
  "total": 1,
  "search_history_id": 90187
}
```

`retrieve_discord_servers` returns `total`, `skip`, `limit`, and a `servers` array. Each server carries `id`, `name`, `description`, `member_count`, `icon_url`, `discovered_at`, and `last_scraped_at`; with `include_channels=true` it also carries a `channels` array, where each channel has `id`, `name`, `type`, and `message_count`. `retrieve_discord_search_history` returns `total`, `page`, `page_size`, and an `items` array, where each item has `id`, `query`, `searched_at`, and `total_matches`.

When a hit lands, read the `context` to confirm the term is a real mention and not a coincidence, then pivot on `author.id` and `server_id` to map the actor and the community before tasking deeper collection.
