Discord

Get Discord server widget

Get a Discord server's public widget with its online count, voice channels and invite.

GET/v1/discord/servers/{serverId}/widget
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
1
serverIdstringrequiredpath

Server id, 17 to 20 digits and at most 9223372036854775807, e.g. `267624335836053506`. A server whose owner disabled the widget returns `lookupStatus: restricted`.

pattern: ^[0-9]{17,20}$

Response fields
19

Endpoint-specific response payload.

datalookupStatus
string

`restricted` when the server exists but its widget is switched off; `not_found` when no server has the id.

one of: found, not_found, restricted

The server, when the widget names it.

dataserverid
string

Server id.

dataservername
stringnullable

Server name.

dataonline
integernullable

The exact online count, not capped at the member sample.

The temporary invite the widget shows.

datainvitecode
string

The temporary invite code.

datainviteurl
string

The invite URL.

datainvitetemporary
boolean

The widget invite is temporary; its code expires within hours, not never.

Public voice channels.

datavoiceChannels[]id
string

Channel id.

datavoiceChannels[]name
string

Channel name.

datavoiceChannels[]position
integernullable

Channel position.

dataonlineSampleSize
integer

Number of online members in the sample (at most 100). The members themselves are not returned.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/discord/servers/267624335836053506/widget" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Server widget.