Catalog / OpenDota

OpenDota API

opendota.com

Live read-only access to OpenDota match details, player profiles and win/loss statistics, player search, and hero performance data. Responses preserve OpenDota's source fields and identify the residential HTTP transport used.

  • Games
  • Dota 2
  • OpenDota
  • matches
  • players
  • hero statistics
5 endpointsDocs updated

Endpoint health

Loading verification…

Connect your agent

Connect through MCP so your agent can find this API, read its docs, and call its endpoints.

Setup guide

Add the server from your terminal.

Claude Code · terminal
claude mcp add --transport http agent-data https://agent-data.motie.dev/mcp

In Claude Code, run /mcp, select agent-data, then Authenticate. Sign in to your agent-data account in the browser.

Then ask your agent to use the OpenDota API for your task.

Call it over HTTP

Get an API key

Sign up free, generate an API key, and set it as AGENT_DATA_API_KEY in your environment. Your first 100 calls each month are free.

Return source match fields and per-player statistics for one match ID.

Numeric OpenDota match ID.

View call pricing
cURL · Match by id
curl --request GET --get 'https://api.agent-data.dev/opendota-com/v1/matches/9011851189' \
  --header "Authorization: Bearer $AGENT_DATA_API_KEY"

Endpoints

Inputs and response fields for every endpoint in this API.

GETMatch by id/v1/matches/{match_id}

Return source match fields and per-player statistics for one match ID.

Input

match_idRequiredPath · integer, min: 1

Numeric OpenDota match ID.

Example: 9011851189

Response

playersobject[]
players[].kills?integer | null
players[].level?integer | null
players[].deaths?integer | null
players[].denies?integer | null
players[].assists?integer | null
players[].hero_id?integer | null
players[].last_hits?integer | null
players[].net_worth?integer | null
players[].account_id?integer | null
players[].xp_per_min?integer | null
players[].player_slot?integer | null
players[].gold_per_min?integer | null
durationinteger
match_idinteger
game_modeinteger
transportstring
dire_scoreinteger
lobby_typeinteger
start_timeinteger
radiant_winboolean
radiant_scoreinteger

Fields marked ? are optional.

GETPlayer by id/v1/players/{account_id}

Return OpenDota profile, rank tier and leaderboard rank for one account.

Input

account_idRequiredPath · integer, min: 1

Numeric Steam account ID.

Example: 312542697

Response

profileobject
profile.account_idinteger
profile.avatarfull?string | null
profile.profileurl?string | null
profile.personaname?string | null
profile.loccountrycode?string | null
rank_tierinteger | null
transportstring
leaderboard_rankinteger | null

Fields marked ? are optional.

GETPlayer win loss/v1/players/{account_id}/wl

Return win and loss counts; supported optional filters are passed to OpenDota.

Input

account_idRequiredPath · integer, min: 1

Numeric Steam account ID.

Example: 312542697

dateOptionalQuery · integer, min: 0 | null

Limit matches to the most recent number of days.

Example: 365

patchOptionalQuery · integer, min: 0 | null

Filter by OpenDota patch ID.

Example: 60

regionOptionalQuery · integer, min: 0 | null

Filter by OpenDota region ID.

Example: 8

hero_idOptionalQuery · integer, min: 0 | null

Filter by Dota hero ID.

Example: 28

game_modeOptionalQuery · integer, min: 0 | null

Filter by Dota game mode ID.

Example: 1

lobby_typeOptionalQuery · integer, min: 0 | null

Filter by Dota lobby type ID.

Example: 1

Response

wininteger
loseinteger
transportstring
GETHero stats/v1/heroes/stats

Return all OpenDota hero rows, including rank-bracket, professional and turbo data.

Input

No input parameters.

Response

itemsobject[]
items[].idinteger
items[].namestring
items[].1_win?integer | null
items[].2_win?integer | null
items[].3_win?integer | null
items[].4_win?integer | null
items[].5_win?integer | null
items[].6_win?integer | null
items[].7_win?integer | null
items[].8_win?integer | null
items[].roles?string[]
items[].1_pick?integer | null
items[].2_pick?integer | null
items[].3_pick?integer | null
items[].4_pick?integer | null
items[].5_pick?integer | null
items[].6_pick?integer | null
items[].7_pick?integer | null
items[].8_pick?integer | null
items[].pro_ban?integer | null
items[].pro_win?integer | null
items[].pub_win?integer | null
items[].pro_pick?integer | null
items[].pub_pick?integer | null
items[].turbo_wins?integer | null
items[].attack_type?string | null
items[].turbo_picks?integer | null
items[].primary_attr?string | null
items[].pub_win_trend?integer[]
items[].localized_namestring
items[].pub_pick_trend?integer[]
items[].turbo_wins_trend?integer[]
items[].turbo_picks_trend?integer[]
transportstring

Fields marked ? are optional.

Don’t see the endpoint you need?

Ask agent-data to add an endpoint or return more fields. Extensions are free and keep existing endpoints working.