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_allowedواجهة API للقراءة فقط: استخدم 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
  }
}

تصدير

تقرير منسّق · قابل لإعادة الاستيراد

الصيغة

يحتوي الملف على بيانات السلسلة: أعد استيراده من السكريمات ← استيراد سلسلة. لا تعد حفظه ولا تطبعه وإلا ضاعت البيانات.