Get started

Your first request

Get your API key, request the sell-listing prices of one CS2 item, and confirm that the request succeeded.

In this tutorial, you get the sell-listing prices of one CS2 item. You need a terminal with curl. No SDK is required.

1. Copy your API key

  1. Sign in at cs.cheap and open the dashboard.
  2. In Settings, add a real email address if needed, and verify it using the email link.
  3. Open the overview or the API key section in Settings, reveal the key, and copy it. The first key is issued automatically for an eligible account.
  4. In Billing, check that you have credits or an active subscription.

Without an active subscription, a successful single-item request normally costs one credit. A wallet top-up alone does not buy credits. See Request costs.

2. Send the request

Run this command in Bash or a compatible shell on your computer or server. Replace replace-with-your-key with the key you copied. Keep the key out of browser code and public repositories.

export CSCHEAP_API_KEY='replace-with-your-key'
curl --get 'https://api.cs.cheap/prices' \
  --header "Authorization: Bearer $CSCHEAP_API_KEY" \
  --data-urlencode 'app_id=730' \
  --data-urlencode 'market_hash_name=AK-47 | Redline (Field-Tested)' \
  --data-urlencode 'side=ask' \
  --write-out '\nHTTP %{http_code}\n'

The command uses these values:

  • app_id=730 selects CS2.
  • market_hash_name is the exact English item name, including its wear condition.
  • side=ask selects sell listings.
  • The base URL is https://api.cs.cheap, with no /v1 prefix.

3. Check the response

The request succeeded when the output ends with HTTP 200. curl adds that line. It is not part of the JSON.

The JSON contains two parts:

  • data.markets is an array of quotes.
  • meta.request_id identifies your request.

Values and available markets depend on the data at request time.

Fix common failures

What you seeWhat to do
200 with an empty markets arrayRemove the side filter and try again. The item may have no sell-listing quotes.
401Copy the current key again. A newly issued key can take time to reach the API.
402Check your credits and the current subscription period in Billing.
404Check the exact item name and the game. This item has no price rows.
422Check the parameter names and values against the command above.
429Wait for the duration in the Retry-After response header.

For other failures, see API errors. Keep meta.request_id when you ask for help. Never share your key.

Next steps