Spire Codex 现已登陆 Overwolf。 获取带有实时卡牌查询和一键上传对局功能的游戏内叠加层。 了解更多 →用 Spire Codex 的数据构建工具、机器人和内容。一切免费开放。
为任何网站添加 Wowhead 风格的卡牌、遗物和药水悬停提示。一个 script 标签,零依赖。
<script src="https://spire-codex.com/widget/spire-codex-tooltip.js"></script>[[Strike]]卡牌提示(默认类型)[[card:Bash]]卡牌(显式)[[relic:Burning Blood]]遗物[[potion:Fire Potion]]药水[[character:Ironclad]]角色[[monster:Jaw Worm]]怪物[[power:Strength]]能力[[event:Neow]]事件[[encounter:Lagavulin]]遭遇[[enchantment:Sharp]]附魔[[keyword:Exhaust]]关键词[[orb:Lightning]]能量球[[affliction:Bound]]状态[[achievement:Minimalist]]成就SpireCodex.scan()重新扫描页面中的新 [[...]] 模式(用于 SPA)SpireCodex.scan(element)扫描指定的 DOM 元素嵌入一个紧凑的交互式更新日志查看器,展示 Spire Codex 的更新历史并支持切换版本。
<div id="scx-changelog"></div>
<script src="https://spire-codex.com/widget/spire-codex-changelog.js"></script>data-version="1.0.4"显示指定版本(默认:最新)完整游戏数据库可通过公开 REST API 访问。无需认证:按 IP 的网站配额足以覆盖浏览和零散调用,无密钥的 API 使用适用下方的基础速率。 脚本和工具请创建 API 密钥,并通过 X-API-Key 请求头发送。 在个人资料页创建一个。 密钥按身份而非 IP 归集你的请求(跨网络稳定,绝不与同一 NAT 下的其他用户共享),并提供用量跟踪;其等级上限按端点计算。响应携带 X-RateLimit-Remaining / X-RateLimit-Reset,便于你控制请求节奏。
| 网站流量 | 300/minute | 每个 IP |
| 无 API 密钥 | 15/minute | |
| 注册用户 | 60/minute | 在个人资料中创建 |
| 学术 | 100/minute | 按申请授予 |
| 付费 | 120/minute | 赞助者 |
所有上限按端点计算:表格是你在每条路由上的配额,而不是全局池。少数重型端点有自己的预算,无论是否使用密钥都对所有调用者生效(见下方的对局导出;语言 ZIP 为每小时 10 次)。关注 X-RateLimit-Remaining,遇到 429 时退避(会设置 Retry-After)。
GET /api/runs/export?limit=1000&start=2026-06-01T00:00:00Z以 JSONL 流式输出官方对局,每行一局。
limit 限制页面大小;满页会返回指向下一页的 cursor。start / end 限制为半开区间的提交时间窗口。分页时保持不变;cursor 不包含它们。该端点有自己的预算,每小时 120 点,带密钥和匿名调用者共享:分页请求消耗 1 点,无限制拉取(不带 limit)消耗 60 点。因此持续同步最好用间隔约 30 秒的分页拉取;遇到 429 时遵守 Retry-After,并用同一个 cursor 继续。
https://spire-codex.comBeta 频道(来自 Steam beta 分支的未发布内容):在任意实体端点上加上: ?channel=beta. 当前 beta 版本: /api/beta/version. 与 main 的完整差异: /api/beta/diff.
完整交互式文档(由后端自动生成,始终最新): /docs
在任意端点上加上此查询参数: ?lang=jpn. 支持 15 种语言:
eng, deu, esp, fra, ita, jpn, kor, pol, ptb, rus, spa, tha, tur, zhs, zht
cURL
curl https://spire-codex.com/api/cards?color=ironclad&rarity=RarePython
import requests
cards = requests.get("https://spire-codex.com/api/cards", params={"color": "ironclad"}).json()
for card in cards:
print(f"{card['name']} - {card['type']} ({card['rarity']})")JavaScript
const res = await fetch("https://spire-codex.com/api/relics?pool=ironclad");
const relics = await res.json();
console.log(relics.map(r => r.name));在任何网页项目中复现游戏内的卡牌缩略图(用于对局历史 / 游戏结束界面)。六层 PNG 通过 CSS mask-image 合成,不用 canvas,不用 WebGL,只是上色的精灵图。 颜色直接取自反编译的游戏代码: NTinyCard, CardPoolModel.DeckEntryCardColor.



Ironclad / Attack / Common


Silent / Skill / Uncommon


Defect / Power / Rare


Necrobinder / Skill / Rare


Regent / Attack / Uncommon


Curse


Event


Quest全部 10 个 PNG 均启用 CORS,把基础 URL 放在每个文件名前即可。每个精灵图为 128×128、RGBA、透明底白色(用于通过 CSS 上色)。
https://spire-codex.com/static/images/ui/run_history_card/
card_back.png ← tinted by pool
desc_box.png ← dark description area (render at 25% opacity)
attack_portrait.png ← portrait per card type
attack_portrait_shadow.png
skill_portrait.png
skill_portrait_shadow.png
power_portrait.png
power_portrait_shadow.png
banner_shadow.png ← render at 60% opacity
banner.png ← tinted by rarity来源: CardPoolModel.DeckEntryCardColor. 将它们与 /api/cards 返回的 color 字段对应。
来源: NTinyCard.GetBannerColor. 与 rarity 字段对应。
肖像文件名: attack = 攻击牌, power = 能力牌, skill = 其余所有(技能、状态、诅咒……)
<div class="tiny-card" style="
--back: #D62000; /* pool color, Ironclad */
--banner: #FFDA36; /* rarity color, Rare */
position: relative;
width: 64px;
height: 64px;
">
<!-- 1. card back, tinted by pool -->
<div class="layer" style="
background-color: var(--back);
mask: url(https://spire-codex.com/static/images/ui/run_history_card/card_back.png) center/contain no-repeat;
-webkit-mask: url(https://spire-codex.com/static/images/ui/run_history_card/card_back.png) center/contain no-repeat;
"></div>
<!-- 2. description box -->
<img class="layer" src="https://spire-codex.com/static/images/ui/run_history_card/desc_box.png" style="opacity:.25">
<!-- 3. portrait shadow + portrait (attack/skill/power) -->
<img class="layer" src="https://spire-codex.com/static/images/ui/run_history_card/attack_portrait_shadow.png">
<img class="layer" src="https://spire-codex.com/static/images/ui/run_history_card/attack_portrait.png"
style="filter: brightness(.95) sepia(.15)">
<!-- 4. banner shadow + banner tinted by rarity -->
<img class="layer" src="https://spire-codex.com/static/images/ui/run_history_card/banner_shadow.png" style="opacity:.6">
<div class="layer" style="
background-color: var(--banner);
mask: url(https://spire-codex.com/static/images/ui/run_history_card/banner.png) center/contain no-repeat;
-webkit-mask: url(https://spire-codex.com/static/images/ui/run_history_card/banner.png) center/contain no-repeat;
"></div>
</div>
<style>
.tiny-card .layer {
position: absolute; inset: 0;
width: 100%; height: 100%;
object-fit: contain;
}
</style>开箱即用的 React 版本。源码: TinyCard.tsx
import TinyCard from "./TinyCard";
// Feed in the three fields from /api/cards:
<TinyCard color="ironclad" type="Attack" rarity="Rare" className="w-16 h-16" />/api/cards 返回的每张卡牌都包含两个可直接使用的 URL,指向游戏渲染的完整卡牌(边框、插画、横幅和文字,与游戏内完全一致)。远古者卡牌为动态 webp。
image_url_card — 基础卡。唯一一张没有渲染图的卡(mad_science)为 null;此时请回退到 image_url(肖像插画)。image_url_card_upg — 升级卡。卡牌没有升级时为 null。// e.g. /api/cards/bash
{
"id": "BASH",
"image_url": "/static/images/cards/bash.webp", // portrait art
"image_url_card": "https://cdn.spire-codex.com/cards-full/stable/bash.webp",
"image_url_card_upg": "https://cdn.spire-codex.com/cards-full/stable/bash_upg.webp"
}本地化渲染图位于语言子文件夹下,例如: cards-full/stable/jpn/bash.webp. 全部 15 种语言均可用。
每张卡牌还会与它可合法获得的每种附魔一起渲染,与游戏内附魔预览的绘制完全一致(徽章、数值和新增的卡牌文字)。URL 遵循同一模式:
https://cdn.spire-codex.com/cards-full/stable/ench/{enchantment}/{card}.webp // English, base
https://cdn.spire-codex.com/cards-full/stable/ench/{enchantment}/{card}_upg.webp // English, upgraded
https://cdn.spire-codex.com/cards-full/stable/{lang}/ench/{enchantment}/{card}.webp // localized
// e.g. Anger with Corrupted, in Japanese:
https://cdn.spire-codex.com/cards-full/stable/jpn/ench/corrupted/anger.webp{enchantment} / {card}: 来自 /api/enchantments 和 /api/cards 的小写 id(如 sharp、corrupted、sown)。将全部游戏数据下载为单个 ZIP 压缩包。每个压缩包包含所有实体类型(卡牌、遗物、怪物、能力等)的 JSON 文件。
完整的 Swagger/OpenAPI 文档,支持在线试用。
打开 API 文档 →Spire Codex 是开源的。数据提取流水线、API 和前端都可以在 GitHub 上获取。
在 GitHub 上查看 →