WebAPI

A WebAPI for match history is available on Dota 2. Web developers can now retrieve the match history and match details in JSON or XML format for use in their own applications.

Obtaining an API Key
First off get a dev key from here, http://steamcommunity.com/dev/apikey and login with your Steam account and you will get unique key. Please do not share this key as it identifies you when you make WebAPI requests.

There are two API calls for Dota 2's match history

Retrieving match history
The following request will retrieve a json package containing the last 25 matches in descending order.

https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V001/?key=

Example Output

Replace " " with your personal WebAPI key. That call will return the latest 25 public matches in JSON format. You can request it in XML format using:

https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V001/?format=XML&key=

A maximum of 25 matches are returned. To request the next 25, use the param start_at_match_id with one less than the last match number you received:

https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V001/?start_at_match_id=27110133&key=

The following additional parameters are available on GetMatchHistory:

player_name= # Search matches with a player name, exact match only hero_id= # Search for matches with a specific hero being played skill= # 0 for any, 1 for normal, 2 for high, 3 for very high skill date_min= # date in UTC seconds since Jan 1, 1970 (unix time format) date_max= # date in UTC seconds since Jan 1, 1970 (unix time format) account_id= # Steam account id (this is not SteamID, its only the account number portion) league_id= # matches for a particular league start_at_match_id= # Start the search at the indicated match id, descending matches_requested= # Defaults is 25 matches, this can limit to less

Retrieve Match Details
To retrieve the specific details of a match, use this API:

https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?match_id=27110133&key=

Retrieving A List of Current Heroes
The following request will retrieve a json package containing the ID and details of every Hero.

http://api.steampowered.com/IEconDOTA2_570/GetHeroes/v0001/?language=en_us&key=

Example Output Replace " " with your personal WebAPI key.

Get Live League Games
http://api.steampowered.com/IDOTA2Match_570/GetLiveLeagueGames/v0001/?language=en_us&key=

Get League Listing
http://api.steampowered.com/IDOTA2Match_570/GetLeagueListing/v0001/?language=en_us&key=

Retrieving Community Information
Please refer to Valve's official documentation page on how to retrieve community information