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!"
    }
@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