Using the summoner-v4 API

The summoner-v4 API is an important "converter" in the League of Legends API. This API takes any valid ID or summoner name as an input and will give you a precise overview about a user.

The response

Let's take a look at the response (summonerDTO) first, before we dig deeper into the different endpoints.

{
  "id": "[encrypted summoner id]...",
  "accountId": " [encrypted account id]...",
  "puuid": "[encrypted puuid]...",
  "profileIconId": 5467,
  "revisionDate": 1663606611,
  "summonerLevel": 500
}

The API response has seven different fields, including the name and icon of a summoner.

Fields

Field Type Note
id String (summonerId) Also called "encrypted summoner id" or "summoner id". Id is unique per platform.
accountId String (accountId) Also called "encrypted account id". AccountId is unique per platform.
puuid String (puuid) The "Player Universally Unique IDentifiers" is globally unique and has a fixed length of 78 characters.
name String DEPRECATED The summoner name. This field is deprecated, use account-v1 instead.
profileIconId Number The id of the summoners profile icon. Read more about profile icon fetching.
revisionDate Number (unix timestamp) Date summoner was last modified specified as epoch milliseconds. Events updating this timestamp are summoner name change, summoner level change or profile icon change.
summonerLevel Number Level of the summoner.

Please keep in mind that the ids are encrypted per key (app id).

Endpoints

There are several endpoints within the summoner-v4 scope. The response (summonerDTO) is always the same, but there are different ways to request a user. For example, you can request a user by their summoner name or puuid.

The base url is:
https://{platform}.api.riotgames.com/lol/summoner/v4/summoners/
Please make sure to replace {platform} with your current platform.

By Puuid

You can also get a summoner using their puuid. All newer API endpoints are only using the puuid as an id, such as the challenges endpoint, which is only returning a puuid and not even a summoner name.

The request url is the following:
https://{platform}.api.riotgames.com/lol/summoner/v4/summoners/by-puuid/{puuid}

By summonerId

You can get the summonerId mostly from older endpoints, such as league-v4. You can also use the encrypted summonerId to get the profile stats of a summoner.
https://{platform}.api.riotgames.com/lol/summoner/v4/summoners/{summonerId}

By AccountId

To use the by-account, you need the encrypted accountId. Please keep in mind that there is currently no endpoint using the accountId except summoner-v4, so it might not be useful to use this endpoint.
https://{platform}.api.riotgames.com/lol/summoner/v4/summoners/by-account/{accountId}

Using the summoner-v4 API
DarkIntaqt
DarkIntaqt
Published
Edited

©2020 - 2024

DarkIntaqt

DarkIntaqt

HomeAboutBlog