Invite
GET/v1/discord/invite1 credit
Resolves a Discord invite link and returns the public server behind it: server id, name, description, icon, banner and splash images, features, the channel the invite opens, who made it, when it expires, and approximate member and online counts.
01Query parameters
| Name | Type | Description |
|---|---|---|
| urlrequired | string | The invite: `discord.gg/<code>`, `discord.com/invite/<code>`, `discordapp.com/invite/<code>` or the bare code. Vanity codes such as `python` work too. |
02Request
curl "https://api.scrapesocial.ai/v1/discord/invite?url=https%3A%2F%2Fdiscord.gg%2Fpython" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
03Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/discord/invite?url=https://discord.gg/python
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"is_valid": true,
"type": 0,
"code": "python",
"expires_at": null,
"id": 0,
"flags": 2,
"guild": {
"id": "267624335836053506",
"name": "Python",
"splash": "b7099fe221153a7faff76048dc2e63ef",
"banner": "ed3be5b67371fe219d7006152087afdb",
"description": "We're a large community focused around the Python programming language. We believe that anyone can learn to code.",
"icon": "a_421bfdb0fba2e5bbf0408c0f2bc15f53",
"features": [
"VANITY_URL",
"AUTOMOD_TRIGGER_ML_SPAM_FILTER"
],
"verification_level": 2,
"vanity_url_code": "python",
"nsfw_level": 0,
"nsfw": false,
"premium_subscription_count": 28,
"premium_tier": 3,
"icon_url": "https://cdn.discordapp.com/icons/267624335836053506/a_421bfdb0fba2e5bbf0408c0f2bc15f53.gif",
"banner_url": "https://cdn.discordapp.com/banners/267624335836053506/ed3be5b67371fe219d7006152087afdb.png",
"splash_url": "https://cdn.discordapp.com/splashes/267624335836053506/b7099fe221153a7faff76048dc2e63ef.png"
},
"guild_id": "267624335836053506",
"channel": {
"id": "267631170882240512",
"type": 0,
"name": "welcome"
},
"profile": {
"id": "267624335836053506",
"name": "Python",
"icon_hash": "a_421bfdb0fba2e5bbf0408c0f2bc15f53",
"member_count": 432481,
"online_count": 48248,
"description": "We're a large community focused around the Python programming language. We believe that anyone can learn to code.",
"banner_hash": null,
"game_application_ids": [],
"game_activity": {},
"tag": "snek",
"badge": 0,
"badge_color_primary": "#008cff",
"badge_color_secondary": "#fdf300",
"badge_hash": "fd3549e1a1a692afda2a7b4cf6b6cad6",
"traits": [],
"features": [
"MEMBER_VERIFICATION_GATE_ENABLED",
"DISCOVERABLE"
],
"visibility": 1,
"custom_banner_hash": "99f4a269f925d0c495dc2711e78e00df",
"premium_subscription_count": 28,
"premium_tier": 3
},
"approximate_member_count": 432481,
"approximate_presence_count": 48248
}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
A working invite answers `is_valid: true` with Discord's invite object; the server is in `guild`, with `icon_url`, `banner_url` and `splash_url` built from the image hashes, and the counts are `approximate_member_count` and `approximate_presence_count`. An unknown or expired invite is a free 404; a value that is not a Discord invite 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.