Bedrock server status
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.mcquery.net/bedrock?target=hivebedrock.network&port=19132"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.mcquery.net/bedrock?target=hivebedrock.network&port=19132")) .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.mcquery.net/bedrock?target=hivebedrock.network&port=19132") .get() .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.mcquery.net/bedrock', params: {target: 'hivebedrock.network', port: '19132'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.mcquery.net/bedrock?target=hivebedrock.network&port=19132';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.mcquery.net/bedrock";
let querystring = [ ("target", "hivebedrock.network"), ("port", "19132"), ];
let client = reqwest::Client::new(); let response = client.get(url) .query(&querystring) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url 'https://api.mcquery.net/bedrock?target=hivebedrock.network&port=19132'Resolves the server (CNAME/A/AAAA) and pings it over UDP. The resolved address must be public.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Minecraft Bedrock server hostname or IP.
Example
hivebedrock.networkUDP port (1-65535), default 19132.
Example
19132Responses
Section titled “Responses”Server status
object
Whether this result was served from cache
How the Bedrock server was reached (host and UDP port). Empty object when the ping failed.
object
The server’s DNS resolution chain (CNAMEs, then A/AAAA). Empty for IP targets.
Server’s DNS resolution chain
object
Record type (SRV, CNAME, A, AAAA).
object
object
The two MOTD lines a Bedrock server advertises.
object
The server’s advertised unique id.
The server’s RakNet GUID as an unsigned 64-bit decimal string.
Example
{ "ok": true, "query": "hivebedrock.network", "connection": { "host": "hivebedrock.network", "port": 19132 }, "dns": [ { "hostname": "hivebedrock.network", "type": "A", "data": "5.135.237.238" }, { "hostname": "hivebedrock.network", "type": "A", "data": "51.178.216.177" }, { "hostname": "hivebedrock.network", "type": "A", "data": "5.196.205.184" }, { "hostname": "hivebedrock.network", "type": "A", "data": "46.105.88.67" }, { "hostname": "hivebedrock.network", "type": "A", "data": "5.135.18.248" } ], "edition": "MCPE", "version": { "name": "1.0", "protocol": 121 }, "players": { "online": 17857, "max": 100001 }, "motd": { "line1": "BEDWARS | MURDER MYSTERY", "line2": "Hive Games" }, "gamemode": "Survival", "serverId": "2638805516392942856", "serverGuid": "1782174733625824"}Headers
Section titled “Headers”IETF-draft combined rate-limit header for the current window: limit, remaining, and reset (seconds until the window resets). Sent on every response from a known endpoint.
Example
limit=120, remaining=119, reset=42Maximum requests allowed per client IP per window (120 requests per 60s).
Example
120Requests remaining in the current window before the limit is hit.
Example
119Seconds until the current window resets.
Example
42Missing or invalid parameter
Error response.
object
Example
{ "ok": false, "msg": "query param target is required"}Headers
Section titled “Headers”IETF-draft combined rate-limit header for the current window: limit, remaining, and reset (seconds until the window resets). Sent on every response from a known endpoint.
Example
limit=120, remaining=119, reset=42Maximum requests allowed per client IP per window (120 requests per 60s).
Example
120Requests remaining in the current window before the limit is hit.
Example
119Seconds until the current window resets.
Example
42Target resolves to a private/reserved address
Error response.
object
Example
{ "ok": false, "msg": "target doesn't resolve to a public addr"}Headers
Section titled “Headers”IETF-draft combined rate-limit header for the current window: limit, remaining, and reset (seconds until the window resets). Sent on every response from a known endpoint.
Example
limit=120, remaining=119, reset=42Maximum requests allowed per client IP per window (120 requests per 60s).
Example
120Requests remaining in the current window before the limit is hit.
Example
119Seconds until the current window resets.
Example
42Rate limit exceeded: more than 120 requests were made from one client IP within a 60-second window.
Error response.
object
Example
{ "ok": false, "msg": "you're being rate limited, try again later."}Headers
Section titled “Headers”IETF-draft combined rate-limit header for the current window: limit, remaining, and reset (seconds until the window resets). Sent on every response from a known endpoint.
Example
limit=120, remaining=119, reset=42Maximum requests allowed per client IP per window (120 requests per 60s).
Example
120Requests remaining in the current window before the limit is hit.
Example
119Seconds until the current window resets.
Example
42Seconds to wait before retrying. Sent only on a 429 response.
Example
42Could not connect to the server
object
Server’s DNS resolution chain
object
Record type (SRV, CNAME, A, AAAA).
Example
{ "ok": false, "cached": false, "msg": "can't connect to the server"}