API Docs

Serverlist
 

The CS2D Server API provides free, real-time data about CS2D game servers, updating every 10 seconds. Easily integrate the latest server status and player stats into your apps or websites, with no rate limits for usage!

You can request information for one or multiple servers by specifying their addresses separated by commas.

https://dev.erpa.cc/api/139.99.135.16:36963

The following is an example response:

{
  "ip": "139.99.135.16",
  "port": 36963,
  "geoip": {
    "name": "Australia",
    "code": "AU",
    "flag": "🇦🇺"
  },
  "debug": {
    "sent": 25375,
    "recv": 22410,
    "sentBytes": 203000,
    "recvBytes": 2890486,
    "lastRequest": 1730943168928,
    "ping": 296
  },
  "ts": 1730943169,
  "password": false,
  "usgnonly": false,
  "fow": false,
  "friendlyfire": true,
  "bots": 5,
  "lua": true,
  "forcelight": false,
  "name": "[Q] cs2d.EU @ Oceania",
  "map": "de_dust2",
  "players": 7,
  "maxplayers": 32,
  "gamemode": 0,
  "recoil": false,
  "offscreendamage": true,
  "hasdownloads": true,
  "playerlist": [
    {
      "id": 1,
      "name": "-_-",
      "team": 2,
      "score": 1,
      "deaths": 0
    },
    {
      "id": 2,
      "name": "L0lz0r",
      "team": 1,
      "score": 1,
      "deaths": 0
    },
    {
      "id": 3,
      "name": "pwn3d",
      "team": 2,
      "score": 0,
      "deaths": 0
    },
    {
      "id": 5,
      "name": "USGN.de",
      "team": 1,
      "score": 0,
      "deaths": 1
    },
    {
      "id": 6,
      "name": "pwner0r",
      "team": 2,
      "score": 0,
      "deaths": 1
    },
    {
      "id": 7,
      "name": "charles.peiqiao.he",
      "team": 1,
      "score": 31,
      "deaths": 10
    },
    {
      "id": 8,
      "name": "a",
      "team": 0,
      "score": 6,
      "deaths": 12
    }
  ]
}

The parameters are defined as follows:

  • ip: The server's IP address.
  • port: The server's port number.
  • geoip:
    • name: Country name.
    • code: Country code.
    • flag: Emoji flag representation.
  • debug:
    • sent: Number of packets sent.
    • recv: Number of packets received.
    • sentBytes: Total bytes sent.
    • recvBytes: Total bytes received.
    • lastRequest: Timestamp of the last sent request.
    • ping: Current server ping in milliseconds.
  • ts: Timestamp of the last received request.
  • password: Indicates if the server requires a password (true/false).
  • usgnonly: Indicates if only U.S.G.N players are allowed (true/false).
  • fow: Indicates if the server has field of view restrictions (true/false).
  • friendlyfire: Indicates if friendly fire is enabled (true/false).
  • bots: Number of bots currently in the game.
  • lua: Indicates if Lua scripting is enabled (true/false).
  • forcelight: Indicates if forced lighting is enabled (true/false).
  • name: Name of the server.
  • map: Current map being played.
  • players: Number of players currently in the game.
  • maxplayers: Maximum number of players allowed on the server.
  • gamemode: Current game mode (0 for standard, etc.).
  • recoil: Indicates if recoil is enabled (true/false).
  • offscreendamage: Indicates if offscreen damage is enabled (true/false).
  • hasdownloads: Indicates if the server has downloadable content (true/false).
  • playerlist: An array of current players on the server, with each player containing:
    • id: Unique player identifier.
    • name: Player's name.
    • team: Team identifier (0 for spectators, 1/2 for teams).
    • score: Player's score.
    • deaths: Number of deaths.