# Cdkeys — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse digital game keys across thousands of titles, view product details, pricing, and discover best sellers and latest releases from CDKeys. Filter games by category, compare options, and stay updated on the newest game key listings available.

**Category:** E-commerce | **Website:** [cdkeys.com/](https://cdkeys.com/) | **Docs:** [parse.bot/marketplace/f6d0eb9f-3a87-4b9e-928c-d414bb408a5b/cdkeys-com-api](https://parse.bot/marketplace/f6d0eb9f-3a87-4b9e-928c-d414bb408a5b/cdkeys-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-cdkeys-com-api-f6d0eb9f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_best_sellers

Retrieve current best-selling products ordered by 14-day sales volume descending. Returns paginated results. Useful for discovering trending and popular game keys.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results per page. |
| `page` | integer | No | Page number (0-indexed). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cdkeys-com-api-f6d0eb9f/get_best_sellers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### get_categories

Retrieve the category hierarchy for filtering products. Returns a list of category objects with path and product count. These category paths are used as input to list_products_by_category.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cdkeys-com-api-f6d0eb9f/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_latest_games

Retrieve the most recently released or upcoming game keys, sorted by release date descending. Includes pre-orders. Returns paginated results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results per page. |
| `page` | integer | No | Page number (0-indexed). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cdkeys-com-api-f6d0eb9f/get_latest_games \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","page":"<integer>"}'
```

### get_product_detail

Get full details for a specific product by SKU or slug. At least one must be provided. Returns the best matching product from the catalog including localized names, URLs, full multi-currency pricing, platform, region, language support, genres, and stock status.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `sku` | string | No | Product SKU (e.g. 'D/ELDRINPC', 'D/MNCJBEPC_WW'). |
| `slug` | string | No | Product slug from URL path (e.g. 'elden-ring-pc-steam', 'minecraft-java-bedrock-edition-pc-ww'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cdkeys-com-api-f6d0eb9f/get_product_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sku":"<string>","slug":"<string>"}'
```

### list_products_by_category

List products within a specific category path. Use get_categories to discover valid category strings. Returns paginated results with 24 items per page. Products are sorted by the specified order.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | Yes | Full category path from get_categories (e.g. 'PC /// Games', 'Xbox /// Xbox Games', 'Nintendo /// Nintendo Games'). |
| `page` | integer | No | Page number (0-indexed). |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cdkeys-com-api-f6d0eb9f/list_products_by_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","page":"<integer>","sort":"<string>"}'
```

### search_products

Full-text search over CDKeys product catalog. Matches game titles and keywords. Supports filtering by platform and region, and sorting by relevance, price, or release date. Returns paginated results with 24 items per page. Each product includes localized names, URLs, pricing in 35+ currencies, platform, region, and stock status.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number (0-indexed). |
| `platform` | string | No | Platform filter (e.g. Steam, Windows, Xbox Play Anywhere, Rockstar Games, Microsoft, Nintendo). |
| `query` | string | Yes | Search query matching product titles (e.g. 'Elden Ring', 'GTA 5', 'minecraft'). |
| `region` | string | No | Region filter (e.g. Worldwide, Europe & UK, Europe Middle East and Africa, North America, UK). |
| `sort` | string | No | Sort order for results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-cdkeys-com-api-f6d0eb9f/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","platform":"<string>","query":"<string>","region":"<string>","sort":"<string>"}'
```
