# Discord User search API (discord.search_users)

- Canonical page: [https://everyinfra.com/en/discord-api/search_users](https://everyinfra.com/en/discord-api/search_users?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "discord", "action": "search_users", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

Discord User search looks up public Discord accounts whose username or display name matches a `keyword`, such as leo. Each row carries the account's `id`, its `username`, the display name in `name`, the `avatar`, the server Clan tag in `clan_tag`, the account's creation time in `created_at`, and the number of servers and invite links in the result as `server_count` and `invite_count`. It answers which public accounts go by a given name.

Brand and community teams use it to find accounts that borrow an official name and to confirm that a handle they publish points to the intended account. Treat the rows as candidates: one term can match several accounts with the same or similar names, so key stored records on `id` rather than on either name. The search covers public account records only; it does not read messages inside servers and does not open private servers.

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=discord&action=search_users

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | Specifies search terms for public Discord server discovery in search or public user matching by username and display name in search_users. Does not index channel messages or grant access to private servers. |
| limit | integer (1–100) | no | 20 | The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| username | Username (@handle). |
| name | Name of the object itself, for account, product and business capabilities. |
| avatar | platform-native meaning |
| clan_tag | platform-native meaning |
| server_count | platform-native meaning |
| invite_count | platform-native meaning |
| created_at | Creation time, same format as posted_at. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "discord",
  "action": "search_users",
  "params": {
    "keyword": "leo"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "discord",
        "action": "search_users",
        "params": {
            "keyword": "leo",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 20. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "discord",
  "action": "search_users",
  "results": [
    {
      "id": "•••",
      "username": "•••",
      "name": "•••",
      "avatar": "https://cdn.discordapp.com/•••",
      "clan_tag": "Ca㏌e",
      "server_count": 65,
      "invite_count": 65,
      "created_at": "2025-05-14T00:00:00+00:00",
      "platform": "discord"
    },
    {
      "id": "•••",
      "username": "•••",
      "name": "•••",
      "avatar": "https://cdn.discordapp.com/•••",
      "server_count": 25,
      "invite_count": 42,
      "created_at": "2018-02-16T00:00:00+00:00",
      "platform": "discord"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### Can I look up a Discord user by username?

Yes. Pass the username as `keyword`. Discord User search matches usernames and display names alike, so several accounts can come back instead of one exact hit. Compare the `username` on each row with the handle you expected before you rely on a match, and remember that only public account records are searched.

### Does Discord User search read messages or private servers?

No. It reads public account records and nothing else: it does not search messages inside servers and does not grant access to private servers. To find public servers rather than people, use the Discord Search capability, which searches the public server directory by keyword, or browse that directory by category with Discord Directory.

### How do I tell look-alike accounts apart?

Key them on `id`, the account's unique ID on Discord, because a name alone can match several accounts. Then compare `username`, the account's handle, and `created_at`, its creation time in ISO 8601, to tell an established account from a newer one with a similar name.

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=discord
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
