HOK API: プログラムのための Honor of Kings データ

Honor of Kings Global のヒーロー、アイテム、アルカナ、スペル、ティアリスト、大会のドラフト、そして自分のスクリムを、プログラムや AI アシスタントから読めます。読み取り専用・無料・キーで利用。

キーを取得

認証

どのアドレスにも bearer トークンとして送る API キーが必要です。キーは読み取り専用で、所有者が見られるものだけを見ます: 全員向けのゲームデータと、あなた自身のスクリム、ティアリスト、チーム。

最初の呼び出し
curl -H "Authorization: Bearer hok_YOUR_KEY" http://127.0.0.1:3000/api/v1/heroes

X-API-Key ヘッダーも使えます。アドレスに入れたキーは無視されます(アドレスはログに残るため)。

制限とエラー

各キーは 1 分あたり 120 リクエストまでです。エラーは固定コード付きの JSON です:

ステータスcode意味
400invalid_body唯一の POST に送った状況が無効です。エラーが何が問題かを示します。
401unauthorizedキーがない、または無効・期限切れ・無効化されたキーです。
403insufficient_scopeこのアドレスに必要なスコープがキーにありません。
404not_found不明なアドレス、またはキーの所有者が見られないものです。
405method_not_allowedAPIは読み取り専用です。GETを使ってください。
429rate_limitedリクエストが多すぎます: Retry-After の秒数だけ待ってください。

AI で使う

API は http://127.0.0.1:3000/api/v1/mcp の MCP サーバーでもあります: アシスタントはキーが読めるアドレスごとにツールを 1 つ得ます。

アシスタントごとに必要な範囲だけのキーを作りましょう(ヒーロー、アイテム、ドラフトについて聞くならゲームの公開データで十分です)。漏れたら他に触れずにそのキーだけ無効化できます。

Claude Code

ターミナルで次を実行します:

Terminal
claude mcp add --transport http hok-api http://127.0.0.1:3000/api/v1/mcp --header "Authorization: Bearer hok_YOUR_KEY"

Claude Desktop

claude_desktop_config.json(Settings、Developer、Edit config)に追加し、Claude を再起動します。Node.js が必要です。

claude_desktop_config.json
{
  "mcpServers": {
    "hok-api": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://127.0.0.1:3000/api/v1/mcp",
        "--header",
        "Authorization:${HOK_API_KEY}"
      ],
      "env": {
        "HOK_API_KEY": "Bearer hok_YOUR_KEY"
      }
    }
  }
}

Cursor

.cursor/mcp.json(プロジェクト内またはホームフォルダ)に追加します:

.cursor/mcp.json
{
  "mcpServers": {
    "hok-api": {
      "url": "http://127.0.0.1:3000/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer hok_YOUR_KEY"
      }
    }
  }
}

ChatGPT

カスタム GPT で: Configure、Create new action、このアドレスで Import from URL。次に Authentication: API key、タイプ Bearer を選び、キーを貼り付けます。

OpenAPI
http://127.0.0.1:3000/api/v1/openapi.json

hok_YOUR_KEY を自分のキーに置き換えます。アシスタントにはキーが読めるアドレスごとにツールが 1 つ表示され、読み取りのみ行います。

アドレス一覧

ツールに取り込むための完全な記述: /api/v1/openapi.json (OpenAPI 3.1)

ゲームデータ game

GET/api/v1/heroesゲームデータ

The heroes of the Global roster (name, classes, lanes, picture).

AI 用ツール: list_heroes

応答の例
{
  "heroes": [
    {
      "id": "h105",
      "name": "Arli",
      "displayName": "Arli",
      "image": "https://camp.honorofkings.com/h105.png",
      "roles": [
        "Marksman"
      ],
      "lanes": [
        "Farm Lane"
      ],
      "laneSources": {
        "Farm Lane": "camp"
      },
      "sourceIds": [
        "105"
      ],
      "availableGlobal": true,
      "isFlowborn": false,
      "sourceUpdated": "20260925"
    }
  ],
  "lastUpdated": "2026-10-31T08:00:00.000Z",
  "sourceUpdated": "20260925",
  "usingCache": true,
  "language": "en",
  "namesLanguage": "en"
}
GET/api/v1/heroes/{id}ゲームデータ

One hero: its sheet (skills, art), its recommended builds, its combos, its official ratings and the competitive figures.

AI 用ツール: get_hero

パラメーター場所説明
id 必須アドレスThe id of the thing.
sinceクエリCount the tournament games from this day on, YYYY-MM-DD.
応答の例
{
  "hero": {
    "id": "h105",
    "name": "Arli",
    "roles": [
      "Marksman"
    ],
    "lanes": [
      "Farm Lane"
    ]
  },
  "competitive": [],
  "tournament": {
    "since": null,
    "totalGames": 48,
    "picks": 21,
    "bans": 9,
    "wins": 12,
    "losses": 9,
    "winRate": 0.571,
    "pickRate": 0.438,
    "banRate": 0.188,
    "byRule": {},
    "range": {
      "first": "2026-08-01",
      "last": "2026-10-30"
    }
  },
  "builds": [],
  "profile": null,
  "ratings": {
    "Farm Lane": "A"
  },
  "ratingSources": {
    "Farm Lane": "tournaments"
  },
  "combos": [],
  "details": null,
  "detailsFetchedAt": null,
  "detailsLanguage": "en",
  "language": "en"
}
GET/api/v1/tier-listゲームデータ

The public tier list of each lane: tournament results first, the editors' ratings for the heroes played too little.

AI 用ツール: get_tier_list

応答の例
{
  "period": {
    "from": "2026-08-01",
    "to": "2026-10-31"
  },
  "minGames": 10,
  "totalGames": 120,
  "lanes": [
    {
      "lane": "Farm Lane",
      "slug": "farm",
      "tiers": [
        {
          "label": "SS",
          "heroes": [
            {
              "heroId": "h105",
              "source": "tournaments",
              "games": 48,
              "winRate": 0.571,
              "pickRate": 0.438,
              "score": 0.62
            }
          ]
        }
      ],
      "unranked": [
        "h199"
      ]
    }
  ],
  "updatedAt": "2026-10-31T08:00:00.000Z"
}
GET/api/v1/catalogゲームデータ

The items, the arcana, the battle spells, the stats and the tags of the game, in one answer.

AI 用ツール: get_catalog

応答の例
{
  "stats": [
    {
      "id": 1,
      "name": "Physical Attack"
    }
  ],
  "tags": [
    {
      "id": 3,
      "name": "Burst"
    }
  ],
  "tagGroups": {
    "red": "Damage"
  },
  "items": [],
  "arcana": [],
  "spells": [
    {
      "id": 1,
      "name": "Flash",
      "imageId": null,
      "description": "Blink a short distance.",
      "cooldownSeconds": 120,
      "unlockLevel": null
    }
  ],
  "heroTags": {}
}
GET/api/v1/catalog/{family}ゲームデータ

One family of the catalogue: items, arcana, spells, stats or tags.

AI 用ツール: list_catalog_family

パラメーター場所説明
family 必須アドレスitems, arcana, spells, stats or tags.
応答の例
{
  "spells": [
    {
      "id": 1,
      "name": "Flash",
      "imageId": null,
      "description": "Blink a short distance.",
      "cooldownSeconds": 120,
      "unlockLevel": null
    }
  ]
}
GET/api/v1/catalog/{family}/{id}ゲームデータ

One item, arcana, spell, stat or tag, by its number: everything its page shows (stats and tags by their number).

AI 用ツール: get_catalog_entry

パラメーター場所説明
family 必須アドレスitems, arcana, spells, stats or tags.
id 必須アドレスThe id of the thing.
応答の例
{
  "id": 1,
  "name": "Flash",
  "imageId": null,
  "description": "Blink a short distance.",
  "cooldownSeconds": 120,
  "unlockLevel": null
}

大会シーン competitive

GET/api/v1/tournaments大会シーン

The tournament series entered by the staff.

AI 用ツール: list_tournaments

パラメーター場所説明
qクエリWords to look for.
pageクエリThe page of the list, from 1.
応答の例
{
  "items": [
    {
      "id": "8d1f6a52-3c1e-4b7e-9a51-1f2c3d4e5f60",
      "name": "KPL West Finals",
      "teamA": "Alpha",
      "teamB": "Bravo",
      "bestOf": 5,
      "status": "complete"
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 25
}
GET/api/v1/tournaments/{id}大会シーン

One tournament series with all its games: bans, picks, lanes, winner, duration.

AI 用ツール: get_tournament

パラメーター場所説明
id 必須アドレスThe id of the thing.
応答の例
{
  "id": "8d1f6a52-3c1e-4b7e-9a51-1f2c3d4e5f60",
  "teamA": {
    "name": "Alpha"
  },
  "teamB": {
    "name": "Bravo"
  },
  "bestOf": 5,
  "gameMode": "global-ban-pick",
  "status": "complete",
  "games": [
    {
      "number": 1,
      "bans": {
        "blue": [
          "h105"
        ],
        "red": [
          "h199"
        ]
      },
      "picks": {
        "blue": [
          "h101"
        ],
        "red": [
          "h120"
        ]
      },
      "winner": "blue",
      "durationSeconds": 1104
    }
  ]
}

あなたのスクリム scrims

GET/api/v1/seriesあなたのスクリム

Your series, and the ones a team of yours shared.

AI 用ツール: list_series

パラメーター場所説明
pageクエリThe page of the list, from 1.
pageSizeクエリHow many entries a page holds.
viewクエリsummary (lighter) or full.
sortクエリupdated, oldest or created.
statusクエリactive, complete or draw.
modeクエリThe game mode: global-ban-pick, free-for-all or classic.
draftModeクエリThe draft mode of the series.
qクエリWords to look for.
fromクエリThe first day, YYYY-MM-DD.
toクエリThe last day, YYYY-MM-DD.
応答の例
{
  "items": [
    {
      "id": "16f3cb87-fb93-4a70-91e0-01f01f863f11",
      "teamA": "Alpha",
      "teamB": "Bravo",
      "bestOf": 3,
      "winsRequired": 2,
      "gameMode": "free-for-all",
      "draftMode": "solo",
      "status": "active",
      "score": {
        "teamA": 1,
        "teamB": 0
      },
      "gamesCount": 1,
      "role": "owner",
      "createdAt": "2026-10-31T20:15:23.262Z",
      "updatedAt": "2026-10-31T20:45:00.000Z"
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 20
}
GET/api/v1/series/{id}あなたのスクリム

One series with every game of it.

AI 用ツール: get_series

パラメーター場所説明
id 必須アドレスThe id of the thing.
応答の例
{
  "id": "16f3cb87-fb93-4a70-91e0-01f01f863f11",
  "createdAt": "2026-10-31T20:15:23.262Z",
  "updatedAt": "2026-10-31T20:45:00.000Z",
  "teamA": {
    "name": "Alpha"
  },
  "teamB": {
    "name": "Bravo"
  },
  "bestOf": 3,
  "winsRequired": 2,
  "gameMode": "free-for-all",
  "draftMode": "solo",
  "status": "active",
  "games": [],
  "currentGame": null,
  "version": 4,
  "serverTime": 1793477723366,
  "viewer": {
    "role": "owner",
    "side": null,
    "canDrive": true
  }
}
GET/api/v1/stats/overviewあなたのスクリム

The statistics of your scrims (figures under the minimum sample are withheld).

AI 用ツール: scrim_stats_overview

パラメーター場所説明
statusクエリactive, complete or draw.
modeクエリThe game mode: global-ban-pick, free-for-all or classic.
draftModeクエリThe draft mode of the series.
qクエリWords to look for.
fromクエリThe first day, YYYY-MM-DD.
toクエリThe last day, YYYY-MM-DD.
minGamesクエリThe fewest games a figure needs to be shown.
応答の例
{
  "label": "Your scrims",
  "minGames": 30,
  "seriesCount": 14,
  "gamesCount": 37,
  "totalDurationSeconds": 42180,
  "averageDurationSeconds": 1140,
  "shortestSeconds": 702,
  "longestSeconds": 1598,
  "blueWins": 20,
  "redWins": 17,
  "blueWinRate": 0.541,
  "byMode": {
    "global-ban-pick": 30,
    "free-for-all": 7,
    "classic": 0
  }
}
GET/api/v1/stats/heroesあなたのスクリム

The per-hero statistics of your scrims.

AI 用ツール: scrim_stats_heroes

パラメーター場所説明
statusクエリactive, complete or draw.
modeクエリThe game mode: global-ban-pick, free-for-all or classic.
draftModeクエリThe draft mode of the series.
qクエリWords to look for.
fromクエリThe first day, YYYY-MM-DD.
toクエリThe last day, YYYY-MM-DD.
minGamesクエリThe fewest games a figure needs to be shown.
pageクエリThe page of the list, from 1.
pageSizeクエリHow many entries a page holds.
orderクエリHow the heroes are sorted (presence by default).
heroクエリOnly the heroes whose name holds these letters.
応答の例
{
  "label": "Your scrims",
  "minGames": 30,
  "totalGames": 37,
  "sort": "presence",
  "rows": [
    {
      "heroId": "h105",
      "picks": 12,
      "bans": 9,
      "wins": 7,
      "presence": 0.568
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 10
}
GET/api/v1/heroes/{id}/scrimsあなたのスクリム

What your scrims say of one hero: picks, bans, synergies, matchups.

AI 用ツール: hero_scrim_stats

パラメーター場所説明
id 必須アドレスThe id of the thing.
応答の例
{
  "label": "Your scrims",
  "minGames": 30,
  "seriesCount": 9,
  "totalGames": 37,
  "picked": 12,
  "wins": 7,
  "losses": 5,
  "banned": 9,
  "winRate": null,
  "pickRate": null,
  "banRate": null,
  "insufficient": true,
  "lanes": [],
  "synergies": [],
  "matchups": []
}

あなたのティアリスト tier-lists

GET/api/v1/tier-listsあなたのティアリスト

Your tier lists, and the ones shared with you.

AI 用ツール: list_my_tier_lists

パラメーター場所説明
pageクエリThe page of the list, from 1.
pageSizeクエリHow many entries a page holds.
laneクエリOnly the lists of one lane.
qクエリWords to look for.
応答の例
{
  "items": [
    {
      "id": "44d20ad7-4f74-4207-80f2-6e0b352ba662",
      "name": "Farm lane, season 4",
      "lane": "Farm Lane",
      "updatedAt": "2026-10-31T20:15:23.224Z"
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 50
}
GET/api/v1/tier-lists/{id}あなたのティアリスト

One tier list with its placements.

AI 用ツール: get_my_tier_list

パラメーター場所説明
id 必須アドレスThe id of the thing.
応答の例
{
  "id": "44d20ad7-4f74-4207-80f2-6e0b352ba662",
  "createdAt": "2026-10-31T20:15:23.224Z",
  "updatedAt": "2026-10-31T20:15:23.224Z",
  "name": "Farm lane, season 4",
  "lane": "Farm Lane",
  "tiers": [
    {
      "id": "t1",
      "label": "S",
      "heroes": [
        "h105"
      ]
    }
  ],
  "unranked": [
    "h199"
  ],
  "version": 0,
  "viewer": {
    "role": "owner",
    "canEdit": true,
    "canDelete": true,
    "canShare": true
  }
}

あなたのチーム teams

GET/api/v1/me/teamsあなたのチーム

The teams you belong to, with your role in each.

AI 用ツール: my_teams

応答の例
{
  "items": [
    {
      "id": "07db7f13-4df0-4d4e-b6c9-453d26c41fe5",
      "name": "Learn Squad",
      "tag": "LERN",
      "region": "EU",
      "level": "amateur",
      "memberCount": 5,
      "myRole": "owner"
    }
  ]
}
GET/api/v1/teamsあなたのチーム

The teams of the community.

AI 用ツール: list_teams

パラメーター場所説明
qクエリWords to look for.
pageクエリThe page of the list, from 1.
pageSizeクエリHow many entries a page holds.
levelクエリOnly the teams of one level.
regionクエリOnly the teams of one region.
応答の例
{
  "items": [
    {
      "id": "07db7f13-4df0-4d4e-b6c9-453d26c41fe5",
      "name": "Learn Squad",
      "tag": "LERN",
      "region": "EU",
      "level": "amateur",
      "memberCount": 5
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 18
}
GET/api/v1/teams/{id}あなたのチーム

One team: its members and its settings that you may see.

AI 用ツール: get_team

パラメーター場所説明
id 必須アドレスThe id of the thing.
応答の例
{
  "id": "07db7f13-4df0-4d4e-b6c9-453d26c41fe5",
  "name": "Learn Squad",
  "tag": "LERN",
  "description": "",
  "region": "EU",
  "timezone": "UTC+1",
  "languages": [
    "en"
  ],
  "level": "amateur",
  "maxMembers": 10,
  "createdAt": 1793477723239,
  "members": [
    {
      "name": "Kai",
      "tag": "YHX7EA",
      "role": "owner",
      "lane": "Jungle"
    }
  ],
  "myRole": "owner"
}
GET/api/v1/teams/{id}/eventsあなたのチーム

The agenda of one of your teams.

AI 用ツール: team_events

パラメーター場所説明
id 必須アドレスThe id of the thing.
応答の例
{
  "items": [
    {
      "id": "2b9c0e3a-6f0d-4a8e-b1c2-3d4e5f6a7b8c",
      "title": "Scrim vs Bravo",
      "startsAt": 1793563200000
    }
  ],
  "canSchedule": true
}
GET/api/v1/teams/{id}/seriesあなたのチーム

The series that this team shared with its members.

AI 用ツール: team_series

パラメーター場所説明
id 必須アドレスThe id of the thing.
応答の例
{
  "items": [],
  "total": 0,
  "page": 1,
  "pageSize": 20
}
GET/api/v1/me/agendaあなたのチーム

Your agenda: the events of all your teams.

AI 用ツール: my_agenda

パラメーター場所説明
fromクエリThe start of the window, in milliseconds since 1970.
toクエリThe end of the window, in milliseconds since 1970.
応答の例
{
  "items": [
    {
      "id": "2b9c0e3a-6f0d-4a8e-b1c2-3d4e5f6a7b8c",
      "title": "Scrim vs Bravo",
      "startsAt": 1793563200000
    }
  ]
}

あなたのトレーニング training

GET/api/v1/training/focusあなたのトレーニング

The heroes you work on.

AI 用ツール: training_focus

応答の例
{
  "heroIds": [
    "h105",
    "h120"
  ]
}
GET/api/v1/training/notesあなたのトレーニング

Your training notebook.

AI 用ツール: training_notes

応答の例
{
  "notes": []
}
GET/api/v1/training/combosあなたのトレーニング

The combos you have acquired.

AI 用ツール: training_combos

応答の例
{
  "progress": {}
}
GET/api/v1/training/combos/reviewあなたのトレーニング

The combos that are due for a check.

AI 用ツール: training_combos_due

応答の例
{
  "now": 1793477503716,
  "due": [],
  "dueTotal": 0,
  "toLearn": [],
  "toLearnTotal": 0,
  "skills": {}
}
GET/api/v1/training/mapsあなたのトレーニング

The maps of the situations.

AI 用ツール: training_maps

応答の例
{
  "maps": []
}
GET/api/v1/training/scenariosあなたのトレーニング

The situations prepared by the staff.

AI 用ツール: list_training_scenarios

応答の例
{
  "scenarios": []
}
GET/api/v1/training/scenarios/{id}あなたのトレーニング

One situation.

AI 用ツール: get_training_scenario

パラメーター場所説明
id 必須アドレスThe id of the thing.
応答の例
{
  "id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
  "title": "Defend the second tower",
  "mapId": "main"
}
GET/api/v1/training/reflexあなたのトレーニング

Your reflex training results.

AI 用ツール: training_reflex

応答の例
{
  "exercises": {
    "reaction": {
      "runs": 12,
      "best": 231,
      "last": []
    }
  },
  "doneToday": [],
  "today": {
    "runs": 3,
    "minutes": 4
  },
  "week": {
    "runs": 12,
    "minutes": 18
  },
  "streak": 2,
  "teams": []
}
GET/api/v1/spaceあなたのトレーニング

Your personal space (the builds and notes you keep).

AI 用ツール: my_space

応答の例
{
  "tierLists": [],
  "builds": [],
  "training": {
    "focus": [],
    "notes": [],
    "combos": [],
    "reflex": {
      "streak": 0,
      "best": {}
    }
  },
  "links": [],
  "limits": {
    "builds": 300,
    "buildsPerHero": 30,
    "links": 20,
    "days": [
      7
    ]
  }
}

あなたのアカウント account

GET/api/v1/meあなたのアカウント

Who the key belongs to (tag and name, never the email), its scopes and its expiry.

AI 用ツール: whoami

応答の例
{
  "account": {
    "tag": "YHX7EA",
    "name": "Kai"
  },
  "key": {
    "id": "25bf6418-4cbf-448a-baed-30349809947e",
    "name": "Stats bot",
    "scopes": [
      "game",
      "competitive"
    ],
    "expiresAt": 1801253503341
  }
}

エクスポート

スタイル付きレポート · 再インポート可能

形式

このファイルにはシリーズのデータが含まれています。スクリム → シリーズをインポートから再インポートできます。再保存や印刷をするとデータが失われます。