API Documentation
Access CS2 server data programmatically with our comprehensive REST API. Get server lists, detailed information, filters, and location data.
Getting Started
The CS2Browser.net API provides access to comprehensive CS2 server data including:
- Real-time server information and player counts
- Advanced filtering by location, gamemode, ping, and more
- Historical player count data and statistics
- Geographical location data for ping calculations
Base URL
https://cs2browser.netAdvanced Search Features
Multi-tag Search
Use commas to require ALL terms:
surf,beginnerNOT Operator
Use ! to exclude servers:
surf,!combatRegex Support
Full regex patterns supported:
^Community.*Server$IP Filtering
Search by IP ranges:
192.168.0.1API Endpoints
/api/locationGet client location information
Description
Returns the geographical location data based on the client's IP address. Used for calculating ping estimates and regional filtering.
Responses
{
"lat": 40.7128,
"lon": -74.006
}{
"error": "Method not allowed"
}/api/filtersGet available filter options
Description
Returns all available continents, countries, maps, and game versions that can be used for filtering servers. Each option includes the number of servers available.
Responses
{
"continents": {
"eu": "Europe (1245)",
"na": "North America (892)",
"as": "Asia (654)"
},
"countries": {
"us": {
"name": "United States (456)",
"continent": "na",
"count": 456
},
"de": {
"name": "Germany (234)",
"continent": "eu",
"count": 234
}
},
"maps": {
"de_dust2": "de_dust2 (123)",
"de_mirage": "de_mirage (98)"
},
"versions": {
"1.38.6.8": "1.38.6.8 (5432)",
"1.38.6.7": "1.38.6.7 (234)"
}
}{
"error": "Method not allowed"
}/api/serversGet server list with filtering and pagination
Description
Returns a paginated list of CS2 servers with comprehensive filtering options. Supports gamemode filtering, geographical filtering, ping filtering, player count filtering, and text search. The pages are having 50 items.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | number | No | Page number for pagination (0-based) Example: 0 |
gamemode | query | string | No | Filter by specific gamemode slug. Available slugs: zombie-escape, surf, bunnyhop, kz, deathmatch, retake, public, awp, aim, jailbreak, zombiemod, pistol-retake, arena, prophunt, scoutzknivez, ttt, minigames, 1v1, gungame, 5v5, combat-surf, hns, only-knife, deathrun, football, warcraft, maniac, duels, fight-yard, execute Example: surf |
server_name | query | string | No | Search in server name, tags, or IP. Supports regex, comma-separated AND search, and NOT operator (!) Example: surf,!combat |
show_continents | query | string | No | Comma-separated list of continents to include Example: eu,na |
hide_continents | query | string | No | Comma-separated list of continents to exclude Example: as,af |
show_countries | query | string | No | Comma-separated list of country codes to include Example: us,de,gb |
hide_countries | query | string | No | Comma-separated list of country codes to exclude Example: cn,ru |
show_maps | query | string | No | Comma-separated list of map names to include Example: de_dust2,de_mirage |
hide_maps | query | string | No | Comma-separated list of map names to exclude Example: de_aztec |
show_versions | query | string | No | Comma-separated list of game versions to include Example: 1.38.6.8,1.38.6.7 |
hide_versions | query | string | No | Comma-separated list of game versions to exclude Example: 1.38.6.5 |
show_pings | query | string | No | Comma-separated list of ping thresholds to include (≤ value) Example: 50,100 |
hide_pings | query | string | No | Comma-separated list of ping thresholds to exclude (> value) Example: 150 |
hide_empty_servers | query | boolean | No | Hide servers with 0 players Example: 1 |
show_full_servers | query | boolean | No | Include servers at max capacity Example: 1 |
servers | query | string | No | Comma-separated list of specific server IDs to retrieve Example: 123,456,789 |
player_sort | query | string | No | Sort by player count Example: desc |
ping_sort | query | string | No | Sort by ping Example: asc |
pagePage number for pagination (0-based)
0gamemodeFilter by specific gamemode slug. Available slugs: zombie-escape, surf, bunnyhop, kz, deathmatch, retake, public, awp, aim, jailbreak, zombiemod, pistol-retake, arena, prophunt, scoutzknivez, ttt, minigames, 1v1, gungame, 5v5, combat-surf, hns, only-knife, deathrun, football, warcraft, maniac, duels, fight-yard, execute
surfserver_nameSearch in server name, tags, or IP. Supports regex, comma-separated AND search, and NOT operator (!)
surf,!combatshow_continentsComma-separated list of continents to include
eu,nahide_continentsComma-separated list of continents to exclude
as,afshow_countriesComma-separated list of country codes to include
us,de,gbhide_countriesComma-separated list of country codes to exclude
cn,rushow_mapsComma-separated list of map names to include
de_dust2,de_miragehide_mapsComma-separated list of map names to exclude
de_aztecshow_versionsComma-separated list of game versions to include
1.38.6.8,1.38.6.7hide_versionsComma-separated list of game versions to exclude
1.38.6.5show_pingsComma-separated list of ping thresholds to include (≤ value)
50,100hide_pingsComma-separated list of ping thresholds to exclude (> value)
150hide_empty_serversHide servers with 0 players
1show_full_serversInclude servers at max capacity
1serversComma-separated list of specific server IDs to retrieve
123,456,789player_sortSort by player count
descping_sortSort by ping
ascpagePage number for pagination (0-based)
0gamemodeFilter by specific gamemode slug. Available slugs: zombie-escape, surf, bunnyhop, kz, deathmatch, retake, public, awp, aim, jailbreak, zombiemod, pistol-retake, arena, prophunt, scoutzknivez, ttt, minigames, 1v1, gungame, 5v5, combat-surf, hns, only-knife, deathrun, football, warcraft, maniac, duels, fight-yard, execute
surfserver_nameSearch in server name, tags, or IP. Supports regex, comma-separated AND search, and NOT operator (!)
surf,!combatshow_continentsComma-separated list of continents to include
eu,nahide_continentsComma-separated list of continents to exclude
as,afshow_countriesComma-separated list of country codes to include
us,de,gbhide_countriesComma-separated list of country codes to exclude
cn,rushow_mapsComma-separated list of map names to include
de_dust2,de_miragehide_mapsComma-separated list of map names to exclude
de_aztecshow_versionsComma-separated list of game versions to include
1.38.6.8,1.38.6.7hide_versionsComma-separated list of game versions to exclude
1.38.6.5show_pingsComma-separated list of ping thresholds to include (≤ value)
50,100hide_pingsComma-separated list of ping thresholds to exclude (> value)
150hide_empty_serversHide servers with 0 players
1show_full_serversInclude servers at max capacity
1serversComma-separated list of specific server IDs to retrieve
123,456,789player_sortSort by player count
descping_sortSort by ping
ascResponses
{
"servers": [
{
"server_id": 123,
"hostname": "Example Surf Server",
"address": "192.168.1.1:27015",
"map": "surf_mesa",
"players_count": 24,
"max_players": 32,
"bots_count": 0,
"secure": true,
"version": "1.38.6.8",
"tags": "surf,beginner",
"country": "us",
"lat": 40.7128,
"lon": -74.006,
"real_players": 24
}
],
"total_count": 1542
}{
"error": "Method not allowed"
}/api/serverGet detailed server information
Description
Returns detailed information about a specific server including current players and player count history.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
server_id | query | number | Yes | Unique server identifier Example: 123 |
mode | query | string | No | Histogram time range: 1 (24h), 2 (7d), 3 (30d) Example: 1 |
server_idUnique server identifier
123modeHistogram time range: 1 (24h), 2 (7d), 3 (30d)
1server_idUnique server identifier
123modeHistogram time range: 1 (24h), 2 (7d), 3 (30d)
1Responses
{
"server_info": {
"server_id": 123,
"hostname": "Example Surf Server",
"address": "192.168.1.1:27015",
"map": "surf_mesa",
"players_count": 24,
"max_players": 32,
"bots_count": 0,
"secure": true,
"version": "1.38.6.8",
"tags": "surf,beginner",
"country": "us",
"lat": 40.7128,
"lon": -74.006
},
"players": [
{
"Name": "PlayerName",
"Score": 1500,
"Duration": 3600
}
],
"player_histogram": {
"2024-01-01 10:00:00": 15,
"2024-01-01 11:00:00": 20,
"2024-01-01 12:00:00": 24
}
}{
"error": "Method not allowed"
}Need Help?
Have questions about the API? Contact us for support.