Game Type Elo Lobby Name Location Status
Type Rating Lobby Name Location Server Status
Leaderboard Rating Match Location Server Started
Rank Elo Country Name Games Wins Drops
Rank Rating Name Games Streak Wins Win % Last Match (ended)
Steam Avatar

Leaderboard Rank Rating Highest Rating Games Streak Longest Streak Wins Losses Drops

It is always great to see what people are able to do with data. Currently testing an API to share the data collected by aoe2.net for anyone to use with their projects.


Strings

Request a list of strings used by the API.

Endpoint
/api/strings

Request Parameters

game (Required)
Game (Age of Empires 2:HD=aoe2hd, Age of Empires 2:Definitive Edition=aoe2de)
language (Optional, defaults to en)
Language (en, de, el, es, es-MX, fr, hi, it, ja, ko, ms, nl, pt, ru, tr, vi, zh, zh-TW)

Example Request

https://aoe2.net/api/strings?game=aoe2de&language=en

Leaderboard

Request the current leaderboards

Endpoint
/api/leaderboard

Request Parameters

game (Required)
Game (Age of Empires 2:Definitive Edition=aoe2de)
leaderboard_id (Required)
Leaderboard ID (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4)
start (Required)
Starting rank (Ignored if search, steam_id, or profile_id are defined)
count (Required)
Number of leaderboard entries to get (Must be 10000 or less))
search (Optional)
Name Search
steam_id (Optional)
steamID64 (ex: 76561199003184910)
profile_id (Optional)
Profile ID (ex: 459658)

Example Request

https://aoe2.net/api/leaderboard?game=aoe2de&leaderboard_id=3&start=1&count=1

Lobbies

Request all open lobbies

Endpoint
/api/lobbies

Request Parameters

game (Optional, defaults to aoe2de)
Game (Age of Empires 2:HD=aoe2hd, Age of Empires 2:Definitive Edition=aoe2de)

Example Request

https://aoe2.net/api/lobbies?game=aoe2de

Player Last Match

Request the last match the player started playing, this will be the current match if they are still in game

Endpoint
/api/player/lastmatch

Request Parameters

game (Required)
Game (Age of Empires 2:Definitive Edition=aoe2de)
steam_id (steam_id or profile_id required)
steamID64 (ex: 76561199003184910)
profile_id (steam_id or profile_id required)
Profile ID (ex: 459658)

Example Request

https://aoe2.net/api/player/lastmatch?game=aoe2de&steam_id=76561199003184910

Player Match History

Request the match history for a player

Endpoint
/api/player/matches

Request Parameters

game (Required)
Game (Age of Empires 2:Definitive Edition=aoe2de)
start (Required)
Starting match (0 is the most recent match)
count (Required)
Number of matches to get (Must be 1000 or less))
steam_id (steam_id or profile_id required)
steamID64 (ex: 76561199003184910)
profile_id (steam_id or profile_id required)
Profile ID (ex: 459658)
steam_ids (steam_id or profile_id required)
steamID64 (ex: 76561199003184910,76561198449406083)
profile_ids (steam_id or profile_id required)
Profile ID (ex: 459658,199325)

Example Request

https://aoe2.net/api/player/matches?game=aoe2de&steam_id=76561199003184910&count=5

Player Rating History

Request the rating history for a player

Endpoint
/api/player/ratinghistory

Request Parameters

game (Required)
Game (Age of Empires 2:Definitive Edition=aoe2de)
leaderboard_id (Required)
Leaderboard ID (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4)
start (Required)
Starting match (0 is the most recent match)
count (Required)
Number of matches to get (Must be 10000 or less))
steam_id (steam_id or profile_id required)
steamID64 (ex: 76561199003184910)
profile_id (steam_id or profile_id required)
Profile ID (ex: 459658)

Example Request

https://aoe2.net/api/player/ratinghistory?game=aoe2de&leaderboard_id=3&steam_id=76561199003184910&count=5

Matches

Request the rating history for a player

Endpoint
/api/matches

Request Parameters

game
Game (Age of Empires 2:Definitive Edition=aoe2de)
count (Required)
Number of matches to get (Must be 1000 or less))
since (Optional)
Only show matches starting after timestamp (epoch)

Example Request

https://aoe2.net/api/matches?game=aoe2de&count=10&since=1596775000

Match

Request matches

Endpoint
/api/match

Request Parameters

game (Required)
Game (Age of Empires 2:Definitive Edition=aoe2de)
uuid (uuid or match_id Required)
Match UUID
match_id (uuid or match_id Required)
Match ID

Example Request

https://aoe2.net/api/match?uuid=66ec2575-5ee4-d241-a1fc-d7ffeffb48b6

Number of Players Online

Number of players in game and an estimate of the number current playing multiplayer

Endpoint
/api/stats/players

Request Parameters

game (Required)
Game (Age of Empires 2:HD=aoe2hd, Age of Empires 2:Definitive Edition=aoe2de)

Example Request

https://aoe2.net/api/stats/players?game=aoe2de

Rank

Request rank details about a player

Request Parameters

game (Optional, defaults to aoe2de)
Game (Age of Empires 2:Definitive Edition=aoe2de)
leaderboard_id (Optional, defaults to 3)
Leaderboard ID (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4)
language (Optional, defaults to en) - not fully translated
Language (en, de, el, es, es-MX, fr, hi, it, ja, ko, ms, nl, pt, ru, tr, vi, zh, zh-TW)
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://aoe2.net/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

Opponent

Request rank details about a players most recent opponent (1v1 only)

Request Parameters

game (Optional, defaults to aoe2de)
Game (Age of Empires 2:Definitive Edition=aoe2de)
leaderboard_id (Optional, defaults to 3)
Leaderboard ID is used when search is defined, will find the highest rated player matching the search term (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4)
language (Optional, defaults to en) - not fully translated
Language (en, de, el, es, es-MX, fr, hi, it, ja, ko, ms, nl, pt, ru, tr, vi, zh, zh-TW)
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 (steam_id or profile_id required)
steamID64 (ex: 76561199003184910)
profile_id (steam_id or profile_id required)
Profile ID (ex: 459658)

Example Command

!addcom !opponent $(urlfetch https://aoe2.net/api/nightbot/opponent?search=$(querystring)&steam_id=76561199003184910&flag=false)

Example Responses

twitchuser: !opponent
Nightbot: DracKeN (1815) Rank #41, has played 642 games with a 58% winrate, -3 streak, and 18 drops
twitchuser: !opponent Hera
Nightbot: ACCM (1935) Rank #16, has played 528 games with a 64% winrate, +1 streak, and 16 drops

Match

Request details about the current or last match

Request Parameters

game (Optional, defaults to aoe2de)
Game (Age of Empires 2:Definitive Edition=aoe2de)
leaderboard_id (Optional, defaults to 3)
Leaderboard ID is used when search is defined, will find the highest rated player matching the search term (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4)
language (Optional, defaults to en) - not fully translated
Language (en, de, el, es, es-MX, fr, hi, it, ja, ko, ms, nl, pt, ru, tr, vi, zh, zh-TW)
color (Optional, defaults to true)
Show player colors
flag (Optional, defaults to false)
Show player flag
search (search, steam_id or profile_id required)
Name Search, returns the highest rated player
steam_id (steam_id or profile_id required)
steamID64 (ex: 76561199003184910)
profile_id (steam_id or profile_id required)
Profile ID (ex: 459658)

Example Command

!addcom !match $(urlfetch https://aoe2.net/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

Civs

Request civs from the current or last match

Request Parameters

game (Optional, defaults to aoe2de)
Game (Age of Empires 2:Definitive Edition=aoe2de)
leaderboard_id (Optional, defaults to 3)
Leaderboard ID is used when search is defined, will find the highest rated player matching the search term (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4)
language (Optional, defaults to en) - not fully translated
Language (en, de, el, es, es-MX, fr, hi, it, ja, ko, ms, nl, pt, ru, tr, vi, zh, zh-TW)
search (search, steam_id or profile_id required)
Name Search, returns the highest rated player
steam_id (steam_id or profile_id required)
steamID64 (ex: 76561199003184910)
profile_id (steam_id or profile_id required)
Profile ID (ex: 459658)

Example Command

!addcom !civs $(urlfetch https://aoe2.net/api/nightbot/civs?search=$(querystring)&steam_id=76561199003184910)

Example Responses

twitchuser: !civs
Nightbot: Hoang: Celts, DracKeN: Celts
twitchuser: !civs Hera
Nightbot: Hera: Mayans, ACCM: Aztecs

Map

Request the current map name

Request Parameters

game (Optional, defaults to aoe2de)
Game (Age of Empires 2:Definitive Edition=aoe2de)
leaderboard_id (Optional, defaults to 3)
Leaderboard ID is used when search is defined, will find the highest rated player matching the search term (Unranked=0, 1v1 Deathmatch=1, Team Deathmatch=2, 1v1 Random Map=3, Team Random Map=4)
language (Optional, defaults to en) - not fully translated
Language (en, de, el, es, es-MX, fr, hi, it, ja, ko, ms, nl, pt, ru, tr, vi, zh, zh-TW)
search (search, steam_id or profile_id required)
Name Search, returns the highest rated player
steam_id (steam_id or profile_id required)
steamID64 (ex: 76561199003184910)
profile_id (steam_id or profile_id required)
Profile ID (ex: 459658)

Example Command

!addcom !map $(urlfetch https://aoe2.net/api/nightbot/map?search=$(querystring)&steam_id=76561199003184910)

Example Responses

twitchuser: !map
Nightbot: Black Forest
twitchuser: !map Hera
Nightbot: Gold Rush

Powered by Steam

Age of Empires II: HD© and Age of Empires II: Definitive Edition© Microsoft Corporation. AoE2.net 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.