Introduction #
The Pingloo.net API allows you to query the status and detailed information of Minecraft servers with simple HTTP requests. You can easily integrate Minecraft server information into your application or website.
Authentication #
Currently, no API key or authentication is required to use the API.
Endpoints #
The following endpoints are available for querying server information:
/server/{ip} #
Queries general information about a Minecraft server, including status, players, version, etc.
Paraméterek:
Parameter | Type | Description |
---|---|---|
ip | string | The IP address or domain name of the Minecraft server |
Response:
HTML response with server data
/server/{ip}/json #
Queries general information about a Minecraft server in JSON format
Response:
"online": true,
"ip": "mc.example.com",
"port": 25565,
"motd": "A Minecraft Server",
"version": "Paper 1.19.2",
"players": {
"online": 42,
"max": 100,
"list": ["player1", "player2"]
},
"ping": 45,
"favicon": "data:image/png;base64,..."
}
/server/{ip}/players #
Queries only player-related information about the server.
Response:
"online": 42,
"max": 100,
"list": ["player1", "player2"]
}
/server/{ip}/favicon #
Returns the server favicon image for direct use.
/server/{ip}/query #
Queries detailed information about the server using the Query protocol, if supported.
Response:
"hostname": "A Minecraft Server",
"gametype": "SMP",
"game_id": "MINECRAFT",
"version": "Paper 1.19.2",
"plugins": ["WorldEdit", "Essentials"],
"map": "world",
"numplayers": 42,
"maxplayers": 100,
"hostport": 25565,
"hostip": "127.0.0.1",
"players": ["player1", "player2"]
}
Rate Limits #
To prevent API overload, we apply rate limits:
- Normal access: 30 requests per minute per IP address
- Premium access: 120 requests per minute per API key
Caching #
Server information is cached for 30 seconds to reduce load.
Examples #
JavaScript (Fetch):
.then(response => response.json())
.then(data => {
console.log(data);
});
PHP:
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
Python:
url = 'https://api.pingloo.net/server/mc.example.com/json'
response = requests.get(url)
data = response.json()
print(data)
Error Messages #
The API may return the following error codes:
Status | Error | Description |
---|---|---|
400 | Bad Request | Invalid request or incorrect parameters. |
403 | Forbidden | Access denied, usually due to rate limit exceeded. |
404 | Not Found | The specified server cannot be found or is not responding. |
429 | Too Many Requests | Too many requests in a short time. Please slow down your request rate. |
500 | Internal Server Error | A server-side error occurred while processing the request. |
503 | Service Unavailable | The service is temporarily unavailable, please try again later. |