GET User Matches
/openmlbb/user/matches
API Path: /api/user/matches
Retrieve the authenticated player's recent matches information using a valid JWT. Supports query parameters for season filtering, pagination, and localization. Requires an Authorization header with the JWT from login.
Headers:
- Authorization:
Bearer <jwt>(JWT obtained during login).
Query parameters:
- sid: Season ID for filtering matches (must be a valid season ID from
/api/user/season). - limit: Maximum number of matches to retrieve (minimum: 1).
- last_cursor: Cursor for pagination. Use the value from
pageInfo.nextCursorin the current response. IfpageInfo.hasNextisfalseorpageInfo.nextCursoris empty, there is no next page. - lang: Language code for localized content (default:
en).
The response includes match details:
- sid: Season ID.
- bid: Battle ID (unique match reference).
- hid: Hero ID used in the match.
- k: Kills.
- d: Deaths.
- a: Assists.
- lid: Lane ID (1 EXP, 2 Mid, 3 Roam, 4 Jungle, 5 Gold).
- s: Score (performance rating for the match, s/100).
- mvp: MVP flag (1 if MVP, 0 otherwise).
- res: Result (1 = Win, 0 = Loss).
- ts: Timestamp of the match.
- hid_e: Hero entity metadata (hero ID, name, images).
- bid_s: String battle ID representation.
Pagination example:
First request: /api/user/matches?sid=40&limit=10&lang=en → response includes pageInfo.nextCursor = 4139649383291049463.
Second request: /api/user/matches?sid=40&limit=10&last_cursor=4139649383291049463&lang=en → retrieves the next page, using pageInfo.nextCursor from the current response.
Stop pagination when pageInfo.hasNext = false or pageInfo.nextCursor is empty.
The response also includes pagination metadata:
- pageInfo.nextCursor: Cursor value for the next page.
- pageInfo.hasNext: Boolean flag indicating if more results are available.
- pageInfo.count: Number of results returned in the current page.
This endpoint is useful for:
- Reconstructing match history.
- Analyzing player performance.
- Enabling clients to paginate reliably through a player's matches.
This endpoint requires JWT. Pass the token via the SDK call argument jwt="YOUR_JWT".
Python Example
from OpenMLBB import OpenMLBB
client = OpenMLBB()
response = client.user.matches(jwt="YOUR_JWT", sid=1, limit=10, last_cursor="value", lang="en")
print(response)
Path and Query Parameters
| Name | In | Type | Required | Default |
|---|---|---|---|---|
| sid | query | integer | yes | - |
| limit | query | integer | no | 10 |
| last_cursor | query | string | no | - |
| lang | query | string | no | en |