Common tasks

Batch price queries

Query up to 1000 items in one request, match the results to your input, and page through every priced item of a game.

Use POST /prices/batch when you track a list of items, or when you need to page through every priced item of a game.

Before you begin, complete Your first request. The command below uses the CSCHEAP_API_KEY environment variable set there. Check Request costs before you run repeated requests.

Submit a batch

Send 1 to 1000 names in market_hash_names.

curl 'https://api.cs.cheap/prices/batch' \
  --header "Authorization: Bearer $CSCHEAP_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"app_id":"730","market_hash_names":["AK-47 | Redline (Field-Tested)"],"side":"all"}'
  • One batch has one app_id, one side selection, and one optional currency. currency works as it does on the single query.
  • markets is a JSON array of market codes. On the single query it is a comma-separated parameter.
  • Unknown fields in the request body are rejected with 422.

For all constraints, see the Get prices for many or all items reference.

Match results to your input

  • data.items preserves the request order.
  • An unknown name returns an entry with an empty markets array. It does not fail the whole batch.
  • Repeated names stay repeated in the output and count toward billing.

Estimate the cost

Without an active subscription, the cost is one credit per started block of 100 submitted names. A batch of 100 names costs one credit, and a batch of 101 names costs two.

Deduplicate names in your application before you send them, unless you need the repeated entries. Split larger collections into several batches and respect the rate limits.

Page through every item

  1. Omit market_hash_names. The request then covers every priced item of app_id.
  2. Set the page size with limit. The default is 100 and the maximum is 1000.
  3. Pass meta.page.next_cursor back unchanged as cursor to get the next page.
  4. Stop when next_cursor is null.

Items come in the same order as the export, each at most once per pass. Prices are read as each page is requested, so an item added while you page may only appear on your next pass.

Each page is billed like a batch of limit names, even when the last page holds fewer items.

Next steps

  • Export prices to fetch everything at once, which is cheaper than paging.