CS2 skin prices in Google Sheets

Track your CS2 inventory in a spreadsheet with live prices. This Apps Script adds a =SKINPRICE(name, market) formula backed by the Skinstrack API, with a 30 minute cache so your quota lasts.

Stack
Google Sheets, Apps Script
Plan
Paid (Standard and up)
Data
34+ marketplaces, refreshed ~15 min
  1. 1

    Get a Skinstrack API key

    Sign in with Steam on skinstrack.com and create a key. Every distinct cell lookup is one request, so a Standard plan (5,000 requests a month) suits a typical inventory sheet.

  2. 2

    Store the key in Script Properties

    In your sheet open Extensions, then Apps Script. Under Project Settings, add a script property named SKINSTRACK_API_KEY. Keeping it there means it never sits in the sheet itself.

  3. 3

    Paste the function

    Replace the contents of Code.gs with this and save. The optional second argument limits the lookup to one marketplace.

    Code.gs
    js
    function SKINPRICE(name, market) {
      if (!name) return "";
      const cache = CacheService.getScriptCache();
      const cacheKey = "skinprice:" + name + ":" + (market || "");
      const cached = cache.get(cacheKey);
      if (cached) return Number(cached);
    
      const key = PropertiesService.getScriptProperties().getProperty("SKINSTRACK_API_KEY");
      const response = UrlFetchApp.fetch(
        "https://api.skinstrack.com/v2/paid/item/" + encodeURIComponent(name),
        { headers: { "X-API-KEY": key }, muteHttpExceptions: true }
      );
      if (response.getResponseCode() !== 200) return "Error " + response.getResponseCode();
    
      const item = JSON.parse(response.getContentText());
      const prices = item.prices.filter((p) => !market || p.provider === market);
      if (prices.length === 0) return "No price";
    
      const lowest = Math.min(...prices.map((p) => p.price));
      cache.put(cacheKey, String(lowest), 1800);
      return lowest;
    }
  4. 4

    Use it in a cell

    Lowest price across all marketplaces, or only on one market.

    Sheet1
    text
    =SKINPRICE("AK-47 | Redline (Field-Tested)")
    =SKINPRICE(A2, "csfloat")

Ready to run it?

Get a Skinstrack API key in a minute. Free tier: 50 requests per month on Steam prices, no card required.

Get your API key

Frequently Asked Questions

CS2 skin prices, the Skinstrack API and the tools around it.

How do I get CS2 skin prices into Google Sheets?

Add a custom Apps Script function that calls the Skinstrack API, like the =SKINPRICE() example on this page. It returns the lowest live price across 34+ marketplaces.

Why does the function cache results?

Sheets recalculates often. The 30 minute cache stops every recalculation from spending an API request, and prices only refresh about every 15 minutes anyway.

Is there a no-code way to value my inventory?

Yes. The free Skinstrack inventory value checker at skinstrack.com/tools/inventory-value prices any public Steam inventory without a key.

More Skinstrack API examples

skinstrack.com

Want full price tracking, charts and alerts?

cs2skinsapi.com shows a quick price. Skinstrack is the full platform behind it, free to use, with everything a CS2 trader or developer needs.

  • Prices from 34+ marketplaces on every skin
  • Daily price history charts and market trends
  • Price alerts by email, Discord or Telegram
  • Portfolio and Steam inventory tracking
  • Free Chrome extension for Steam
  • Trade-up, case ROI and loadout tools