Discord Server Widget API
A server's public widget: online count, voice channels and invite, or a clear restricted answer.
GET /v1/discord/servers/{serverId}/widget1 credit Failed requests are free
About this endpoint
GET /v1/discord/servers/{serverId}/widget returns the public widget summary. On found, data.server names the server, online is the exact online count (not capped at the sample), invite carries the temporary code, URL and temporary: true when the widget includes one, voiceChannels lists the public voice channels with their id, name and position, and onlineSampleSize reports how many online members the sample contains. The sample members themselves are not returned.
A server owner can switch the widget off. That is a valid answer, not an error: lookupStatus is restricted and the response still names the server id. An id that matches no server returns not_found.
Discord Server Widget API FAQ
Why is the answer restricted?
The server owner has switched the public widget off. The route returns lookupStatus restricted with the server id instead of failing. Use the server page route for the server's public directory record.
Is the invite permanent?
No. The widget invite is temporary and its code expires within hours; the response marks it temporary: true rather than claiming it never expires. A store page's permanent invite is exposed on the server route as data.invite.
Is online the same as onlineSampleSize?
No. online is the exact online count. onlineSampleSize is the number of online members in the sample (at most 100); individual sampled members are not returned.
How many credits does a widget lookup cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
Other Discord endpoints
- InviteGET /v1/discord/invites/{code}
- ServerGET /v1/discord/servers/{serverId}
- ServersGET /v1/discord/servers
- Server searchGET /v1/discord/servers/search
- Server indexGET /v1/discord/servers/index
- Game indexGET /v1/discord/games/index
- Trending gamesGET /v1/discord/games/trending
- GameGET /v1/discord/games/{applicationId}