Skip to content

Java server MOTD

GET
/java/motd
const url = 'https://api.mcquery.net/java/motd?target=mc.hypixel.net&port=25565&players=true';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}

Renders and returns the server’s MOTD as a PNG image that resembles the in-game server list

target
required
string

Minecraft server hostname or IP.

Example
mc.hypixel.net
port
required
integer
>= 1 <= 65535

TCP port (1-65535).

Example
25565
players
boolean
default: true

Whether to render the player count (default true). Set to false/0/no/off to omit it.

Example
true

PNG image of the server’s MOTD (rendered for both reachable and unreachable servers)

Media typeimage/png
string format: binary
RateLimit
string

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=42
RateLimit-Limit
integer

Maximum requests allowed per client IP per window (120 requests per 60s).

Example
120
RateLimit-Remaining
integer

Requests remaining in the current window before the limit is hit.

Example
119
RateLimit-Reset
integer

Seconds until the current window resets.

Example
42

Missing or invalid parameter

Media typeapplication/json

Error response.

object
ok
required
boolean
msg
required
string
Example
{
"ok": false,
"msg": "query param target is required"
}
RateLimit
string

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=42
RateLimit-Limit
integer

Maximum requests allowed per client IP per window (120 requests per 60s).

Example
120
RateLimit-Remaining
integer

Requests remaining in the current window before the limit is hit.

Example
119
RateLimit-Reset
integer

Seconds until the current window resets.

Example
42

Target resolves to a private/reserved address

Media typeapplication/json

Error response.

object
ok
required
boolean
msg
required
string
Example
{
"ok": false,
"msg": "target doesn't resolve to a public addr"
}
RateLimit
string

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=42
RateLimit-Limit
integer

Maximum requests allowed per client IP per window (120 requests per 60s).

Example
120
RateLimit-Remaining
integer

Requests remaining in the current window before the limit is hit.

Example
119
RateLimit-Reset
integer

Seconds until the current window resets.

Example
42

Rate limit exceeded: more than 120 requests were made from one client IP within a 60-second window.

Media typeapplication/json

Error response.

object
ok
required
boolean
msg
required
string
Example
{
"ok": false,
"msg": "you're being rate limited, try again later."
}
RateLimit
string

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=42
RateLimit-Limit
integer

Maximum requests allowed per client IP per window (120 requests per 60s).

Example
120
RateLimit-Remaining
integer

Requests remaining in the current window before the limit is hit.

Example
119
RateLimit-Reset
integer

Seconds until the current window resets.

Example
42
Retry-After
integer

Seconds to wait before retrying. Sent only on a 429 response.

Example
42