The official Go client library for the SteamAnalyst CS2 Pricing API. Retrieve real-time and aggregated CS2 skin prices from 25+ marketplaces with a single API call.
SteamAnalyst is the leading price aggregation platform for Counter-Strike 2 skins. It continuously tracks prices across every major CS2 marketplace and computes fair market values used by traders, investors, and developers worldwide.
- Browse CS2 skins and knives on SteamAnalyst
- Track market trends across all CS2 items
- Compare prices across marketplaces including Buff, Skinport, DMarket, and more
- Learn more about SteamAnalyst
Sign up and generate an API key on the SteamAnalyst API page. Three tiers are available:
| Tier | Endpoints | Rate Limit |
|---|---|---|
| Hobby (free) | GET /v1/prices |
30 req/min, 100 req/day |
| Lite | GET /v1/prices + GET /v1/prices/all |
60 req/min |
| Paid | All endpoints (v1, v2, v3) | 300 req/min |
Full details on the SteamAnalyst API info page.
go get github.com/steamanalyst/gopackage main
import (
"fmt"
"log"
steamanalyst "github.com/steamanalyst/go"
)
func main() {
client := steamanalyst.New("sa_live_your_api_key_here")
price, err := client.GetPrice("AK-47 | Redline (Field-Tested)")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s: $%.2f\n", price.MarketName, price.Price)
}Full API documentation is available at api.steamanalyst.com/docs.
Creates a new SteamAnalyst API client. Requires an API key from steamanalyst.com/api-info.
// Default configuration
client := steamanalyst.New("sa_live_xxx")
// With custom base URL
client := steamanalyst.New("sa_live_xxx", steamanalyst.WithBaseURL("https://custom.endpoint.com"))
// With custom HTTP client
client := steamanalyst.New("sa_live_xxx", steamanalyst.WithHTTPClient(&http.Client{
Timeout: 60 * time.Second,
}))GET /v1/prices?market_name=NAME — Tier: Hobby, Lite, Paid
Returns the SteamAnalyst aggregated price for a single CS2 item.
price, err := client.GetPrice("AWP | Dragon Lore (Factory New)")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s: $%.2f\n", price.MarketName, price.Price)
// AWP | Dragon Lore (Factory New): $12450.00GET /v1/prices/all — Tier: Lite, Paid
Returns prices for every CS2 item tracked by SteamAnalyst.
items, err := client.GetAllPrices()
if err != nil {
log.Fatal(err)
}
fmt.Printf("Loaded %d items\n", len(items))
for _, item := range items[:5] {
fmt.Printf(" %s: $%.2f\n", item.MarketName, item.AvgPrice7DaysRaw)
}GET /v2/:game — Tier: Paid
Returns the full pricing dataset for a specific game. Supported games: csgo, dota2.
data, err := client.GetGamePrices("csgo")
if err != nil {
log.Fatal(err)
}
// Unmarshal into your own type
var prices map[string]interface{}
json.Unmarshal(data, &prices)GET /v3/markets — Tier: Paid
Returns per-item prices across all tracked marketplaces. Each item includes the lowest listed price on every marketplace — Buff, Skinbaron, DMarket, CSFloat, and 20+ others.
markets, err := client.GetMarketPrices()
if err != nil {
log.Fatal(err)
}
item := markets.MarketsPrices["AK-47 | Redline (Field-Tested)"]
for marketplace, price := range item {
if price != nil {
fmt.Printf(" %s: $%.2f\n", marketplace, *price)
}
}Look up the current SteamAnalyst price for any CS2 skin:
package main
import (
"fmt"
"log"
"os"
steamanalyst "github.com/steamanalyst/go"
)
func main() {
client := steamanalyst.New(os.Getenv("STEAMANALYST_API_KEY"))
skins := []string{
"AK-47 | Redline (Field-Tested)",
"AWP | Asiimov (Field-Tested)",
"M4A4 | Howl (Factory New)",
"Karambit | Doppler (Factory New)",
}
for _, skin := range skins {
price, err := client.GetPrice(skin)
if err != nil {
log.Printf("Error fetching %s: %v", skin, err)
continue
}
fmt.Printf("%-45s $%10.2f\n", price.MarketName, price.Price)
}
}Compare prices across all CS2 marketplaces to find the best deal:
package main
import (
"fmt"
"log"
"math"
"os"
steamanalyst "github.com/steamanalyst/go"
)
func main() {
client := steamanalyst.New(os.Getenv("STEAMANALYST_API_KEY"))
markets, err := client.GetMarketPrices()
if err != nil {
log.Fatal(err)
}
itemName := "AK-47 | Redline (Field-Tested)"
item, ok := markets.MarketsPrices[itemName]
if !ok {
log.Fatalf("Item not found: %s", itemName)
}
bestMarket := ""
bestPrice := math.MaxFloat64
for marketplace, price := range item {
if price != nil && *price > 0 && *price < bestPrice {
bestPrice = *price
bestMarket = marketplace
}
}
fmt.Printf("Cheapest listing for %s:\n", itemName)
fmt.Printf(" %s at $%.2f\n", bestMarket, bestPrice)
}The SDK returns typed errors for API failures:
price, err := client.GetPrice("Nonexistent Skin Name")
if err != nil {
var saErr *steamanalyst.SteamAnalystError
if errors.As(err, &saErr) {
switch saErr.Code {
case "ITEM_NOT_FOUND":
fmt.Println("Item does not exist")
case "RATE_LIMIT_EXCEEDED":
fmt.Println("Slow down — check rate limits at steamanalyst.com/api-info")
case "INSUFFICIENT_TIER":
fmt.Println("Upgrade your API key at steamanalyst.com/api-info")
default:
fmt.Printf("API error: %s\n", saErr.Message)
}
} else {
fmt.Printf("Network error: %v\n", err)
}
}Rate limits depend on your API tier. The API returns rate limit headers with every response:
| Header | Description |
|---|---|
X-RateLimit-Limit |
Maximum requests per window |
X-RateLimit-Remaining |
Requests remaining in current window |
X-RateLimit-Reset |
Unix timestamp when the window resets |
| Tier | Per-Minute Limit | Daily Limit |
|---|---|---|
| Hobby (free) | 30 | 100 |
| Lite | 60 | Unlimited |
| Paid | 300 | Unlimited |
Manage your API key and view current usage at steamanalyst.com/api-info.
| Code | HTTP | Description |
|---|---|---|
MISSING_AUTH |
401 | No API key provided |
INVALID_KEY |
401 | API key is invalid or revoked |
INSUFFICIENT_TIER |
403 | Endpoint requires a higher tier |
ITEM_NOT_FOUND |
404 | Item market name not found |
RATE_LIMIT_EXCEEDED |
429 | Too many requests |
DAILY_LIMIT_EXCEEDED |
429 | Daily request quota exceeded (hobby tier) |
DATA_UNAVAILABLE |
503 | Price data temporarily unavailable |
- Go 1.21 or later
- A SteamAnalyst API key — get one here
- Zero external dependencies (stdlib only)
- SteamAnalyst — CS2 skin price aggregation and analytics
- API Documentation — Full endpoint reference and schemas
- Get an API Key — Sign up and manage your API access
- Supported Marketplaces — All tracked CS2 marketplaces
- Browse CS2 Skins — Explore knives, gloves, and more
- Market Trends — Track CS2 skin price movements
- About SteamAnalyst — Our mission and team
Built and maintained by SteamAnalyst. Licensed under the MIT License.