# Dota 2 API
> Live Dota 2 data as an API, powered by OpenDota — clean JSON, no key. List all heroes with their attributes, roles and pick/win statistics; open any player by account id for their profile, rank and overall win/loss; pull a player's recent matches and most-played heroes (hero ids enriched to names); follow the professional scene with recent pro matches, pro players and pro teams; and open any match for its full detail — both line-ups with each player's hero, kills, deaths, assists, GPM/XPM and net worth. Live data sourced continuously from OpenDota. One of the biggest esports titles — ideal for match trackers, stat overlays, MMR and leaderboard tools, fantasy and Discord bots. 8 data endpoints. Authenticated with an x-oanor-key; fair-use rate limits per plan.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/dota-api/..."
```

## Pricing
- **Free** (Free) — 3,600 calls/Mo, 5 req/s
- **Starter** ($7/Mo) — 53,000 calls/Mo, 15 req/s
- **Pro** ($30/Mo) — 290,000 calls/Mo, 30 req/s
- **Mega** ($93/Mo) — 1,250,000 calls/Mo, 80 req/s

## Endpoints

### Heroes

#### `GET /v1/heroes` — All heroes with stats

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dota-api/v1/heroes"
```

**Response:**
```json
{
    "data": {
        "count": 127,
        "heroes": [
            {
                "id": 1,
                "img": "https://cdn.cloudflare.steamstatic.com/apps/dota2/images/dota_react/heroes/antimage.png?",
                "icon": "https://cdn.cloudflare.steamstatic.com/apps/dota2/images/dota_react/heroes/icons/antimage.png?",
                "name": "Anti-Mage",
                "roles": [
                    "Carry",
                    "Escape",
                    "Nuker"
                ],
                "pro_ban": 20,
                "pro_win": 10,
                "pro_pick": 18,
                "pub_pick": 349782,
                "attack_type": "Melee",
                "primary_attr": "agi"
            },
            {
                "id": 2,
                "img": "https://cdn.cloudflare.steamstatic.com/apps/dota2/images/dota_react/heroes/axe.png?",
                "icon": "https://cdn.cloudflare.steamstatic.com/apps/dota2/images/dota_react/heroes/icons/axe.png?",
                "name": "Axe",
                "roles": [
                    "Initiator",
                    "Durable",
                    "Disabler",
                    "Carry"
                ],
                "pro_ban": 125,
                "pro_win": 54,
                "pro_pick": 116,
                "pub_pick": 595631,
                "attack_type": "Melee",
                "primary_attr": "str"
            },
            {
                "id": 3,
                "img": "https://cdn.cloudf
…(truncated, see openapi.json for full schema)
```

### Players

#### `GET /v1/player` — Player profile + win/loss

**Parameters:**
- `id` (query, required, string) — Steam account id (32-bit) Example: `70388657`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dota-api/v1/player?id=70388657"
```

**Response:**
```json
{
    "data": {
        "player": {
            "name": "Snake master",
            "wins": 11061,
            "avatar": "https://avatars.steamstatic.com/33b68b3971dfc9aaed846b49779e622a88ee35d8_full.jpg",
            "losses": 10251,
            "country": "UA",
            "win_rate": 51.9,
            "rank_tier": 80,
            "account_id": 70388657,
            "profile_url": "https://steamcommunity.com/id/DendiQ/",
            "leaderboard_rank": 865
        }
    },
    "meta": {
        "timestamp": "2026-06-07T16:46:24.967Z",
        "request_id": "adcb4496-ba06-461f-b478-cedcba426d82"
    },
    "status": "ok",
    "message": "Player retrieved successfully",
    "success": true
}
```

#### `GET /v1/player/heroes` — A player's most-played heroes

**Parameters:**
- `id` (query, required, string) — Account id Example: `70388657`
- `limit` (query, optional, string) — Max results Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dota-api/v1/player/heroes?id=70388657&limit=20"
```

**Response:**
```json
{
    "data": {
        "count": 20,
        "heroes": [
            {
                "hero": "Queen of Pain",
                "wins": 798,
                "games": 1484,
                "hero_id": 39,
                "win_rate": 53.8,
                "last_played": 1739831812
            },
            {
                "hero": "Puck",
                "wins": 628,
                "games": 1201,
                "hero_id": 13,
                "win_rate": 52.3,
                "last_played": 1715519737
            },
            {
                "hero": "Shadow Fiend",
                "wins": 588,
                "games": 1177,
                "hero_id": 11,
                "win_rate": 50,
                "last_played": 1780150209
            },
            {
                "hero": "Templar Assassin",
                "wins": 649,
                "games": 1162,
                "hero_id": 46,
                "win_rate": 55.9,
                "last_played": 1717688246
            },
            {
                "hero": "Magnus",
                "wins": 585,
                "games": 1015,
                "hero_id": 97,
                "win_rate": 57.6,
                "last_played": 1757184497
            },
            {
                "hero": "Storm Spirit",
                "wins": 531,
                "games": 1002,
                "hero_id": 17,
                "win_rate": 53,
                "last_played": 1779097608
            },
            {
                "hero": "P
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/player/matches` — A player's recent matches

**Parameters:**
- `id` (query, required, string) — Account id Example: `70388657`
- `limit` (query, optional, string) — Max results (1–50) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dota-api/v1/player/matches?id=70388657&limit=20"
```

**Response:**
```json
{
    "data": {
        "count": 20,
        "matches": [
            {
                "win": false,
                "hero": "Void Spirit",
                "side": "radiant",
                "kills": 11,
                "deaths": 7,
                "assists": 3,
                "hero_id": 126,
                "duration": 2070,
                "match_id": 8832207980,
                "game_mode": 16,
                "start_time": 1780175003
            },
            {
                "win": true,
                "hero": "Invoker",
                "side": "dire",
                "kills": 6,
                "deaths": 6,
                "assists": 14,
                "hero_id": 74,
                "duration": 2764,
                "match_id": 8832095809,
                "game_mode": 2,
                "start_time": 1780169219
            },
            {
                "win": false,
                "hero": "Alchemist",
                "side": "dire",
                "kills": 5,
                "deaths": 5,
                "assists": 10,
                "hero_id": 73,
                "duration": 2262,
                "match_id": 8831751682,
                "game_mode": 16,
                "start_time": 1780153262
            },
            {
                "win": true,
                "hero": "Shadow Fiend",
                "side": "dire",
                "kills": 15,
                "deaths": 0,
                "assists": 6,
                "hero_id": 11,
                "dura
…(truncated, see openapi.json for full schema)
```

### Pro

#### `GET /v1/pro-matches` — Recent professional matches

**Parameters:**
- `limit` (query, optional, string) — Max results (1–100) Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dota-api/v1/pro-matches?limit=30"
```

**Response:**
```json
{
    "data": {
        "count": 30,
        "matches": [
            {
                "league": "SIVVIT League",
                "duration": 1959,
                "match_id": 8842439090,
                "dire_team": "MakeevkaTeam",
                "dire_score": 19,
                "start_time": 1780839965,
                "radiant_win": true,
                "series_type": 0,
                "radiant_team": "Sanya ssssqd",
                "radiant_score": 46
            },
            {
                "league": "SIVVIT League",
                "duration": 1764,
                "match_id": 8842432544,
                "dire_team": "DayDreams",
                "dire_score": 6,
                "start_time": 1780839731,
                "radiant_win": true,
                "series_type": 0,
                "radiant_team": "BoomBoys",
                "radiant_score": 34
            },
            {
                "league": "SIVVIT League",
                "duration": 1126,
                "match_id": 8842427685,
                "dire_team": null,
                "dire_score": 4,
                "start_time": 1780839558,
                "radiant_win": true,
                "series_type": 0,
                "radiant_team": "GHOULCKOE",
                "radiant_score": 44
            },
            {
                "league": "刀塔扭蛋杯",
                "duration": 4272,
                "match_id": 8842386728,
                "dire_team": "软柿子人身意外饱险",
     
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/pro-players` — Professional players

**Parameters:**
- `limit` (query, optional, string) — Max results (1–200) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dota-api/v1/pro-players?limit=50"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "players": [
            {
                "name": "LINE",
                "team": "TRIES",
                "country": "us",
                "persona": "LineDOTA2",
                "team_tag": "TRIES",
                "account_id": 1111506,
                "fantasy_role": 2
            },
            {
                "name": "Newsham",
                "team": "Fart Studios",
                "country": "",
                "persona": "Newsham",
                "team_tag": "FRT",
                "account_id": 1296625,
                "fantasy_role": 2
            },
            {
                "name": "Shindaqq",
                "team": "SHADOW GOVERNMENT",
                "country": "ax",
                "persona": "АНИМЕ ПСИХОЗ",
                "team_tag": "SG",
                "account_id": 2029214,
                "fantasy_role": 1
            },
            {
                "name": "还不错",
                "team": "bilibili",
                "country": "",
                "persona": "是打不过啊",
                "team_tag": "bilibili",
                "account_id": 2503633,
                "fantasy_role": 0
            },
            {
                "name": "Snowie",
                "team": "SOG",
                "country": "",
                "persona": "Snowie",
                "team_tag": "SOG",
                "account_id": 3035021,
                "fantasy_role": 0
            },
            {
    
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/teams` — Professional teams

**Parameters:**
- `limit` (query, optional, string) — Max results (1–200) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dota-api/v1/teams?limit=50"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "teams": [
            {
                "tag": "PV",
                "logo": "https://cdn.steamusercontent.com/ugc/10380389074903512947/5D074799695A862D17D4205285315FE20399B28D/",
                "name": "PARIVISION",
                "wins": 323,
                "losses": 171,
                "rating": 1560.15,
                "team_id": 9572001
            },
            {
                "tag": "C9",
                "logo": "https://cdn.steamusercontent.com/ugc/2399941883261718982/81DE19B3FD9737B5F16C725D3FB7E72251BE2A81/",
                "name": "Cloud9",
                "wins": 326,
                "losses": 242,
                "rating": 1492.34,
                "team_id": 8605863
            },
            {
                "tag": "TY",
                "logo": "https://cdn.steamusercontent.com/ugc/12970505637628494427/B04C3358F4E815ADFC2F8B1B8BE3AB0CE75C8881/",
                "name": "Team Yandex",
                "wins": 159,
                "losses": 115,
                "rating": 1479.91,
                "team_id": 9823272
            },
            {
                "tag": "Aurora",
                "logo": "https://cdn.steamusercontent.com/ugc/2362769341411270166/E13C592A0E744E1C386E09DE650BE36B85AE8137/",
                "name": "Aurora.1xBet",
                "wins": 86,
                "losses": 67,
                "rating": 1458.74,
                "team_id": 9255706
            },
            {
                "ta
…(truncated, see openapi.json for full schema)
```

### Matches

#### `GET /v1/match` — Full match detail

**Parameters:**
- `id` (query, required, string) — Match id Example: `8842319756`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dota-api/v1/match?id=8842319756"
```

**Response:**
```json
{
    "data": {
        "match": {
            "league": "Party To Play league",
            "players": [
                {
                    "hero": "Puck",
                    "name": "Yankiiツ",
                    "side": "radiant",
                    "kills": 6,
                    "level": 19,
                    "deaths": 7,
                    "assists": 12,
                    "hero_id": 13,
                    "last_hits": 171,
                    "account_id": 449420398,
                    "xp_per_min": 591,
                    "gold_per_min": 431
                },
                {
                    "hero": "Tidehunter",
                    "name": "ЧЕБОКСАРЫ",
                    "side": "radiant",
                    "kills": 9,
                    "level": 23,
                    "deaths": 6,
                    "assists": 12,
                    "hero_id": 29,
                    "last_hits": 217,
                    "account_id": 1187858460,
                    "xp_per_min": 831,
                    "gold_per_min": 537
                },
                {
                    "hero": "Templar Assassin",
                    "name": "swarovski",
                    "side": "radiant",
                    "kills": 9,
                    "level": 24,
                    "deaths": 11,
                    "assists": 11,
                    "hero_id": 46,
                    "last_hits": 358,
                    "account_id": 900905070,
              
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dota-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "service": "dota-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/match": "Full match detail by id.",
            "GET /v1/teams": "Professional teams.",
            "GET /v1/heroes": "All heroes with stats.",
            "GET /v1/player": "Player profile + win/loss by account id.",
            "GET /v1/pro-matches": "Recent professional matches.",
            "GET /v1/pro-players": "Professional players.",
            "GET /v1/player/heroes": "A player's most-played heroes.",
            "GET /v1/player/matches": "A player's recent matches."
        },
        "description": "Dota 2 data via OpenDota: all heroes with pick/win stats, player profiles with win/loss, a player's recent matches and most-played heroes, recent pro matches, pro players, pro teams and full match detail. Real live data, no key."
    },
    "meta": {
        "timestamp": "2026-06-07T16:46:31.911Z",
        "request_id": "cd31fd76-053a-4bb0-a07c-fb299b46490f"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/dota-api
OpenAPI spec: https://www.oanor.com/api/dota-api/openapi.json
