Dear aoe2.net Community,

After many years of supporting the Age of Empires II community, we regret to inform you that aoe2.net will be sunsetting on 24 November 2024. This means that after this time, the website, including the API, will no longer be functional, and data such as match history, player statistics, and other features will no longer be accessible.

We deeply appreciate everyone's support over the years. It has been a pleasure to provide a platform that helped the community connect and enhance their game experience. Though aoe2.net is closing, we hope the community spirit will continue to thrive in new spaces.

Thank you for being part of our journey.

Warm regards,

The aoe2.net Team

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

Leaderboard Rank Rating Highest Rating Games Streak Longest Streak Wins Losses Drops
For more info see here

AoE2.net API

Unofficial API to query data stored by AoE2.net.

Not required, but if you will be making a lot of requests, it would help if you set the useragent to your site, project name, or some kind of contact information when making requests.


Games

Game NameGameApp ID
Age of Empires II (2013)aoe2hd221380
Age of Empires: Definitive Editionaoe1de1017900
Age of Empires II: Definitive Editionaoe2de813780
Age of Empires III: Definitive Editionaoe3de933110
Age of Empires IVaoe41466860

Leaderboards

Game NameLeaderboardLeaderboard ID
Age of Empires: Definitive EditionRandom Map (1v1)1
Age of Empires: Definitive EditionRandom Map (Team)2
Age of Empires: Definitive EditionDeathmatch (1v1)3
Age of Empires: Definitive EditionDeathmatch (Team)4
Age of Empires II: Definitive EditionUnranked0
Age of Empires II: Definitive EditionDeathmatch (1v1)1
Age of Empires II: Definitive EditionDeathmatch (Team)2
Age of Empires II: Definitive EditionRandom Map (1v1)3
Age of Empires II: Definitive EditionRandom Map (Team)4
Age of Empires II: Definitive EditionEmpire Wars (1v1)13
Age of Empires II: Definitive EditionEmpire Wars (Team)14
Age of Empires III: Definitive EditionSupremacy (1v1)1
Age of Empires III: Definitive EditionSupremacy (Team)2
Age of Empires III: Definitive EditionTreaty (All)3
Age of Empires III: Definitive EditionDeathmatch (All)4
Age of Empires IVCustom0
Age of Empires IVQuick Match (1v1)17
Age of Empires IVQuick Match (2v2)18
Age of Empires IVQuick Match (3v3)19
Age of Empires IVQuick Match (4v4)20

Events Leaderboards

Game NameLeaderboardLeaderboard ID
Age of Empires IVSeason 11
Age of Empires IVSeason 22
Age of Empires IVSeason 3 (1v1)5
Age of Empires IVSeason 3 (Team)6

Languages

LanguageLanguage Code
Englishen
Germande
Greekel
Spanishes
Spanish-Latin Americaes-MX
Frenchfr
Hindihi
Italianit
Japaneseja
Koreanko
Malayms
Dutchnl
Portuguesept
Russianru
Turkishtr
Vietnamesevi
Simplified Chinesezh
Traditional Chinesezh-TW

Strings

Request a list of strings used by the API.

Endpoint
/api/strings

Request Parameters

game (Required)
Game (see table above)
language (Optional, defaults to en)
Language (see table above)

Example Request

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

Leaderboard

Request the current leaderboards

Endpoint
/api/leaderboard

Request Parameters

game (Required)
Game (see table above)
leaderboard_id (leaderboard_id or event_leaderboard_id required)
Leaderboard ID (see table above)
event_leaderboard_id (leaderboard_id or event_leaderboard_id required)
Event Leaderboard ID (see table above)
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=aoe4&leaderboard_id=17&start=1&count=1

Player Rating History

Request the rating history for a player

Endpoint
/api/player/ratinghistory

Request Parameters

game (Required)
Game (see table above)
leaderboard_id (leaderboard_id or event_leaderboard_id required)
Leaderboard ID (see table above)
event_leaderboard_id (leaderboard_id or event_leaderboard_id required)
Event Leaderboard ID (see table above)
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=aoe4&leaderboard_id=17&profile_id=283233&count=5

Player Match History

Request the match history for a player

Endpoint
/api/player/matches

Request Parameters

game (Required)
Game (see table above)
start (Optional)
Starting match (0 is the most recent match. Ignored if requesting matches from multiple players)
count (Required)
Number of matches to get (Must be 1000 or less))
steam_id (steam_id(s) or profile_id(s) required)
steamID64 (ex: 76561199003184910)
profile_id (steam_id(s) or profile_id(s) required)
Profile ID (ex: 459658)
steam_ids (steam_id(s) or profile_id(s) required)
steamID64 (ex: 76561199003184910,76561198449406083)
profile_ids (steam_id(s) or profile_id(s) required)
Profile ID (ex: 459658,199325)

Example Request

https://aoe2.net/api/player/matches?game=aoe4&profile_id=283233&count=1

Rank

Request rank details about a player

Request Parameters

game (Required)
Game (see table above)
leaderboard_id (leaderboard_id or event_leaderboard_id required)
Leaderboard ID (see table above)
event_leaderboard_id (leaderboard_id or event_leaderboard_id required)
Event Leaderboard ID (see table above)
language (Optional, defaults to en)
Language (see table above)
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?game=aoe4&leaderboard_id=17&search=$(querystring)&profile_id=283233&flag=false)

Example Responses

twitchuser: !rank
Nightbot: ashleylynn (1238) Rank #3,783, has played 105 games with a 52% winrate, and a -1 streak
twitchuser: !rank Nili
Nightbot: GL.Nili (1351) Rank #1,059, has played 176 games with a 57% winrate, -2 streak, and 1 drops

Match

Request details about the current or last match

If you give multiple ProfileIds this will get the most recent match. This may be useful if you have multiple accounts.

Request Parameters

game (Required with search)
Game (see table above)
language (Optional, defaults to en)
Language (see table above)
color (Optional, defaults to true)
Show player colors
flag (Optional, defaults to false)
Show player flag
civflag (Optional, defaults to false)
Show civ flag (It seems that needs a subscription to use these subscriber emotes, if you want to use this, gift NightBot a sub to FollowGrubby or let me know some other emotes that will work with nightbot)
search (search or profile_id(s) required)
Name Search, returns the highest rated player
profile_id (profile_id or profile_ids required)
Profile ID (ex: 459658)
profile_ids (profile_id or profile_ids required)
Profile IDs (ex: 459658,199325)

Example Command

!addcom !match $(urlfetch https://aoe2.net/api/nightbot/match?game=aoe4&search=$(querystring)&profile_id=283233&color=false&flag=false)

Example Responses

twitchuser: !match
Nightbot: ashleylynn (1239) as Mongols -VS- KiWiKaKi (1246) as English playing on King of Hill
twitchuser: !match Nili Not working yet, check back later
Nightbot: GL.Nili (1351) as Rus -VS- Mars (1364) as French playing on Lipany