# Discord API
> Read Discord in real time — no bot token, no OAuth, no login. Resolve any invite (a discord.gg/<code> link or bare code) to its full server: name, description, icon/banner/splash image URLs, verification and NSFW levels, premium (boost) tier and count, vanity URL, the channel it points to, the user who created it, and live approximate member and online counts. Pull a server's clan/guild "profile" (tag, badge, traits, features) and a lightweight member+online count by itself. For any server that has its widget enabled, read the widget directly by guild id: online presence count, the list of currently-online members and the voice channels, plus the active instant invite. A helper builds any Discord CDN asset URL (icon, banner, splash, avatar, guild-tag badge) from an id and hash. Every call is live (no cache) and returns the upstream Discord shape, enriched with ready-to-use image URLs. 10 endpoints — the same public surface the popular Discord-lookup wrappers expose, built for server analytics, invite resolution, community dashboards and bot back-ends. No upstream key, no cache. (Widget endpoints return 403 when a server has its widget turned off.)

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/discord-api/..."
```

## Pricing
- **Free** (Free) — 3,100 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 62,000 calls/Mo, 8 req/s
- **Pro** ($32/Mo) — 305,000 calls/Mo, 20 req/s
- **Mega** ($73/Mo) — 1,520,000 calls/Mo, 50 req/s

## Endpoints

### Invites

#### `GET /v1/channel` — Invite target channel

**Parameters:**
- `code` (query, required, string) — Invite code or discord.gg/<code> link Example: `discord-developers`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/channel?code=discord-developers"
```

**Response:**
```json
{
    "data": {
        "code": "discord-developers",
        "channel": {
            "id": "613430047285706767",
            "name": "rules",
            "type": 0
        },
        "guild_id": "613425648685547541",
        "expires_at": null
    },
    "meta": {
        "timestamp": "2026-06-02T16:53:14.175Z",
        "request_id": "f17a9731-22c8-4eca-816a-af91608eb78d"
    },
    "status": "ok",
    "message": "Invite target channel",
    "success": true
}
```

#### `GET /v1/counts` — Member + online counts

**Parameters:**
- `code` (query, required, string) — Invite code or discord.gg/<code> link Example: `discord-developers`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/counts?code=discord-developers"
```

**Response:**
```json
{
    "data": {
        "id": "613425648685547541",
        "name": "Discord Developers",
        "member_count": 284272,
        "online_count": 78214
    },
    "meta": {
        "timestamp": "2026-06-02T16:53:14.315Z",
        "request_id": "1d9f0d46-b083-423b-976a-0acbfce33527"
    },
    "status": "ok",
    "message": "Member + online counts",
    "success": true
}
```

#### `GET /v1/guild` — Server / guild info

**Parameters:**
- `code` (query, required, string) — Invite code or discord.gg/<code> link Example: `discord-developers`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/guild?code=discord-developers"
```

**Response:**
```json
{
    "data": {
        "id": "613425648685547541",
        "icon": "a_1d18823294be0ccfbcdec090c8ffcc0d",
        "name": "Discord Developers",
        "nsfw": false,
        "banner": "f02442ea4d3d218bbeb15ce12cff0387",
        "splash": "56394bca8b4f60282ea833e8703b5fcf",
        "features": [
            "VIDEO_QUALITY_720_60FPS",
            "ANIMATED_ICON",
            "VIDEO_QUALITY_1080_60FPS",
            "GUILD_WEB_PAGE_VANITY_URL",
            "CHANNEL_ICON_EMOJIS_GENERATED",
            "CONSIDERED_EXTERNALLY_DISCOVERABLE",
            "AUDIO_BITRATE_128_KBPS",
            "MEMBER_VERIFICATION_GATE_ENABLED",
            "AUDIO_BITRATE_384_KBPS",
            "SOUNDBOARD",
            "AUTO_MODERATION",
            "HAS_DIRECTORY_ENTRY",
            "AGE_VERIFICATION_LARGE_GUILD",
            "AUTOMOD_TRIGGER_USER_PROFILE",
            "TEXT_IN_STAGE_ENABLED",
            "PIN_PERMISSION_MIGRATION_COMPLETE",
            "DISCOVERABLE",
            "BYPASS_SLOWMODE_PERMISSION_MIGRATION_COMPLETE",
            "NEW_THREAD_PERMISSIONS",
            "NEWS",
            "STAGE_CHANNEL_VIEWERS_50",
            "WELCOME_SCREEN_ENABLED",
            "MEMBER_SAFETY_PAGE_ROLLOUT",
            "TIERLESS_BOOSTING",
            "GUILD_SERVER_GUIDE",
            "VANITY_URL",
            "ROLE_ICONS",
            "VIDEO_BITRATE_ENHANCED",
            "ENABLED_DISCOVERABLE_BEFORE",
            "VERIFIED",
            "GUILD_ONBOARDING",
            "COMMUNITY_EXP_LARGE_UNGATED",
   
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/invite` — Full invite resolution

**Parameters:**
- `code` (query, required, string) — Invite code or discord.gg/<code> link Example: `discord-developers`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/invite?code=discord-developers"
```

**Response:**
```json
{
    "data": {
        "id": 0,
        "code": "discord-developers",
        "type": 0,
        "flags": 2,
        "guild": {
            "id": "613425648685547541",
            "icon": "a_1d18823294be0ccfbcdec090c8ffcc0d",
            "name": "Discord Developers",
            "nsfw": false,
            "banner": "f02442ea4d3d218bbeb15ce12cff0387",
            "splash": "56394bca8b4f60282ea833e8703b5fcf",
            "features": [
                "VIDEO_QUALITY_720_60FPS",
                "ANIMATED_ICON",
                "VIDEO_QUALITY_1080_60FPS",
                "GUILD_WEB_PAGE_VANITY_URL",
                "CHANNEL_ICON_EMOJIS_GENERATED",
                "CONSIDERED_EXTERNALLY_DISCOVERABLE",
                "AUDIO_BITRATE_128_KBPS",
                "MEMBER_VERIFICATION_GATE_ENABLED",
                "AUDIO_BITRATE_384_KBPS",
                "SOUNDBOARD",
                "AUTO_MODERATION",
                "HAS_DIRECTORY_ENTRY",
                "AGE_VERIFICATION_LARGE_GUILD",
                "AUTOMOD_TRIGGER_USER_PROFILE",
                "TEXT_IN_STAGE_ENABLED",
                "PIN_PERMISSION_MIGRATION_COMPLETE",
                "DISCOVERABLE",
                "BYPASS_SLOWMODE_PERMISSION_MIGRATION_COMPLETE",
                "NEW_THREAD_PERMISSIONS",
                "NEWS",
                "STAGE_CHANNEL_VIEWERS_50",
                "WELCOME_SCREEN_ENABLED",
                "MEMBER_SAFETY_PAGE_ROLLOUT",
                "TIERLESS_BOOSTING",
                "GUILD_SERVER_GU
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/inviter` — Invite creator

**Parameters:**
- `code` (query, required, string) — Invite code or discord.gg/<code> link Example: `discord-developers`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/inviter?code=discord-developers"
```

**Response:**
```json
{
    "data": {
        "code": "discord-developers",
        "note": "Vanity / system invite — no inviter.",
        "inviter": null
    },
    "meta": {
        "timestamp": "2026-06-02T16:53:14.698Z",
        "request_id": "5104cee8-5e8b-4b4a-8862-a711f91f111c"
    },
    "status": "ok",
    "message": "Invite creator",
    "success": true
}
```

#### `GET /v1/profile` — Clan / guild profile

**Parameters:**
- `code` (query, required, string) — Invite code or discord.gg/<code> link Example: `discord-developers`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/profile?code=discord-developers"
```

**Response:**
```json
{
    "data": {
        "note": null,
        "profile": {
            "id": "613425648685547541",
            "tag": "CODE",
            "name": "Discord Developers",
            "badge": 6,
            "traits": [],
            "features": [
                "DISCOVERABLE",
                "MEMBER_VERIFICATION_GATE_ENABLED",
                "VERIFIED",
                "COMMUNITY"
            ],
            "badge_url": "https://cdn.discordapp.com/guild-tag-badges/613425648685547541/fabe3300337b6abfa12443ade32c4ceb.png",
            "icon_hash": "a_1d18823294be0ccfbcdec090c8ffcc0d",
            "badge_hash": "fabe3300337b6abfa12443ade32c4ceb",
            "visibility": 1,
            "banner_hash": null,
            "description": "Welcome to Discord Developers (DDevs), the official home for the community of developers building apps, bots, games, and more with Discord APIs.",
            "member_count": 284272,
            "online_count": 78214,
            "premium_tier": 3,
            "game_activity": [],
            "custom_banner_hash": "a1a6ecd2400811d7f7596150b8672b50",
            "badge_color_primary": "#25d6a4",
            "game_application_ids": [],
            "badge_color_secondary": "#57b59e",
            "premium_subscription_count": 45
        },
        "guild_id": "613425648685547541"
    },
    "meta": {
        "timestamp": "2026-06-02T16:53:14.852Z",
        "request_id": "1eb65233-f5cd-4053-8f87-1ed7b3d45ca3"
    },
    "status": "ok",
    "message": "C
…(truncated, see openapi.json for full schema)
```

### Widget

#### `GET /v1/widget` — Server widget

**Parameters:**
- `guild` (query, required, string) — Server (guild) id — widget must be enabled Example: `267624335836053506`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/widget?guild=267624335836053506"
```

**Response:**
```json
{
    "data": {
        "id": "267624335836053506",
        "name": "Python",
        "members": [
            {
                "id": "0",
                "avatar": null,
                "status": "dnd",
                "username": "! ꒰ঌ Asom ໒꒱",
                "avatar_url": "https://cdn.discordapp.com/widget-avatars/fFFc_sT1sqx0kldcV1f4RZLNvMQgMbF_tPB0vZhF-nY/3t3LWQeXB7TyJh34W1z_5YRVwA5VrShZVC3CWFLJhe0LvNrvcuisTeoer_y2jFzv2F-Vk8McFLleTzbHV-9u4dec46_KuIFDiZQsIzyLoqTIIMgMdfad3l6CzTBpM39JjGLRIo4mKYnK5w",
                "discriminator": "0000"
            },
            {
                "id": "1",
                "avatar": null,
                "status": "online",
                "username": "'Elizabeth🌹",
                "avatar_url": "https://cdn.discordapp.com/widget-avatars/hyL0EMkN2QHh3lGCQs0wYJK9-medYbERocy7OKjdmZs/THbU44r28ViLdRaovavZQwd3DMFHN8UQbCP6dMolOoaW53ferXtIbowbU65oSVA1DiZPdpdu4HDMNeIyknzJ0B4dEnHbjhLyUSeMCbZO7lD2hnkMvhJJLzZi0NgMLnliUBvCzx2qLsulXQ",
                "discriminator": "0000"
            },
            {
                "id": "2",
                "avatar": null,
                "status": "online",
                "activity": {
                    "name": "Honkai: Star Rail"
                },
                "username": "1...",
                "avatar_url": "https://cdn.discordapp.com/widget-avatars/LSugcIFtMMM_llQLzg3KXjPGQrPwo_7Bl1S-yGKe-w4/jBAGEJ_r7E3WYNb7Ce9zb4TRLGC6DAeqg1Uu1dtG1HMpDU7zpFDKOI__EecZskjiJsnQaLuKZcjZwTD5j74",
         
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/widget/channels` — Widget voice channels

**Parameters:**
- `guild` (query, required, string) — Server (guild) id — widget must be enabled Example: `267624335836053506`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/widget/channels?guild=267624335836053506"
```

**Response:**
```json
{
    "data": {
        "id": "267624335836053506",
        "name": "Python",
        "channels": [
            {
                "id": "756327105389920306",
                "name": "AFK",
                "position": 22
            },
            {
                "id": "751592231726481530",
                "name": "Code/Help",
                "position": 20
            },
            {
                "id": "855798297763512341",
                "name": "Main Stage Channel",
                "position": 0
            },
            {
                "id": "764232549840846858",
                "name": "Off-Topic Lounge",
                "position": 21
            },
            {
                "id": "751591688538947646",
                "name": "Voice Chat 0",
                "position": 18
            },
            {
                "id": "799641437645701151",
                "name": "Voice Chat 1",
                "position": 19
            }
        ],
        "instant_invite": "https://discord.com/invite/QZQUrVWs"
    },
    "meta": {
        "timestamp": "2026-06-02T16:53:15.575Z",
        "request_id": "00ea4d58-ae11-4207-a6a6-efbaea089b80"
    },
    "status": "ok",
    "message": "Widget voice channels",
    "success": true
}
```

#### `GET /v1/widget/members` — Widget online members

**Parameters:**
- `guild` (query, required, string) — Server (guild) id — widget must be enabled Example: `267624335836053506`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/widget/members?guild=267624335836053506"
```

**Response:**
```json
{
    "data": {
        "id": "267624335836053506",
        "name": "Python",
        "members": [
            {
                "id": "0",
                "avatar": null,
                "status": "dnd",
                "username": "! ꒰ঌ Asom ໒꒱",
                "avatar_url": "https://cdn.discordapp.com/widget-avatars/fFFc_sT1sqx0kldcV1f4RZLNvMQgMbF_tPB0vZhF-nY/3t3LWQeXB7TyJh34W1z_5YRVwA5VrShZVC3CWFLJhe0LvNrvcuisTeoer_y2jFzv2F-Vk8McFLleTzbHV-9u4dec46_KuIFDiZQsIzyLoqTIIMgMdfad3l6CzTBpM39JjGLRIo4mKYnK5w",
                "discriminator": "0000"
            },
            {
                "id": "1",
                "avatar": null,
                "status": "online",
                "username": "'Elizabeth🌹",
                "avatar_url": "https://cdn.discordapp.com/widget-avatars/hyL0EMkN2QHh3lGCQs0wYJK9-medYbERocy7OKjdmZs/THbU44r28ViLdRaovavZQwd3DMFHN8UQbCP6dMolOoaW53ferXtIbowbU65oSVA1DiZPdpdu4HDMNeIyknzJ0B4dEnHbjhLyUSeMCbZO7lD2hnkMvhJJLzZi0NgMLnliUBvCzx2qLsulXQ",
                "discriminator": "0000"
            },
            {
                "id": "2",
                "avatar": null,
                "status": "online",
                "activity": {
                    "name": "Honkai: Star Rail"
                },
                "username": "1...",
                "avatar_url": "https://cdn.discordapp.com/widget-avatars/LSugcIFtMMM_llQLzg3KXjPGQrPwo_7Bl1S-yGKe-w4/jBAGEJ_r7E3WYNb7Ce9zb4TRLGC6DAeqg1Uu1dtG1HMpDU7zpFDKOI__EecZskjiJsnQaLuKZcjZwTD5j74",
         
…(truncated, see openapi.json for full schema)
```

### Utility

#### `GET /v1/cdn` — Build CDN asset URL

**Parameters:**
- `type` (query, required, string) — icon|splash|discovery_splash|banner|avatar|guild_tag_badge Example: `icon`
- `id` (query, required, string) — Guild or user snowflake id Example: `613425648685547541`
- `hash` (query, required, string) — Asset hash Example: `a_1d18823294be0ccfbcdec090c8f00000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/cdn?type=icon&id=613425648685547541&hash=a_1d18823294be0ccfbcdec090c8f00000"
```

**Response:**
```json
{
    "data": {
        "id": "613425648685547541",
        "url": "https://cdn.discordapp.com/icons/613425648685547541/a_1d18823294be0ccfbcdec090c8f00000.gif",
        "hash": "a_1d18823294be0ccfbcdec090c8f00000",
        "type": "icon"
    },
    "meta": {
        "timestamp": "2026-06-02T16:53:15.797Z",
        "request_id": "d2a26818-24c7-46b5-b497-3621b2b7e6fb"
    },
    "status": "ok",
    "message": "Build CDN asset URL",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/discord-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream (public invite + widget endpoints); this gateway requires x-api-key",
        "name": "Discord API",
        "note": "Resolve any invite (discord.gg/<code>) for guild, channel, inviter, clan profile and live member/online counts; read the server widget (online members, voice channels, instant invite) for widget-enabled servers; build CDN asset URLs. Live, no cache. Widget endpoints 403 when a server has the widget disabled.",
        "source": "Discord public REST (api/v10 invites + guild widget) — no bot token",
        "endpoints": 10
    },
    "meta": {
        "timestamp": "2026-06-02T16:53:15.904Z",
        "request_id": "a9b92f7d-48f3-40c0-9560-322ff2dc7e96"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/discord-api
OpenAPI spec: https://www.oanor.com/api/discord-api/openapi.json
