# Opendota on Onekey > 10 endpoints for Opendota (10 stable, 0 beta), 1 to 5 credits each. Category: Gaming. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/opendota Reference (Markdown): https://onekey.dev/docs/api/opendota.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 10 mapped Opendota endpoints return each: - `content.createdAt` (ISO 8601 date): 6 - `content.id` (string): 4 - `media.durationSeconds` (number): 4 - `author.avatarUrl` (URL): 2 - `author.id` (string): 2 - `author.username` (string): 2 - `entity.id` (string): 2 - `entity.name` (string): 2 - `author.displayName` (string): 1 - `author.url` (URL): 1 - `entity.slug` (string): 1 - plus 30 platform-specific fields under `ext.` ## Endpoints ### opendota.hero_stats Dota 2 hero stats: base stats and pro pick/win/ban counts. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/opendota/hero_stats` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.id`, `entity.name`, `ext.attribute`, `ext.attackType`, `ext.proPicks`, `ext.proWins`, `ext.proBans`, `ext.baseHealth`, `ext.moveSpeed` - Reference: https://onekey.dev/docs/api/opendota/hero_stats.md ### opendota.heroes All Dota 2 heroes. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/opendota/heroes` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `entity.id`, `entity.name`, `entity.slug`, `ext.attribute`, `ext.attackType` - Reference: https://onekey.dev/docs/api/opendota/heroes.md ### opendota.match Summary of a Dota 2 match. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/opendota/match?match_id=8000000000` with header `x-api-key: YOUR_API_KEY` - Parameters: - `match_id` (string, required): Match id - Fields returned: `content.id`, `content.createdAt`, `media.durationSeconds`, `ext.radiantWin`, `ext.radiantScore`, `ext.direScore`, `ext.gameMode`, `ext.patch`, `ext.leagueId` - Reference: https://onekey.dev/docs/api/opendota/match.md ### opendota.player Fetch a Dota 2 player's profile (OpenDota). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/opendota/player?account_id=86745912` with header `x-api-key: YOUR_API_KEY` - Parameters: - `account_id` (string, required): Dota 2 account id (32-bit), e.g. 86745912 - Fields returned: `author.id`, `author.username`, `author.displayName`, `author.avatarUrl`, `author.url`, `ext.rankTier`, `ext.leaderboardRank`, `ext.lastLogin` - Reference: https://onekey.dev/docs/api/opendota/player.md ### opendota.player_heroes A Dota 2 player's per-hero games and wins. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/opendota/player_heroes?account_id=86745912` with header `x-api-key: YOUR_API_KEY` - Parameters: - `account_id` (string, required): Dota 2 account id (32-bit), e.g. 86745912 - Fields returned: `content.createdAt`, `ext.heroId`, `ext.games`, `ext.wins` - Reference: https://onekey.dev/docs/api/opendota/player_heroes.md ### opendota.player_recent_matches A Dota 2 player's last 20 matches. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/opendota/player_recent_matches?account_id=86745912` with header `x-api-key: YOUR_API_KEY` - Parameters: - `account_id` (string, required): Dota 2 account id (32-bit), e.g. 86745912 - Fields returned: `content.id`, `content.createdAt`, `media.durationSeconds`, `ext.heroId`, `ext.kills`, `ext.deaths`, `ext.assists`, `ext.goldPerMin`, `ext.xpPerMin`, `ext.radiantWin`, `ext.gameMode` - Reference: https://onekey.dev/docs/api/opendota/player_recent_matches.md ### opendota.player_search Search Dota 2 players by name. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/opendota/player_search?q=miracle` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Persona name - Fields returned: `author.id`, `author.username`, `author.avatarUrl`, `content.createdAt`, `ext.similarity` - Reference: https://onekey.dev/docs/api/opendota/player_search.md ### opendota.player_winloss A Dota 2 player's win/loss totals. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/opendota/player_winloss?account_id=86745912` with header `x-api-key: YOUR_API_KEY` - Parameters: - `account_id` (string, required): Dota 2 account id (32-bit), e.g. 86745912 - Fields returned: `ext.wins`, `ext.losses` - Reference: https://onekey.dev/docs/api/opendota/player_winloss.md ### opendota.pro_matches Recent professional Dota 2 matches. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/opendota/pro_matches` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `content.id`, `content.createdAt`, `media.durationSeconds`, `ext.league`, `ext.radiantTeam`, `ext.direTeam`, `ext.radiantScore`, `ext.direScore`, `ext.radiantWin` - Reference: https://onekey.dev/docs/api/opendota/pro_matches.md ### opendota.public_matches Recent public Dota 2 matches. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/opendota/public_matches` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `content.id`, `content.createdAt`, `media.durationSeconds`, `ext.radiantWin`, `ext.avgRankTier`, `ext.gameMode` - Reference: https://onekey.dev/docs/api/opendota/public_matches.md ## Sample request ```bash curl "https://api.onekey.dev/v1/opendota/match?match_id=8000000000" \ -H "x-api-key: YOUR_API_KEY" ```