# OpenDota Dota 2 Stats API

> Dota 2 player profiles, match details, hero stats and pro matches from OpenDota

- Vendor: `opendotadota2statsapi` · version 1.0 · category Sports · tags dota 2 api, opendota api, esports stats api, dota match api, hero stats api, game stats api
- Datasource: custom HTTP routes
- Marketplace page: https://apiclay.com/api/opendotadota2statsapi
- This document: https://apiclay.com/docs/opendotadota2statsapi.md
- OpenAPI 3.1: https://apiclay.com/api/opendotadota2statsapi/openapi.json
- MCP: connect https://api.apiclay.com/v1/mcp (see https://apiclay.com/llms.txt), then `apiclay_describe_api` with vendor `opendotadota2statsapi`
- Updated: 2026-11-18

## About

## OpenDota Dota 2 Stats API

Dota 2 data from OpenDota: a player's profile and MMR estimate, their recent matches and win/loss, a full match (players, heroes, items, KDA, gold and XP), hero win rates by rank bracket, and recent professional matches.

Data comes from **opendota.com** (https://www.opendota.com). Every route calls the source's own public API and returns it unchanged.

Typical flow: `/player?account_id=105248644`, `/player-matches?account_id=105248644`, `/match?match_id=...`.

### Routes

#### GET `/player` - Player
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| account_id | path | number | yes | Steam32 account id. |

Returns: `profile` (name, avatar, country), `rank_tier`, `leaderboard_rank`, `mmr_estimate`.

#### GET `/player-matches` - Player recent matches
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| account_id | path | number | yes | Account id. |

Returns: array of matches with hero, KDA, GPM, XPM, duration, result.

#### GET `/player-wl` - Player win/loss
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| account_id | path | number | yes | Account id. |

Returns: `win`, `lose`.

#### GET `/match` - Match
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| match_id | path | number | yes | Match id. |

Returns: match with `players[]` (hero, items, KDA, net worth), `radiant_win`, `duration`, picks and bans.

#### GET `/hero-stats` - Hero stats
No parameters.

Returns: array of heroes with picks and wins per rank bracket and pro.

#### GET `/pro-matches` - Pro matches
No parameters.

Returns: recent professional matches with teams, league and result.

### Caveats

- OpenDota allows about 60 requests a minute without a key.
- Upstream responses can change over time. Verify fields before relying on them.
- Not affiliated with or endorsed by opendota.com.

## Pricing

- Pay as you go: 0.0012 credits/request
- Trial: 1 free requests per buyer
- Billing order: trial requests -> subscribed plan requests -> pay as you go. 1 credit's USD value is shown on the marketplace page.

## HTTP routes

Only the public, buyer-facing parts of each route are listed; vendor-side credentials stay on the gateway.

### GET /player — Player
- Gateway: `GET https://api.apiclay.com/v1/api/opendotadota2statsapi/player`
- Public query params: `account_id` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /player-matches — Player recent matches
- Gateway: `GET https://api.apiclay.com/v1/api/opendotadota2statsapi/player-matches`
- Public query params: `account_id` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /player-wl — Player win/loss
- Gateway: `GET https://api.apiclay.com/v1/api/opendotadota2statsapi/player-wl`
- Public query params: `account_id` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /match — Match
- Gateway: `GET https://api.apiclay.com/v1/api/opendotadota2statsapi/match`
- Public query params: `match_id` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /hero-stats — Hero stats
- Gateway: `GET https://api.apiclay.com/v1/api/opendotadota2statsapi/hero-stats`
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /pro-matches — Pro matches
- Gateway: `GET https://api.apiclay.com/v1/api/opendotadota2statsapi/pro-matches`
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

## Call example

```bash
curl -X GET "https://api.apiclay.com/v1/api/opendotadota2statsapi/player?account_id=<account_id>" \
  -H "token: <YOUR_APICLAY_TOKEN>"
```

Index of every published API: https://apiclay.com/llms.txt
