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.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.
Set up environment variables
Store your base URL and API key as environment variables so you never hardcode credentials into your code.
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.Understand the response
Every list endpoint returns three top-level fields:
items— the records you asked for, one object per provider resultmeta— response context: the currency you requested, your filter parameters, and which providers actually returned datapagination— total record count and paging state (limit,offset,has_next,has_prev)
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.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.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.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.
| Status | Code | What it means |
|---|---|---|
401 | AUTH_INVALID_API_KEY | Your Authorization: Bearer header is missing, malformed, or the key has been revoked. Check the header format and regenerate your key if needed. |
429 | RATE_LIMIT_EXCEEDED | You’re sending requests faster than your plan allows. Back off and respect the Retry-After response header before retrying. |
429 | RATE_LIMIT_MONTHLY_QUOTA_EXCEEDED | You’ve exhausted your plan’s monthly request quota. Upgrade your plan or wait for the quota to reset. |
503 | PRICES_INDEX_UNAVAILABLE or BIDS_INDEX_UNAVAILABLE | A data index is temporarily unavailable due to a refresh cycle or upstream issue. Retry with exponential backoff — this resolves quickly. |
422 | VALIDATION_ERROR | One 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. |
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.