# Brickset — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 thousands of LEGO sets by theme, year, or keyword. Retrieve detailed data for any set including piece count, minifigure count, dimensions, RRP, and more. Explore the full catalog of themes and yearly releases available on Brickset.

**Category:** Entertainment | **Website:** [brickset.com/](https://brickset.com/) | **Docs:** [parse.bot/marketplace/684238fd-ae16-4466-800e-fcde003fbab1/brickset-com-api](https://parse.bot/marketplace/684238fd-ae16-4466-800e-fcde003fbab1/brickset-com-api)

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

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/parse-brickset-com-api-684238fd/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### Get set details

Get detailed information for a specific LEGO set including full metadata like pieces, minifigs, designer, RRP, dimensions, and availability. The set_id uses the format 'NUMBER-VARIANT' (e.g. '75192-1'). Returns input_not_found if the set does not exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `set_id` | string | Yes | Set ID in format 'NUMBER-VARIANT' (e.g. '75192-1'). Can be obtained from search_sets or list endpoints via the set_number field. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-brickset-com-api-684238fd/get_set_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"set_id":"<string>"}'
```

### List sets by theme

List all LEGO sets for a specific theme. Returns paginated set summaries. Theme names use spaces (converted to hyphens internally). Use list_themes to discover valid theme names.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `theme` | string | Yes | Theme name with spaces (e.g. 'Star Wars', 'City', 'Harry Potter'). Spaces are converted to hyphens for the URL path. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-brickset-com-api-684238fd/list_sets_by_theme \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","theme":"<string>"}'
```

### List sets by year

List all LEGO sets released in a specific year. Returns paginated set summaries. Years range from 1949 to the current year; an invalid year returns an empty list.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `year` | integer | Yes | Year of release (e.g. 2024). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-brickset-com-api-684238fd/list_sets_by_year \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","year":"<integer>"}'
```

### List themes

List all available LEGO themes with their set counts. Returns the full catalog of themes from Brickset. No pagination required — all themes returned in a single response.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-brickset-com-api-684238fd/list_themes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### List years

List all years for which LEGO sets are available, with the number of sets released each year. Returns the complete set of years from the database. No pagination required.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-brickset-com-api-684238fd/list_years \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Search sets

Full-text search over all LEGO sets by keyword. Returns paginated set summaries ordered by set number. Pagination via integer page parameter; each page returns up to ~25 items. An empty result set (no matches) is valid.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword (e.g. 'star wars', 'millennium falcon', 'castle'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/parse-brickset-com-api-684238fd/search_sets \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
