OverwolfSpire Codex が Overwolf に登場しました。 詳しく見る →

スレイ・ザ・スパイア2 (STS2) 開発者

Spire Codex のデータでツール、ボット、コンテンツを作れます。すべて無料でオープンです。

ツールチップウィジェット

Wowhead 風のホバー表示ツールチップ(カード・レリック・ポーション)をどんなサイトにも追加できます。script タグ1つ、依存関係ゼロ。

インストール

<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]]実績

JavaScript API

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

ゲームの全データベースに公開 REST API でアクセスできます。認証は不要です。IPごとのサイト利用枠でブラウジングや軽い呼び出しはまかなえ、キーなしの API 利用には下記の基本レートが適用されます。 スクリプトやツールでは、API キーを作成して X-API-Key ヘッダーで送信してください。 プロフィールページで作成できます。 キーを使うとリクエストは IP ではなく ID 単位で扱われ(ネットワークが変わっても安定し、同じ NAT 配下の他ユーザーと共有されません)、利用状況を確認できます。ティアの上限はエンドポイントごとに適用されます。レスポンスには X-RateLimit-Remaining / X-RateLimit-Reset が含まれるので、リクエストの間隔調整に使えます。

レート制限

サイトのトラフィック300/minuteIPごと
APIキーなし15/minute
登録ユーザー60/minuteプロフィールで作成
学術100/minute申請制
有料120/minuteサポーター

すべての上限はエンドポイントごとに数えます。表は各ルートでの許容量であり、全体のプールではありません。一部の重いエンドポイントには、キーの有無にかかわらず全呼び出し元に適用される独自の予算があります(下記のラン エクスポート参照。言語 ZIP は 10回/時)。X-RateLimit-Remaining を監視し、429 が返ったら待機してください(Retry-After が設定されます)。

ランの一括エクスポート

GET /api/exports/runs?limit=1000&start=2026-06-01T00:00:00Z

公式ランを JSONL としてストリーミングします(1行1ラン)。

limit ページの上限を決めます。ページが満杯なら次ページ用のカーソルが返ります。
start / end 投稿日時の半開区間で絞り込みます。ページ送り中は固定してください。カーソルには含まれません。

このエンドポイントには1時間あたり120クレジットの独自予算があり、キーの有無を問わず全呼び出し元で共有されます。ページ付きリクエストは1クレジット、上限なしの取得(limit なし)は60クレジットです。継続的な同期は約30秒間隔のページ付き取得が最適です。429 が返ったら Retry-After に従い、同じカーソルで再開してください。

全データが必要な場合、パラメータなしの呼び出しは1日1回再生成される静的ファイル /exports/runs-latest.jsonl.gz にリダイレクトされます(行の形式は同じ)。/api/exports/runs/manifest で生成日時とラン数を確認できます。各行には player_token(送信アカウントの安定した仮名ID、匿名ランでは null)が含まれます。

1つのパッチだけ? /api/exports/runs?version=v0.111.0 はマニフェストの versions マップにあるバージョン別の静的ファイル /exports/runs-v0.111.0.jsonl.gz へリダイレクトします。limit と cursor と組み合わせると、1つのパッチ内をページングします。

ベース URL

https://spire-codex.com

ベータチャンネル(Steam ベータブランチの未公開コンテンツ):任意のエンティティのエンドポイントに次を付けます: ?channel=beta. 現在のベータ版: /api/beta/version. main との全差分: /api/beta/diff.

The community stats pages were reorganized: /community-stats, /leaderboards/metrics, /charts, and the /meta page now live under /stats, /leaderboards/elo is /top-players, and run submission moved to /runs/submit. Old URLs redirect.

エンドポイント

完全な対話型ドキュメント(バックエンドから自動生成、常に最新): /docs

エンティティ

GET/api/cards全カード(フィルター:color, type, rarity, keyword, tag, spawns, search)
GET/api/cards/{id}カード1件
GET/api/charactersすべてのキャラクター
GET/api/characters/{id}キャラクター1件
GET/api/relics全レリック(フィルター:rarity, pool, ancient, search)
GET/api/relics/{id}レリック1件
GET/api/potions全ポーション(フィルター:rarity, pool, search)
GET/api/potions/{id}ポーション1件
GET/api/monsters全モンスター(フィルター:type, search)
GET/api/monsters/{id}モンスター1件
GET/api/powers全パワー(フィルター:type, stack_type, search)
GET/api/powers/{id}パワー1件
GET/api/events全イベント(フィルター:type, act, search)
GET/api/events/{id}イベント1件
GET/api/encounters全エンカウント(フィルター:room_type, act, search)
GET/api/encounters/{id}エンカウント1件
GET/api/enchantments全エンチャント
GET/api/enchantments/{id}エンチャント1件
GET/api/keywordsカードのキーワード
GET/api/keywords/{id}キーワード1件
GET/api/intents全インテント種別
GET/api/intents/{id}インテント1件
GET/api/orbs全オーブ種別
GET/api/orbs/{id}オーブ1件
GET/api/afflictionsアフリクション種別
GET/api/afflictions/{id}アフリクション1件
GET/api/modifiersカスタムモードの修正子
GET/api/modifiers/{id}修正子1件
GET/api/achievements全実績
GET/api/achievements/{id}実績1件
GET/api/badges全バッジ
GET/api/badges/{id}バッジ1件
GET/api/epochs全エポック
GET/api/epochs/{id}エポック1件
GET/api/stories全ストーリー
GET/api/stories/{id}ストーリー1件
GET/api/acts全幕
GET/api/acts/{id}アクト1件
GET/api/ascensions全アセンションレベル
GET/api/ascensions/{id}アセンション1件
GET/api/glossary全用語集
GET/api/glossary/{id}用語1件

集計と検索

GET/api/statsエンティティ数
GET/api/ancient-pools条件付きの全エンシェントのレリックプール
GET/api/ancient-pools/{id}エンシェント1体のプール
GET/api/unlocksエポック情報付きで種別ごとにまとめた解放可能エンティティ
GET/api/history/{entity_type}/{entity_id}更新履歴に基づくエンティティごとのバージョン履歴
GET/api/update-history/{entity_type}/{entity_id}ゲームパッチによるエンティティごとの更新履歴
GET/api/names/{entity_type}/{entity_id}エンティティの多言語名の検索
GET/api/searchエンティティ、リファレンス、メカニクス、ガイド、ニュース、サイトページ、画像ファイルを横断するサイト内検索(タイプミス許容、q, lang)
GET/api/search/semanticMeaning-based entity search, same item shape as /api/search (q, limit); empty when the feature is off
GET/api/merchant/configMerchant pricing config extracted from the game
GET/api/mechanics/constantsMechanics constants: room odds, gold ranges, ascension tuning
GET/api/mechanics/sectionsIndex of the mechanics pages
GET/api/mechanics/sections/{slug}One mechanics page as markdown with template tokens resolved
GET/api/changelogs全更新履歴
GET/api/changelogs/recent-additionsホームページのバンドに表示する最新エンティティ
GET/api/changelogs/{tag}タグ指定の更新履歴1件(例:v1.0.20)
GET/api/newsSteam のお知らせ(保存のためローカルにミラー)
GET/api/news/{gid}サニタイズ済み本文付きのニュース記事1件
GET/api/versionsバージョン選択用に利用可能なベータデータのバージョン
GET/api/news/codexSpire Codex site news, newest first
GET/api/news/codex/{slug}One site news entry
GET/api/announcementsActive site banner messages

Languages

GET/api/languagesAvailable languages with display names
GET/api/translationsTranslation maps for filter values and UI strings (lang)
GET/api/localizationsThe game's own localization tables as ICU MessageFormat, all of them or the ones named in ?tables= (max 50; unknown names are 404)
GET/api/localizations/tablesNames of the available localization tables
GET/api/localizations/{table}One localization table

コミュニティと投稿

GET/api/guides全ガイド(フィルター:category, difficulty, tag, search)
GET/api/guides/{slug}Markdown をレンダリング済みのガイド1件
POST/api/guidesガイドを投稿(Discord Webhook、レート制限あり)
POST/api/runsSubmit a run for community stats and leaderboards. The run is attached to an account only with Authorization: Bearer <jwt>; a bare steam_id is kept as a hint
POST/api/runs/claimAttach the signed-in account to previously-submitted anonymous runs by hash
GET/api/runs/listフィルターとページ送り付きで投稿済みランを閲覧(投稿者の勝率による ascension_min/ascension_max と winrate_min/winrate_max、いわゆるコンテンツブラケットを含む) 各行には player_token が含まれます。送信アカウントの安定した仮名IDで、匿名ランでは null です。 total_is_lower_bound is true when the exact count ran out of time and total is a capped lower bound.
GET/api/runs/leaderboardRun leaderboards (fastest, highest_ascension); filter by character, players, game_mode, ascension_min, winrate_min (the content brackets), build_id
GET/api/runs/shared/{run_hash}ハッシュ指定の投稿済みラン1件(レート制限あり)
GET/api/runs/statsコミュニティ統計の集計(character, ascension, username で絞り込み)
GET/api/runs/community-statsThe /stats hub dataset: event decision splits, deadliest encounters, win rates by ascension/character, records. Takes the same bracket keys as the metrics tables; an unknown bracket returns HTTP 400
GET/api/charts/meta/stats/charts エクスプローラー用のチャート一覧:利用可能なチャート、フィルター、分割、ラン統計
GET/api/charts/{chart}One pre-aggregated chart (filter: players, ascension, game_mode, username, split, bracket=a10|wr30|wr50|wr75, build_id, plus per-chart params). A saved chart id from the chart builder returns that saved chart instead
POST/api/chartsSave a chart spec to your profile (bearer token, 100 per account)
PATCH/api/charts/{id}Update the title, visibility or spec of your own saved chart; DELETE removes it
GET/api/charts/mineYour saved charts, newest first (bearer token)
GET/api/charts/publicNewest public saved charts (limit)
GET/api/tierlists/shared/{share_id}Public read-only view of a shared tier list
GET/api/beta/diff現在のベータがエンティティ種別ごとに追加・変更・削除する内容。すべての BETA ラベルの元データ
GET/api/beta/version現在のベータ版
GET/api/runs/scores/{type}Codex Score + Codex Elo per entity (cards/relics/potions); ?bracket= grades within a run bracket (a10|wr30|wr50|wr75, a game version, or any metrics bracket; unknown is HTTP 400) (the in-game mod sends the same via ?stat_filter=a10|a10_wr30|a10_wr50|a10_wr75); relics accept ?act=1|2|3 to rank by acquisition act; ?character= switches to that character's slice (entries gain a scope field)
GET/api/runs/leaderboard/seed-rank特定シードのシード内順位と全体順位(?seed=&steam_id=)。勝利ランがない場合、順位フィールドは null
POST/api/auth/steam/ticketSteamworks の Web 認証チケットをサイトの JWT と交換(ゲーム内サイレントサインイン)。サーバーに Steam キーがない間は 503
GET/api/runs/metrics/{type}Dense metrics table for cards/relics/potions, one row per entity: Codex Score, win_rate with a Wilson 95% win_rate_ci, hold_rate, lift and lift_n over the floor-adjusted expectation (null under 20 seats), Codex Elo and pick_rate from free choice screens for cards and relics, a wax block on relics (Toy Box copies split out), and used/use_rate on potions. Counts are per seat, so a 4P run is four seats; the response carries total_runs, total_seats, total_wins and data_through. ?bracket=all|solo|2p|3p|4p|a10|daily|custom|wr30|wr50|wr75 or a composite like solo:standard; ?character= switches to that character's slice (rows gain per-character Elo and Pick%). An unknown bracket returns HTTP 400
GET/api/runs/metrics/shopsShop shelf table, one row per card, relic or potion: seen, bought, buy_rate, and the buyers' win_rate, win_rate_ci and lift. Same bracket keys as the other metrics tables
GET/api/runs/metrics/eventsEvent option table: chosen, share of that event's choices, win_rate, win_rate_ci and lift. Same bracket keys as the other metrics tables
GET/api/runs/metrics/campfiresRest-site choice table (rest, smith, and the rest) with a localized name per ?lang=: chosen, share, low_hp_share, win_rate, win_rate_ci and lift. Same bracket keys as the other metrics tables
GET/api/runs/versions投稿済みランがあるゲームビルド ID の一覧
GET/api/runs/leaderboard/rank/{run_hash}Rank of one winning run within its ladder (category)
GET/api/leaderboards/eloTop players by Codex Elo over solo A10 standard runs, refreshed nightly; powers /top-players (limit, min_runs)
GET/api/runs/stats/{type}/{id}Community stats for one card, relic or potion, with per-bracket and per-character splits
GET/api/runs/stats/{type}/{id}/historyDaily Codex Score and Elo history for one entity (bracket=all|a10|wr30|wr50|wr75)
GET/api/runs/top/{type}/{character}Most-picked entities of a type for one character (limit)
GET/api/runs/encounter-statsPer-encounter appearances, fatal rate, avg damage and turns, per character too (act, room_type, multiplayer, bracket, build_id, encounter, page, limit)
GET/api/runs/encounter-seriesThe given encounters (max 20) rolled up per bracket and per recent game version
GET/api/runs/pulseCommunity run and win totals plus data_through
GET/api/runs/snapshot-statusWhether the stats are loaded or rebuilding
GET/api/runs/{run_hash}/similarNearest winning solo decks to a run and what they took that it didn't
GET/api/runs/archetypesCommunity deck archetypes, clustered nightly
GET/api/runs/encounter-buildsWhich archetypes die to an encounter and which walk past it (encounter)
GET/api/runs/deck-advisorWhat the winning decks nearest a partial deck carry that it doesn't yet (character, cards, relics)
GET/api/runs/pick-coachNearest archetypes for a partial deck and a score per offered card (character, cards, relics, offer, target)
GET/api/pairings/{item_type}/{item_id}Cards, relics and potions that show up in the same runs as this item
GET/api/draft-recs/{item_type}/{item_id}Cards players most often draft when they already hold this item
POST/api/draft-adviceRank the offered cards for the current deck
GET/api/replaysRuns with a replay to watch; same filters and row shape as /api/runs/list plus replay_url
GET/api/replays/summaryHow many replays are watchable, overall and per character
GET/api/runs/{run_hash}/replayThe stored replay journal as gzip; POST uploads one for a run you own, DELETE removes it
GET/api/players/{username}/insightsOne player's public insights with community comparison; 404 for unknown or private profiles
GET/api/players/{username}/statsプレイヤー自身のカード、レリック、ポーション、イベント、ショップ、焚き火の統計と個人Lift。フィルターとプライバシーはinsightsと同じ
GET/api/presence/activeLive runs from the in-game mod, deepest first
GET/api/presence/{steam_id}One player's live run; 404 when they aren't in one
GET/api/thanksGitHub contributors, special thanks, and public supporters
GET/api/mod/latestLatest mod build and the game version it was verified against
GET/api/rate-limitsThe public rate-limit tiers
POST/api/feedbackフィードバックを送信(Discord Webhook)

一括ダウンロード

GET/api/exports/runs公式ランの JSONL ストリーム(limit/start/end/cursor でページ送り。1時間120クレジットの独自予算、上記の一括エクスポート参照)
GET/api/exports/runs/manifestWhen the daily full run dump was generated and how many runs it holds
GET/api/exports/{lang}1言語分の全エンティティ JSON の ZIP(10回/時)
GET/api/images画像ギャラリーのカテゴリ
GET/api/images/searchファイル名で画像を検索
GET/api/images/game/{version}/{category}/browseアセット全ダンプのフォルダをページ送りで閲覧(path, offset, limit)
GET/api/images/game/{version}/{category}/downloadダンプ内フォルダ1つのファイルを ZIP で取得(path、上限2000ファイル)

多言語

任意のエンドポイントに次のクエリパラメータを付けます: ?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=Rare

Python

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));

ミニカードスプライト

ゲーム内のカードサムネイル(ラン履歴 / ゲームオーバー画面で使用)を任意の Web プロジェクトで再現できます。CSS の mask-image で合成した6枚の PNG レイヤーで、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 フィールドと照合してください。

ironclad#D62000
silent#5EBD00
defect#3EB3ED
necrobinder#CD4EED
regent#E36600
colorless#A3A3A3
event#A3A3A3
curse#585B61
quest#24476A
status#FFFFFF
token#FFFFFF

レアリティ(バナー)の色

出典: NTinyCard.GetBannerColor. rarity フィールドと照合してください。

Basic#9C9C9C
Starter#9C9C9C
Common#9C9C9C
Uncommon#64FFFF
Rare#FFDA36
Curse#E669FF
Event#13BE1A
Ancient#13BE1A
Quest#F46836
Status#9C9C9C
Token#9C9C9C

最小限の HTML + CSS レシピ

ポートレートのファイル名: 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 コンポーネント

そのまま使える 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 が2つ含まれます。エンシェントカードはアニメーション 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 は次の1つのパターンに従います:

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)。
  • 存在するのは有効なカードとエンチャントの組み合わせのみで(エクスポートはゲーム自身の適用ルールを使用)、無効な組み合わせは 404 になります。/api/enchantments の card_type / applicable_to フィールドが、どのカードが対象かを示します。
  • すべての組み合わせに基本版と強化版があり、14言語すべてでエンチャントのテキストが完全にローカライズされています。

データエクスポート

全ゲームデータを1つの ZIP アーカイブでダウンロードできます。各アーカイブにはエンティティ種別ごと(カード、レリック、モンスター、パワーなど)の JSON ファイルが含まれます。

対話型 API ドキュメント

その場で試せる機能付きの完全な Swagger/OpenAPI ドキュメント。

API ドキュメントを開く →

オープンソース

Spire Codex はオープンソースです。データ抽出パイプライン、API、フロントエンドはすべて GitHub で公開しています。

GitHub で見る →