JSPM

steamanalyst

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q65234F
  • License MIT

Official JavaScript/TypeScript client for the SteamAnalyst CS2 Pricing API — real-time Counter-Strike 2 skin prices from 30+ marketplaces

Package Exports

  • steamanalyst

Readme

SteamAnalyst JavaScript SDK

The official JavaScript/TypeScript client for the SteamAnalyst CS2 Pricing API.

Get real-time Counter-Strike 2 skin prices aggregated from 30+ marketplaces — including Buff, CSFloat, DMarket, SkinBaron, CS.Money, and more.

npm version License: MIT


About SteamAnalyst

SteamAnalyst is the leading price aggregator for CS2 skins, trusted by over 1 million monthly users since 2013. Unlike the Steam Market API, SteamAnalyst provides accurate, manipulation-resistant pricing by aggregating real transaction data from 30+ skin marketplaces.

Learn more about our methodology


Getting Started

1. Get Your API Key

Sign up for a free or paid API key at steamanalyst.com/api-info.

Plan Requests Best For
Hobby (Free) 100/day Personal projects, testing
Pro Custom Trading bots, commercial apps

2. Install

npm install steamanalyst

3. Use

import SteamAnalyst from "steamanalyst";

const client = new SteamAnalyst("your_api_key");

// Get a single item price
const item = await client.getPrice("AK-47 | Redline (Field-Tested)");
console.log(item.price); // 25.50

API Reference

Full API documentation is available at api.steamanalyst.com/docs.

getPrice(marketName)

Get the current price for a single CS2 item.

const item = await client.getPrice("AWP | Dragon Lore (Factory New)");
// { market_name: "AWP | Dragon Lore (Factory New)", price: 12500.00 }

getAllPrices()

Get prices for every CS2 item in a single request. Requires a paid API key.

const items = await client.getAllPrices();
console.log(`Loaded ${items.length} items`);

getGamePrices(marketName?)

Get CS2 item data from the v2 endpoint. Pass an optional marketName for a single item.

// All items
const all = await client.getGamePrices();

// Single item
const knife = await client.getGamePrices("Karambit | Fade (Factory New)");

getMarketPrices()

Compare prices across 30+ skin marketplaces — find the best deals instantly. Requires a paid API key.

const data = await client.getMarketPrices();

const redline = data.markets_prices["AK-47 | Redline (Field-Tested)"];
console.log(`Buff: $${redline.buff}`);
console.log(`CSFloat: $${redline.float}`);
console.log(`DMarket: $${redline.dmarket}`);

Supported marketplaces include: Buff, CSFloat, DMarket, SkinBaron, CS.Money, BitSkins, Tradeit, Waxpeer, ShadowPay, LootFarm, SkinFlow, and many more.


Examples

Price Checker

import SteamAnalyst from "steamanalyst";

const client = new SteamAnalyst("your_api_key");

const items = [
  "AK-47 | Redline (Field-Tested)",
  "AWP | Asiimov (Field-Tested)",
  "M4A4 | Howl (Factory New)",
];

for (const name of items) {
  const { price } = await client.getPrice(name);
  console.log(`${name}: $${price}`);
}

Find the Cheapest Marketplace

import SteamAnalyst from "steamanalyst";

const client = new SteamAnalyst("your_api_key");
const data = await client.getMarketPrices();

const item = "AK-47 | Redline (Field-Tested)";
const prices = data.markets_prices[item];

const cheapest = Object.entries(prices)
  .filter(([, price]) => price > 0)
  .sort(([, a], [, b]) => a - b)[0];

console.log(`Cheapest for ${item}: ${cheapest[0]} at $${cheapest[1]}`);

Error Handling

import SteamAnalyst, { SteamAnalystError } from "steamanalyst";

const client = new SteamAnalyst("your_api_key");

try {
  const item = await client.getPrice("Nonexistent Skin");
} catch (error) {
  if (error instanceof SteamAnalystError) {
    console.error(`API Error [${error.code}]: ${error.message}`);
    // API Error [ITEM_NOT_FOUND]: Item not found
  }
}

Rate Limits

Rate limits depend on your API plan:

Plan Rate Limit Daily Limit
Hobby (Free) 30 req/min 100 req/day
Pro 300 req/min Unlimited

Rate limit info is returned in response headers (X-RateLimit-Remaining). The SDK throws a SteamAnalystError with code RATE_LIMIT_EXCEEDED when you hit the limit.


Requirements

  • Node.js 18+ (uses native fetch)
  • Zero dependencies

TypeScript

Full TypeScript support is included out of the box. All methods return typed responses.

import SteamAnalyst, { PriceData, MarketsPriceData, SteamAnalystError } from "steamanalyst";


License

MIT - see LICENSE

Built and maintained by SteamAnalyst — tracking CS2 skin prices since 2013.