This is the official client for the CS2 API at cs2-api.org. It covers:
- live Counter-Strike 2 match scores and round-level scoreboards
- match results, schedules and streams
- player stats (rating, ADR, KAST, K/D) and leaderboards
- teams, rosters and head-to-head
- the world ranking and Valve Regional Standings (VRS)
- events, standings and brackets
- transfers
- CS2 skin prices across 25+ marketplaces, with price history
It has zero dependencies. The JavaScript client ships TypeScript types and works as ESM or CommonJS; the Python client needs only the standard library.
You need a free API key (500 requests/month, no card): Get your key
npm install cs2-apipip install cs2-api-clientimport { CS2Api } from "cs2-api"; // or: const { CS2Api } = require("cs2-api")
const cs2 = new CS2Api(); // reads process.env.CITO_API_KEY
const live = await cs2.live(); // every match being played right now
for (const m of live) {
console.log(`${m.team1Name} ${m.team1Score}-${m.team2Score} ${m.team2Name} · ${m.currentMap}`);
}
const ranking = await cs2.worldRanking({ limit: 10 });
const vitality = await cs2.team("vitality"); // roster + recent results
const donk = await cs2.player("donk");
const prices = await cs2.skinPrices("ak-47-redline-field-tested-1ab1a2dc");from cs2_api import CS2Api
cs2 = CS2Api() # reads CITO_API_KEY
for m in cs2.live():
print(f"{m['team1Name']} {m['team1Score']}-{m['team2Score']} {m['team2Name']} · {m['currentMap']}")
ranking = cs2.world_ranking(limit=10)
vitality = cs2.team("vitality")
donk = cs2.player("donk")
prices = cs2.skin_prices("ak-47-redline-field-tested-1ab1a2dc")JavaScript uses camelCase and Python uses snake_case (worldRanking / world_ranking). Teams, players and events accept an id or a slug (vitality, donk).
| Area | Methods |
|---|---|
| Live | live(), liveScoreboard(matchId): sides, round, player K/D/ADR |
| Matches | upcoming(), results(), today(), match(id), matchMaps(id), matchPlayerStats(id), matchStreams(id) |
| Teams | team(slug), teamMatches(slug), teamStats(slug), teamMapStats(slug), headToHead(a, b) |
| Players | player(slug), searchPlayers(q), playerStats(slug), playerMatches(slug) |
| Events | events({ status }), event(slug), eventMatches(slug), eventStandings(slug), eventBracket(slug) |
| Rankings & stats | worldRanking(), vrsRanking(), leaderboard(metric), transfers(), search(q) |
| Skins | searchSkins(q), skin(slug), skinPrices(slug), skinHistory(slug), trendingSkins() |
| Anything else | get(path, query, { raw }): any of the 140+ endpoints, with meta for pagination when raw: true |
Errors throw CS2ApiError (JS) or raise CS2ApiError (Python), with status and the API's message.
- Discord bots: cs2-discord-bot
- Stream overlays: cs2-obs-overlay
- Skin trading tools: cs2-skin-price-api
- Moving off HLTV scrapers: hltv-api-alternative
- Fantasy, analytics dashboards, prediction models and AI agents
Keep it in an environment variable or .env (git-ignored). Call the API from your server, never from browser code. If a key leaks, revoke it in your dashboard and create a new one.
- CS2 API docs and endpoints: https://cs2-api.org/endpoints/
- Pricing: https://citoapi.com/pricing
- Issues: https://github.com/achillesscriptsvip/cs2-api/issues
Not affiliated with Valve, HLTV, ESL, BLAST or PGL. MIT licensed.