Dota – How to pull a player’s match data in Dota 2

dota-2

I'm trying to compute somewhat advanced stats for my own match history (or, potentially any player's history), that would be include more than the regular information one can find on Dotabuff.

I already can pull "easily" my summary Dotabuff history via Excel, but it only contains the basic information (Outcome, Hero, Mode, Duration and K/D/A). I can manually add the other information I need (GPM, XPM, if I was in a party, whom I was playing with, my build order, etc.) by going into individual match pages from Dotabuff or through the game client itself, but I'm looking for something faster or more efficient.

Does something like that already exist ?

Best Answer

I'm not sure how good your programming is but the DOTA API can help with a lot of this. You query the API with a match ID and it gives a JSON object that looks something like this. There is also a call you can make to get all of your match_ids played by querying for your match history and then you can set up a loop to go through all of those matches. It's really pretty cool stuff. A link I've found really helpful about the DOTA api is http://dev.dota2.com/showthread.php?t=58317&highlight=teaminfo. I've since become steam friends with this guy and he knows his stuff.

"account_id": 32bitIDishere,
"player_slot": 0,
"hero_id": 73,
"item_0": 50,
"item_1": 187,
"item_2": 36,
"item_3": 61,
"item_4": 40,
"item_5": 0,
"kills": 8,
"deaths": 1,
"assists": 13,
"leaver_status": 0,
"gold": 4089,
"last_hits": 37,
"denies": 0,
"gold_per_min": 457,
"xp_per_min": 421,
"gold_spent": 5579,
"hero_damage": 6921,
"tower_damage": 289,
"hero_healing": 0,
"level": 12,