Discord 目录与社区发现 API
按 category 浏览 Discord 公开服务器,不用先知道名称或邀请链接;每行返回 name、categories、language、text 和 url,每千次 $1.39。
category取gaming、entertainment、education、music、science-and-tech- 不传
category就不限定分类 - 失败和空结果不收费
接口健康状态
- 24h 健康值
- 正常
- 健康 / 正常
- 可用
- 少量可用
- 基本不可用
24 小时趋势
30 天趋势
1请求
POST /api/v1/social { "platform": "discord", "action": "directory", "params": {} }2JSON 响应
{ "results": [ { "name": "Midjourney", "text": "The official server for Midjourney, a text-to-image AI where your imagination is the only limit.", "member_count": 18557200, "online_count": 735634 }, … ], "count": 20 }3行
name text member_count online_count Midjourney The official server for Midjourney, a text-to-image AI where your imagination is the only limit. 18557200 735634 Steal a Brainrot Welcome to the official Steal a Brainrot server! 🧠 7752624 292420 4CSV
discord-directory-sample.csv id,name,url,text,member_count,online_count,boost_count,vanity_url_code,language,categories,keywords,icon_url,banner_url,verification_level,is_nsfw,created_at,directory_url,platform
category,返回这一类的服务器,results 里每行是一个服务器,列成字段表,也可下载为 CSV。能拿到什么数据
下表取自一次不带参数的真实调用,采集于 2026年9月26日 16:56(UTC),共返回 20 行;灰条是隐去的个人信息(CSV 里是 •••)。你自己调用时,按字段表返回这些字段。
| id | name | url | text | member_count | online_count | boost_count | vanity_url_code | language | categories | keywords | icon_url | banner_url | verification_level | is_nsfw | created_at | directory_url | platform |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Midjourney | https://discord.gg/midjourney | The official server for Midjourney, a text-to-image AI where your imagination is the only limit. | 18557200 | 735634 | 250 | null | en-US | ["Entertainment"] | ["AI","artificial intelligence","art"] | https://cdn.discordapp.com/icons/662267976984297473/39128f6c9fc33f4c95a27d4c601ad7db.png?size=256.webp?size=256 | https://cdn.discordapp.com/banners/662267976984297473/63249e6867f276efc07d32793b7b3b5a.webp?size=480 | COMMUNITY, DISCOVERABLE, VERIFIED | null | null | https://discord.com/servers/midjourney-662267976984297473 | discord | |
| Steal a Brainrot | https://discord.gg/brainrots | Welcome to the official Steal a Brainrot server! 🧠 | 7752624 | 292420 | 536 | null | en-US | ["Memes","Gaming"] | ["brainrot","roblox"] | https://cdn.discordapp.com/icons/1376018788041887795/f9f69ceda1bb918075ee1b2fd4cb5fcc.png?size=256.webp?size=256 | https://cdn.discordapp.com/banners/1376018788041887795/a8e25be1082189e0a535f86e5d601126.webp?size=480 | COMMUNITY, DISCOVERABLE | null | null | https://discord.com/servers/steal-a-brainrot-1376018788041887795 | discord |
用途
按分类建候选名单
category取gaming,读name、text和member_count,列出游戏类的候选社区。比较不同分类里的服务器
分别取不同的
category,比较返回的服务器行的member_count和online_count。按语言分组
读返回行的
language,按语言把候选社区分开。
Discord 帮助中心(Discover 页) 与 EveryInfra 对比
下面从分类这一方面,比较 Discord 帮助中心和 EveryInfra directory。
| 对比项 | Discord 帮助中心(Discover 页) | EveryInfra |
|---|---|---|
| 分类 | "In Servers, you can browse various server categories like gaming, music, entertainment, and more by selecting from the category bar located at the top of the Servers page." | category 取 gaming、entertainment、education、music、science-and-tech;不传不限定分类,未列出的分类会被忽略。 |
引文出自 Discord 帮助中心的 Discover Tab 页,原文是英文,2026-11-22 核对;页面没有标更新日期。 官方出处: Discover Tab
限制和注意事项
category只认gaming、entertainment、education、music、science-and-tech;不传不限定分类,未列出的分类会被忽略,不能按任意标签筛选。limit最大 100。- 返回的是服务器行,不是分类树,也不是各分类的全量统计。
- 返回行里的
categories是服务器自己的分类标签,取值比category能填的五个更多(如Memes)。
价格
每次调用 $0.001389,按次计费,不按条数算。失败和空结果不收费。
| 调用次数 | 费用 |
|---|---|
| 10,000 | $13.89 |
| 100,000 | $138.89 |
| 1,000,000 | $1,388.89 |
合计按每次调用的标价算。
代码示例
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "discord",
"action": "directory",
"params": {}
}'OpenAPI 定义 (JSON)示例从环境变量 EVERYINFRA_API_KEY 读取 Key,复制出去的代码不含你的 Key。
API 参考
下面是 directory 的参数、响应字段、错误和计费,可以复制整页,或用 Markdown 打开后交给 AI 助手。
AI 提示词
#请帮我用 EveryInfra 的「Discord 目录与社区发现」接口(discord/directory)写一个数据采集脚本。
接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 discord,action 填 directory,参数放在 params 里。
- 没有必填参数。
- 可选参数:
- category:directory 的服务器分类:gaming 游戏、entertainment 娱乐、education 教育、music 音乐、science-and-tech 科学技术。不传则不限定分类。
- limit:这次调用最多返回的条数,整数,1–100;不传按默认值,实际返回可能少于这个数。超过上限会在扣费前返回 422。(默认 20)
- 返回一组记录,每条记录的主要字段:id、name、url、text、member_count(服务器总成员数)、online_count(当前在线数)、boost_count(服务器 Boost 数(成员付费加…)、vanity_url_code(自定义邀请短链)、language、categories(服务器分类)、keywords(关键词标签)、icon_url(服务器图标);一共 17 个字段,完整列表见 https://api.everyinfra.com/api/v1/social/catalog?platform=discord。
- 示例请求体:
{
"platform": "discord",
"action": "directory",
"params": {}
}
- 计费:$1.39 / 千次;失败和空结果不扣费。
- 一次要采几十上百个时,在请求体加 "mode": "async":先拿到 job_id,再轮询 GET https://api.everyinfra.com/api/v1/jobs/{job_id} 取结果。
- 返回 422 时,按错误信息里的候选参数和允许值修正;返回 429 或 503 时,按 Retry-After 等待后重试。
写代码前,先问清楚我要采哪些对象、一共多少个、需要哪些字段、结果存成什么格式,再把方案和大概花费讲给我确认。请求参数
#| 参数名 | 位置 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
Authorization | header | string | 是 | - | Bearer 加你的 API Key。在控制台创建;不要放进网址或代码仓库。 |
platform | body | string | 是 | discord | 平台标识,固定值。 |
action | body | string | 是 | directory | 能力标识,固定值。 |
category | body.params | string | 否 | - | directory 的服务器分类:gaming 游戏、entertainment 娱乐、education 教育、music 音乐、science-and-tech 科学技术。不传则不限定分类;未列出的分类会被忽略,不支持按任意标签筛选。 |
limit | body.params | integer (1–100) | 否 | 20 | 这次调用最多返回的条数,整数,1–100;不传按默认值,实际返回可能少于这个数。超过上限会在扣费前返回 422。 |
响应示例
#{ "id": "req_…", "platform": "discord", "action": "directory", "results": [ { "id": "•••", "name": "Midjourney", "url": "https://discord.gg/midjourney", "text": "The official server for Midjourney, a text-to-image AI where your imagination is the only limit.", "member_count": 18557200, "online_count": 735634, "boost_count": 250, "language": "en-US", "categories": [ "Entertainment" ], "keywords": [ "AI", "artificial intelligence", "art" ], "icon_url": "https://cdn.discordapp.com/icons/662267976984297473/39128f6c9fc33f4c95a27d4c601ad7db.png?size=256.webp?size=256", "banner_url": "https://cdn.discordapp.com/banners/662267976984297473/63249e6867f276efc07d32793b7b3b5a.webp?size=480", "verification_level": "COMMUNITY, DISCOVERABLE, VERIFIED", "directory_url": "https://discord.com/servers/midjourney-662267976984297473", "platform": "discord" }, { "id": "•••", "name": "Steal a Brainrot", "url": "https://discord.gg/brainrots", "text": "Welcome to the official Steal a Brainrot server! 🧠", "member_count": 7752624, "online_count": 292420, "boost_count": 536, "language": "en-US", "categories": [ "Memes", "Gaming" ], "keywords": [ "brainrot", "roblox" ], "icon_url": "https://cdn.discordapp.com/icons/1376018788041887795/f9f69ceda1bb918075ee1b2fd4cb5fcc.png?size=256.webp?size=256", "banner_url": "https://cdn.discordapp.com/banners/1376018788041887795/a8e25be1082189e0a535f86e5d601126.webp?size=480", "verification_level": "COMMUNITY, DISCOVERABLE", "directory_url": "https://discord.com/servers/steal-a-brainrot-1376018788041887795", "platform": "discord" } ], "count": 20, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
返回字段
#业务数据在 results 里;下表是每条记录可能包含的字段,平台没有提供的值不会被编造。
| 字段 | 含义 |
|---|---|
id | 该记录在原平台上的唯一标识。仅在同一平台内唯一,跨平台可能重复。 |
name | 名称。用于账号/商品/商家类能力,指该对象本身的名字。 |
url | 该记录在原平台上的可访问链接。 |
text | 正文内容,已去除 HTML 标签,全文返回、不截断(个别平台的列表结果本身只有摘要,以该平台的字段说明为准)。 |
member_count | 服务器总成员数。 |
online_count | 当前在线数。在线/总数比值比总数更能反映社区活跃度。 |
boost_count | 服务器 Boost 数(成员付费加成)。 |
vanity_url_code | 自定义邀请短链。有它说明服务器达到过 Boost 等级门槛。 |
language | 内容语言代码(如 zh、en),由平台判定,可能不准。 |
categories | 服务器分类。 |
keywords | 关键词标签。 |
icon_url | 服务器图标。 |
banner_url | 横幅图。 |
verification_level | 验证等级(进入门槛)。 |
is_nsfw | 是否为 NSFW 服务器。 |
created_at | 创建时间,格式同 posted_at。 |
directory_url | 服务器目录页链接。 |
platform | 数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。 |
错误与计费
#- 401
- 缺少 Key 或 Key 无效。
- 402
- 余额不足,先充值。
- 422
- 参数名或取值不对,按错误信息给的候选改;不扣费。
- 429
- 超过每分钟请求上限,按 Retry-After 等待后再试。
- 503
- 暂时无法完成,预扣的费用退回;结果未知时先核对,不要直接重发。
- 200 空结果
- 没有数据,不扣费。
常见问题
目录接口返回哪些字段?
每行有 id、name、url、text、member_count、online_count、boost_count、vanity_url_code、language、categories、keywords、icon_url、banner_url、verification_level、is_nsfw、created_at 和 directory_url。
浏览一类服务器要多少钱?
每次 $0.001389,每千次 $1.39,按调用次数算,不按条数算。失败和空结果不收费。
能按语言筛选吗?
没有按语言筛选的参数。language 是返回字段,读到结果后自己按它分组。
相关的 Discord 能力
同一把 Key 还能调用 Discord 的其他能力。