HOK API: dữ liệu Honor of Kings cho chương trình của bạn

Đọc tướng, trang bị, ngọc, phép bổ trợ, tier list và draft giải đấu của Honor of Kings Global, cùng scrim của chính bạn, từ một chương trình hoặc trợ lý AI. Chỉ đọc, miễn phí, cần một khóa.

Lấy khóa

Xác thực

Mỗi địa chỉ cần một khóa API, gửi dưới dạng bearer token. Khóa chỉ đọc và thấy những gì chủ của nó thấy: dữ liệu game cho mọi người, scrim, tier list và đội của bạn cho riêng bạn.

Lệnh gọi đầu tiên
curl -H "Authorization: Bearer hok_YOUR_KEY" http://127.0.0.1:3000/api/v1/heroes

Header X-API-Key cũng dùng được. Khóa đặt trong địa chỉ sẽ bị bỏ qua: địa chỉ thường bị ghi vào log.

Giới hạn và lỗi

Mỗi khóa được gửi 120 yêu cầu mỗi phút. Lỗi là JSON với một mã cố định:

Trạng tháicodeÝ nghĩa
400invalid_bodyTình huống gửi tới POST duy nhất không hợp lệ: lỗi cho biết điều gì sai.
401unauthorizedKhông có khóa, hoặc khóa không hợp lệ, đã hết hạn hay bị thu hồi.
403insufficient_scopeKhóa thiếu phạm vi mà địa chỉ này yêu cầu.
404not_foundĐịa chỉ không xác định, hoặc thứ mà chủ khóa không được xem.
405method_not_allowedAPI chỉ cho phép đọc: hãy dùng GET.
429rate_limitedQuá nhiều yêu cầu: hãy đợi số giây trong Retry-After.

Dùng với AI

API cũng là một máy chủ MCP, tại http://127.0.0.1:3000/api/v1/mcp: trợ lý nhận một công cụ cho mỗi địa chỉ mà khóa của nó đọc được.

Tạo một khóa cho mỗi trợ lý, chỉ với những gì nó cần (dữ liệu công khai của game là đủ để hỏi về tướng, trang bị và draft). Nếu một khóa bị lộ, thu hồi nó mà không ảnh hưởng các khóa khác.

Claude Code

Chạy lệnh này trong terminal:

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

Thêm đoạn này vào claude_desktop_config.json (Settings, Developer, Edit config), rồi khởi động lại Claude. Cần có 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

Thêm đoạn này vào .cursor/mcp.json, trong dự án hoặc thư mục cá nhân của bạn:

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

ChatGPT

Trong một GPT tùy chỉnh: Configure, Create new action, Import from URL với địa chỉ này. Sau đó Authentication: API key, kiểu Bearer, và dán khóa của bạn.

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

Thay hok_YOUR_KEY bằng khóa của bạn. Trợ lý sẽ thấy một công cụ cho mỗi địa chỉ khóa đọc được, và chỉ đọc.

Địa chỉ

Mô tả đầy đủ, để nhập vào một công cụ: /api/v1/openapi.json (OpenAPI 3.1)

Dữ liệu game game

GET/api/v1/heroesDữ liệu game

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

Công cụ cho AI: list_heroes

Ví dụ phản hồi
{
  "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}Dữ liệu game

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

Công cụ cho AI: get_hero

Tham sốVị tríMô tả
id bắt buộcđịa chỉThe id of the thing.
sincetruy vấnCount the tournament games from this day on, YYYY-MM-DD.
Ví dụ phản hồi
{
  "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-listDữ liệu game

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

Công cụ cho AI: get_tier_list

Ví dụ phản hồi
{
  "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/catalogDữ liệu game

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

Công cụ cho AI: get_catalog

Ví dụ phản hồi
{
  "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}Dữ liệu game

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

Công cụ cho AI: list_catalog_family

Tham sốVị tríMô tả
family bắt buộcđịa chỉitems, arcana, spells, stats or tags.
Ví dụ phản hồi
{
  "spells": [
    {
      "id": 1,
      "name": "Flash",
      "imageId": null,
      "description": "Blink a short distance.",
      "cooldownSeconds": 120,
      "unlockLevel": null
    }
  ]
}
GET/api/v1/catalog/{family}/{id}Dữ liệu game

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

Công cụ cho AI: get_catalog_entry

Tham sốVị tríMô tả
family bắt buộcđịa chỉitems, arcana, spells, stats or tags.
id bắt buộcđịa chỉThe id of the thing.
Ví dụ phản hồi
{
  "id": 1,
  "name": "Flash",
  "imageId": null,
  "description": "Blink a short distance.",
  "cooldownSeconds": 120,
  "unlockLevel": null
}

Giải đấu chuyên nghiệp competitive

GET/api/v1/tournamentsGiải đấu chuyên nghiệp

The tournament series entered by the staff.

Công cụ cho AI: list_tournaments

Tham sốVị tríMô tả
qtruy vấnWords to look for.
pagetruy vấnThe page of the list, from 1.
Ví dụ phản hồi
{
  "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}Giải đấu chuyên nghiệp

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

Công cụ cho AI: get_tournament

Tham sốVị tríMô tả
id bắt buộcđịa chỉThe id of the thing.
Ví dụ phản hồi
{
  "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
    }
  ]
}

Scrim của bạn scrims

GET/api/v1/seriesScrim của bạn

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

Công cụ cho AI: list_series

Tham sốVị tríMô tả
pagetruy vấnThe page of the list, from 1.
pageSizetruy vấnHow many entries a page holds.
viewtruy vấnsummary (lighter) or full.
sorttruy vấnupdated, oldest or created.
statustruy vấnactive, complete or draw.
modetruy vấnThe game mode: global-ban-pick, free-for-all or classic.
draftModetruy vấnThe draft mode of the series.
qtruy vấnWords to look for.
fromtruy vấnThe first day, YYYY-MM-DD.
totruy vấnThe last day, YYYY-MM-DD.
Ví dụ phản hồi
{
  "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}Scrim của bạn

One series with every game of it.

Công cụ cho AI: get_series

Tham sốVị tríMô tả
id bắt buộcđịa chỉThe id of the thing.
Ví dụ phản hồi
{
  "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/overviewScrim của bạn

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

Công cụ cho AI: scrim_stats_overview

Tham sốVị tríMô tả
statustruy vấnactive, complete or draw.
modetruy vấnThe game mode: global-ban-pick, free-for-all or classic.
draftModetruy vấnThe draft mode of the series.
qtruy vấnWords to look for.
fromtruy vấnThe first day, YYYY-MM-DD.
totruy vấnThe last day, YYYY-MM-DD.
minGamestruy vấnThe fewest games a figure needs to be shown.
Ví dụ phản hồi
{
  "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/heroesScrim của bạn

The per-hero statistics of your scrims.

Công cụ cho AI: scrim_stats_heroes

Tham sốVị tríMô tả
statustruy vấnactive, complete or draw.
modetruy vấnThe game mode: global-ban-pick, free-for-all or classic.
draftModetruy vấnThe draft mode of the series.
qtruy vấnWords to look for.
fromtruy vấnThe first day, YYYY-MM-DD.
totruy vấnThe last day, YYYY-MM-DD.
minGamestruy vấnThe fewest games a figure needs to be shown.
pagetruy vấnThe page of the list, from 1.
pageSizetruy vấnHow many entries a page holds.
ordertruy vấnHow the heroes are sorted (presence by default).
herotruy vấnOnly the heroes whose name holds these letters.
Ví dụ phản hồi
{
  "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}/scrimsScrim của bạn

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

Công cụ cho AI: hero_scrim_stats

Tham sốVị tríMô tả
id bắt buộcđịa chỉThe id of the thing.
Ví dụ phản hồi
{
  "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 list của bạn tier-lists

GET/api/v1/tier-listsTier list của bạn

Your tier lists, and the ones shared with you.

Công cụ cho AI: list_my_tier_lists

Tham sốVị tríMô tả
pagetruy vấnThe page of the list, from 1.
pageSizetruy vấnHow many entries a page holds.
lanetruy vấnOnly the lists of one lane.
qtruy vấnWords to look for.
Ví dụ phản hồi
{
  "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}Tier list của bạn

One tier list with its placements.

Công cụ cho AI: get_my_tier_list

Tham sốVị tríMô tả
id bắt buộcđịa chỉThe id of the thing.
Ví dụ phản hồi
{
  "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
  }
}

Đội của bạn teams

GET/api/v1/me/teamsĐội của bạn

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

Công cụ cho AI: my_teams

Ví dụ phản hồi
{
  "items": [
    {
      "id": "07db7f13-4df0-4d4e-b6c9-453d26c41fe5",
      "name": "Learn Squad",
      "tag": "LERN",
      "region": "EU",
      "level": "amateur",
      "memberCount": 5,
      "myRole": "owner"
    }
  ]
}
GET/api/v1/teamsĐội của bạn

The teams of the community.

Công cụ cho AI: list_teams

Tham sốVị tríMô tả
qtruy vấnWords to look for.
pagetruy vấnThe page of the list, from 1.
pageSizetruy vấnHow many entries a page holds.
leveltruy vấnOnly the teams of one level.
regiontruy vấnOnly the teams of one region.
Ví dụ phản hồi
{
  "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}Đội của bạn

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

Công cụ cho AI: get_team

Tham sốVị tríMô tả
id bắt buộcđịa chỉThe id of the thing.
Ví dụ phản hồi
{
  "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Đội của bạn

The agenda of one of your teams.

Công cụ cho AI: team_events

Tham sốVị tríMô tả
id bắt buộcđịa chỉThe id of the thing.
Ví dụ phản hồi
{
  "items": [
    {
      "id": "2b9c0e3a-6f0d-4a8e-b1c2-3d4e5f6a7b8c",
      "title": "Scrim vs Bravo",
      "startsAt": 1793563200000
    }
  ],
  "canSchedule": true
}
GET/api/v1/teams/{id}/seriesĐội của bạn

The series that this team shared with its members.

Công cụ cho AI: team_series

Tham sốVị tríMô tả
id bắt buộcđịa chỉThe id of the thing.
Ví dụ phản hồi
{
  "items": [],
  "total": 0,
  "page": 1,
  "pageSize": 20
}
GET/api/v1/me/agendaĐội của bạn

Your agenda: the events of all your teams.

Công cụ cho AI: my_agenda

Tham sốVị tríMô tả
fromtruy vấnThe start of the window, in milliseconds since 1970.
totruy vấnThe end of the window, in milliseconds since 1970.
Ví dụ phản hồi
{
  "items": [
    {
      "id": "2b9c0e3a-6f0d-4a8e-b1c2-3d4e5f6a7b8c",
      "title": "Scrim vs Bravo",
      "startsAt": 1793563200000
    }
  ]
}

Luyện tập của bạn training

GET/api/v1/training/focusLuyện tập của bạn

The heroes you work on.

Công cụ cho AI: training_focus

Ví dụ phản hồi
{
  "heroIds": [
    "h105",
    "h120"
  ]
}
GET/api/v1/training/notesLuyện tập của bạn

Your training notebook.

Công cụ cho AI: training_notes

Ví dụ phản hồi
{
  "notes": []
}
GET/api/v1/training/combosLuyện tập của bạn

The combos you have acquired.

Công cụ cho AI: training_combos

Ví dụ phản hồi
{
  "progress": {}
}
GET/api/v1/training/combos/reviewLuyện tập của bạn

The combos that are due for a check.

Công cụ cho AI: training_combos_due

Ví dụ phản hồi
{
  "now": 1793477503716,
  "due": [],
  "dueTotal": 0,
  "toLearn": [],
  "toLearnTotal": 0,
  "skills": {}
}
GET/api/v1/training/mapsLuyện tập của bạn

The maps of the situations.

Công cụ cho AI: training_maps

Ví dụ phản hồi
{
  "maps": []
}
GET/api/v1/training/scenariosLuyện tập của bạn

The situations prepared by the staff.

Công cụ cho AI: list_training_scenarios

Ví dụ phản hồi
{
  "scenarios": []
}
GET/api/v1/training/scenarios/{id}Luyện tập của bạn

One situation.

Công cụ cho AI: get_training_scenario

Tham sốVị tríMô tả
id bắt buộcđịa chỉThe id of the thing.
Ví dụ phản hồi
{
  "id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
  "title": "Defend the second tower",
  "mapId": "main"
}
GET/api/v1/training/reflexLuyện tập của bạn

Your reflex training results.

Công cụ cho AI: training_reflex

Ví dụ phản hồi
{
  "exercises": {
    "reaction": {
      "runs": 12,
      "best": 231,
      "last": []
    }
  },
  "doneToday": [],
  "today": {
    "runs": 3,
    "minutes": 4
  },
  "week": {
    "runs": 12,
    "minutes": 18
  },
  "streak": 2,
  "teams": []
}
GET/api/v1/spaceLuyện tập của bạn

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

Công cụ cho AI: my_space

Ví dụ phản hồi
{
  "tierLists": [],
  "builds": [],
  "training": {
    "focus": [],
    "notes": [],
    "combos": [],
    "reflex": {
      "streak": 0,
      "best": {}
    }
  },
  "links": [],
  "limits": {
    "builds": 300,
    "buildsPerHero": 30,
    "links": 20,
    "days": [
      7
    ]
  }
}

Tài khoản của bạn account

GET/api/v1/meTài khoản của bạn

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

Công cụ cho AI: whoami

Ví dụ phản hồi
{
  "account": {
    "tag": "YHX7EA",
    "name": "Kai"
  },
  "key": {
    "id": "25bf6418-4cbf-448a-baed-30349809947e",
    "name": "Stats bot",
    "scopes": [
      "game",
      "competitive"
    ],
    "expiresAt": 1801253503341
  }
}

Xuất

Báo cáo có định dạng · có thể nhập lại

Định dạng

Tệp chứa dữ liệu series: hãy nhập lại từ Scrim → Nhập series. Đừng lưu lại hay in nó, nếu không dữ liệu sẽ mất.