Discord 关键词搜索 API
按 keyword 在 Discord 公开服务器目录里找服务器,每行返回 name、text、member_count、online_count、categories 和 url,每千次 $1.39。
Discord 关键词搜索按 keyword 在公开服务器目录里查找服务器,每条带名称、介绍、成员数和在线人数、Boost 数、分类和关键词标签、验证等级、是否 NSFW、创建时间和链接。它回答「围绕这个主题有哪些公开社区、活跃程度如何」,适合社区运营参照同类服务器,营销团队寻找目标用户聚集的社区,研究者按主题梳理社区。
它只查公开服务器目录,不检索服务器里的聊天消息,也不能进入私有服务器。判断活跃度看 online_count 占 member_count 的比例,比只看总数更说明问题;有 vanity_url_code 说明服务器达到过 Boost 等级门槛。language 由平台判定,可能不准。
categories和keywords是服务器的分类与关键词标签limit最大 100- 失败和空结果不收费
接口健康状态
- 24h 健康值
- 正常
- 健康 / 正常
- 可用
- 少量可用
- 基本不可用
24 小时趋势
30 天趋势
1请求
POST /api/v1/social { "platform": "discord", "action": "search", "params": { "keyword": "game development" } }2JSON 响应
{ "results": [ { "name": "Krunker Bunker", "text": "The official Krunker.io Discord server! Your hub for game development, trading, giveaways, and chatting!", "member_count": 192954, "online_count": 6754 }, … ], "count": 20 }3行
name text member_count online_count Krunker Bunker The official Krunker.io Discord server! Your hub for game development, trading, giveaways, and chatting! 192954 6754 InfinitySports Official discord server for the ROBLOX game development studio InfinitySports 156670 17822 4CSV
discord-search-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
keyword,返回匹配的服务器,results 里每行是一个服务器,列成字段表,也可下载为 CSV。能拿到什么数据
下表取自对 game development 的一次真实调用,采集于 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Krunker Bunker | https://discord.gg/krunker | The official Krunker.io Discord server! Your hub for game development, trading, giveaways, and chatting! | 192954 | 6754 | 21 | null | en-US | ["LFG"] | ["Game","Gaming","Krunker"] | https://cdn.discordapp.com/icons/448194623580667916/307504ce3821a7b6ffd605b21dc996a8.png?size=256.webp?size=256 | https://cdn.discordapp.com/banners/448194623580667916/b77e42c8e9069afa2fbdcee16a23adfc.webp?size=480 | COMMUNITY, DISCOVERABLE, VERIFIED | null | null | https://discord.com/servers/krunker-bunker-448194623580667916 | discord | |
| InfinitySports | https://discord.gg/infinitysports | Official discord server for the ROBLOX game development studio InfinitySports | 156670 | 17822 | 102 | null | en-US | ["Esports"] | ["basketball","football","hockey"] | https://cdn.discordapp.com/icons/1102970117853282374/ddccd7682a0870316aa7c477b00fb259.png?size=256.webp?size=256 | https://cdn.discordapp.com/banners/1102970117853282374/d42d8db7fa0b142d5c23c3f0ff56eb2a.webp?size=480 | COMMUNITY, DISCOVERABLE | null | null | https://discord.com/servers/infinitysports-1102970117853282374 | discord |
用途
找同类社区做参照
搜自己产品所在的主题词,比较各服务器的
member_count和online_count,看同类社区有多大。找目标用户聚集的社区
读
text、categories和keywords,筛出目标用户会聚集的服务器,再按url去看。先排除成人服务器
读
is_nsfw,把成人内容的服务器先排除,再看剩下的。按语言看社区
按
language分组,看一个主题在哪些语言的社区里热;language由平台判定,可能不准。
Discord 开发者文档 与 EveryInfra 对比
下面从读取范围和对象两方面,比较 Discord 开发者文档和 EveryInfra search。
| 对比项 | Discord 开发者文档 | EveryInfra |
|---|---|---|
| 消息内容 | "Instead, access to MESSAGE_CONTENT permits your app to receive message content data across the APIs." | keyword 只匹配公开服务器目录里的服务器,不检索服务器里的聊天消息,也不授予进入私有服务器的权限。 |
| 服务器指什么 | "Guilds in Discord represent an isolated collection of users and channels, and are often referred to as “servers” in the UI." | 每行是一个公开服务器:name、text、member_count、online_count、categories、keywords,url 是邀请入口。 |
引文出自 Discord 开发者文档的 Gateway 页和 Guild 页,原文是英文,2026-11-22 核对;页面没有标更新日期。Gateway 页讲 app 怎样用 intents 接收服务器里的事件,Guild 页讲服务器对象。 官方出处: Gateway · Guild Resource
限制和注意事项
keyword必填,查的是公开服务器目录,不是聊天消息,也不能进入私有服务器。limit最大 100。member_count、online_count是读取时可见的人数快照。vanity_url_code有值,说明服务器达到过 Boost 等级门槛。language由平台判定,可能不准。url是邀请入口,directory_url是目录页,两者用途不同。
价格
每次调用 $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": "search",
"params": {
"keyword": "game development"
}
}'OpenAPI 定义 (JSON)示例从环境变量 EVERYINFRA_API_KEY 读取 Key,复制出去的代码不含你的 Key。
这里搜索公开服务器目录,不是检索私密频道聊天。
API 参考
下面是 search 的参数、响应字段、错误和计费,可以复制整页,或用 Markdown 打开后交给 AI 助手。
AI 提示词
#请帮我用 EveryInfra 的「Discord 关键词搜索」接口(discord/search)写一个数据采集脚本。
接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 discord,action 填 search,参数放在 params 里。
- 必填参数:
- keyword:search 查公开服务器目录,search_users 按用户名或显示名查公开用户。它不检索服务器内消息,也不授予访问私有服务器的权限。
- 可选参数:
- 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": "search",
"params": {
"keyword": "game development"
}
}
- 计费:$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 | 是 | search | 能力标识,固定值。 |
keyword | body.params | string | 是 | - | search 查公开服务器目录,search_users 按用户名或显示名查公开用户。它不检索服务器内消息,也不授予访问私有服务器的权限。 |
limit | body.params | integer (1–100) | 否 | 20 | 这次调用最多返回的条数,整数,1–100;不传按默认值,实际返回可能少于这个数。超过上限会在扣费前返回 422。 |
响应示例
#{ "id": "req_…", "platform": "discord", "action": "search", "results": [ { "id": "•••", "name": "Krunker Bunker", "url": "https://discord.gg/krunker", "text": "The official Krunker.io Discord server! Your hub for game development, trading, giveaways, and chatting!", "member_count": 192954, "online_count": 6754, "boost_count": 21, "language": "en-US", "categories": [ "LFG" ], "keywords": [ "Game", "Gaming", "Krunker" ], "icon_url": "https://cdn.discordapp.com/icons/448194623580667916/307504ce3821a7b6ffd605b21dc996a8.png?size=256.webp?size=256", "banner_url": "https://cdn.discordapp.com/banners/448194623580667916/b77e42c8e9069afa2fbdcee16a23adfc.webp?size=480", "verification_level": "COMMUNITY, DISCOVERABLE, VERIFIED", "directory_url": "https://discord.com/servers/krunker-bunker-448194623580667916", "platform": "discord" }, { "id": "•••", "name": "InfinitySports", "url": "https://discord.gg/infinitysports", "text": "Official discord server for the ROBLOX game development studio InfinitySports", "member_count": 156670, "online_count": 17822, "boost_count": 102, "language": "en-US", "categories": [ "Esports" ], "keywords": [ "basketball", "football", "hockey" ], "icon_url": "https://cdn.discordapp.com/icons/1102970117853282374/ddccd7682a0870316aa7c477b00fb259.png?size=256.webp?size=256", "banner_url": "https://cdn.discordapp.com/banners/1102970117853282374/d42d8db7fa0b142d5c23c3f0ff56eb2a.webp?size=480", "verification_level": "COMMUNITY, DISCOVERABLE", "directory_url": "https://discord.com/servers/infinitysports-1102970117853282374", "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 空结果
- 没有数据,不扣费。
常见问题
能搜到服务器里的聊天内容吗?
不能。keyword 只在公开服务器目录里匹配服务器,不检索任何服务器内的消息,也不提供进入私有服务器的权限。要找的是用户而不是服务器时,用 Discord 用户搜索,它按用户名或显示名查找公开用户。
怎么判断一个服务器活不活跃?
用 online_count 除以 member_count,即读取时在线成员占总成员的比例,它比成员总数更能反映活跃度;boost_count 是成员付费加成(Boost)的数量,可以作为社区投入程度的另一个信号。在线人数只代表读取那一刻,定期读取才能看出趋势。
想进一步读某个服务器的资料怎么办?
手里有邀请码或邀请链接时,用 Discord 服务器资料读取,可以传裸邀请码、discord.gg 或 discord.com/invite 链接;它只读邀请对应的公开信息,不会替你加入服务器,邀请失效也不代表服务器不存在。想按分类浏览,用 Discord 目录与社区发现。
Discord 搜索接口返回哪些字段?
每行有 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,按调用次数算,不按条数算。失败和空结果不收费。
categories 和 keywords 有什么区别?
categories 是服务器的分类,keywords 是关键词标签。只想按分类浏览,用 directory。
相关的 Discord 能力
同一把 Key 还能调用 Discord 的其他能力。