├── README.md
├── README_old.md
├── example.php
├── keyslist.md
├── match_history_API.md
├── news-api.md
└── v2.json
/README.md:
--------------------------------------------------------------------------------
1 | # Apex Legends API
2 | Documentation has moved! Find everything you need on https://apexlegendsapi.com
3 |
4 | Old documentation is still available on README_old.md :)
5 |
6 | Currently providing: Map rotation API, stats API, game data API, server status API, match history API, news API, and shop API.
7 |
--------------------------------------------------------------------------------
/README_old.md:
--------------------------------------------------------------------------------
1 | # Documentation has moved
2 |
3 |
4 | **Now providing a MATCH HISTORY API ! Read more @ https://github.com/HugoDerave/ApexLegendsAPI/blob/master/match_history_API.md**
5 |
6 | Please note: We have a strict rate limit for users which aren't registered in our database. Once you make a first request on them and they are succesfully added in our DB, this rate won't apply. From now, we'll apply bans to people trying to overload our API for no reason (using security breach, for example).
7 | With the upcomming Season 2, API may not work for some time / new stats trackers may be missing. They will be added as quick as possible ;)
8 |
9 | # Apex Legends News API
10 | See news-api.md for info.
11 |
12 | # Unofficial Apex Legends Stats API
13 |
14 | We're providing a free API without any rate limit, that can be used for any project. However, this may change in the near future according to our finance & server load. Sorry for the average english level, i'm french :-)
15 | Any question? Go to our discord @ [https://discord.gg/TZ4Y9EB](https://discord.gg/TZ4Y9EB "https://discord.gg/TZ4Y9EB").
16 |
17 | Please also note that due to current Respawn limitations, the API will only return the banners displayed data in the "current" field. Data displayed in the "all" field comes from previous requests, that are saved.
18 |
19 | # Get an API Key
20 |
21 | We require every user to get an API Key for "control" reason and stats. To get an API key, go to https://api.mozambiquehe.re/getkey. We'll ask you your project url and short project description. Please note that providing a wrong information will most likely get your key suspended.
22 |
23 | ## Make a request
24 |
25 | To get a player's data, go to https://api.mozambiquehe.re/bridge and add the 3 main GET parameters. First one is platform, which can only take "PC", "PS4" or "X1". The second one will be "player", and that's obvisouly the player's name you're looking for. You can also add "version" parameter, which will give you more flexibility. (Currently we have version 1 and 2).
26 |
27 | **Authorization**
28 | To auth yourself, you can either put your API Key as a third GET parameter in the URL which will be "auth", or put your API Key in the "Authorization" header.
29 |
30 | Your request should look like this (if you're using your API Key in the URL):
31 |
32 | **v1**
33 |
34 | GET https://api.mozambiquehe.re/bridge?platform=PC&player=HeyImLifeline&auth=YOURAPIKEY
35 |
36 | **v2**
37 |
38 | GET https://api.mozambiquehe.re/bridge?version=2&platform=PC&player=HeyImLifeline&auth=YOURAPIKEY
39 |
40 |
41 | **Multi player search (all players must be on the same platform !, working for both API versions)**
42 |
43 | GET https://api.mozambiquehe.re/bridge?version=2&platform=PC&player=PlayerA,PlayerB,PlayerC&auth=YOURAPIKEY
44 |
45 | **Search by UID (working in both single or multi query, same syntax as above, given example if for multi)**
46 |
47 | GET https://api.mozambiquehe.re/bridge?platform=PC&uid=UID1,UID2&auth=YOURAPIKEY
48 |
49 |
50 | Where PC is the platform and HeyImLifeline the user's name. The API will convert the username to his UID by itself, so don't use his UID as GET parameter :-)
51 |
52 | # API Response
53 | If the API returns with a httpcode other than 200, there was an error while processing the data. You should get the error message in response.
54 |
55 | If code 200 is returned, you'll find the following JSON content (THIS IS FOR V1. SEE V2.JSON IF YOU'RE USING V2):
56 |
57 | {"global":{"name":"HeyImLIFELINE","uid":1000575543540,"platform":"PC","level":78,"toNextLevelPercent":21,"internalUpdateCount":1900,"rank":{"rankScore":1,"rankName":"Bronze","rankDiv":4},"battlepass":{"level":14},"timeSinceLastRespawnUpdate":-1},"realtime":{"lobbyState":"open","isOnline":0,"isInGame":0,"canJoin":0,"partyFull":0,"selectedLegend":"Lifeline"},"legends":{"selected":{"Lifeline":{"kills":958,"damage":254506,"games_played":449}},"all":{"Bangalore":{"kills":"17","creeping_barrage_damage":"200","wins_season_1":"0","wins_season_2":"0"},"Bloodhound":{"kills":"83","top_3":"12","beast_of_the_hunt_kills":"22","kills_season_1":"8","wins_season_2":"0"},"Lifeline":{"kills":"958","damage":"254506","games_played":"449","dropped_items_for_squadmates":"244","wins_season_2":"0"},"Caustic":{"kills":"4","wins_season_2":"0"},"Gibraltar":{"kills":"0","wins_season_1":"0","wins_season_2":"0"},"Mirage":{"kills":"13","wins_season_2":"0"},"Pathfinder":{"kills":"9","pistol_kills":"0","beacons_scanned":"0","wins_season_1":"0","wins_season_2":"0"},"Wraith":{"kills":"24","wins_season_1":"0","kills_season_1":"5","wins_season_2":"0"},"Octane":{"kills":"3","wins_season_2":"0"},"Wattson":{"wins_season_2":"0"}}},"total":{"kills":1111,"creeping_barrage_damage":200,"wins_season_1":0,"wins_season_2":0,"top_3":12,"beast_of_the_hunt_kills":22,"kills_season_1":13,"damage":254506,"games_played":449,"dropped_items_for_squadmates":244,"pistol_kills":0,"beacons_scanned":0,"kd":-1},"event":{"eliteStreak":0}}
58 |
59 | The **global** field contains most important data about the user. You'll find his name, his UID, his platform, level, level progress and how many times he updated his character ingame.
60 |
61 | The **realtime** field provided current data about the user, such as the selected Legend, his lobbyState (open or invite), if the player is online, if he's in a game and if you can join him (if you can't, he's party is full or his lobbyState is set to 'invite').
62 |
63 | The **legends** field contains all data related to legends, split in 2 main data arrays:
64 | **selected** -> data about currently selected legend.
65 |
66 | **all** -> player's data history, with updated ones and older ones. Each time the player is updated, any new data will be added and if already present, it will be updated.
67 |
68 | Finally, you'll get total stats across all legends. The kd field will be -1 unless the API finds a 'kills' field and 'games_played' field.
69 |
70 |
--------------------------------------------------------------------------------
/example.php:
--------------------------------------------------------------------------------
1 |
5 | executions
6 | damage
7 | headshots
8 | wins_as_full_squad
9 | sniper_kills
10 | ar_kills
11 | smg_kills
12 | lmg_kills
13 | pistol_kills
14 | shotgun_kills
15 | care_package_kills
16 | kills_as_kill_leader
17 | revives
18 | winning_kills
19 | games_played
20 | top_3
21 | damage_season_1
22 | kills_season_1
23 | wins_season_1
24 | wins_season_2
25 | kills_season_2
26 | wins_season_3
27 | wins_season_4
28 |
29 | # CRYPTO
30 | death_totems
31 | silenced_targets
32 | silenced_targets_killed
33 |
34 | # CRYPTO
35 | passive_enemies_scanned
36 | shield_damage
37 | traps_destroyed
38 |
39 | # BANGALORE
40 | double_time_distance
41 | smoke_grenade_enemies_hit
42 | creeping_barrage_damage
43 |
44 | # LIFELINE
45 | doc_drone_healing
46 | dropped_items_for_squadmates
47 | revive_shield_damage_blocked
48 |
49 | # BLOODHOUND
50 | enemies_scanned
51 | beast_of_the_hunt_kills
52 | traps_scanned
53 |
54 | # CAUSTIC
55 | noxgas_damage_dealt
56 | noxgassed_enemies_killed
57 | noxgas_times_activated
58 |
59 | # GIBRALTAR
60 | gunshield_damage_blocked
61 | dome_damage_blocked
62 | bombardment_kills
63 |
64 | # MIRAGE
65 | decoys_spawned
66 | encore_execution_escaped
67 | bamboozles
68 |
69 | # PATHFINDER
70 | ziplines_used_by_squad
71 | grapple_travel_distance
72 | beacons_scanned
73 | grandsoiree_damage
74 | grandsoiree_kills
75 | grandsoiree_wins
76 |
77 | # WRAITH
78 | voice_warnings_heard
79 | rifts_squadmates_phased
80 | phase_walk_time
81 |
82 | # OCTANE
83 | distance_on_stim
84 | squadmates_use_jumppad
85 | passive_health_regen
86 |
87 | # WATTSON
88 | detected_breaches
89 | shields_charged
90 | ordnance_destroyed
91 |
--------------------------------------------------------------------------------
/match_history_API.md:
--------------------------------------------------------------------------------
1 | # Match history API
2 | This API is only available to our Supporters for now. For more information, check out our discord @ https://discord.gg/6D59VkE
3 |
4 | # Query structure
5 | Like any other request, you must have an API key.
6 |
7 | An example query would be:
8 |
9 | GET https://api.mozambiquehe.re/bridge?player=heyimlifeline&platform=PC&auth=YOURAPIKEY&history=1&action=info
10 |
11 | The "history" parameter must be set to 1 to access the match history API. Data returned differs according to the "action" parameter
12 |
13 | ## info
14 | The action=info parameter will return the players you're currently tracking. Please note you're curently limited to 20 registered users at the same time.
15 |
16 | {
17 | "registered": 2,
18 | "data": [
19 | {
20 | "name": "mrc9h13n",
21 | "platform": "PC"
22 | },
23 | {
24 | "name": "heyimlifeline",
25 | "platform": "PC"
26 | }
27 | ]
28 | }
29 |
30 |
31 | ## get
32 | This parameter will return ALL tracked events for the player given in the player and platform parameter. An example response would be
33 |
34 | [
35 | {
36 | "uid": "1000575543540",
37 | "player": "HeyImLIFELINE",
38 | "timestamp": "1575905943",
39 | "eventType": "Game",
40 | "xpProgress": "180",
41 | "gameLength": "3",
42 | "legendPlayed": "Lifeline",
43 | "event": [
44 | {
45 | "value": 95,
46 | "key": "damage",
47 | "name": "Damage"
48 | },
49 | {
50 | "value": 1,
51 | "key": "games_played",
52 | "name": "Games played"
53 | }
54 | ]
55 | },
56 | {
57 | "uid": "1000575543540",
58 | "player": "HeyImLIFELINE",
59 | "timestamp": "1575905943",
60 | "eventType": "Session",
61 | "event": {
62 | "action": "leave",
63 | "sessionDuration": "9"
64 | }
65 | },
66 | {
67 | "uid": "1000575543540",
68 | "player": "HeyImLIFELINE",
69 | "timestamp": "1575905673",
70 | "eventType": "Level",
71 | "event": {
72 | "newLevel": "89"
73 | }
74 | },
75 | {
76 | "uid": "1000575543540",
77 | "player": "HeyImLIFELINE",
78 | "timestamp": "1575905673",
79 | "eventType": "Game",
80 | "xpProgress": "16740",
81 | "gameLength": "4",
82 | "legendPlayed": "Lifeline",
83 | "event": [
84 | {
85 | "value": 1,
86 | "key": "games_played",
87 | "name": "Games played"
88 | }
89 | ]
90 | },
91 | {
92 | "uid": "1000575543540",
93 | "player": "HeyImLIFELINE",
94 | "timestamp": "1575905403",
95 | "eventType": "Level",
96 | "event": {
97 | "newLevel": "88"
98 | }
99 | },
100 | {
101 | "uid": "1000575543540",
102 | "player": "HeyImLIFELINE",
103 | "timestamp": "1575905403",
104 | "eventType": "Game",
105 | "xpProgress": "0",
106 | "gameLength": "-1",
107 | "legendPlayed": "",
108 | "event": [
109 | {
110 | "value": 0,
111 | "key": null,
112 | "name": null
113 | }
114 | ]
115 | },
116 | {
117 | "uid": "1000575543540",
118 | "player": "HeyImLIFELINE",
119 | "timestamp": "1575905403",
120 | "eventType": "Session",
121 | "event": {
122 | "action": "join"
123 | }
124 | }
125 | ]
126 | There are 4 events tracked:
127 | Login, leave, level up and game played.
128 |
129 | **Session login** will return his timestamp and the join action, as shown above.
130 | **Sesion leave** will return timestamp and game session duration in minutes.
131 | **Level up** will return timestamp and the new player level.
132 | **Game** will return the data from the player's trackers shown on his profile (max 3), the legend he was using, timestamp, XP progress (approx.) and the game duration.
133 |
134 | ## delete
135 | Removes the given user from the tracked users list. Will return your current registered users.
136 |
137 | ## add
138 | Add the given player to your current registered users. Max 20 for now.
139 |
140 | More data will be added in the upcoming days, give your suggestion on discord :)
141 |
--------------------------------------------------------------------------------
/news-api.md:
--------------------------------------------------------------------------------
1 | ### Apex Legends NEWS API
2 |
3 | Simple.
4 |
5 | Make a call with your API key (see README.md for more info on how to get one) to
6 | `GET https://api.mozambiquehe.re/news?&lang=en-us&auth=YOURAPIKEY`
7 |
8 | You can change en-us by your wanted language.
9 |
--------------------------------------------------------------------------------
/v2.json:
--------------------------------------------------------------------------------
1 | {
2 | "global": {
3 | "name": "HeyImLIFELINE",
4 | "uid": 1000575543540,
5 | "platform": "PC",
6 | "level": 78,
7 | "toNextLevelPercent": 21,
8 | "internalUpdateCount": 1900,
9 | "rank": {
10 | "rankScore": 1,
11 | "rankName": "Bronze",
12 | "rankDiv": 4
13 | },
14 | "battlepass": {
15 | "level": "14"
16 | },
17 | "timeSinceLastRespawnUpdate": -1
18 | },
19 | "realtime": {
20 | "lobbyState": "open",
21 | "isOnline": 0,
22 | "isInGame": 0,
23 | "canJoin": 0,
24 | "partyFull": 0,
25 | "selectedLegend": "Lifeline"
26 | },
27 | "legends": {
28 | "selected": {
29 | "Lifeline": {
30 | "kills": 958,
31 | "damage": 254506,
32 | "games_played": 449,
33 | "ImgAssets": {
34 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/lifeline.png",
35 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/lifeline.jpg"
36 | }
37 | }
38 | },
39 | "all": {
40 | "Bangalore": {
41 | "data": {
42 | "kills": {
43 | "name": "Kills",
44 | "value": 17,
45 | "key": "kills"
46 | },
47 | "creeping_barrage_damage": {
48 | "name": "Creeping barrage damage",
49 | "value": 200,
50 | "key": "creeping_barrage_damage"
51 | },
52 | "wins_season_1": {
53 | "name": "Season 1 Wins",
54 | "value": 0,
55 | "key": "wins_season_1"
56 | },
57 | "wins_season_2": {
58 | "name": "Season 2 Wins",
59 | "value": 0,
60 | "key": "wins_season_2"
61 | }
62 | },
63 | "ImgAssets": {
64 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/bangalore.png",
65 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/bangalore.jpg"
66 | }
67 | },
68 | "Bloodhound": {
69 | "data": {
70 | "kills": {
71 | "name": "Kills",
72 | "value": 83,
73 | "key": "kills"
74 | },
75 | "top_3": {
76 | "name": "Top 3",
77 | "value": 12,
78 | "key": "top_3"
79 | },
80 | "beast_of_the_hunt_kills": {
81 | "name": "Beast of the hunt kills",
82 | "value": 22,
83 | "key": "beast_of_the_hunt_kills"
84 | },
85 | "kills_season_1": {
86 | "name": "Season 1 Kills",
87 | "value": 8,
88 | "key": "kills_season_1"
89 | },
90 | "wins_season_2": {
91 | "name": "Season 2 Wins",
92 | "value": 0,
93 | "key": "wins_season_2"
94 | }
95 | },
96 | "ImgAssets": {
97 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/bloodhound.png",
98 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/bloodhound.jpg"
99 | }
100 | },
101 | "Lifeline": {
102 | "data": {
103 | "kills": {
104 | "name": "Kills",
105 | "value": 958,
106 | "key": "kills"
107 | },
108 | "damage": {
109 | "name": "Damage",
110 | "value": 254506,
111 | "key": "damage"
112 | },
113 | "games_played": {
114 | "name": "Games played",
115 | "value": 449,
116 | "key": "games_played"
117 | },
118 | "dropped_items_for_squadmates": {
119 | "name": "Care items for mates",
120 | "value": 244,
121 | "key": "dropped_items_for_squadmates"
122 | },
123 | "wins_season_2": {
124 | "name": "Season 2 Wins",
125 | "value": 0,
126 | "key": "wins_season_2"
127 | }
128 | },
129 | "ImgAssets": {
130 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/lifeline.png",
131 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/lifeline.jpg"
132 | }
133 | },
134 | "Caustic": {
135 | "data": {
136 | "kills": {
137 | "name": "Kills",
138 | "value": 4,
139 | "key": "kills"
140 | },
141 | "wins_season_2": {
142 | "name": "Season 2 Wins",
143 | "value": 0,
144 | "key": "wins_season_2"
145 | }
146 | },
147 | "ImgAssets": {
148 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/caustic.png",
149 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/caustic.jpg"
150 | }
151 | },
152 | "Gibraltar": {
153 | "data": {
154 | "kills": {
155 | "name": "Kills",
156 | "value": 0,
157 | "key": "kills"
158 | },
159 | "wins_season_1": {
160 | "name": "Season 1 Wins",
161 | "value": 0,
162 | "key": "wins_season_1"
163 | },
164 | "wins_season_2": {
165 | "name": "Season 2 Wins",
166 | "value": 0,
167 | "key": "wins_season_2"
168 | }
169 | },
170 | "ImgAssets": {
171 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/gibraltar.png",
172 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/gibraltar.jpg"
173 | }
174 | },
175 | "Mirage": {
176 | "data": {
177 | "kills": {
178 | "name": "Kills",
179 | "value": 13,
180 | "key": "kills"
181 | },
182 | "wins_season_2": {
183 | "name": "Season 2 Wins",
184 | "value": 0,
185 | "key": "wins_season_2"
186 | }
187 | },
188 | "ImgAssets": {
189 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/mirage.png",
190 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/mirage.jpg"
191 | }
192 | },
193 | "Pathfinder": {
194 | "data": {
195 | "kills": {
196 | "name": "Kills",
197 | "value": 9,
198 | "key": "kills"
199 | },
200 | "pistol_kills": {
201 | "name": "Pistol kills",
202 | "value": 0,
203 | "key": "pistol_kills"
204 | },
205 | "beacons_scanned": {
206 | "name": "Beacons scanned",
207 | "value": 0,
208 | "key": "beacons_scanned"
209 | },
210 | "wins_season_1": {
211 | "name": "Season 1 Wins",
212 | "value": 0,
213 | "key": "wins_season_1"
214 | },
215 | "wins_season_2": {
216 | "name": "Season 2 Wins",
217 | "value": 0,
218 | "key": "wins_season_2"
219 | }
220 | },
221 | "ImgAssets": {
222 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/pathfinder.png",
223 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/pathfinder.jpg"
224 | }
225 | },
226 | "Wraith": {
227 | "data": {
228 | "kills": {
229 | "name": "Kills",
230 | "value": 24,
231 | "key": "kills"
232 | },
233 | "wins_season_1": {
234 | "name": "Season 1 Wins",
235 | "value": 0,
236 | "key": "wins_season_1"
237 | },
238 | "kills_season_1": {
239 | "name": "Season 1 Kills",
240 | "value": 5,
241 | "key": "kills_season_1"
242 | },
243 | "wins_season_2": {
244 | "name": "Season 2 Wins",
245 | "value": 0,
246 | "key": "wins_season_2"
247 | }
248 | },
249 | "ImgAssets": {
250 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/wraith.png",
251 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/wraith.jpg"
252 | }
253 | },
254 | "Octane": {
255 | "data": {
256 | "kills": {
257 | "name": "Kills",
258 | "value": 3,
259 | "key": "kills"
260 | },
261 | "wins_season_2": {
262 | "name": "Season 2 Wins",
263 | "value": 0,
264 | "key": "wins_season_2"
265 | }
266 | },
267 | "ImgAssets": {
268 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/octane.png",
269 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/octane.jpg"
270 | }
271 | },
272 | "Wattson": {
273 | "data": {
274 | "wins_season_2": {
275 | "name": "Season 2 Wins",
276 | "value": 0,
277 | "key": "wins_season_2"
278 | }
279 | },
280 | "ImgAssets": {
281 | "icon": "http:\/\/api.apexlegendsstatus.com\/assets\/icons\/wattson.png",
282 | "banner": "http:\/\/api.apexlegendsstatus.com\/assets\/banners\/wattson.jpg"
283 | }
284 | }
285 | }
286 | },
287 | "total": {
288 | "kills": {
289 | "name": "Kills",
290 | "value": 1111
291 | },
292 | "creeping_barrage_damage": {
293 | "name": "Creeping barrage damage",
294 | "value": 200
295 | },
296 | "wins_season_1": {
297 | "name": "Season 1 Wins",
298 | "value": 0
299 | },
300 | "wins_season_2": {
301 | "name": "Season 2 Wins",
302 | "value": 0
303 | },
304 | "top_3": {
305 | "name": "Top 3",
306 | "value": 12
307 | },
308 | "beast_of_the_hunt_kills": {
309 | "name": "Beast of the hunt kills",
310 | "value": 22
311 | },
312 | "kills_season_1": {
313 | "name": "Season 1 Kills",
314 | "value": 13
315 | },
316 | "damage": {
317 | "name": "Damage",
318 | "value": 254506
319 | },
320 | "games_played": {
321 | "name": "Games played",
322 | "value": 449
323 | },
324 | "dropped_items_for_squadmates": {
325 | "name": "Care items for mates",
326 | "value": 244
327 | },
328 | "pistol_kills": {
329 | "name": "Pistol kills",
330 | "value": 0
331 | },
332 | "beacons_scanned": {
333 | "name": "Beacons scanned",
334 | "value": 0
335 | },
336 | "kd": {
337 | "value": -1,
338 | "name": "KD"
339 | }
340 | },
341 | "mozambiquehere_internal": {
342 | "claimedBy": "1",
343 | "APIAccessType": null,
344 | "ClusterID": "1"
345 | },
346 | "event": {
347 | "eliteStreak": 0
348 | }
349 | }
350 |
--------------------------------------------------------------------------------