# OpenDota

> Look up Dota 2 matches, players, heroes and teams.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/opendota

## Actions

### Get match

Get a match summary, its players and available match statistics.

**Inputs**

- Match ID (`match_id`, number, required): The match id for this request.

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "barracks_status_dire": 1,
    "barracks_status_radiant": 1,
    "chat": [
      {
        "key": "example",
        "player_slot": 1,
        "slot": 1,
        "time": 1,
        "unit": "example"
      }
    ],
    "cluster": 1,
    "cosmetics": {},
    "dire_score": 1,
    "draft_timings": [
      {
        "active_team": 1,
        "extra_time": 1,
        "hero_id": 1,
        "order": 1,
        "pick": false,
        "player_slot": 1,
        "total_time_taken": 1
      }
    ],
    "duration": 1,
    "engine": 1,
    "first_blood_time": 1,
    "game_mode": 1,
    "human_players": 1,
    "leagueid": 1,
    "lobby_type": 1,
    "match_id": 3703866531,
    "match_seq_num": 1,
    "negative_votes": 1,
    "objectives": [
      {}
    ],
    "picks_bans": [
      {
        "hero_id": 1,
        "is_pick": false,
        "order": 1,
        "team": 1
      }
    ],
    "positive_votes": 1
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get player

Get a player profile and available ranking details.

**Inputs**

- Account ID (`account_id`, number, required): Steam32 account ID

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "aliases": [
      {
        "name_since": "example",
        "personaname": "example"
      }
    ],
    "computed_mmr": 1.0,
    "computed_mmr_turbo": 1,
    "leaderboard_rank": 1.0,
    "profile": {
      "account_id": 1,
      "avatar": "example",
      "avatarfull": "example",
      "avatarmedium": "example",
      "cheese": 1,
      "last_login": "example",
      "loccountrycode": "example",
      "name": "example",
      "personaname": "420 booty wizard",
      "plus": false,
      "profileurl": "example",
      "steamid": "example"
    },
    "rank_tier": 1.0
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get player win and loss totals

Get a player’s total wins and losses.

**Inputs**

- Account ID (`account_id`, number, required): Steam32 account ID

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "lose": 1,
    "win": 1
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get team

Get a team’s profile, rating and record.

**Inputs**

- Team (`dota_team_id`, number, required): Team ID

**Outputs**

- `data` (object): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": {
    "last_match_time": 1,
    "losses": 1,
    "name": "Newbee",
    "rating": 1.0,
    "tag": "example",
    "team_id": 1,
    "wins": 1
  },
  "has_more": false,
  "next_cursor": null
}
```

### List hero match durations

See a hero’s results grouped by match length.

**Inputs**

- Hero (`hero_id`, number, required): Hero ID

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "duration_bin": "example",
      "games_played": 1,
      "wins": 1
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List hero matchups

See the games and wins for a hero against other heroes.

**Inputs**

- Hero (`hero_id`, number, required): Hero ID

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "games_played": 1,
      "hero_id": 1,
      "wins": 1
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List hero statistics

See hero pick and win counts by rank.

**Inputs**: None.

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "attack_type": "example",
      "base_health": 1,
      "base_health_regen": 1.0,
      "base_mana": 1,
      "base_mana_regen": 1,
      "icon": "example",
      "id": 1,
      "img": "example",
      "localized_name": "Anti-Mage",
      "name": "npc_dota_hero_antimage",
      "primary_attr": "example",
      "roles": [
        "example"
      ]
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List heroes

Get hero names, roles and attack types.

**Inputs**: None.

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "id": 1,
      "localized_name": "Anti-Mage",
      "name": "npc_dota_hero_antimage",
      "roles": [
        "Carry"
      ]
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List leagues

Find leagues and their identifiers.

**Inputs**: None.

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "banner": "example",
      "leagueid": 1,
      "name": "ASUS ROG DreamLeague Season 4",
      "ticket": "example",
      "tier": "example"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List live matches

Get live games currently reported by OpenDota.

**Inputs**: None.

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "game_time": 120,
      "league_id": 1,
      "match_id": 7897633250
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List player heroes

See games and wins by hero for a player.

**Inputs**

- Account ID (`account_id`, number, required): Steam32 account ID

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "against_games": 1,
      "against_win": 1,
      "games": 1,
      "hero_id": 1,
      "last_played": 1,
      "win": 1,
      "with_games": 1,
      "with_win": 1
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List player matches

Read a page of a player’s match history.

**Inputs**

- Account ID (`account_id`, number, required): Steam32 account ID
- Limit (`limit`, number): Number of matches to limit to
- Offset (`offset`, number): Number of matches to offset start by
- Win (`win`, text): Whether the player won. One of: `0`, `1`.
- Hero (`hero_id`, number): Hero ID

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "assists": 1,
      "deaths": 1,
      "duration": 1,
      "game_mode": 1,
      "hero_id": 1,
      "kills": 1,
      "lobby_type": 1,
      "match_id": 3703866531,
      "player_slot": 1,
      "radiant_win": false,
      "start_time": 1,
      "version": 1
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List player teammates

See players who have shared games with this account.

**Inputs**

- Account ID (`account_id`, number, required): Steam32 account ID

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "account_id": 1,
      "against_games": 1,
      "against_win": 1,
      "games": 1,
      "last_played": 1,
      "name": "example",
      "personaname": "420 booty wizard",
      "win": 1,
      "with_games": 1,
      "with_gpm_sum": 1,
      "with_win": 1,
      "with_xpm_sum": 1
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List pro matches

Get the latest professional match results.

**Inputs**

- Less than match ID (`less_than_match_id`, number): Get matches with a match ID lower than this value

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "dire_name": "Dire",
      "leagueid": 1,
      "match_id": 7897633250,
      "radiant_name": "Radiant",
      "start_time": 1721122900
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List pro players

Get profiles of professional players.

**Inputs**: None.

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "account_id": 1,
      "avatar": "example",
      "avatarfull": "example",
      "avatarmedium": "example",
      "cheese": 1,
      "fh_unavailable": false,
      "full_history_time": "example",
      "last_login": "example",
      "loccountrycode": "example",
      "personaname": "420 booty wizard",
      "profileurl": "example",
      "steamid": "example"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List public matches

Get a sample of recent public matches.

**Inputs**

- Less than match ID (`less_than_match_id`, number): Get matches with a match ID lower than this value
- Min rank (`min_rank`, number): Minimum rank for the matches.
- Max rank (`max_rank`, number): Maximum rank for the matches.

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "avg_rank_tier": 1,
      "cluster": 1,
      "dire_team": [
        1
      ],
      "duration": 1,
      "game_mode": 1,
      "lobby_type": 1,
      "match_id": 3703866531,
      "match_seq_num": 1,
      "num_rank_tier": 1,
      "radiant_team": [
        1
      ],
      "radiant_win": false,
      "start_time": 1
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List recent player matches

Get a player’s twenty most recent matches.

**Inputs**

- Account ID (`account_id`, number, required): Steam32 account ID

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "duration": 2170,
      "hero_id": 1,
      "match_id": 7897633250,
      "radiant_win": true,
      "start_time": 1721122900
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List team matches

Get a professional team’s recent matches.

**Inputs**

- Team (`dota_team_id`, number, required): Team ID

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "match_id": 7897633250,
      "radiant": true,
      "radiant_win": true,
      "start_time": 1721122900
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### List teams

Find professional teams and their ratings.

**Inputs**: None.

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "name": "Team Liquid",
      "rating": 1285.0,
      "team_id": 2163
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

### Search players

Find Dota 2 accounts by name.

**Inputs**

- Query (`query`, text, required): Search string

**Outputs**

- `data` (list): The data returned by the service.
- `has_more` (true/false): Whether the service reports another page.
- `next_cursor` (text): Continuation value when the service reports another page.

**Example output**

```json
{
  "data": [
    {
      "account_id": 1,
      "avatarfull": "example",
      "last_match_time": "example",
      "personaname": "420 booty wizard",
      "similarity": 1.0
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```
