npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cs2-api

v1.0.0

Published

CS2 API client: Counter-Strike 2 live scores, match results, player stats, teams, rankings (world + VRS), events and skin prices. Zero dependencies, TypeScript types.

Readme

cs2-api: Counter-Strike 2 API client for JavaScript and Python

npm PyPI license

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

Install

npm install cs2-api
pip install cs2-api

JavaScript / TypeScript

import { 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");

Python

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")

Methods

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.

Use cases

Keep your key safe

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.

Links

  • 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.