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.
| Parameter | Example | Description |
|---|---|---|
search | ?search=promod | Search hostname, map, IP, country, gametype, mod, version and player names. |
country | ?country=de | Filter by two-letter country code. |
gametype | ?gametype=sd | Filter by game mode. |
version | ?version=1.3 | Filter by version prefix. |
populated | ?populated=1 | Only return servers with players. |
empty | ?empty=1 | Only return empty servers. |
passworded | ?passworded=0 | Use 1 for locked servers or 0 for open servers. |
modded | ?modded=1 | Only return servers with a mod or fs_game value. |
sort | ?sort=players | Sort by players, hostname, map, country, response_time or last_updated. |
order | ?order=asc | Sort direction. |
limit / offset | ?limit=50&offset=50 | Paginate 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/summaryResponse 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.