GET Hero Rank
The query parameters for fetching hero rankings include the number of days (1, 3, 7, 15, 30), rank category (all, epic, legend, mythic, honor, glory), number of records per page (1-127), page index (1-127), sorting field (pick_rate, ban_rate, win_rate), and sorting order (asc, desc). The default values are 1 day, all ranks, 20 records per page, page index 1, sorted by win_rate in descending order. The result includes a status code, message, and data with records of heroes, including their appearance rate, ban rate, win rate, and IDs, along with sub-heroes and their respective details. The total number of records is also provided.
Endpoint
GET /api/hero-rank/
Query Parameters
-
days Number of days for which the data is to be fetched.
- Possible Values:
1
,3
,7
,15
,30
- Default:
1
- Possible Values:
-
rank Rank category for filtering the data.
- Possible Values:
all
,epic
,legend
,mythic
,honor
,glory
- Default:
all
- Possible Values:
-
size Number of records per page.
- Possible Values: From
1
to127
- Default:
20
- Possible Values: From
-
index Page index for pagination.
- Possible Values: From
1
to127
- Default:
1
- Possible Values: From
-
sort_field Field by which the data should be sorted.
- Possible Values:
pick_rate
,ban_rate
,win_rate
- Default:
win_rate
- Possible Values:
-
sort_order Order of sorting.
- Possible Values:
asc
,desc
- Default:
desc
- Possible Values:
Example Requests
GET /api/hero-rank/?days=7&rank=mythic&size=10&index=2&sort_field=pick_rate&sort_order=asc
This request fetches hero rankings for the past 7 days, filtered by the "mythic" rank category, with 10 records per page, showing the second page of results, sorted by pick rate in ascending order.
Example Usage
Python requests
import requests
import json
def fetch_api(api_url):
try:
response = requests.get(api_url)
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
return None
api_url = "https://mlbb-stats.ridwaanhall.com/api/hero-rank/?days=7&rank=mythic&size=10&index=2&sort_field=pick_rate&sort_order=asc"
data = fetch_api(api_url)
print(json.dumps(data, indent=4) if data else "No data fetched.")
Direct API Access
Click this to Access the API directly
Result
{
"code": 0,
"message": "OK",
"data": {
"records": [
{
"data": {
"main_hero": {
"data": {
"head": "https://akmweb.youngjoygame.com/web/svnres/img/mlbb/homepage/100_d1d055377612e96139f2f2ae5d0c3279.png",
"name": "Kimmy"
}
},
"main_hero_appearance_rate": 0.001684,
"main_hero_ban_rate": 0.000524,
"main_hero_channel": {
"id": 2678807
},
"main_hero_win_rate": 0.418314,
"main_heroid": 71,
"sub_hero": [
{
"hero": {
"data": {
"head": "https://akmweb.youngjoygame.com/web/svnres/img/mlbb/homepage/100_b07dccc76d66453f7d5c779b1b0f9370.png"
}
},
"hero_channel": {
"id": 2678805
},
"heroid": 69,
"increase_win_rate": 0.050536
},
{
"hero": {
"data": {
"head": "https://akmweb.youngjoygame.com/web/svnres/img/mlbb/homepage/100_8a9c1966feb34e85d7bdcc1ed01ffb5d.png"
}
},
"hero_channel": {
"id": 2678796
},
"heroid": 60,
"increase_win_rate": 0.024666
},
{
"hero": {
"data": {
"head": "https://akmweb.youngjoygame.com/web/svnres/img/mlbb/homepage/100_f070d82521ecd2e14d4ef3f25880830a.png"
}
},
"hero_channel": {
"id": 2678857
},
"heroid": 121,
"increase_win_rate": 0.022627
},
{
"hero": {
"data": {
"head": "https://akmweb.youngjoygame.com/web/svnres/img/mlbb/homepage/100_efe9c7ed8d8f84f1bb0f88a3e08de5fc.png"
}
},
"hero_channel": {
"id": 2678819
},
"heroid": 83,
"increase_win_rate": 0.020299
},
{
"hero": {
"data": {
"head": "https://akmweb.youngjoygame.com/web/svnres/img/mlbb/homepage/100_2a7a8d1531a1c4f8524880413535348d.png"
}
},
"hero_channel": {
"id": 2678802
},
"heroid": 66,
"increase_win_rate": 0.019797
}
]
}
},
...
],
"total": 127
}
}