Skip to content

Instantly share code, notes, and snippets.

@aimardcr
Created September 28, 2024 21:02
Show Gist options
  • Select an option

  • Save aimardcr/a10a03010023aae1779ee55a035e2c68 to your computer and use it in GitHub Desktop.

Select an option

Save aimardcr/a10a03010023aae1779ee55a035e2c68 to your computer and use it in GitHub Desktop.
MLBB API Docs

API Documentation

Base URL

https://mlbb-api.aimar.id/v1

Authentication

All endpoints except /health-check require API key authentication. Include the API key in the Authorization header of your request.

API Keys

There are two types of API keys available:

  1. Free: No IP restrictions
  2. Specific User: IP-restricted

Error Handling

  • 401 Unauthorized: Returned when the API key is missing, invalid, or the request is from an unauthorized IP (for IP-restricted keys).
  • 404 Not Found: Returned when the requested resource is not found.

Endpoints

1. Health Check

Check the health status of the API.

  • URL: /health-check
  • Method: GET
  • Auth required: No

Success Response

  • Code: 200 OK
  • Content:
    {
      "success": true,
      "message": "Healthy!"
    }

2. Get Player Data

Retrieve player information based on game ID and server ID.

  • URL: /get-player-data
  • Method: GET
  • Auth required: Yes

Parameters

Name Type Required Description
game_id string Yes Player's game ID
server_id string Yes Player's server ID

Success Response

  • Code: 200 OK
  • Content:
    {
      "success": true,
      "message": "Player data fetched!",
      "data": {
        // Player data object
      }
    }

Error Response

  • Code: 400 Bad Request
  • Content:
    {
      "success": false,
      "message": "game_id is required!"
    }
    OR
    {
      "success": false,
      "message": "server_id is required!"
    }
  • Code: 404 Not Found
  • Content:
    {
      "success": false,
      "message": "Player not found!"
    }

3. Get Battle IDs

Retrieve recent battle IDs for a player.

  • URL: /get-battle-ids
  • Method: GET
  • Auth required: Yes

Parameters

Name Type Required Description
game_id string Yes Player's game ID
server_id string Yes Player's server ID

Success Response

  • Code: 200 OK
  • Content:
    {
      "success": true,
      "message": "Battle Info fetched!",
      "data": {
        // Battle IDs data
      }
    }

Error Response

  • Code: 400 Bad Request
  • Content:
    {
      "success": false,
      "message": "game_id is required!"
    }
    OR
    {
      "success": false,
      "message": "server_id is required!"
    }
  • Code: 404 Not Found
  • Content:
    {
      "success": false,
      "message": "Player not found!"
    }

4. Get Squad Data

Retrieve data for a specific squad.

  • URL: /get-squad-data
  • Method: GET
  • Auth required: Yes

Parameters

Name Type Required Description
squad_id string Yes Squad ID

Success Response

  • Code: 200 OK
  • Content:
    {
      "success": true,
      "message": "Squad data fetched!",
      "data": {
        // Squad data object
      }
    }

Error Response

  • Code: 400 Bad Request
  • Content:
    {
      "success": false,
      "message": "squad_id is required!"
    }
  • Code: 404 Not Found
  • Content:
    {
      "success": false,
      "message": "Squad not found!"
    }
@techwiz37
Copy link

update pls

@lemmyyzyy
Copy link

Update pls

@achedon12
Copy link

Hello, I'm really interested in your project and if the api really works, is it possible for you to put it back together? I'm a developer and I've been looking for a mlbb api for a long time to make projects and other things. Is it possible to collaborate?
Waiting for your reply

@aimardcr
Copy link
Author

aimardcr commented Jun 9, 2025

For those who wants the access you can directly contact me on my email add tell me your purpose for the API. I'm open for business opportunity too.

@achedon12
Copy link

achedon12 commented Jun 9, 2025

For those who wants the access you can directly contact me on my email add tell me your purpose for the API. I'm open for business opportunity too.

Can you give me your email address please ?

@aimardcr
Copy link
Author

aimardcr commented Jun 9, 2025

For those who wants the access you can directly contact me on my email add tell me your purpose for the API. I'm open for business opportunity too.

Can you give me your email address please ?

You can go to my LinkedIn if you have.

@achedon12
Copy link

achedon12 commented Jun 9, 2025

For those who wants the access you can directly contact me on my email add tell me your purpose for the API. I'm open for business opportunity too.

Can you give me your email address please ?

You can go to my LinkedIn if you have.

It's done ! Please check your linkedin when you will have the time

@pyaepgyak
Copy link

Title: Request for MLBB API Key

Hello Aimar,

I'm building a public tool to check MLBB player info using UID and zone. I found your get-player-data API and would love to use it in my project. Could I kindly request an API key for personal use?

Thanks a lot for your great work!
– [Your name or username]

@KENJIE699
Copy link

Hello, it can see account creation date and devices? If it does then i have an offer for you

@aimardcr
Copy link
Author

DM my telegram for business purposes.
t.me/coldclear

@achedon12
Copy link

DM my telegram for business purposes. t.me/coldclear

Is it possible to give me a response on linkedin ?

@Kendy979
Copy link

hello i need api key

@forbmacc0-bot
Copy link

I need api key

@aimardcr
Copy link
Author

aimardcr commented Oct 8, 2025

I am selling full source to scrap MLBB data, from creating account (and using it for authenticating in the source), viewing profiles, finding players by game id, and many more. Code is purely made in Python and no need interaction with the game application itself. Telegram: @coldclear to purchase the source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment