Skip to content

smsq

NAME

smsq

SYNOPSIS

smsq [OPTIONS]

DESCRIPTION

Find Steam game servers through the Web API, legacy master-server UDP, or an authenticated Steam Connection Manager session. The Web API command is the default and is recommended for most queries.

OPTIONS

Filter options

Option Description Required
-r, --raw-filter Raw Steam filter expression; an embedded AppID takes precedence over --app-id no
-f, --filter Add an include filter as key=value no
-x, --nor Exclude servers matching any supplied condition; incompatible with --nand no
-X, --nand Exclude servers matching all supplied conditions; incompatible with --nor no
-i, --app-id Steam application ID; required unless included in --raw-filter no

Query options

Option Description Default Required
-l, --limit Maximum number of unique servers to return 25 no
-t, --timeout Maximum duration of the complete operation 2m no

Output options

Option Description Default Required
-F, --format Output format; choices: html, md, csv, table, yaml, json table no
-o, --output Write output to a file instead of stdout no
-c, --columns Select output fields; all includes fields available for this protocol and hides empty or zero fields; choices: address, players, map, name, version, gamedir, os, gametype, bots, gameport, secure, all address, players, map, name no
-p, --pretty Indent JSON output; YAML uses block format by default no

Help Options

Option Description Required
-h, --help Show this help message no
-v, --version Show version information no

COMMANDS

Help Commands

help

Show help

Usage: smsq [OPTIONS] help

version

Show version information

Usage: smsq [OPTIONS] version [version-OPTIONS]

Show version information

Option Description Required
--short Print version number only no
--commit Print commit SHA only no
--json Print version information as JSON no

completion

Generate shell completion

Usage: smsq [OPTIONS] completion [completion-OPTIONS]

Generate shell completion

Option Description Required
--shell Shell completion format; choices: bash, zsh, pwsh no

Arguments

Name Description Required
output Output file path no

grpc

Query server lists through an authenticated Steam CM session

Query Steam's game-server browser through an authenticated Steam Connection Manager session using protobuf over WebSocket. MasterServerQuery returns server addresses and available metadata. Despite the command name, this does not use standard gRPC.

Usage: smsq [OPTIONS] grpc [grpc-OPTIONS]

Examples

Authenticate with mobile QR approval and cache the refresh token

smsq grpc --app-id 730 --auth-mode qr --token-file ./.steam-token.json --limit 10000

Collect addresses using a saved Steam Connection Manager discovery plan

smsq grpc --app-id 730 --plan-in plan.json --records addresses --limit 120000

Discovery plan files

Option Description Required
--plan-in Collect results using a saved Discovery plan no
--plan-out Save the generated Discovery plan; only applies when Discovery runs no

Authentication

Option Description Default Environment Required
-m, --auth-mode Steam authentication: QR approval, Steam Guard code, or mobile approval; choices: qr, code, approve qr no
-a, --account Steam account name for password-based login $STEAM_ACCOUNT no
--device-name Device name shown during Steam login smsq no

Token storage

Option Description Environment Required
--token-file Read and update a plaintext refresh-token file; omit to keep the token in memory $STEAM_TOKEN_FILE no

Discovery

Option Description Default Required
--records Return full server records or addresses only; choices: full, addresses full no
--max-requests Maximum CM Discovery requests; 0 derives the budget from --limit no
--max-depth Maximum recursive Discovery split depth; 0 uses the default no

Steam Connection Manager connection

Option Description Required
--cm-endpoint Use this Steam CM host:port instead of looking up endpoints from Steam no
--request-interval Minimum delay between Discovery request starts after the initial burst; 0 disables pacing no
--initial-burst Number of initial Discovery requests sent without pacing; 0 disables the burst no

rest

Query server lists through the Steam Web API

List Steam game servers through IGameServersService/GetServerList. One request returns at most 10,000 records. Larger limits, Discovery options, or a saved plan use the Discovery workflow.

Usage: smsq [OPTIONS] rest [rest-OPTIONS]

Examples

Query server addresses with the Web API

smsq rest --app-id 730 --api-key '<KEY>' --limit 500 --records addresses

Discover beyond the 10,000-row API limit and save its plan

smsq rest --app-id 730 --api-key '<KEY>' --limit 120000 --plan-out plan.json --records addresses

Collect using a saved plan

smsq rest --app-id 730 --api-key '<KEY>' --plan-in plan.json --limit 120000

Query server lists through the Steam Web API

Option Description Default Environment Required
-k, --api-key Steam Web API key; alternatively set STEAM_API_KEY $STEAM_API_KEY yes
--records Return full server records or addresses only; choices: full, addresses full no

Discovery plan files

Option Description Required
--plan-in Collect results using a saved Discovery plan no
--plan-out Save the generated Discovery plan; only applies when Discovery runs no

Discovery limits

Option Description Required
--max-requests Maximum Web API requests used by Discovery; 0 derives the budget from --limit no
--max-plan-queries Maximum query leaves in the plan; 0 derives the value from --limit no
--max-buffered-records Maximum sample records retained for split validation; 0 uses the default no
--max-depth Maximum recursive split depth; 0 uses the default no
--min-value-count Ignore split values with fewer sample records; 0 uses the default no

udp

Query server addresses through legacy master-server UDP

Query one or more legacy Steam master servers. Results are deduplicated across masters; collection stops when the servers are exhausted, --limit is reached, or --max-pages stops a master.

Usage: smsq [OPTIONS] udp [udp-OPTIONS]

Examples

Query a legacy master server

smsq udp --app-id 10 --master master.example.net:27011 --limit 1000

Combine include and exclude filters

smsq udp --app-id 10 --master master.example.net:27011 --filter map=de_dust2 --nor password=1

Pass a raw filter expression without CLI validation

smsq udp --app-id 10 --master master.example.net:27011 --raw-filter '\map\de_dust2'

Query server addresses through legacy master-server UDP

Option Description Default Required
--master Steam master server address (host:port) yes
--io-timeout Timeout for each UDP request 1s no
--max-pages Maximum pages to read from each master; 0 means no page cap no
--region Legacy geographic region code (0-255; 255 requests all regions) 0 no

Filter keys

Use these keys with --filter, --nor, and --nand. Filter behavior may vary by protocol and game.

Flag filters

Binary flag operands accept 0/1, true/false, yes/no, or y/n.

  • dedicated=1: Dedicated servers; 0 selects non-dedicated servers
  • empty=1: Servers with players; 0 selects servers with no players
  • full=1: Servers below capacity; 0 selects full servers
  • linux=1: Linux servers; 0 selects non-Linux servers
  • noplayers=1: Servers with zero players; 0 selects servers with players
  • notfull=1: Select servers below reported capacity; Steam ignores the operand
  • password=1: Password-protected servers; 0 selects servers without a password
  • proxy=1: Proxy servers; 0 selects non-proxy servers
  • secure=1: VAC-protected servers; 0 selects servers without VAC protection
  • white=1: Servers with whitelist enabled; 0 selects servers with it disabled

Value filters

  • gameaddr=192.0.2.1:27015: Match this exact game address
  • gamedata=tag1: Match a hidden game-data tag
  • gamedir=cstrike: Match the game's directory identifier
  • gametype=battleye: Match a server tag (sv_tags)
  • map=de_dust2: Match the server's map name
  • name_match=*server*: Match the server name using wildcards
  • napp=10: Exclude this Steam application ID
  • version_match=1.3.*: Match the game version using wildcards

SEE ALSO

  • https://github.com/WoozyMasta/smsq