Back to APIs

Discord

A Discord server's member count shows up on every invite: the server name, the icon, and how many people are inside. It is public by design, which makes it a natural number to track.

What the official API asks of you

A bot. Discord's API reports a server's member count to a bot that has been added to that server, using a bot token from a registered application. That works well for your own server. For anyone else's, you would need an administrator to invite your bot in first, which is rarely something you can ask for.

What Metrika gives you for Discord

Send a server's vanity invite code and get back its member count. The identifier is the code from the server's own invite link, so discord.gg/discord-developers is simply discord-developers. Generated invite codes, the random ones anyone can create, are not supported: use the server's vanity code.

bash
$ curl -X POST https://metrika.run/api/v1/resources/search \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"resources": [{"platform": "discord", "type": "community", "identifier": "discord-developers"}]}'

Discord servers use the community type, the same one used for Telegram groups and subreddits. The member count comes back under metrics as followers, the common name for an audience, with a semantic field of members so your interface can use Discord's own word for it.

The same request shape everywhere

Discord is one of many platforms Metrika supports, alongside Instagram, X, TikTok, YouTube, LinkedIn, Facebook, Threads, Bluesky, GitHub, Twitch, Kick, Telegram, Snapchat, Pinterest, Reddit, Spotify, and SoundCloud. The request you write here is the request you write for all of them, and that matters because a community rarely lives on one platform. The same project often has a Discord server, a subreddit, and a GitHub organization, and the useful view is all of them side by side. One token, one response shape, up to ten resources in a single call, mixing platforms freely.

What Metrika is not

Metrika is read-only and public-only. It will not read messages, list members or roles, report who is online, or track individual Discord users. If you need that, a bot on the official API is the right tool for the job.

Getting started

Create an account, generate an API key from your dashboard, and you get up to 500 requests per month at no cost, no credit card required. The docs cover authentication and response formats.

Get started with Metrika

Create a free account and start pulling social media datapoints in minutes. The free tier includes 500 requests per month, no credit card required.