Brickset APIbrickset.com ↗
Access LEGO set data from Brickset.com. Search by keyword, browse by theme or year, and retrieve full set details including piece count, RRP, and minifig counts.
What is the Brickset API?
This API exposes 6 endpoints for querying the Brickset catalog of LEGO sets, covering search, theme browsing, year filtering, and per-set details. The get_set_details endpoint returns a metadata object with fields including pieces, minifigs, designer, RRP, dimensions, and year released. Listing endpoints like list_themes and list_years enumerate the full scope of available catalog dimensions.
curl -X GET 'https://api.parse.bot/scraper/d4370d71-31da-48c1-9748-3afc8a79a1e8/search_sets?page=1&query=star+wars' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace brickset-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Brickset LEGO Database — search, browse, and drill into set details."""
from parse_apis.brickset_lego_database_api import Brickset, SetNotFound
client = Brickset()
# Browse available themes and pick one with its set count.
theme = client.themes.list(limit=3).first()
if theme:
print(f"Theme: {theme.name} ({theme.count} sets, slug={theme.slug})")
# Search for sets by keyword, capped to 5 total items.
for summary in client.setsummaries.search(query="millennium falcon", limit=5):
print(f" [{summary.set_number}] {summary.name} ({summary.year}) - {summary.pieces} pieces")
# Drill into one result's full details via the navigation op.
hit = client.setsummaries.search(query="millennium falcon", limit=1).first()
if hit:
detail = hit.details()
print(f"Detail: {detail.name}, image={detail.image_url}")
# Typed error handling: attempt to fetch a non-existent set.
try:
client.sets.get(set_id="99999-1")
except SetNotFound as exc:
print(f"Set not found: {exc.set_id}")
# List sets by year, bounded.
for s in client.setsummaries.list_by_year(year=2024, limit=3):
print(f" 2024 set: {s.name} — theme {s.theme}")
print("exercised: themes.list / setsummaries.search / details / sets.get / list_by_year")
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.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination. |
| queryrequired | string | Search keyword (e.g. 'star wars', 'millennium falcon', 'castle'). |
{
"type": "object",
"fields": {
"page": "integer current page number",
"items": "array of set summary objects with set_number, name, year, theme, subtheme, pieces, minifigs, image_url, metadata, url",
"has_next": "boolean indicating whether more pages are available"
},
"sample": {
"data": {
"page": 1,
"items": [
{
"url": "https://brickset.com/sets/1709-1/Pen-Darth-Vader",
"name": "Pen Darth Vader",
"year": "2002",
"theme": "Gear",
"pieces": null,
"metadata": {},
"minifigs": null,
"subtheme": "Pens",
"image_url": "https://images.brickset.com/sets/small/1709-1.jpg?200211190624",
"set_number": "1709-1"
}
],
"has_next": false
},
"status": "success"
}
}About the Brickset API
Search and Browse Endpoints
The search_sets endpoint accepts a query string and returns paginated results, each item containing set_number, name, year, theme, subtheme, pieces, minifigs, image_url, and a direct url to the set page. Pagination is handled via a page integer parameter; the has_next boolean in the response tells you whether additional pages exist. The same response shape appears in list_sets_by_year (requires a year integer) and list_sets_by_theme (requires a theme string, e.g. 'Harry Potter' or 'City').
Set Details
Passing a set_id in NUMBER-VARIANT format (e.g. 75192-1) to get_set_details returns the full metadata object for that set. This includes all available fields from the Brickset catalog — pieces, minifigs, theme, designer, RRP, year released, and dimensions — plus image_url and a description string where available. Set IDs can be harvested from the url or summary objects returned by any of the list endpoints.
Catalog Enumeration
list_themes returns the complete array of LEGO theme objects, each with a name, count (number of sets in that theme), and slug. list_years returns the same structure keyed by year and count, letting you quickly determine which years have the most catalog coverage before issuing a list_sets_by_year call. Neither endpoint takes any input parameters.
The Brickset API is a managed, monitored endpoint for brickset.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when brickset.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official brickset.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Building a LEGO set price tracker using RRP and year-released fields from get_set_details
- Generating a theme catalog browser that lists set counts per theme via list_themes
- Comparing piece counts and minifig counts across sets within a single theme using list_sets_by_theme
- Finding all sets released in a given year for a retrospective collection tool via list_sets_by_year
- Populating a personal collection database with set images, names, and set numbers from search_sets
- Building a designer attribution lookup using the designer field returned by get_set_details
- Displaying set thumbnails and metadata in a fan site or mobile app using image_url and metadata fields
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.