# Riot Games

> Look up League of Legends players by Riot ID, then pull their ranked stats and match history with your Riot Games API key.

App · Gaming · 5 actions. Web page: https://docs.lodol.com/docs/integrations/riot-games

## Actions

### Get a summoner

Fetch a League of Legends summoner's profile icon, level, and last-modified date from a PUUID.

**Inputs**

- Game server (`platform`, text, required): The game server the account plays on, for example 'na1' or 'euw1'. This is not the same as the continent used by the match actions. One of: `br1`, `eun1`, `euw1`, `jp1`, `kr`, `la1`, `la2`, `me1`, `na1`, `oc1`, and 5 more.
- Player ID (PUUID) (`puuid`, text, required): The player's unique ID, as returned by Get an account. It's stable across name changes and every region.

**Outputs**

- `profile_icon_id` (number): ID of the icon shown on the profile
- `puuid` (text): The player's unique ID
- `revision_date` (number): When the profile last changed, as a Unix timestamp in milliseconds
- `summoner_level` (number): The account's level

**Example output**

```json
{
  "profile_icon_id": 6299,
  "puuid": "cJ8s4mUeK1p2QwXyZ0aBcDeFgHiJkLmNoPqRsTuVwXyZ0aBcDeFgHiJkLmNoPqRsTuVwXyZ",
  "revision_date": 1782934233712,
  "summoner_level": 743
}
```

### Get an account

Look up a player's PUUID from their Riot ID. Every other action starts here, since Riot retired summoner names.

**Inputs**

- Continent (`routing_region`, text, required): The continent that serves this data: 'americas', 'europe', 'asia', or 'sea'. Riot routes accounts and matches per continent rather than per game server. One of: `americas`, `asia`, `europe`, `sea`.
- Riot ID name (`game_name`, text, required): The part before the # in a Riot ID -- for 'Faker#KR1' that's 'Faker'.
- Riot ID tag (`tag_line`, text, required): The part after the # in a Riot ID -- for 'Faker#KR1' that's 'KR1'. The # itself is optional.

**Outputs**

- `game_name` (text): The name part of the Riot ID
- `puuid` (text): The player's unique ID. Use with Get a summoner and List recent matches.
- `tag_line` (text): The tag part of the Riot ID

**Example output**

```json
{
  "game_name": "Faker",
  "puuid": "cJ8s4mUeK1p2QwXyZ0aBcDeFgHiJkLmNoPqRsTuVwXyZ0aBcDeFgHiJkLmNoPqRsTuVwXyZ",
  "tag_line": "KR1"
}
```

### Get match details

Fetch one match's mode, length, and per-player scoreboard.

**Inputs**

- Continent (`routing_region`, text, required): The continent that serves this data: 'americas', 'europe', 'asia', or 'sea'. Riot routes accounts and matches per continent rather than per game server. One of: `americas`, `asia`, `europe`, `sea`.
- Match ID (`match_id`, text, required): The match ID, as returned by List recent matches -- for example 'NA1_4938271056'.

**Outputs**

- `game_duration` (number): How long the match lasted, in seconds
- `game_mode` (text): The mode played, for example 'CLASSIC' or 'ARAM'
- `game_start` (number): When the match started, as a Unix timestamp in milliseconds
- `match_id` (text): The match's ID
- `participants` (list): Every player in the match, with their score

**Example output**

```json
{
  "game_duration": 1834,
  "game_mode": "CLASSIC",
  "game_start": 1782934233712,
  "match_id": "NA1_4938271056",
  "participants": [
    {
      "assists": 11,
      "champion": "Azir",
      "deaths": 2,
      "kills": 9,
      "puuid": "cJ8s4mUeK1p2QwXyZ0aBcDeFgHiJkLmNoPqRsTuVwXyZ",
      "riot_id": "Faker",
      "team_position": "MIDDLE",
      "win": true
    }
  ]
}
```

### Get ranked stats

Look up a player's rank, LP, and win/loss record in every ranked queue they've played, from their PUUID.

**Inputs**

- Game server (`platform`, text, required): The game server the account plays on, for example 'na1' or 'euw1'. This is not the same as the continent used by the match actions. One of: `br1`, `eun1`, `euw1`, `jp1`, `kr`, `la1`, `la2`, `me1`, `na1`, `oc1`, and 5 more.
- Player ID (PUUID) (`puuid`, text, required): The player's unique ID, as returned by Get an account. It's stable across name changes and every region.

**Outputs**

- `entries` (list): One entry per ranked queue the summoner has played. Empty if they're unranked this season.

**Example output**

```json
{
  "entries": [
    {
      "league_points": 47,
      "losses": 98,
      "queue_type": "RANKED_SOLO_5x5",
      "rank": "II",
      "tier": "GOLD",
      "wins": 112
    }
  ]
}
```

### List recent matches

List a player's recent match IDs, newest first.

**Inputs**

- Continent (`routing_region`, text, required): The continent that serves this data: 'americas', 'europe', 'asia', or 'sea'. Riot routes accounts and matches per continent rather than per game server. One of: `americas`, `asia`, `europe`, `sea`.
- Player ID (PUUID) (`puuid`, text, required): The player's unique ID, as returned by Get an account. It's stable across name changes and every region.
- Start position (`start`, number): How many matches to skip before returning any. At least 0. Default: `0`.
- How many matches (`count`, number): How many match IDs to return (1-100). From 1 to 100. Default: `5`.

**Outputs**

- `match_ids` (list): Match IDs, newest first. Use with Get match details.

**Example output**

```json
{
  "match_ids": [
    "NA1_4938271056",
    "NA1_4938104772"
  ]
}
```
