HOK API: данные Honor of Kings для ваших программ

Читайте героев, предметы, арканы, заклинания, тир-лист и турнирные драфты Honor of Kings Global, а также свои скримы, из программы или ИИ-ассистента. Только чтение, бесплатно, по ключу.

Получить ключ

Аутентификация

Каждый адрес требует API-ключ, переданный как bearer-токен. Ключ только читает и видит то же, что его владелец: данные игры для всех, ваши скримы, тир-листы и команды для вас.

Ваш первый запрос
curl -H "Authorization: Bearer hok_YOUR_KEY" http://127.0.0.1:3000/api/v1/heroes

Заголовок X-API-Key тоже работает. Ключ в адресе игнорируется: адреса попадают в журналы.

Лимиты и ошибки

Каждый ключ может делать 120 запросов в минуту. Ошибки приходят в JSON со стабильным кодом:

СтатусcodeЗначение
400invalid_bodyСитуация, отправленная в единственный POST, неверна: ошибка говорит, что не так.
401unauthorizedНет ключа, либо ключ недействителен, истёк или отозван.
403insufficient_scopeУ ключа нет области доступа, нужной этому адресу.
404not_foundНеизвестный адрес или то, что владелец ключа не может видеть.
405method_not_allowedAPI только для чтения: используйте GET.
429rate_limitedСлишком много запросов: подождите столько секунд, сколько указано в Retry-After.

Использовать с ИИ

API также является MCP-сервером по адресу http://127.0.0.1:3000/api/v1/mcp: ассистент получает по инструменту на каждый адрес, доступный его ключу.

Создайте отдельный ключ для каждого ассистента и дайте ему только нужное (публичных данных игры хватает для вопросов о героях, предметах и драфтах). Если ключ утечёт, отзовите его, не трогая остальные.

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 своим ключом. Ассистент увидит по одному инструменту на каждый адрес, доступный ключу, и будет только читать.

Адреса

Полное описание для импорта в инструмент: /api/v1/openapi.json (OpenAPI 3.1)

Данные игры game

GET/api/v1/heroesДанные игры

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

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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).

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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).

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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.

Инструмент для ИИ: training_focus

Пример ответа
{
  "heroIds": [
    "h105",
    "h120"
  ]
}
GET/api/v1/training/notesВаша тренировка

Your training notebook.

Инструмент для ИИ: training_notes

Пример ответа
{
  "notes": []
}
GET/api/v1/training/combosВаша тренировка

The combos you have acquired.

Инструмент для ИИ: training_combos

Пример ответа
{
  "progress": {}
}
GET/api/v1/training/combos/reviewВаша тренировка

The combos that are due for a check.

Инструмент для ИИ: training_combos_due

Пример ответа
{
  "now": 1793477503716,
  "due": [],
  "dueTotal": 0,
  "toLearn": [],
  "toLearnTotal": 0,
  "skills": {}
}
GET/api/v1/training/mapsВаша тренировка

The maps of the situations.

Инструмент для ИИ: training_maps

Пример ответа
{
  "maps": []
}
GET/api/v1/training/scenariosВаша тренировка

The situations prepared by the staff.

Инструмент для ИИ: list_training_scenarios

Пример ответа
{
  "scenarios": []
}
GET/api/v1/training/scenarios/{id}Ваша тренировка

One situation.

Инструмент для ИИ: 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.

Инструмент для ИИ: 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).

Инструмент для ИИ: 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.

Инструмент для ИИ: whoami

Пример ответа
{
  "account": {
    "tag": "YHX7EA",
    "name": "Kai"
  },
  "key": {
    "id": "25bf6418-4cbf-448a-baed-30349809947e",
    "name": "Stats bot",
    "scopes": [
      "game",
      "competitive"
    ],
    "expiresAt": 1801253503341
  }
}

Экспорт

Оформленный отчёт · можно импортировать обратно

Формат

Файл содержит данные серии: импортируйте его обратно через Скримы → Импортировать серию. Не пересохраняйте и не печатайте его, иначе данные будут потеряны.