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

skinstrack

v1.0.0

Published

Official TypeScript SDK for skinstrack.com CS2 Skins Price API

Readme

skinstrack

Official TypeScript SDK for the skinstrack.com CS2 Skins Price API.

Features

  • Full TypeScript support with comprehensive type definitions
  • Support for both API v1 and v2
  • Works in Node.js, browsers, and edge runtimes
  • Zero runtime dependencies
  • Tree-shakeable exports
  • Custom error classes for easy error handling

Installation

npm install skinstrack

Quick Start

V1 API (Core Pricing)

import { SkinstracksV1 } from 'skinstrack';

const client = new SkinstracksV1({ apiKey: 'your-api-key' });

// Get free Steam market prices (50 calls/month)
const freeItems = await client.getFreeItems();
console.log(`Found ${freeItems.items.length} items`);

// Get specific item details (paid)
const ak47 = await client.getItem('AK-47 | Redline (Field-Tested)');
console.log(`Price: $${ak47.prices[0]?.price}`);

V2 API (Full Features)

import { SkinstracksV2 } from 'skinstrack/v2';

const client = new SkinstracksV2({ apiKey: 'your-api-key' });

// Search for items
const results = await client.search('Dragon Lore');

// Get trending items
const trending = await client.getTrending({ period: '7d' });

// Create a price alert
await client.createAlert({
  item_slug: 'ak-47-redline-field-tested',
  price: 10.00,
  direction: 'below',
  notification_method: 'email',
});

// Get Steam inventory value
const inventory = await client.getSteamInventory('76561198000000000');
console.log(`Value: $${inventory.summary.estimatedValue}`);

API Reference

Client Configuration

interface ClientConfig {
  apiKey: string;        // Your skinstrack.com API key
  baseUrl?: string;      // Override API base URL (for testing)
  timeout?: number;      // Request timeout in ms (default: 30000)
  fetch?: typeof fetch;  // Custom fetch implementation
}

V1 Methods

| Method | Description | Auth | |--------|-------------|------| | getFreeItems() | Get Steam market prices (50 calls/month) | API Key | | getItem(itemName) | Get detailed item info and prices | Paid | | getItems(options?) | Get list of items with prices | Paid | | getMarketplaceIds() | Get cross-marketplace ID mappings | Paid | | getRedirectUrl(itemName, marketId) | Generate marketplace redirect URL | None | | getBuffRedirectUrl(itemName) | Generate Buff163 redirect URL | None |

V2 Methods (includes all V1 methods)

| Method | Description | Auth | |--------|-------------|------| | getStatus() | Check API status | None | | search(query) | Search items by name (up to 8 results) | API Key | | getSteamInventory(steamId, options?) | Get Steam inventory with prices | Paid | | getItem(itemName) | Get detailed information and prices for a specific item | | getItems(options?) | Get a list of items with their prices from specified providers | | getAlerts(options?) | List your price alerts | API Key | | createAlert(alert) | Create a price alert | API Key | | deleteAlert(alertId) | Delete a price alert | API Key | | getTrending(options?) | Get trending items | API Key | | getTraderInventory(options?) | Get saved inventory | API Key | | saveTraderInventory(inventory) | Save inventory (1/hour) | API Key | | fetchTraderInventory() | Import inventory from Steam (1/hour) | API Key |

Error Handling

import { 
  SkinstracksV1, 
  UnauthorizedError, 
  RateLimitError,
  NotFoundError 
} from 'skinstrack';

const client = new SkinstracksV1({ apiKey: 'your-api-key' });

try {
  await client.getItem('AK-47 | Redline (Field-Tested)');
} catch (error) {
  if (error instanceof UnauthorizedError) {
    console.error('Invalid API key');
  } else if (error instanceof RateLimitError) {
    console.error('Rate limit exceeded');
  } else if (error instanceof NotFoundError) {
    console.error('Item not found');
  } else {
    throw error;
  }
}

Error Classes

| Class | Status Code | Description | |-------|-------------|-------------| | UnauthorizedError | 401 | Missing or invalid API key | | RateLimitError | 429 | API call limit reached | | NotFoundError | 404 | Resource not found | | BadRequestError | 400 | Invalid request parameters | | ServerError | 5xx | Server error | | SkinstracksError | * | Base error class |

Examples

Get Items with Statistics

const items = await client.getItems({
  providers: 'csfloat,waxpeer,buff',
  avg: true,
  median: true,
});

for (const item of items) {
  console.log(`${item.market_hash_name}: $${item.prices[0]?.price}`);
  console.log(`  7d avg: $${item.average?.['7d']}`);
}

Filter by Specific Items

const items = await client.getItems({
  market_hash_names: 'AK-47 | Redline (Field-Tested),AWP | Dragon Lore (Factory New)',
  providers: 'csfloat',
});

Get Trending with Filters (V2)

const trending = await client.getTrending({
  period: '7d',
  price_min: 10,
  price_max: 500,
  liquidity: 50,
});

console.log('Trending up:');
for (const item of trending.trending_up.data.slice(0, 5)) {
  console.log(`  ${item.market_hash_name}: +${item.price_change}%`);
}

Manage Price Alerts (V2)

// Create alert
const alert = await client.createAlert({
  item_slug: 'ak-47-redline-field-tested',
  price: 10.00,
  direction: 'below',
  notification_method: 'discord',
  note: 'Buy signal',
  provider: 'csfloat',
});

console.log(`Alert created: ID ${alert.data.id}`);

// List alerts
const alerts = await client.getAlerts({ page: 1, limit: 10 });
console.log(`You have ${alerts.total} active alerts`);

// Delete alert
await client.deleteAlert(alert.data.id);

V1 vs V2 Comparison

| Feature | V1 | V2 | |---------|----|----| | Free items | Yes | Yes | | Item details | Yes | Yes (extended) | | Items list | Yes | Yes (+ price changes) | | Marketplace IDs | Yes | Yes | | Redirects | Yes | Yes | | Search | No | Yes | | Steam Inventory | No | Yes | | Price Alerts | No | Yes | | Trending | No | Yes | | Trader Inventory | No | Yes |

TypeScript

All types are exported for your convenience:

import type { 
  ItemDetail, 
  Price, 
  TrendingItem,
  CreateAlertRequest 
} from 'skinstrack';

License

MIT

Links