logo

Discord Lookup API

Bot-powered server-scoped user lookups — privacy-first.

How it works

The API is backed by a Discord bot. To use server endpoints you must invite the bot to your server. Lookups are scoped by guild ID — the user being queried must be a member of that guild. This prevents cross-server stalking.

Getting started

  1. Invite the bot to your server using https://discord.com/oauth2/authorize?client_id=1418180497191993354&scope=bot&permissions=65536 or the OAuth link.
  2. Ensure the bot has permission to view server members.
  3. Call /api/discord-server-api/user?guild=GUILD_ID&user=999407143646142514 (only works if user is in guild).

API Examples

Get Guild Info
GET /api/discord-server-api/guild?guild=1150156572857733170
{
  "id": "1150156572857733170",
  "name": "ItsMarwan's Blue Planet",
  "description": "ItsMarwan Official Discord Server! If Y...",
  "icon": "https://cdn.discordapp.com/icons/...",
  "banner": null,
  "splash": null,
  "discoverySplash": "https://cdn.discordapp.com/discovery-splashes/...",
  "vanityURL": "itsmarwan-s-blue-planet-1...",
  "verificationLevel": 3,
  "explicitContentFilter": 2,
  "mfaLevel": 1,
  "nsfwLevel": 0,
  "features": [
    "GUILD_ONBOARDING_HAS_PROMPTS",
    "ENABLED_DISCOVERA..."
  ],
  "premiumTier": 0,
  "premiumSubscriptionCount": 1,
  "approximateMemberCount": 1754,
  "approximatePresenceCount": 578,
  "ownerId": "999407143646142514",
  "joinedAt": null,
  "afkTimeout": 900,
  "maxMembers": 25000000,
  "maxPresences": null,
  "preferredLocale": "en-US"
}
User lookup (guild-scoped)
GET /api/discord-server-api/user?guild=GUILD_ID&user=999407143646142514
{
  "id": "999407143646142514",
  "tag": "itsmarwan.",
  "username": "itsmarwan.",
  "bot": false,
  "badges": [
    "HYPESQUAD_BRAVERY",
    "ACTIVE_DEVELOPER"
  ],
  "avatar": {
    "id": "23cbb86f9144f88876034a82ba5f4b61",
    "link": "https://cdn.discordapp.com/avatars/...",
    "is_animated": false
  },
  "banner": {
    "id": null,
    "link": null,
    "is_animated": false,
    "color": 460033
  },
  "createdAt": "2022-07-20T20:07:11.132Z"
}

Docs

Authentication

No API key required — the serverless function uses a bot token stored in environment variables. Keep your bot token secret.

Rate limits

This simple serverless API does not implement caching. For heavy usage add caching or rate-limits to avoid Discord rate limit errors.