Api

There is no public api yet. During development of this site the current internal api will be polished so that it can be opened up later.

Nightbot
Rank
Request rank details about a player
Request Parameters
leaderboard_id (Optional, defaults to 3)
Leaderboard ID (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4, 1v1 Empire Wars=13, Team Empire Wars=14)
flag (Optional, defaults to true)
Show player flag
search (search, steam_id or profile_id required)
Name Search, returns the highest rated player
steam_id (search, steam_id or profile_id required)
steamID64 (ex: 76561199003184910)
profile_id (search, steam_id or profile_id required)
Profile ID (ex: 459658)
Example Command
!addcom !rank $(urlfetch https://data.aoe2companion.com/api/nightbot/rank?leaderboard_id=3&search=$(querystring)&steam_id=76561199003184910&flag=false)
Example Responses
twitchuser: !rank
Nightbot: Hoang (1799) Rank #44, has played 1181 games with a 59% winrate, -1 streak, and 20 drops
twitchuser: !rank Hera
Nightbot: Hera (2118) Rank #1, has played 659 games with a 71% winrate, +6 streak, and 3 drops
Match
Request details about the current or last match
Request Parameters
leaderboard_id (Optional)
Leaderboard ID can be used to restrict player result to a leaderboard (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4, 1v1 Empire Wars=13, Team Empire Wars=14)
color (Optional, defaults to true)
Show player colors
search (search, steam_id or profile_id required)
Name Search, returns the highest rated player
steam_id (search, steam_id or profile_id required)
steamID64 (ex: 76561199003184910)
profile_id (search, steam_id or profile_id required)
Profile ID (ex: 459658)
Example Command
!addcom !match $(urlfetch https://data.aoe2companion.com/api/nightbot/match?search=$(querystring)&steam_id=76561199003184910&color=false&flag=false)
Example Responses
twitchuser: !match
Nightbot: Hoang (1815) as Celts -VS- DracKeN (1820) as Celts playing on Black Forest
twitchuser: !match Hera
Nightbot: Hera (2112) as Mayans -VS- ACCM (1960) as Aztecs playing on Gold Rush

Age of Empires II© Microsoft Corporation. aoe2companion.com was created under Microsoft's "Game Content Usage Rules" using assets from Age of Empires II: Definitive Edition, and it is not endorsed by or affiliated with Microsoft.