New: live data for Youpin, CSFloat, and Steam

Quickstart

Build with cs2.sh from an AI coding agent such as Claude Code or Codex.

Get an API key#

Subscribe to a plan, then copy your key from the dashboard. To try the API first, sign up and open a ticket in our Discord server for a free 2-day Developer key.

Give your agent the docs#

Paste this into your agent:

Read https://cs2.sh/docs/quickstart.md and use the cs2.sh API.

Then ask for what you want to build.

Connect the docs MCP server#

The docs MCP server at https://cs2.sh/mcp lets your agent search and read these docs. It needs no API key.

Claude Code:

claude mcp add --transport http cs2sh-docs https://cs2.sh/mcp

Codex:

codex mcp add cs2sh-docs --url https://cs2.sh/mcp

Docs for agents#

ResourceContents
llms.txtAn index of every docs page, with Markdown links.
llms-full.txtEvery docs page in one Markdown file, including examples and API objects.
openapi.yamlThe OpenAPI 3.1 spec.
Any docs URL plus .mdThat page in Markdown, such as data-coverage.md.
agent-card.jsonThe base URL, authentication, rate limits, and every /v1 endpoint with the plans that can call it.
GET /v1/live/capabilitiesThe JSON Schema for every live request and response, with each operation's filters, sort fields, and an example body.

Agent instructions#

  • Send requests to https://api.cs2.sh with Authorization: Bearer <key> and Accept-Encoding: gzip.
  • Keep the key on the server. Don't put it in browser or client code.
  • Call GET /v1/account first. It returns the key's plan, its limits, and the endpoints it can call.
  • Find the endpoints the task needs in llms.txt.
  • Build each live request body from GET /v1/live/capabilities?market=<market>&operation=<operation>.
  • Handle errors by status:
    • 400: the message and details say what to fix.
    • 401: the key is missing, malformed, invalid, or expired.
    • 403 with error set to forbidden: the plan doesn't include the endpoint.
    • 429 from a live endpoint: wait details.retry_after_seconds, then retry.
    • Any other 429: retry with a bounded delay.