CODSERVERS.NET

Read-only JSON API

Build with live classic Call of Duty server data.

The CoDServers.net API exposes the same live masterlist used by the website for CoD1, United Offensive, CoD2 and CoD4. It is versioned, CORS-enabled and safe to call from browser apps.

Base URL

Endpoints

Query Parameters

Server list endpoints support filters and pagination.

ParameterExampleDescription
search?search=promodSearch hostname, map, IP, country, gametype, mod, version and player names.
country?country=deFilter by two-letter country code.
gametype?gametype=sdFilter by game mode.
version?version=1.3Filter by version prefix.
populated?populated=1Only return servers with players.
empty?empty=1Only return empty servers.
passworded?passworded=0Use 1 for locked servers or 0 for open servers.
modded?modded=1Only return servers with a mod or fs_game value.
sort?sort=playersSort by players, hostname, map, country, response_time or last_updated.
order?order=ascSort direction.
limit / offset?limit=50&offset=50Paginate large result sets.

Examples

js
const res = await fetch('https://api.codservers.net/v1/servers/cod2?populated=1');
const json = await res.json();
console.log(json.data);
py
import requests

res = requests.get('https://api.codservers.net/v1/servers/cod2?populated=1')
data = res.json()
print(data['data'])
sh
curl https://api.codservers.net/v1/summary

Response Shape

Successful responses use {"success":true,"data":...}. Errors use a structured code and message.

json
{
  "success": false,
  "error": {
    "code": "server_not_found",
    "message": "Server was not found."
  }
}

CORS is enabled with Access-Control-Allow-Origin: *. The default rate limit is 120 requests per minute per client IP. Cache headers are intentionally short because server data refreshes frequently.

Use Terms

Please cache responsibly, link back to CoDServers.net when possible, and avoid aggressive scraping. The API is free and read-only, and it does not require authentication for public use.