Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

Dota 2 Match History WebAPI

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    The match details API seems to make heavy use of enums and flags that have not been disclosed. Can you please publish some documentation so I have a chance of actually being able to consume the data?

    Comment


    • #47
      is there any way to get replay file?
      sorry for my bad English ...

      From Vietnam with Love - Lagest DOTA 2 Community in Vietnam: DotA-2.Vn

      Comment


      • #48
        Is it possible to retrieve matches that are currently happening?

        I'm looking for a way to grab data from my current game and display it in my stream(IE: Current Hero).

        Comment


        • #49
          Originally posted by Tsunami Nori View Post
          is there any way to get replay file?
          This was answered on the first page of the thread.

          Here you go:

          Originally posted by Tharuler View Post
          To download a replay:

          "http://replay" + match.cluster + ".valve.net/570/" + match.match_id + "_" + match.replay_salt + ".dem.bz2?v=1"
          The "match.cluster" and "match.replay_salt" values can be retrieved from the GetMatchDetails API call.

          If using XML format for API responses, the elements to look for are the <cluster> and <replay_salt>, respectively.

          Comment


          • #50
            oh, i get it

            thnx about this.
            sorry for my bad English ...

            From Vietnam with Love - Lagest DOTA 2 Community in Vietnam: DotA-2.Vn

            Comment


            • #51
              Updated the first post with some answers to common questions people are asking.

              If you have questions about specific data fields, please do ask and I can help out in puzzling out some of the information. It's great to see people working with the WebAPI. I look forward to seeing what people come up with it.

              When we update the main Dota 2 version later today, the WebAPI will be available there as well. Remember to change the "205790" to "570" in your URLs since that is the application-id of the main Dota 2 version.

              Comment


              • #52
                Originally posted by Addsky View Post
                But on heroes, u can go http://api.steampowered.com/IEconDOT...en_us&key=xxxx here and got list of items, so i wanna find same API for items? Someone know it?
                Try this link to see if this is what you want. Make sure you remember to put your key on the end when you access it!

                http://api.steampowered.com/IEconItems_570/GetSchema/v0001/?language=en&format=xml&key=<key_goes_here>

                Comment


                • #53
                  Originally posted by Zoid View Post
                  If you have questions about specific data fields, please do ask and I can help out in puzzling out some of the information.
                  In the GetMatchDetails API call, can you elaborate on which buildings match up to which bits for the tower_status_radiant, tower_status_dire, barracks_status_radiant and barracks_status_dire fields?

                  Also in that same API call, can you provide a list of possible values for the lobby_type field, as well as what these values represent?

                  Lastly, I may be showing my ignorance a bit here, but whats the purpose of the season field?

                  Comment


                  • #54
                    Is the web api key avaible for people who do not own webpage but wants to use the functionality for whatever purpose(info gatehring, edu, etc)?

                    Comment


                    • #55
                      waiting for API to access current game in progress ... can we use it for League/Tournament game?
                      sorry for my bad English ...

                      From Vietnam with Love - Lagest DOTA 2 Community in Vietnam: DotA-2.Vn

                      Comment


                      • #56
                        I would love to see stats for consumables bought per player

                        Comment


                        • #57
                          Originally posted by Zoid View Post
                          The following additional parameters are available on GetMatchHistory:

                          Code:
                          player_name=<name> # Search matches with a player name, exact match only
                          hero_id=<id> # Search for matches with a specific hero being played, hero id's are in dota/scripts/npc/npc_heroes.txt in your Dota install directory
                          skill=<skill>  # 0 for any, 1 for normal, 2 for high, 3 for very high skill
                          date_min=<date> # date in UTC seconds since Jan 1, 1970 (unix time format)
                          date_max=<date> # date in UTC seconds since Jan 1, 1970 (unix time format)
                          account_id=<id> # Steam account id (this is not SteamID, its only the account number portion)
                          league_id=<id> # matches for a particular league
                          start_at_match_id=<id> # Start the search at the indicated match id, descending
                          matches_requested=<n> # Defaults is 25 matches, this can limit to less
                          For example, to retrieve the latest single match:

                          Code:
                          https://api.steampowered.com/IDOTA2Match_205790/GetMatchHistory/V001/?matches_requested=1&key=<key>
                          The matches_requested variable does not seem to be working as you described. When using the url you provided to retrieve the single latest match (with my API key in place, of course), 25 matches are returned and num_results is shown to have a value of 25. However, when i specify matches_requested=100 in my url, it does actually give me 100 results back (and num_results does equal 100). From your wording above, it sounded like 25 was meant to be the maximum number of results returned in a single request, not a minimum value as it currently seems to be working. I hope this helps!

                          Thanks for the awesome new features!

                          Comment


                          • #58
                            Quick tip for you guys, instead of messing with npc_heroes.txt file just use:

                            Code:
                            http://api.steampowered.com/IEconDOTA2_570/GetHeroes/v0001/?language=english&key=x
                            Example output:

                            Code:
                            {
                            	"result": {
                            		"heroes": [
                            			{
                            				"name": "npc_dota_hero_antimage",
                            				"id": 1,
                            				"localized_name": "Anti-Mage"
                            			},
                            			{
                            				"name": "npc_dota_hero_axe",
                            				"id": 2,
                            				"localized_name": "Axe"
                            			},
                            			{
                            				"name": "npc_dota_hero_bane",
                            				"id": 3,
                            				"localized_name": "Bane"
                            			},
                            			{
                            				"name": "npc_dota_hero_bloodseeker",
                            				"id": 4,
                            				"localized_name": "Bloodseeker"
                            			},
                            			{
                            				"name": "npc_dota_hero_crystal_maiden",
                            				"id": 5,
                            				"localized_name": "Crystal Maiden"
                            			},
                            			{
                            				"name": "npc_dota_hero_drow_ranger",
                            				"id": 6,
                            				"localized_name": "Drow Ranger"
                            			},
                            			{
                            				"name": "npc_dota_hero_earthshaker",
                            				"id": 7,
                            				"localized_name": "Earthshaker"
                            			},
                            			{
                            				"name": "npc_dota_hero_juggernaut",
                            				"id": 8,
                            				"localized_name": "Juggernaut"
                            			},
                            			{
                            				"name": "npc_dota_hero_mirana",
                            				"id": 9,
                            				"localized_name": "Mirana"
                            			},
                            			{
                            				"name": "npc_dota_hero_nevermore",
                            				"id": 11,
                            				"localized_name": "Shadow Fiend"
                            			},
                            			{
                            				"name": "npc_dota_hero_morphling",
                            				"id": 10,
                            				"localized_name": "Morphling"
                            			},
                            			{
                            				"name": "npc_dota_hero_phantom_lancer",
                            				"id": 12,
                            				"localized_name": "Phantom Lancer"
                            			},
                            			{
                            				"name": "npc_dota_hero_puck",
                            				"id": 13,
                            				"localized_name": "Puck"
                            			},
                            			{
                            				"name": "npc_dota_hero_pudge",
                            				"id": 14,
                            				"localized_name": "Pudge"
                            			},
                            			{
                            				"name": "npc_dota_hero_razor",
                            				"id": 15,
                            				"localized_name": "Razor"
                            			},
                            			{
                            				"name": "npc_dota_hero_sand_king",
                            				"id": 16,
                            				"localized_name": "Sand King"
                            			},
                            			{
                            				"name": "npc_dota_hero_storm_spirit",
                            				"id": 17,
                            				"localized_name": "Storm Spirit"
                            			},
                            			{
                            				"name": "npc_dota_hero_sven",
                            				"id": 18,
                            				"localized_name": "Sven"
                            			},
                            			{
                            				"name": "npc_dota_hero_tiny",
                            				"id": 19,
                            				"localized_name": "Tiny"
                            			},
                            			{
                            				"name": "npc_dota_hero_vengefulspirit",
                            				"id": 20,
                            				"localized_name": "Vengeful Spirit"
                            			},
                            			{
                            				"name": "npc_dota_hero_windrunner",
                            				"id": 21,
                            				"localized_name": "Windrunner"
                            			},
                            			{
                            				"name": "npc_dota_hero_zuus",
                            				"id": 22,
                            				"localized_name": "Zeus"
                            			},
                            			{
                            				"name": "npc_dota_hero_kunkka",
                            				"id": 23,
                            				"localized_name": "Kunkka"
                            			},
                            			{
                            				"name": "npc_dota_hero_lina",
                            				"id": 25,
                            				"localized_name": "Lina"
                            			},
                            			{
                            				"name": "npc_dota_hero_lich",
                            				"id": 31,
                            				"localized_name": "Lich"
                            			},
                            			{
                            				"name": "npc_dota_hero_lion",
                            				"id": 26,
                            				"localized_name": "Lion"
                            			},
                            			{
                            				"name": "npc_dota_hero_shadow_shaman",
                            				"id": 27,
                            				"localized_name": "Shadow Shaman"
                            			},
                            			{
                            				"name": "npc_dota_hero_slardar",
                            				"id": 28,
                            				"localized_name": "Slardar"
                            			},
                            			{
                            				"name": "npc_dota_hero_tidehunter",
                            				"id": 29,
                            				"localized_name": "Tidehunter"
                            			},
                            			{
                            				"name": "npc_dota_hero_witch_doctor",
                            				"id": 30,
                            				"localized_name": "Witch Doctor"
                            			},
                            			{
                            				"name": "npc_dota_hero_riki",
                            				"id": 32,
                            				"localized_name": "Riki"
                            			},
                            			{
                            				"name": "npc_dota_hero_enigma",
                            				"id": 33,
                            				"localized_name": "Enigma"
                            			},
                            			{
                            				"name": "npc_dota_hero_tinker",
                            				"id": 34,
                            				"localized_name": "Tinker"
                            			},
                            			{
                            				"name": "npc_dota_hero_sniper",
                            				"id": 35,
                            				"localized_name": "Sniper"
                            			},
                            			{
                            				"name": "npc_dota_hero_necrolyte",
                            				"id": 36,
                            				"localized_name": "Necrolyte"
                            			},
                            			{
                            				"name": "npc_dota_hero_warlock",
                            				"id": 37,
                            				"localized_name": "Warlock"
                            			},
                            			{
                            				"name": "npc_dota_hero_beastmaster",
                            				"id": 38,
                            				"localized_name": "Beastmaster"
                            			},
                            			{
                            				"name": "npc_dota_hero_queenofpain",
                            				"id": 39,
                            				"localized_name": "Queen of Pain"
                            			},
                            			{
                            				"name": "npc_dota_hero_venomancer",
                            				"id": 40,
                            				"localized_name": "Venomancer"
                            			},
                            			{
                            				"name": "npc_dota_hero_faceless_void",
                            				"id": 41,
                            				"localized_name": "Faceless Void"
                            			},
                            			{
                            				"name": "npc_dota_hero_skeleton_king",
                            				"id": 42,
                            				"localized_name": "Skeleton King"
                            			},
                            			{
                            				"name": "npc_dota_hero_death_prophet",
                            				"id": 43,
                            				"localized_name": "Death Prophet"
                            			},
                            			{
                            				"name": "npc_dota_hero_phantom_assassin",
                            				"id": 44,
                            				"localized_name": "Phantom Assassin"
                            			},
                            			{
                            				"name": "npc_dota_hero_pugna",
                            				"id": 45,
                            				"localized_name": "Pugna"
                            			},
                            			{
                            				"name": "npc_dota_hero_templar_assassin",
                            				"id": 46,
                            				"localized_name": "Templar Assassin"
                            			},
                            			{
                            				"name": "npc_dota_hero_viper",
                            				"id": 47,
                            				"localized_name": "Viper"
                            			},
                            			{
                            				"name": "npc_dota_hero_luna",
                            				"id": 48,
                            				"localized_name": "Luna"
                            			},
                            			{
                            				"name": "npc_dota_hero_dragon_knight",
                            				"id": 49,
                            				"localized_name": "Dragon Knight"
                            			},
                            			{
                            				"name": "npc_dota_hero_dazzle",
                            				"id": 50,
                            				"localized_name": "Dazzle"
                            			},
                            			{
                            				"name": "npc_dota_hero_rattletrap",
                            				"id": 51,
                            				"localized_name": "Clockwerk"
                            			},
                            			{
                            				"name": "npc_dota_hero_leshrac",
                            				"id": 52,
                            				"localized_name": "Leshrac"
                            			},
                            			{
                            				"name": "npc_dota_hero_furion",
                            				"id": 53,
                            				"localized_name": "Nature's Prophet"
                            			},
                            			{
                            				"name": "npc_dota_hero_life_stealer",
                            				"id": 54,
                            				"localized_name": "Lifestealer"
                            			},
                            			{
                            				"name": "npc_dota_hero_dark_seer",
                            				"id": 55,
                            				"localized_name": "Dark Seer"
                            			},
                            			{
                            				"name": "npc_dota_hero_clinkz",
                            				"id": 56,
                            				"localized_name": "Clinkz"
                            			},
                            			{
                            				"name": "npc_dota_hero_omniknight",
                            				"id": 57,
                            				"localized_name": "Omniknight"
                            			},
                            			{
                            				"name": "npc_dota_hero_enchantress",
                            				"id": 58,
                            				"localized_name": "Enchantress"
                            			},
                            			{
                            				"name": "npc_dota_hero_huskar",
                            				"id": 59,
                            				"localized_name": "Huskar"
                            			},
                            			{
                            				"name": "npc_dota_hero_night_stalker",
                            				"id": 60,
                            				"localized_name": "Night Stalker"
                            			},
                            			{
                            				"name": "npc_dota_hero_broodmother",
                            				"id": 61,
                            				"localized_name": "Broodmother"
                            			},
                            			{
                            				"name": "npc_dota_hero_bounty_hunter",
                            				"id": 62,
                            				"localized_name": "Bounty Hunter"
                            			},
                            			{
                            				"name": "npc_dota_hero_weaver",
                            				"id": 63,
                            				"localized_name": "Weaver"
                            			},
                            			{
                            				"name": "npc_dota_hero_jakiro",
                            				"id": 64,
                            				"localized_name": "Jakiro"
                            			},
                            			{
                            				"name": "npc_dota_hero_batrider",
                            				"id": 65,
                            				"localized_name": "Batrider"
                            			},
                            			{
                            				"name": "npc_dota_hero_chen",
                            				"id": 66,
                            				"localized_name": "Chen"
                            			},
                            			{
                            				"name": "npc_dota_hero_spectre",
                            				"id": 67,
                            				"localized_name": "Spectre"
                            			},
                            			{
                            				"name": "npc_dota_hero_doom_bringer",
                            				"id": 69,
                            				"localized_name": "Doom Bringer"
                            			},
                            			{
                            				"name": "npc_dota_hero_ancient_apparition",
                            				"id": 68,
                            				"localized_name": "Ancient Apparition"
                            			},
                            			{
                            				"name": "npc_dota_hero_ursa",
                            				"id": 70,
                            				"localized_name": "Ursa"
                            			},
                            			{
                            				"name": "npc_dota_hero_spirit_breaker",
                            				"id": 71,
                            				"localized_name": "Spirit Breaker"
                            			},
                            			{
                            				"name": "npc_dota_hero_gyrocopter",
                            				"id": 72,
                            				"localized_name": "Gyrocopter"
                            			},
                            			{
                            				"name": "npc_dota_hero_alchemist",
                            				"id": 73,
                            				"localized_name": "Alchemist"
                            			},
                            			{
                            				"name": "npc_dota_hero_invoker",
                            				"id": 74,
                            				"localized_name": "Invoker"
                            			},
                            			{
                            				"name": "npc_dota_hero_silencer",
                            				"id": 75,
                            				"localized_name": "Silencer"
                            			},
                            			{
                            				"name": "npc_dota_hero_obsidian_destroyer",
                            				"id": 76,
                            				"localized_name": "Outworld Destroyer"
                            			},
                            			{
                            				"name": "npc_dota_hero_lycan",
                            				"id": 77,
                            				"localized_name": "Lycanthrope"
                            			},
                            			{
                            				"name": "npc_dota_hero_brewmaster",
                            				"id": 78,
                            				"localized_name": "Brewmaster"
                            			},
                            			{
                            				"name": "npc_dota_hero_shadow_demon",
                            				"id": 79,
                            				"localized_name": "Shadow Demon"
                            			},
                            			{
                            				"name": "npc_dota_hero_lone_druid",
                            				"id": 80,
                            				"localized_name": "Lone Druid"
                            			},
                            			{
                            				"name": "npc_dota_hero_chaos_knight",
                            				"id": 81,
                            				"localized_name": "Chaos Knight"
                            			},
                            			{
                            				"name": "npc_dota_hero_meepo",
                            				"id": 82,
                            				"localized_name": "Meepo"
                            			},
                            			{
                            				"name": "npc_dota_hero_treant",
                            				"id": 83,
                            				"localized_name": "Treant Protector"
                            			},
                            			{
                            				"name": "npc_dota_hero_ogre_magi",
                            				"id": 84,
                            				"localized_name": "Ogre Magi"
                            			},
                            			{
                            				"name": "npc_dota_hero_undying",
                            				"id": 85,
                            				"localized_name": "Undying"
                            			},
                            			{
                            				"name": "npc_dota_hero_rubick",
                            				"id": 86,
                            				"localized_name": "Rubick"
                            			},
                            			{
                            				"name": "npc_dota_hero_disruptor",
                            				"id": 87,
                            				"localized_name": "Disruptor"
                            			},
                            			{
                            				"name": "npc_dota_hero_nyx_assassin",
                            				"id": 88,
                            				"localized_name": "Nyx Assassin"
                            			},
                            			{
                            				"name": "npc_dota_hero_naga_siren",
                            				"id": 89,
                            				"localized_name": "Naga Siren"
                            			},
                            			{
                            				"name": "npc_dota_hero_keeper_of_the_light",
                            				"id": 90,
                            				"localized_name": "Keeper of the Light"
                            			},
                            			{
                            				"name": "npc_dota_hero_wisp",
                            				"id": 91,
                            				"localized_name": "Wisp"
                            			},
                            			{
                            				"name": "npc_dota_hero_visage",
                            				"id": 92,
                            				"localized_name": "Visage"
                            			}
                            		]
                            		,
                            		"count": 91
                            	}
                            }
                            // Economy
                            "NotTheStringsYoureLookingFor"

                            Comment


                            • #59
                              Also, it would be nice, if u can add information about, how much wards players put in this game, so we can understand, who is good support.

                              And unreal waiting stats for practice matches, wanna to create awesome league

                              And one more, only me got problem, when i want to create a page with stats from match, like we got when game end ... and this page with this stats got info about match from 1 place, about players from 10 places (because 10 players) and result = 30 seconds loading...
                              Last edited by Addsky; 07-19-2012, 11:50 AM.

                              Comment


                              • #60
                                Originally posted by thekid View Post
                                The matches_requested variable does not seem to be working as you described.
                                Oops, I screwed up and used a Max instead of a Min! Will fix and thanks for the report!

                                Comment

                                Working...
                                X