Rebrickable LEGO Sets, MOCs & Parts API
ECOMMERCE
Rebrickable LEGO Sets, MOCs & Parts API
Retrieve LEGO set inventories, MOC (My Own Creation) designs, parts, themes, and colors from the Rebrickable REST API.
What you get
- Set records — set number, name, year, theme, part count, image URL
- Part inventory — full per-set part lists (part number, color, quantity, spare flag) — the join key for BrickLink price-out calculations
- MOC alternates — community-designed alternate builds for a given set, with designer attribution
- Theme taxonomy — the complete official LEGO theme tree with parent-child relationships
- Color catalog — all Rebrickable colors with hex RGB and transparency flag
Modes
| Mode | Description |
|---|---|
sets_incremental |
Paginate recent LEGO sets, optionally filtered by year or theme ID |
set_inventories |
Fetch the complete part inventory for specific set numbers |
mocs_by_set |
Fetch community MOC alternate builds for specific set numbers |
themes_full |
Download the complete theme tree and color catalog |
Input
| Field | Type | Description |
|---|---|---|
mode |
string | Which data to fetch. Default: sets_incremental |
setNums |
array | Set numbers for set_inventories / mocs_by_set modes (e.g. ["10300-1", "75313-1"]) |
minYear |
integer | Earliest year for sets_incremental (defaults to current year) |
themeId |
integer | Theme ID filter for sets_incremental |
maxItems |
integer | Maximum records to return |
Output schema
Each output record includes a record_type field indicating which endpoint it came from:
set— from the sets endpointinventory_part— from the set parts endpoint (includesset_num, part details, color details,quantity,is_spare)moc— from the alternates endpointtheme— from the themes endpointcolor— from the colors endpoint
Rate limits
This actor runs at ~1 request/second against the Rebrickable API, well within its free-tier request limits for typical single-mode runs.
Use cases
- LEGO investing — fetch full part inventories to compare sealed-set value vs. parted-out value (combine with BrickLink price data)
- MOC sourcing — find community designs that reuse parts from sets you already own
- Curriculum design — explore the LEGO theme tree and part catalog for educational projects
- Collection management — catalog parts across your set collection by color and quantity