> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/discord/servers-serverid-widget>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/discord/servers-serverid-widget.mdx>

---

# 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}/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`.

## Request

- **Endpoint:** `GET /v1/discord/servers/{serverId}/widget`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by server id
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/discord/servers/serverid/widget/get)
- **Platform page:** [/platforms/discord](https://www.socialfetch.dev/platforms/discord)

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