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. |
Generic a2s queries require port, which is the actual A2S query destination. They do not accept queryPort. Named profiles retain their normal game-port defaults and query-port conventions.
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 explicit queryPort always wins.
Accepted game aliases
Aliases are input conveniences. Successful and failed results always use the canonical ID.
| Game | Canonical ID | Aliases |
|---|---|---|
| Generic A2S | a2s | None |
| Don't Starve Together | dont-starve-together | dstdontstarvetogether |
| Rust | rust | None |
| Palworld | palworld | None |
| Project Zomboid | project-zomboid | zomboidpzprojectzomboid |
| 7 Days to Die | 7-days-to-die | seven-days-to-die7days-to-die7d2d7dtd |
| DayZ | dayz | None |
| Valheim | valheim | None |
| Minecraft: Java Edition | minecraft-java | minecraftmcjavaminecraft-java-edition |
| Minecraft: Bedrock Edition | minecraft-bedrock | bedrockmcbemc-bedrockminecraft-bedrock-edition |
| FiveM | fivem | five-m |
| RedM | redm | red-mrdr3 |
| Satisfactory | satisfactory | None |
| Vintage Story | vintage-story | vintagestoryvs |
| Counter-Strike 2 | counter-strike-2 | cs2counterstrike2 |
| Counter-Strike: Source | counter-strike-source | csscs-sourcecounterstrikesource |
| Team Fortress 2 | team-fortress-2 | tf2teamfortress2 |
| Left 4 Dead | left-4-dead | l4dleft4dead |
| Left 4 Dead 2 | left-4-dead-2 | l4d2left4dead2 |
| Garry's Mod | garrys-mod | gmodgarrysmod |
| ARK: Survival Evolved | ark-survival-evolved | arkarksease |
| Conan Exiles | conan-exiles | conanconanexiles |
| Killing Floor 2 | killing-floor-2 | kf2killingfloor2 |
| Day of Dragons | day-of-dragons | dayofdragons |
| Soulmask | soulmask | None |
| Sons of the Forest | sons-of-the-forest | sotfsonsoftheforest |
| Icarus | icarus | None |
| Abiotic Factor | abiotic-factor | abioticfactor |
| Arma 3 | arma-3 | arma3a3 |
| American Truck Simulator | american-truck-simulator | atsamericantrucksimulator |
| Euro Truck Simulator 2 | euro-truck-simulator-2 | ets2eurotrucksimulator2 |
| The Forest | the-forest | theforest |
| Unturned | unturned | None |
| Enshrouded | enshrouded | None |
| Insurgency: Sandstorm | insurgency-sandstorm | sandstorminsurgencysandstorm |
| Arma Reforger | arma-reforger | armareforgerreforger |
| Starbound | starbound | None |
| Space Engineers | space-engineers | spaceengineers |
| HumanitZ | humanitz | None |
| V Rising | v-rising | vrising |
| Eco | eco | None |
| VEIN | vein | None |
| Avorion | avorion | None |
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.