> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drain.lat/llms.txt
> Use this file to discover all available pages before exploring further.

# Valorant

> Look up Valorant accounts, MMR/rank data, and recent match history.

# Valorant

**Base URL:** `https://drain.lat/api/v1/valorant`

<AccordionGroup>
  <Accordion title="GET /account/:name/:tag" icon="id-card">
    Look up a Valorant account by name and tag.

    ```
    GET /api/v1/valorant/account/:name/:tag
    ```

    <ParamField path="name" type="string" required>
      The player's Valorant display name.
    </ParamField>

    <ParamField path="tag" type="string" required>
      The player's tag (e.g. `SEN`).
    </ParamField>

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://drain.lat/api/v1/valorant/account/TenZ/SEN" \
        -H "x-api-key: YOUR_API_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch("https://drain.lat/api/v1/valorant/account/TenZ/SEN", {
        headers: { "x-api-key": "YOUR_API_KEY" }
      });
      const data = await res.json();
      ```

      ```python Python theme={null}
      import requests

      res = requests.get(
          "https://drain.lat/api/v1/valorant/account/TenZ/SEN",
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      print(res.json())
      ```
    </CodeGroup>

    <ResponseField name="puuid" type="string">Player UUID.</ResponseField>
    <ResponseField name="name" type="string">Display name.</ResponseField>
    <ResponseField name="tag" type="string">Player tag.</ResponseField>
    <ResponseField name="region" type="string">Player region.</ResponseField>
    <ResponseField name="accountLevel" type="number">Account level.</ResponseField>
    <ResponseField name="cardSmall" type="string">Small player card image URL.</ResponseField>
    <ResponseField name="cardLarge" type="string">Large player card image URL.</ResponseField>
    <ResponseField name="cardWide" type="string">Wide player card image URL.</ResponseField>

    ```json Response theme={null}
    {
      "puuid": "54942ced-1967-5f66-8a16-1e0dae875641",
      "name": "TenZ",
      "tag": "SEN",
      "region": "na",
      "accountLevel": 412,
      "cardSmall": "https://media.valorant-api.com/playercards/.../smallart.png",
      "cardLarge": "https://media.valorant-api.com/playercards/.../largeart.png",
      "cardWide": "https://media.valorant-api.com/playercards/.../wideart.png",
      "lastUpdate": "2026-05-05T12:00:00.000Z",
      "scrapedAt": "2026-05-05T12:00:00.000Z"
    }
    ```
  </Accordion>

  <Accordion title="GET /mmr/:region/:name/:tag" icon="trophy">
    Get a player's current rank and MMR data.

    ```
    GET /api/v1/valorant/mmr/:region/:name/:tag
    ```

    <ParamField path="region" type="string" required>
      Player region. One of: `eu` `na` `ap` `kr` `br` `latam`
    </ParamField>

    <ParamField path="name" type="string" required>
      The player's display name.
    </ParamField>

    <ParamField path="tag" type="string" required>
      The player's tag.
    </ParamField>

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://drain.lat/api/v1/valorant/mmr/na/TenZ/SEN" \
        -H "x-api-key: YOUR_API_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch("https://drain.lat/api/v1/valorant/mmr/na/TenZ/SEN", {
        headers: { "x-api-key": "YOUR_API_KEY" }
      });
      const data = await res.json();
      ```

      ```python Python theme={null}
      import requests

      res = requests.get(
          "https://drain.lat/api/v1/valorant/mmr/na/TenZ/SEN",
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      print(res.json())
      ```
    </CodeGroup>

    <ResponseField name="currentRank" type="string">Current rank name (e.g. `Radiant`).</ResponseField>
    <ResponseField name="currentTier" type="number">Current rank tier number.</ResponseField>
    <ResponseField name="rankingInTier" type="number">RR within the current tier.</ResponseField>
    <ResponseField name="mmrChange" type="number">MMR change from last game.</ResponseField>
    <ResponseField name="elo" type="number">Total ELO score.</ResponseField>

    <ResponseField name="rankImages" type="object">
      <Expandable title="rank images">
        <ResponseField name="small" type="string">Small rank icon URL.</ResponseField>
        <ResponseField name="large" type="string">Large rank icon URL.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="peakRank" type="string">Highest rank ever achieved.</ResponseField>
    <ResponseField name="peakSeason" type="string">Season when peak rank was achieved.</ResponseField>

    ```json Response theme={null}
    {
      "name": "TenZ",
      "tag": "SEN",
      "currentRank": "Radiant",
      "currentTier": 27,
      "rankingInTier": 412,
      "mmrChange": 22,
      "elo": 2412,
      "rankImages": {
        "small": "https://media.valorant-api.com/...",
        "large": "https://media.valorant-api.com/..."
      },
      "peakRank": "Radiant",
      "peakSeason": "e8a3",
      "scrapedAt": "2026-05-05T12:00:00.000Z"
    }
    ```
  </Accordion>

  <Accordion title="GET /matches/:region/:name/:tag" icon="list">
    Get recent match history for a player.

    ```
    GET /api/v1/valorant/matches/:region/:name/:tag
    ```

    <ParamField path="region" type="string" required>
      Player region. One of: `eu` `na` `ap` `kr` `br` `latam`
    </ParamField>

    <ParamField path="name" type="string" required>
      The player's display name.
    </ParamField>

    <ParamField path="tag" type="string" required>
      The player's tag.
    </ParamField>

    <ParamField query="size" type="number">
      Number of matches to return. Max `10`. Default `5`.
    </ParamField>

    <ParamField query="mode" type="string">
      Filter by game mode (e.g. `competitive`, `unrated`, `deathmatch`).
    </ParamField>

    <CodeGroup>
      ```bash cURL theme={null}
      curl "https://drain.lat/api/v1/valorant/matches/na/TenZ/SEN?size=5&mode=competitive" \
        -H "x-api-key: YOUR_API_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch(
        "https://drain.lat/api/v1/valorant/matches/na/TenZ/SEN?size=5&mode=competitive",
        { headers: { "x-api-key": "YOUR_API_KEY" } }
      );
      const data = await res.json();
      ```

      ```python Python theme={null}
      import requests

      res = requests.get(
          "https://drain.lat/api/v1/valorant/matches/na/TenZ/SEN",
          params={"size": 5, "mode": "competitive"},
          headers={"x-api-key": "YOUR_API_KEY"}
      )
      print(res.json())
      ```
    </CodeGroup>

    <ResponseField name="matches" type="array">
      <Expandable title="match object">
        <ResponseField name="matchId" type="string">Match ID.</ResponseField>
        <ResponseField name="map" type="string">Map name.</ResponseField>
        <ResponseField name="mode" type="string">Game mode.</ResponseField>
        <ResponseField name="startedAt" type="string">Match start time.</ResponseField>
        <ResponseField name="roundsPlayed" type="number">Total rounds played.</ResponseField>
        <ResponseField name="won" type="boolean">Whether the player's team won.</ResponseField>
        <ResponseField name="agent" type="string">Agent played.</ResponseField>
        <ResponseField name="rank" type="string">Rank at time of match.</ResponseField>
        <ResponseField name="kills" type="number">Kill count.</ResponseField>
        <ResponseField name="deaths" type="number">Death count.</ResponseField>
        <ResponseField name="assists" type="number">Assist count.</ResponseField>
        <ResponseField name="score" type="number">Combat score.</ResponseField>
        <ResponseField name="headshots" type="number">Headshot count.</ResponseField>
        <ResponseField name="damageDealt" type="number">Total damage dealt.</ResponseField>
      </Expandable>
    </ResponseField>

    ```json Response theme={null}
    {
      "name": "TenZ",
      "tag": "SEN",
      "region": "na",
      "matches": [
        {
          "matchId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "map": "Ascent",
          "mode": "Competitive",
          "startedAt": "Tuesday, May 5, 2026 8:00 PM",
          "roundsPlayed": 25,
          "won": true,
          "agent": "Jett",
          "rank": "Radiant",
          "kills": 28,
          "deaths": 14,
          "assists": 6,
          "score": 6240,
          "headshots": 18,
          "bodyshots": 42,
          "legshots": 2,
          "damageDealt": 4812
        }
      ],
      "total": 5,
      "scrapedAt": "2026-05-05T12:00:00.000Z"
    }
    ```

    <Note>Match data is cached for 2 minutes.</Note>
  </Accordion>
</AccordionGroup>
