Steam Query Protocol (A2S)
If you've ever wondered how Steam knows your game server exists, how the server browser populates, or why your server sometimes doesn't show up — the answer is the Steam Server Query Protocol, commonly called A2S.
This guide explains what A2S is, how it works, which games use it, and how to troubleshoot common issues.
What is the Steam Query Protocol?
The Steam Query Protocol is a UDP-based protocol that allows clients (like the Steam server browser, or tools like python-a2s) to request information from a game server. Valve originally designed it for Source Engine games (Counter-Strike, Team Fortress 2, Half-Life), but it's now used by most games with Steam multiplayer.
When you open the Steam server browser and see a list of servers with player counts, map names, and ping times — that data comes from A2S queries.
The Three Main Query Types
| Query | Request | Response | Purpose |
|---|---|---|---|
| A2S_INFO | \xFF\xFF\xFF\xFF\x54 | Server name, map, players, max players, game, OS | Basic server information |
| A2S_PLAYER | \xFF\xFF\xFF\xFF\x55 | Player names, scores, play time | Who's currently playing |
| A2S_RULES | \xFF\xFF\xFF\xFF\x56 | Server configuration key-value pairs | Server settings (cvars) |
All three use UDP and follow a challenge-response pattern to prevent spoofing.
How A2S Works
┌──────────┐ ┌──────────────┐
│ Client │ │ Game Server │