Discord 目录与社区发现 API

按 category 浏览 Discord 公开服务器,不用先知道名称或邀请链接;每行返回 name、categories、language、text 和 url,每千次 $1.39。

  • category 取 gaming、entertainment、education、music、science-and-tech
  • 不传 category 就不限定分类
  • 失败和空结果不收费
免费开始

接口健康状态

24h 健康值
正常
  • 健康 / 正常
  • 可用
  • 少量可用
  • 基本不可用
正常

24 小时趋势

30 天趋势

  1. 1请求

    POST /api/v1/social
    {
      "platform": "discord",
      "action": "directory",
      "params": {}
    }
  2. 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. 3行

    nametextmember_countonline_count
    MidjourneyThe official server for Midjourney, a text-to-image AI where your imagination is the only limit.18557200735634
    Steal a BrainrotWelcome to the official Steal a Brainrot server! 🧠7752624292420
  4. 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 里是 •••)。你自己调用时,按字段表返回这些字段。

idnameurltextmember_countonline_countboost_countvanity_url_codelanguagecategorieskeywordsicon_urlbanner_urlverification_levelis_nsfwcreated_atdirectory_urlplatform
Midjourneyhttps://discord.gg/midjourneyThe official server for Midjourney, a text-to-image AI where your imagination is the only limit.18557200735634250nullen-US["Entertainment"]["AI","artificial intelligence","art"]https://cdn.discordapp.com/icons/662267976984297473/39128f6c9fc33f4c95a27d4c601ad7db.png?size=256.webp?size=256https://cdn.discordapp.com/banners/662267976984297473/63249e6867f276efc07d32793b7b3b5a.webp?size=480COMMUNITY, DISCOVERABLE, VERIFIEDnullnullhttps://discord.com/servers/midjourney-662267976984297473discord
Steal a Brainrothttps://discord.gg/brainrotsWelcome to the official Steal a Brainrot server! 🧠7752624292420536nullen-US["Memes","Gaming"]["brainrot","roblox"]https://cdn.discordapp.com/icons/1376018788041887795/f9f69ceda1bb918075ee1b2fd4cb5fcc.png?size=256.webp?size=256https://cdn.discordapp.com/banners/1376018788041887795/a8e25be1082189e0a535f86e5d601126.webp?size=480COMMUNITY, DISCOVERABLEnullnullhttps://discord.com/servers/steal-a-brainrot-1376018788041887795discord

用途

  • 按分类建候选名单

    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

合计按每次调用的标价算。

代码示例

#
bash
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 助手。

POST

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 等待后重试。

写代码前,先问清楚我要采哪些对象、一共多少个、需要哪些字段、结果存成什么格式,再把方案和大概花费讲给我确认。

请求参数

#
参数名位置类型必填默认值说明
Authorizationheaderstring是-Bearer 加你的 API Key。在控制台创建;不要放进网址或代码仓库。
platformbodystring是discord平台标识,固定值。
actionbodystring是directory能力标识,固定值。
categorybody.paramsstring否-directory 的服务器分类:gaming 游戏、entertainment 娱乐、education 教育、music 音乐、science-and-tech 科学技术。不传则不限定分类;未列出的分类会被忽略,不支持按任意标签筛选。
limitbody.paramsinteger (1–100)否20这次调用最多返回的条数,整数,1–100;不传按默认值,实际返回可能少于这个数。超过上限会在扣费前返回 422。

响应示例

#
2026年9月26日 16:56(北京时间)用上方代码示例的参数真实调用所得。results 与 count 是那次的真实返回,已隐去名字、账号、头像、主页链接、联系方式等个人信息,列表只保留前 2 条;id、billing、quota 每次调用都不同,只给结构。
json
{  "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 是返回字段,读到结果后自己按它分组。

同一把 Key 还能调用 Discord 的其他能力。

Google Analytics 同意才加载 隐私