Core library
Query a server
Choose a game profile and let QueryHost apply its protocol, discovery, port, and safety rules.
Query input
| Field | Required | Meaning |
|---|---|---|
game | Yes | Canonical game ID or accepted alias. |
host | Yes | DNS hostname or IP literal. URL syntax is rejected. |
port | No | Game or service port. The registry default is used when omitted. |
queryPort | No | Explicit protocol query destination when it differs from the game port. |
mode | No | summary skips optional enrichment; full requests it. |
timeoutMs | No | Global deadline from 1 through 30,000 ms; defaults to 5,000 ms. |
signal | No | Caller cancellation propagated to outstanding operations. |
const result = await query({
game: "minecraft-java",
host: "play.example.com",
mode: "full",
timeoutMs: 5000,
});Game and query ports
port represents the normal game or service port. A profile can derive a conventional query destination from it. Rust, for example, maps game port 28015 to query port 28017. An explicitqueryPort always wins.
Accepted game aliases
Aliases are input conveniences. Successful and failed results always use the canonical ID.
| Game | Canonical ID | Aliases |
|---|---|---|
| Rust | rust | None |
| Project Zomboid | project-zomboid | zomboidpzprojectzomboid |
| 7 Days to Die | 7-days-to-die | seven-days-to-die7days-to-die7d2d7dtd |
| Minecraft: Java Edition | minecraft-java | minecraftmcjavaminecraft-java-edition |
| Minecraft: Bedrock Edition | minecraft-bedrock | bedrockmcbemc-bedrockminecraft-bedrock-edition |
| FiveM | fivem | five-m |
Live by default
The library performs live network work for every call. It has no hidden cache. Applications that need caching must add it explicitly outside QueryHost.