API Documentation
Easily access real-time CS2D server data and upload leaderboard stats with our API:
- Completely free HTTP API
- Consistent JSON responses
- Unlimited usage — no rate limits
- Public access with CORS enabled (*)
Endpoint: Server Status
curl "https://cs2d.pp.ua/api/157.90.170.75:20001"
This endpoint lets you request info for multiple CS2D servers by providing their IPs and ports, separated by commas.
Endpoint: Upload Leaderboard
curl -4 -X POST "https://cs2d.pp.ua/api/upload" -F "file=@sys/stats/userstats.dat" -F "port=36963"
This endpoint uploads leaderboard and matches the server by sender IP, so use it from the same IP as the hosted server.
file
(required): Path to theuserstats.dat
fileport
(required): The port number of the serversort
(optional): Formula used to sort users [default: 1]
Note: The -4
flag forces curl
to use IPv4. This is useful if your server has both IPv4 and IPv6 but the API expects the IPv4 address to identify the server correctly.