Closed ibabde closed 6 years ago
So leaderboards in Fortnite are currently randomized. You are placed in a group of 50 players per week and you can sort of "rank yourself" amongst them. They are not, however, the global leaderboards. There's another API call that gets made right before these with cohort
in the URI indicating it is indeed just a group of people selected.
I am more confident that the one endpoint for globals wins is indeed global. This endpoint:
https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/leaderboards/type/global/stat/br_placetop1_%v_m0%v/window/weekly
where the first %v
is the platform, and the 2nd is the group-type indicator. I made an example of this endpoint in Go where you can see the output here, and my implementation here. The response is a series of account IDs and their rank # and amount of wins. After this, you must perform an additional request to their account server endpoint doing a lookup on all 50 account IDs in order to get their display name (2nd function below in my implementation I linked).
Luckily you can do this all in one request by preparing a long series of query parameters in the call, which is exactly what the game does internally, too.
The URL for that endpoint is https://account-public-service-prod03.ol.epicgames.com/account/api/public/account
where you simply add ?accountID=123&accountID=456&accountID=789
and so on to get a response with the account IDs and usernames, and then map them. However, for some odd reason Epic strips the hypens -
out of the account names in the request and the response, so you must strip them before performing the call and mapping them.
@henhouse thank you . I used this information to create global leaderboard
Nice job!
is there any leaderboards endpoint ?
I searched and found this 3 endpoints : https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/leaderboards/type/group/stat/br_score_pc_m0_p9/window/weekly?ownertype=1
https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/leaderboards/type/global/stat/br_placetop1_pc_m0_p9/window/weekly?ownertype=1&pageNumber=0&itemsPerPage=50
https://fortnite-public-service-prod11.ol.epicgames.com/fortnite/api/leaderboards/type/group/stat/br_placetop3_pc_m0_p9/window/weekly?ownertype=1
I don't think those are for the global leaderboard.