QueryHost
Esc

Documentation menu

Core library

Query a server

Choose a game profile and let QueryHost apply its protocol, discovery, port, and safety rules.

Query input

FieldRequiredMeaning
gameYesCanonical game ID or accepted alias.
hostYesDNS hostname or IP literal. URL syntax is rejected.
portNo*Game or service port. The registry default is used when omitted.
queryPortNoExplicit protocol query destination when it differs from the game port.
modeNosummary skips optional enrichment; full requests it.
timeoutMsNoGlobal deadline from 1 through 30,000 ms; defaults to 5,000 ms.
signalNoCaller 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.

Full Minecraft Java queryTypeScript
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.

GameCanonical IDAliases
Generic A2Sa2sNone
Don't Starve Togetherdont-starve-togetherdstdontstarvetogether
RustrustNone
PalworldpalworldNone
Project Zomboidproject-zomboidzomboidpzprojectzomboid
7 Days to Die7-days-to-dieseven-days-to-die7days-to-die7d2d7dtd
DayZdayzNone
ValheimvalheimNone
Minecraft: Java Editionminecraft-javaminecraftmcjavaminecraft-java-edition
Minecraft: Bedrock Editionminecraft-bedrockbedrockmcbemc-bedrockminecraft-bedrock-edition
FiveMfivemfive-m
RedMredmred-mrdr3
SatisfactorysatisfactoryNone
Vintage Storyvintage-storyvintagestoryvs
Counter-Strike 2counter-strike-2cs2counterstrike2
Counter-Strike: Sourcecounter-strike-sourcecsscs-sourcecounterstrikesource
Team Fortress 2team-fortress-2tf2teamfortress2
Left 4 Deadleft-4-deadl4dleft4dead
Left 4 Dead 2left-4-dead-2l4d2left4dead2
Garry's Modgarrys-modgmodgarrysmod
ARK: Survival Evolvedark-survival-evolvedarkarksease
Conan Exilesconan-exilesconanconanexiles
Killing Floor 2killing-floor-2kf2killingfloor2
Day of Dragonsday-of-dragonsdayofdragons
SoulmasksoulmaskNone
Sons of the Forestsons-of-the-forestsotfsonsoftheforest
IcarusicarusNone
Abiotic Factorabiotic-factorabioticfactor
Arma 3arma-3arma3a3
American Truck Simulatoramerican-truck-simulatoratsamericantrucksimulator
Euro Truck Simulator 2euro-truck-simulator-2ets2eurotrucksimulator2
The Forestthe-foresttheforest
UnturnedunturnedNone
EnshroudedenshroudedNone
Insurgency: Sandstorminsurgency-sandstormsandstorminsurgencysandstorm
Arma Reforgerarma-reforgerarmareforgerreforger
StarboundstarboundNone
Space Engineersspace-engineersspaceengineers
HumanitZhumanitzNone
V Risingv-risingvrising
EcoecoNone
VEINveinNone
AvorionavorionNone

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.