---
title: "MLBB Stats & Winrate API"
url: "https://ridwaanhall.com/projects/mlbb-stats-winrate-api"
markdown: "https://ridwaanhall.com/projects/mlbb-stats-winrate-api.md"
summary: "A Flask API for Mobile Legends usernames, MPL statistics and win-rate calculators, since moved to Rone Arena."
---

# MLBB Stats & Winrate API

> A Flask API for Mobile Legends usernames, MPL statistics and win-rate calculators, since moved to Rone Arena.

- Category: API
- Status: Completed
- Started: August 14, 2023
- Built with: Flask, Python, BeautifulSoup
- Source: https://github.com/ridwaanhall/MPL-ID-API

## About

### The problem

Mobile Legends player and tournament data was scattered across several community sites, and checking a username or working out a win-rate target meant doing it by hand.

### The approach

This Flask API checks a username from a user ID and zone ID, reads statistics from id-mpl.com, and calculates win rates: the rate needed to reach a target, and wins and losses from a match total and rate. It can return JSON or XML.

- Username lookup by user ID and zone ID.
- MPL ID statistics and match data.
- Win-rate target calculators.

### The result

The project is archived: it migrated into Rone Arena, which is where this work continues.

## Features

- **Username Lookup**: Fetch player usernames quickly via mainlagiaja.com’s API.
- **MPL Stats Integration**: Pull competitive stats and insights directly from id-mpl.com.
- **Winrate Engine**: Calculate accurate winrates using takapadia.com data and custom logic.

## Tags

MLBB, Mobile Legends, API, Flask, Game Stats, Winrate, Player Data, Python, Gaming

## Elsewhere

- This page for people: https://ridwaanhall.com/projects/mlbb-stats-winrate-api
- Index of every page as Markdown: [llms.txt](https://ridwaanhall.com/llms.txt)
