# Discord Server API (discord.server)

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

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| invite | not declared | yes | not declared | Identifies a target server using a raw invite code or full URL format (discord.gg/<code> or discord.com/invite/<code>). The server action reads public metadata attached to the invite without joining the server; expired or invalid invites do not prove a server is non-existent. |
| code | not declared | no | not declared | Accepts the invite code segment from an invite link as a compatibility alias for the invite parameter. The request must still pass the required invite parameter; this field does not accept verification codes, bot tokens, or server IDs. |
| url | not declared | no | not declared | Provides a compatibility alias for the invite parameter that accepts a full Discord invite link. The request must still pass the required invite parameter; channel message links are not accepted as valid invites. |

## 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. |
| name | Name of the object itself, for account, product and business capabilities. |
| url | Link to the record on the platform. |
| text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
| member_count | platform-native meaning |
| online_count | platform-native meaning |
| boost_count | platform-native meaning |
| invite_code | platform-native meaning |
| vanity_url_code | platform-native meaning |
| icon_url | platform-native meaning |
| banner_url | platform-native meaning |
| verification_level | platform-native meaning |
| nsfw_level | platform-native meaning |
| channel_name | platform-native meaning |
| channel_type | platform-native meaning |
| inviter_username | platform-native meaning |
| inviter_name | platform-native meaning |
| expires_at | platform-native meaning |
| 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": "server",
  "params": {
    "invite": "discord.gg/limewire"
  }
}'
```

```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": "server",
        "params": {
            "invite": "discord.gg/limewire",
        },
    },
    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. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "discord",
  "action": "server",
  "results": {
    "id": "•••",
    "name": "LimeWire",
    "url": "https://discord.gg/limewire",
    "text": "The new LimeWire",
    "member_count": 1957101,
    "online_count": 28267,
    "boost_count": 8,
    "invite_code": "limewire",
    "vanity_url_code": "limewire",
    "icon_url": "https://cdn.discordapp.com/icons/1046979304547954728/bbe5d6097255431300cfc18dd629b876.png",
    "banner_url": "https://cdn.discordapp.com/banners/1046979304547954728/d16ea54ee56246388b498ee9256de5ed.png",
    "verification_level": "LOW",
    "nsfw_level": "DEFAULT",
    "channel_name": "📢︱updates",
    "channel_type": "ANNOUNCEMENT",
    "platform": "discord"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

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