# Overview (/introduction)

The Steambuff API serves the data behind [steambuff.app](https://steambuff.app) over REST: the price of every CS2 item on the marketplaces we track, with its collections and crates, the CS2 market as a whole with the CS2 Index and Fear & Greed, the deals between marketplaces, Steam profiles with their bans, friends and games, their CS2 inventories priced item by item, their CS2 stats from FACEIT, Leetify and Steam, the leaderboards of what accounts are worth, and how many people are on Steam right now.

## Base URL [#base-url]

```txt
https://api.steambuff.app/v1
```

Every data endpoint sits under `/v1`. A change that would break your code comes as a new version rather than as an edit to this one.

## Authentication [#authentication]

Every request needs an API key. Create one on the [Developers page](https://steambuff.app/account/developers) of your account, after signing in with Steam. The key is shown in full only once, so store it when it appears. Creating a new one revokes the old one. Keys start with `sbf_`, so a secret scanner can spot one committed by mistake.

Send the key in the `x-api-key` header:

```bash
curl "https://api.steambuff.app/v1/cs2/items/AK-47%20%7C%20Redline%20(Field-Tested)" \
  -H "x-api-key: $STEAMBUFF_API_KEY"
```

`Authorization: Bearer $STEAMBUFF_API_KEY` works too, if your HTTP client prefers it.

Keep the key on your server. The API sends no CORS headers, so browsers block calls made from a web page.

## Responses [#responses]

Every response is JSON with camelCase fields. Prices are integer cents in USD, so `1250` means $12.50. The HTTP status tells a result from an error: a 2xx carries the result, anything else an error.

A single resource, such as one item or one profile, is the body itself:

```json
{
  "marketHashName": "★ Karambit | Doppler (Factory New)",
  "itemSlug": "karambit-doppler-phase-2",
  "minPrice": 119693,
  "minMarketplace": "csfloat",
  "steamPrice": 142435,
  "listings": 347
}
```

A list carries its entries in `data`. A paged list also carries its position in `pagination`. Ask for the next page with `?page=`, and change the page size with `?limit=`:

```json
{
  "data": [],
  "pagination": {
    "page": 1,
    "limit": 100,
    "total": 362,
    "totalPages": 4
  }
}
```

## Limits and credits [#limits-and-credits]

Each plan has a per-minute request limit and a monthly credit quota. Every endpoint states what one call costs in credits, and a paged list what one page costs. Only successful responses are charged, and a request refused by the per-minute limit costs nothing. On the Free plan, credits reset at 00:00 UTC on the first day of each month. On a paid plan, they reset every month on the day of the month your plan started. `X-Credits-Reset` always says when. Your plan and the current month's usage are on the [Developers page](https://steambuff.app/account/developers).

Some endpoints need a paid plan, and each one says which. Calling one your plan doesn't include returns a `403` with the code `PLAN_UPGRADE_REQUIRED` and costs nothing. The plans, their limits and what they include are on the [API page](https://steambuff.app/api). A paid plan that ends returns the account to Free, and the same key keeps working with Free limits.

The response headers report what is left. `RateLimit` and `RateLimit-Policy` follow the IETF's [RateLimit header fields](https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/) draft:

| Header                | Meaning                                                                         |
| --------------------- | ------------------------------------------------------------------------------- |
| `RateLimit`           | Requests left in the current minute and seconds to reset: `"minute";r=59;t=42` |
| `RateLimit-Policy`    | Your plan's requests per minute: `"minute";q=60;w=60`                          |
| `X-Credits-Limit`     | Your plan's monthly credits                                                     |
| `X-Credits-Remaining` | Credits left in the current month                                               |
| `X-Credits-Reset`     | Seconds until the credits reset                                                 |
| `X-Credits-Cost`      | Credits this request cost, `0` when it didn't succeed                           |
| `Retry-After`         | Seconds to wait before retrying, sent with a `429`                              |

## Errors [#errors]

An error is marked by `"error": true` and carries a machine-readable `code`, a message and the `requestId` to quote when you contact us. A validation error also lists each failed parameter in `details`:

```json
{
  "error": true,
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed",
  "details": [{ "path": "limit", "message": "Too big: expected number to be <=100" }],
  "requestId": "3f2b8c1e-7a4d-4e9b-9c6f-1d2e3a4b5c6d"
}
```

These codes can come from any endpoint. Each endpoint lists its own on top of them, such as a `403` for a private inventory or a `503` when Steam doesn't answer.

| Status | Code                     | Meaning                                         |
| ------ | ------------------------ | ----------------------------------------------- |
| 400    | `BAD_REQUEST`            | A value in the request is malformed             |
| 401    | `API_KEY_MISSING`        | No API key in the request                       |
| 401    | `API_KEY_INVALID`        | The key is wrong or has been revoked            |
| 403    | `PLAN_UPGRADE_REQUIRED`  | Your plan doesn't include the endpoint          |
| 404    | `NOT_FOUND`              | No endpoint or resource matches the path        |
| 422    | `VALIDATION_ERROR`       | A parameter failed validation, see `details`    |
| 429    | `RATE_LIMITED`           | Your plan's requests per minute are used up     |
| 429    | `MONTHLY_QUOTA_EXCEEDED` | Your plan's monthly credits are used up         |
| 500    | `INTERNAL_SERVER_ERROR`  | Something failed on our side; quote `requestId` |

## AI tools [#ai-tools]

The docs are also served as Markdown for coding assistants and AI agents:

- [`/llms.txt`](/llms.txt) lists every page, with a link to its Markdown.
- [`/llms-full.txt`](/llms-full.txt) is every page in one file.
- Any page's address with `.md` added is that page alone, like [`/introduction.md`](/introduction.md). An API reference page holds its endpoint as an OpenAPI fragment, with only the schemas it uses.
- The MCP server at `https://docs.steambuff.app/api/mcp` lets an agent list, search and read the pages.

The whole API is one OpenAPI 3.1 document at [`https://api.steambuff.app/v1/openapi.json`](https://api.steambuff.app/v1/openapi.json).

## Terms [#terms]

Using the API means accepting Steambuff's [Terms of Service](https://steambuff.app/terms): among them, what you may do with its data and how plans, payments and the balance work. What the API keeps about you, and what NOWPayments gets when you pay, is in the [Privacy Policy](https://steambuff.app/privacy).