Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cs2cap.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through everything you need to make a live CS2 item price request against the CS2Cap API. You’ll set up your credentials, send a request, read the response, and know how to handle the most common errors — all before you write a single line of production code.
1

Set up environment variables

Store your base URL and API key as environment variables so you never hardcode credentials into your code.
export CS2C_API_BASE="https://api.cs2c.app/v1"
export CS2C_API_KEY="your_api_key_here"
Generate your API key from the Account page at cs2cap.com after verifying your email address.
2

Make your first request

Query the /prices endpoint for an AK-47 | Redline (Field-Tested) across the Steam marketplace. This is the fastest way to confirm your key is working and to see what a real response looks like.
curl -sS \
  -H "Authorization: Bearer $CS2C_API_KEY" \
  "$CS2C_API_BASE/prices?market_hash_name=AK-47%20%7C%20Redline%20(Field-Tested)&providers=steam&currency=USD"
3

Understand the response

Every list endpoint returns three top-level fields:
  • items — the records you asked for, one object per provider result
  • meta — response context: the currency you requested, your filter parameters, and which providers actually returned data
  • pagination — total record count and paging state (limit, offset, has_next, has_prev)
{
  "meta": {
    "currency": "USD",
    "filters": {
      "market_hash_name": "★ Falchion Knife | Doppler (Minimal Wear)",
      "phase": "Phase 1",
      "requested_providers": [
        "steam",
        "marketcsgo"
      ]
    },
    "returned_providers": [
      "marketcsgo"
    ]
  },
  "items": [
    {
      "provider": "marketcsgo",
      "item_id": 3739,
      "market_hash_name": "★ Falchion Knife | Doppler (Minimal Wear)",
      "phase": "Phase 1",
      "lowest_ask": 58915,
      "quantity": 1,
      "link": "https://cs2c.app/r/marketcsgo/3739",
      "url": "https://market.csgo.com/...",
      "timestamp": "2026-03-18T16:14:41.493719Z",
      "last_updated": "2026-03-18T16:54:58.782196Z"
    }
  ],
  "pagination": {
    "limit": 1000,
    "offset": 0,
    "total": 2,
    "has_next": false,
    "has_prev": false
  }
}
All price fields use minor units (integer cents). A lowest_ask of 2550 with currency: USD means $25.50. Divide by 100 to convert to the major unit for any two-decimal currency.
4

Common next requests

Once you have a working /prices call, these four requests cover the most frequent follow-up queries. The item_id lookup is a good second step — it gives you the stable numeric ID you can reuse across endpoints without URL-encoding the full item name each time.
# Resolve a market_hash_name to its stable item_id
curl -sS -H "Authorization: Bearer $CS2C_API_KEY" \
  "$CS2C_API_BASE/items?market_hash_name=AK-47%20%7C%20Redline%20(Field-Tested)&limit=1"
Buy orders require Starter or higher. Sales and raw history require Pro or higher. If your tier does not include an endpoint, the request returns 403 until you upgrade. See Pricing & Plans for a full endpoint-by-tier breakdown.
5

Handle common failures

The table below covers the errors you’re most likely to encounter while integrating. Treat these as your first-line debugging checklist before opening a support ticket.
StatusCodeWhat it means
401AUTH_INVALID_API_KEYYour Authorization: Bearer header is missing, malformed, or the key has been revoked. Check the header format and regenerate your key if needed.
429RATE_LIMIT_EXCEEDEDYou’re sending requests faster than your plan allows. Back off and respect the Retry-After response header before retrying.
429RATE_LIMIT_MONTHLY_QUOTA_EXCEEDEDYou’ve exhausted your plan’s monthly request quota. Upgrade your plan or wait for the quota to reset.
503PRICES_INDEX_UNAVAILABLE or BIDS_INDEX_UNAVAILABLEA data index is temporarily unavailable due to a refresh cycle or upstream issue. Retry with exponential backoff — this resolves quickly.
422VALIDATION_ERROROne or more query parameters are missing, have the wrong type, or contain an invalid value. Check the response body for a details field that identifies the offending parameter.
Do not retry 401 or 422 errors without first fixing the underlying issue — they will not self-resolve. Only 503 and 429 errors are safe to retry automatically.

Next steps

Authentication

Learn how API keys work, how to rotate them, and how to use sub-keys to scope access per application.

Core concepts

Understand providers, minor units, pagination, and the data model before you build.

API reference

Browse every endpoint: prices, bids, sales, analytics, portfolio, and account management.

Pricing & plans

Compare Free, Starter, Pro, and Quant tiers by endpoint access, rate limits, and monthly quotas.
Last modified on May 23, 2026