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
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
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
Paste the function
Replace the contents of Code.gs with this and save. The optional second argument limits the lookup to one marketplace.
Code.gsjsfunction 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
Use it in a cell
Lowest price across all marketplaces, or only on one market.
Sheet1text=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.