Introduction
If you are looking for the API portal / or to register a key, click here. For inquiries, you can DM hugo#0069 on Discord.
Welcome to the UNOFFICIAL apex legends API! This API is aimed at providing an easy way for developers to access Apex Legends player data, and also general game data.
This API is UNOFFICIAL. The API comes with no warranty, and there is no guaranteed uptime.
To use this API, you must register an API key first on the developer portal. Only one API key is allowed per project and person. Make sure to follow that rule, as your API key may be deleted otherwise. A fairuse rule applies when using this API. Don't make any action that could be harmful to the API itself.
Authentication
To authorize, use this code:
# With shell, you can just pass the correct header with each request
curl "https://api.mozambiquehe.re/" \
-H "Authorization: YOUR_API_KEY"
# You can also give the "auth" parameter in the GET request
curl "https://api.mozambiquehe.re/?auth=YOUR_API_KEY"
Make sure to replace
YOUR_API_KEY
with your API key.
Having an API Key is mandatory to use this API (As a reminder, you can get one on the developer portal).
You can either put your API key in a auth=YOUR_API_KEY
GET parameter in your request, or use an authorization header, like below:
Authorization: YOUR_API_KEY
Rate limiting
When first creating an API key, you are limited to one request per 2 seconds. This limit can be increased to 2 requests/seconds by connecting with your Discord account. To do so, click on the red popup at the top of the API Portal
You are limited to 2 queries/second across all APIs. This limit can be increased in very specific cases by opening a ticket on the Discord server, within very reasonable limits.
To know your current request rate, you can check the X-Current-Rate
header returned by the server.
Webhook
You can retrieve data from specific APIs through webhooks. Currently, only the Shop API and match history API supports it. You must configure your webhook URLs on the developer portal.
The user agent used by the webhooks will always be "ApexAPI Webhook/0.1". Your server must accept the POST request within 3 seconds of receiving it, otherwise it will be dropped.
Player statistics
Query by name
This allows you to get a player's statistics using his name and his platform. For PC players, you must use the Origin account name, even if they are playing on Steam (in that case, use the Origin account name linked to that Steam account). Additional parameters are available, see below.
curl "https://api.mozambiquehe.re/bridge?auth=YOUR_API_KEY&player=PLAYER_NAME&platform=PLATFORM"
HTTP Request
GET https://api.mozambiquehe.re/bridge?auth=YOUR_API_KEY&player=PLAYER_NAME&platform=PLATFORM
Query Parameters
Parameter | Required | Description |
---|---|---|
player | true | The player's username |
platform | true | The platform the player is playing on. Can be PC (Origin or Steam), PS4 (Playstation 4/5) or X1 (Xbox). Mobile is not supported at the moment. |
version | false | Changes the API version (1, 2, 4 or 5). Current default version is 5, and you should not use any other version as they are no longer actively supported. |
enableClubsBeta | false | (true or false) API will try to get the clubs the player is in. This will not always work, and may return no data. Still in beta. |
skipRank | false | (any value) Won't return stats ranking data in the API response. |
merge | false | (any value) Will merge trackers value of same type in a single tracker. For example, limited edition kills trackers will be displayed as "kills" trackers instead of "specialEvent_kills" trackers. |
removeMerged | false | (any value) Will remove trackers that have been merged, keeping only the merged value. |
Query by UID
This allows you to get a player's statistics using his UID and his platform. You can get a user UID by querying his name first, or by using an other API. Getting player stats by UID is recommended if you are going to query the same player multiple times, to avoid issues when the user changes his name.
This also supports Switch players statistics.
curl "https://api.mozambiquehe.re/bridge?auth=YOUR_API_KEY&uid=PLAYER_UID&platform=PLATFORM"
HTTP Request
GET https://api.mozambiquehe.re/bridge?auth=YOUR_API_KEY&uid=PLAYER_UID&platform=PLATFORM
Query Parameters
Parameter | Required | Description |
---|---|---|
uid | true | The player's UID |
platform | true | The platform the player is playing on. Can be PC (Origin or Steam), PS4 (Playstation 4/5), X1 (Xbox) or SWITCH (Nintendo Switch). Mobile is not supported at the moment. |
version | false | Changes the API version (1, 2, 4 or 5). Current default version is 5, and you should not use any other version as they are no longer actively supported. |
enableClubsBeta | false | (true or false) API will try to get the clubs the player is in. This will not always work, and may return no data. Still in beta. |
skipRank | false | (any value) Won't return stats ranking data in the API response. |
merge | false | (any value) Will merge trackers value of same type in a single tracker. For example, limited edition kills trackers will be displayed as "kills" trackers instead of "specialEvent_kills" trackers. |
removeMerged | false | (any value) Will remove trackers that have been merged, keeping only the merged value. |
Match history
We support two types of match history APIs.
"New" match history API
You must be whitelisted to use this API. To do so, open a ticket on the Discord server by clicking here. This API is currently unavailable to new users.
This API is free to use, with a strict limit of 5 uniques players queried per hour. If you need additional players, see the "Legacy" match history API below. Data collected from the "Legacy" match history will also be available in the /games
endpoint for easy filtering.
For each user you want to track match data from, you will need to make a /bridge
request every 4 minutes (see documentation here). Collected match data will then be available on the /games
endpoint.
curl "https://api.mozambiquehe.re/games?auth=YOUR_API_KEY&uid=PLAYER_UID"
HTTP Request
GET https://api.mozambiquehe.re/games?auth=YOUR_API_KEY&uid=PLAYER_UID
Query Parameters
Parameter | Required | Description |
---|---|---|
uid | true | The player's UID |
mode | false | Only return matches made in a given game mode. Values can be BATTLE_ROYALE , ARENAS or UNKNOWN . |
start | false | Only return games made after a given epoch timestamp. Value must be an int. |
end | false | Only return games made before a given epoch timestamp. Value must be an int. |
limit | false | Only return a maximum of X matches. Value must be an int. |
"Legacy" match history API
This API is currently unavailable to new users.
It is the original match history API, which does all the work for you. Data collected from this API will either be available from the /bridge
endpoint, or the /games
endpoint, while the /games
endpoint allows for more precise data filtering. To get matches data from a player, you must add it to your tracked list first.
The query syntax is very similar to the Stats query, with a few additional parameters. Only UIDs are supported. To use the API, add a history=1
GET parameter to your /bridge
query. Then, simply add the action
GET parameter that can be one of the following values:
info Will return a list of all the players you're currently tracking, with their UID and platform.
get Will return all the tracked events (matches) for the given UID.
delete Will remove the given UID from your tracked players list.
add Will add the given UID to your tracked players list.
curl "https://api.mozambiquehe.re/bridge?auth=YOUR_API_KEY&uid=PLAYER_UID&platform=PLATFORM&history=1&action=ACTION"
HTTP Request
GET https://api.mozambiquehe.re/bridge?auth=YOUR_API_KEY&uid=PLAYER_UID&platform=PLATFORM&history=1&action=ACTION
Query Parameters
Parameter | Required | Description |
---|---|---|
uid | true | The player's UID |
platform | true | The platform the player is playing on. Can be PC (Origin or Steam), PS4 (Playstation 4/5), X1 (Xbox) or SWITCH (Nintendo Switch). |
history | true | Switches the bridge endpoint to "match history" mode. Value must be 1 . |
action | true | Tells what action you want to perform on your tracked players list. Values can be info , get , delete or add . |
Leaderboards
This API is currently unavailable to new users.
This API allows you to get the data for the top 500 players for each statistics/legends in the apexlegendsstatus.com database. You can see an example of data on https://apexlegendsstatus.com/leaderboard. For each player, you will get its UID, name, platform and value. Data is updated every 6 hours.
When using this API and unless you have a "white label" access, you must add a direct clickable link to "https://apexlegendsstatus.com" with the following text: "Data provided by Apex Legends Status"
curl "https://api.mozambiquehe.re/leaderboard?auth=YOUR_API_KEY&legend=LEGEND&key=KEY&platform=PLATFORM"
HTTP Request
GET https://api.mozambiquehe.re/leaderboard?auth=YOUR_API_KEY&legend=LEGEND&key=KEY&platform=PLATFORM
Query Parameters
Parameter | Required | Description |
---|---|---|
platform | true | Platform. Can be PC, X1, PS4, SWITCH or ANY. |
legend | true | Legend name, starting with a capital letter. "Global" can be used to get global trackers and level, rankScore, arenaScore. |
key | false | Tracker to return data for. Not supplying this argument with return a list of all available keys for the legend provided. |
Map rotation
The map rotation API will return the current and next map for Battle Royale and Arenas, for both pubs and ranked modes. Control map rotation is also available. Be careful, version=1
(or no version parameter) will only return battle royale map data. For the complete rotation, you must use version=2
.
curl "https://api.mozambiquehe.re/maprotation?auth=YOUR_API_KEY"
HTTP Request
GET https://api.mozambiquehe.re/maprotation?auth=YOUR_API_KEY
Query Parameters
Parameter | Required | Description |
---|---|---|
version | false | 1 for battle royale pubs only, 2 for all modes. |
Predator
This API will return the RP/AP needed to reach Apex Predator on PC, Playstation, Xbox and Switch. It will also return the number of Masters on each platform.
curl "https://api.mozambiquehe.re/predator?auth=YOUR_API_KEY"
HTTP Request
GET https://api.mozambiquehe.re/predator?auth=YOUR_API_KEY
Store
Returns current in game shop data. Must be whitelisted to use this API by opening a Discord ticket.
curl "https://api.mozambiquehe.re/store?auth=YOUR_API_KEY"
HTTP Request
GET https://api.mozambiquehe.re/store?auth=YOUR_API_KEY
Crafting rotation
This API will return the current items that can be crafted in replicators.
curl "https://api.mozambiquehe.re/crafting?auth=YOUR_API_KEY"
HTTP Request
GET https://api.mozambiquehe.re/crafting?auth=YOUR_API_KEY
News
Will return the latest news from the news feed in the given lang. Lang defaults to en-US
.
curl "https://api.mozambiquehe.re/news?auth=YOUR_API_KEY"
HTTP Request
GET https://api.mozambiquehe.re/news?auth=YOUR_API_KEY
Query Parameters
Parameter | Required | Description |
---|---|---|
lang | false | Lang code. Defaults to en-US if not specified. |
Server status
Shows the current server status, as shown on the apexlegendsstatus.com website. You must put either a clickable link to https://apexlegendsstatus.com or have a message such as "Data from apexlegendsstatus.com" when displaying data coming from this API.
curl "https://api.mozambiquehe.re/servers?auth=YOUR_API_KEY"
HTTP Request
GET https://api.mozambiquehe.re/servers?auth=YOUR_API_KEY
Origin
Used to only get a player's UID without getting his Apex Legends statistics. The player must have played Apex Legends previously.
curl "https://api.mozambiquehe.re/origin?auth=YOUR_API_KEY&player=PLAYER_NAME"
HTTP Request
GET https://api.mozambiquehe.re/origin?auth=YOUR_API_KEY&player=PLAYER_NAME
Query Parameters
Parameter | Required | Description |
---|---|---|
player | true | The player's name. |
Name to UID
Used to return a player's UID from a given name, but also works with Playstation and Xbox players.
curl "https://api.mozambiquehe.re/nametouid?auth=YOUR_API_KEY&player=PLAYER_NAME&platform=PLATFORM"
HTTP Request
GET https://api.mozambiquehe.re/nametouid?auth=YOUR_API_KEY&player=PLAYER_NAME&platform=PLATFORM
Query Parameters
Parameter | Required | Description |
---|---|---|
player | true | The player's name. |
platform | true | The player's platform. Values can be PS4 for Playstation, X1 for Xbox and PC for Origin. |
Errors
The API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Try again in a few minutes. |
403 | Unauthorized / Unknown API key. |
404 | The player could not be found. |
405 | External API error. |
410 | Unknown platform provided. |
429 | Rate limit reached. |
500 | Internal error. |