Server Widget
GET/v1/discord/server1 credit
Returns a Discord server's public widget by server id: name, its invite link, voice channels, a sample of up to 100 online members and the number of members online.
01Query parameters
| Name | Type | Description |
|---|---|---|
| guild_idrequired | string | The server's numeric id, e.g. `267624335836053506` (the `guild.id` of an invite). |
02Request
curl "https://api.scrapesocial.ai/v1/discord/server?guild_id=267624335836053506" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
03Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/discord/server?guild_id=267624335836053506
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"id": "267624335836053506",
"name": "Python",
"instant_invite": "https://discord.com/invite/4DB7Jxz5",
"channels": [
{
"id": "756327105389920306",
"name": "AFK",
"position": 22
},
{
"id": "751592231726481530",
"name": "Code/Help",
"position": 20
}
],
"members": [
{
"id": "0",
"username": "! Bounty",
"discriminator": "0000",
"avatar": null,
"status": "dnd",
"avatar_url": "https://cdn.discordapp.com/widget-avatars/72VUXxMat45B96OljKUXGDhSta6mxIiPKs0DhkKXgLs/C4YdkwnrLQvXS_-RQNx4ASsGvo3Th-ZELSy4AfQ8seZqimjx1BqX7VHtS-eM3lMhhFROcg-TAb2AtBFp_ZR8aeP5ZvQg4pFq7wGV_OBTI1L2ustGwf259bPCQfzNgaTAEoaDBE3WkczgWwANig"
},
{
"id": "1",
"username": "alen",
"discriminator": "0000",
"avatar": null,
"status": "idle",
"avatar_url": "https://cdn.discordapp.com/widget-avatars/xulnGDmcgvjV0OhVW9Tn5MsA7wtOT5TtgJRxm8C25gc/iQ67GCCq9VDApp-oIkC9QIFB7BZDnAFfwljpH2T0eHQPJRua6nTmGrpFMq72ly7-95PROzoScxWEEuAjuUl9iLTqCz0vAZ4blDpKpPZbXG8eHVmsy2A9axSwdDpXtWRYbVDYs0I3hV04gg"
}
],
"presence_count": 48354
}Common to every endpoint
Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.
GET /v1/cosmos/profile?handle=design
{
"success": false,
"message": "Invalid API key"
}04Notes
Only servers that turned their widget on have one; for the others the answer is a free 403 `widget_disabled` (use the Invite endpoint instead). An unknown server id is a free 404; a value that is not a number is a free 400.
05Errors & credits
Every error has success: false, a real HTTP status and costs no credits.
400missing_parameter
A required parameter is missing or invalid.
403private_account
The account is private or age-restricted.
404not_found
No such account.
503upstream_error
The platform did not answer; retry shortly.