Sources › Social media › Discord Invite Info › Get Server Widget

Discord Invite Info Server Widget API
Widget publik sebuah server Discord, kalau pemiliknya mengaktifkannya.
Request
https://api.zapi.ink/v1/social-media:discord/widgetSend your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 5 minutes.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| guild | string | query | No | Guild (server) ID. Use this or `code` Example: 81384788765712384 |
| code | string | query | No | Invite code, resolved to a guild first. Use this or `guild` Example: discord-api |
Code examples
curl -X GET "https://api.zapi.ink/v1/social-media:discord/widget?guild=81384788765712384&code=discord-api" \ -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
const res = await fetch("https://api.zapi.ink/v1/social-media:discord/widget?guild=81384788765712384&code=discord-api", { method: "GET", headers: { "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" }, }); const data = await res.json(); console.log(data);
import requests res = requests.get( "https://api.zapi.ink/v1/social-media:discord/widget", params={"guild":"81384788765712384","code":"discord-api"}, headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"}, ) print(res.json())
Example response
{ "project": "social-media:discord", "data": { "ok": true, "guild": { "id": "81384788765712384", "name": "Discord API" }, "onlineSample": [ { "status": "dnd", "username": "4...", "avatarUrl": "https://cdn.discordapp.com/widget-avatars/tryYienQ-9REzcwu6n6KFYE5kJCnyVNK9cguhkmHw-8/I5I_Xn4xRCCyjGQHJPuL6lTr51gZ-juTso7mGtyb9IpVDcsJRWt6VOSOSHb4JWMd3lH4L7g_vQk1uOYNIu3hvWGIIvb8GD…" }, { "status": "dnd", "username": "a...", "avatarUrl": "https://cdn.discordapp.com/widget-avatars/GSh1NQULMqdbthPBxf82mO7Lq29hlIcuM2OQtwMkk9o/dYNZwjuvmsZtEmBhiGqzXNY4gq_2tqODANlvB-HPlB-YARdm8YqjZrWHy66T9nTEiNPFQr-QJj8JzokVcrOKsdn9xYx7oZ…" }, { "status": "online", "username": "a...", "avatarUrl": "https://cdn.discordapp.com/widget-avatars/TojzuRaxslDRpPA7TjOZYXEOMSpmt_Aj_ztJAZjhjYM/91rOW31cUbQ6E9tIUhe7i8M-sg23MsXS5S4IHkQsVYZSxtP_RxmP23P_fO4KrzuDFCNHXSfAr1JDC6tI87Tq6db03jDlT_…" } ], "presenceCount": 13206, "voiceChannels": [ { "id": "81384788862181376", "name": "General", "position": 0 }, { "id": "131937933270712320", "name": "Music", "position": 1 }, { "id": "178478247103823872", "name": "Music2", "position": 2 } ], "onlineSampleCount": 100, "onlineSampleIsCapped": true }, "timestamp": "2026-05-27T13:36:09Z" }
Frequently asked questions
How do I call the Discord Invite Info Server Widget API?
Send a GET request to https://api.zapi.ink/v1/social-media:discord/widget with your Zapi key in the x-api-key header. Parameters — optional: guild, code. The response is JSON in the { project, data, timestamp } envelope.
What does the Discord Invite Info Server Widget API return?
Widget publik sebuah server Discord, kalau pemiliknya mengaktifkannya. The example response has the fields ok, guild, onlineSample, presenceCount, voiceChannels, onlineSampleCount, onlineSampleIsCapped. Each item in onlineSample has fields such as status, username, avatarUrl.
Is the Discord Invite Info Server Widget API free?
Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.
Can an AI assistant call the Discord Invite Info Server Widget API?
Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "discord" and endpoint "widget".
What other Discord Invite Info API endpoints are there?
It has 2 endpoints. Besides Get Server Widget: Invite Info.