Welcome to the BrickEconomy API for developers. The API is designed to provide easy, automated interaction with BrickEconomy data, including your personal collection data.

The BrickEconomy API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON request bodies on the endpoints that change your collection, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

The BrickEconomy API does not support bulk updates. Each request works on one object.

API version 1 is the default and encouraged way to programmatically interact with BrickEconomy.

Base URL
https://www.brickeconomy.com/api/v1/

Authentication

The BrickEconomy API uses an API key to authenticate requests. You can view and change your API key on your API profile page.

To authenticate, include the x-apikey header with your personal API key in every request.

Your API key carries many privileges, so be sure to keep it secure. Do not share your secret API key in publicly accessible places such as GitHub or client-side code. Always use HTTPS instead of HTTP for making your requests.

Example Request
GET /api/v1/set/10236-1 HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>

Important: send all of the headers above (Accept, User-Agent and x-apikey) with every request. A request without x-apikey returns an authentication error, and a request without a User-Agent can be refused before it reaches the API.

Rate limits

The API implements daily rate limits per API key, aligned with the Premium membership's license terms. These quotas reset at 00:00 UTC daily. The standard rate limit is 100 requests per day.

Once the daily limit is reached, every request returns a 429 error code with QuotaExceededError (refer to the Errors section) until the quota resets.

Your API profile page displays and tracks your daily API limits and quotas. The usage endpoint returns the same figures and does not count toward your quota.

Some endpoints also have a limit per minute. A request over that limit returns a 429 error code with TooManyRequestsError and a Retry-After header of 60 seconds. It does not count toward your daily quota.

Endpoints Requests per minute
Search sets and search minifigs, counted together30
Usage30
Collection summary10
Every endpoint that changes your collection or wanted lists60

For all other endpoints, please keep to 30 requests per minute.

API responses

Most endpoints in the BrickEconomy API return a response in JSON format. Unless otherwise specified, a successful request's response returns a 200 HTTP status code and has the following format:

Response structure
{ "data": <response data> }

<response data> is usually an object or a list of objects, but that's not always the case. Refer to each endpoint below for exact responses.

When working with a response object, it's crucial to verify the existence of specific nodes rather than assuming their presence. For example, when accessing the set endpoint, the retired_date node in the JSON response will be missing if the set has not been retired.

Set and minifig responses are stored for 24 hours, so repeating a call for the same item and currency within that time returns the same response. Each call still counts toward your daily quota.

Search results are stored for 60 minutes and the collection summary for 10 minutes. A change you make to your collection through the API clears your stored summary.

Errors

The BrickEconomy API follows the conventional HTTP response codes to indicate success or failure. Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error in the request (e.g. a missing parameter, a resource was not found). Codes in the 5xx range indicate an error in BrickEconomy's servers and should be rare.

Error response structure
{ "error": <a message code describing the error>, "message": <what was wrong, in plain words> }
Example 401
{"error": "AuthenticationRequiredError"}

The error code is a string with one of the values provided in the table below. You can use the error code to see the description of the error.

The message node is only present on some errors, mostly from the endpoints that change your collection, where the error code alone does not say what to correct. Use it for your own logs. Its wording can change, so let your code decide on the error code.

HTTP Code Error code Description
400 BadRequestError The API request is invalid or malformed.
400 InvalidArgumentError Some of the provided arguments are incorrect.
400 UnknownObject The object asked for is not known. For example, the set endpoint returns this when the set number does not exist.
401 AuthenticationRequiredError The operation requires an authenticated user. Verify that you have provided your API key.
401 WrongCredentialsError The provided API key is incorrect.
401 UserNotActiveError The user account is not active. The collection endpoints also return this error code, with a 404 HTTP code, when the collection is empty.
403 ForbiddenError You are not allowed to perform the requested operation. For the endpoints that change your collection, write access is switched off for your API key.
404 NotFoundError The requested resource was not found. Also returned for an address that is not an endpoint.
400 GeneralError The request could not be completed. For an endpoint that changes your collection, read your collection before sending the request again.
405 MethodNotAllowedError The endpoint takes a different HTTP method. The endpoints that change your collection take POST.
409 ConflictError The item cannot be changed in its current state. The message says why.
429 QuotaExceededError You have used up your daily quota. The quota resets every day at 00:00 UTC.
429 TooManyRequestsError Too many requests in one minute for this endpoint. Wait for the number of seconds in the Retry-After header.

Currencies

The BrickEconomy API supports currency conversions across various endpoints. To specify the currency for returning a set's values, use the query parameter currency with a standard ISO 4217 currency code. For instance, to get values in Euros, append currency=EUR to your query. If no currency is specified in the query, the default currency used will be USD (United States Dollar).

ISO 4217 is the international standard describing three-letter codes (also known as the currency code) to define the names of currencies established by the International Organization for Standardization (ISO). Each code typically consists of the country's two-character ISO 3166-1 code and an additional character to denote the currency unit. For example, USD for United States Dollar, EUR for Euro, JPY for Japanese Yen, etc. The BrickEconomy API supports the following currency codes:

Currency code Curency Country
USD United States Dollar United States
GBP British Pound United Kingdom
CAD Canadian Dollar Canada
AUD Australian Dollar Australia
CNY Chinese Yuan China
KRW Korean Won South Korea
EUR Euro Eurozone
JPY Japanese Yen Japan
CHF Swiss Franc Switzerland
INR Indian Rupee India
BRL Brazilian Real Brazil
MXN Mexican Peso Mexico
SGD Singapore Dollar Singapore
SEK Swedish Krona Sweden
NZD New Zealand Dollar New Zealand
NOK Norwegian Krone Norway
DKK Danish Krone Denmark
PLN Polish Zloty Poland
CZK Czech Koruna Czech Republic
HUF Hungarian Forint Hungary

A currency code that is not in this table is not an error on the endpoints that read data. The values are returned in USD, so check the currency node of the response.

Example request
GET /api/v1/minifig/sw0509?currency=EUR HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>

Code examples

BrickEconomy is compatible with nearly all development platforms, thanks to its use of standard REST and JSON responses. In this section, you will find introductory examples for various development platforms to help you get started.

In the following examples, we demonstrate how to query a set's data using the Get a set endpoint, accessible at https://www.brickeconomy.com/api/v1/set/. Detailed instructions and examples for this are provided in the next section below.

Curl
curl --request GET \ --url 'https://www.brickeconomy.com/api/v1/set/21034?currency=GBP' \ --header 'x-apikey: <your api key>' \ --header 'accept: application/json' \ --user-agent '<your user agent>'
C#
using System.Net.Http.Headers; var client = new HttpClient(); client.DefaultRequestHeaders.UserAgent.ParseAdd("<your user agent>"); var request = new HttpRequestMessage { Method = HttpMethod.Get, RequestUri = new Uri("https://www.brickeconomy.com/api/v1/set/21034?currency=GBP"), Headers = { { "accept", "application/json" }, { "x-apikey", "<your api key>" }, }, }; using (var response = await client.SendAsync(request)) { response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body); }
PHP
"https://www.brickeconomy.com/api/v1/set/21034?currency=GBP", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-apikey: <your api key>", "accept: application/json" ], CURLOPT_USERAGENT => "<your user agent>", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
JavaScript
const options = { method: 'GET', headers: { accept: 'application/json', 'x-apikey': '<your api key>', 'User-Agent': '<your user agent>' } }; fetch('https://www.brickeconomy.com/api/v1/set/21034?currency=GBP', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
Powershell
$headers=@{} $headers.Add("accept", "application/json") $headers.Add("x-apikey", "<your api key>") $headers.Add("User-Agent", "<your user agent>") $response = Invoke-WebRequest -Uri 'https://www.brickeconomy.com/api/v1/set/21034?currency=GBP' -Method GET -Headers $headers
Python
$ python -m pip install requests
import requests url = "https://www.brickeconomy.com/api/v1/set/21034?currency=GBP" headers = { "accept": "application/json", "x-apikey": "<your api key>" "User-Agent": "<your user agent>" } response = requests.get(url, headers=headers) print(response.text)
Node
const http = require('https'); const options = { method: 'GET', hostname: 'www.brickeconomy.com', port: null, path: '/api/v1/set/21034?currency=GBP', headers: { accept: 'application/json', 'x-apikey': '<your api key>', 'User-Agent': '<your user agent>' } }; const req = http.request(options, function (res) { const chunks = []; res.on('data', function (chunk) { chunks.push(chunk); }); res.on('end', function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
Go
import ( "fmt" "io" "net/http" "golang.org/x/net/http2" ) func main() { url := "https://www.brickeconomy.com/api/v1/set/21034?currency=GBP" transport := &http.Transport{ TLSNextProto: make(map[string]func(authority string, c *tls.Conn) http.RoundTripper), } client := &http.Client{ Transport: transport, } req, _ := http.NewRequest("GET", url, nil) req.Header.Add("accept", "application/json") req.Header.Add("x-apikey", "<your api key>") req.Header.Add("User-Agent", "<your user agent>") res, _ := client.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }

In the examples above and throughout this reference, replace <your api key> with your API key and <your user agent> with any common User-Agent string you choose. Note that the x-apikey and the User-Agent strings cannot be omitted.

Get my usage

GEThttps://www.brickeconomy.com/api/v1/usage

Returns your daily quota and how much of it you have used today. This request does not count toward your quota, and it still answers when your quota is used up.

Headers
x-apikeystringrequired
Your API key
Example request
GET /api/v1/usage HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
Example response
{ "data": { "quota": 100, "used_today": 37, "remaining": 63, "resets_at": "2026-10-07T00:00:00Z", "writes_enabled": false } }
Usage object attributes
  • quota: <integer> The number of requests your API key can make per day.
  • used_today: <integer> The number of requests counted today.
  • remaining: <integer> The number of requests left today.
  • resets_at: <string> When the count starts again, always the next midnight UTC.
  • writes_enabled: <boolean> Whether your API key is allowed to change your collection and wanted lists. You switch this on in your API profile page.

Get a set

GEThttps://www.brickeconomy.com/api/v1/set/<set number>

Returns a JSON object of a LEGO set.

Path Parameters
set numberstringrequired
The set number of the set to look up. For example, 10236 and 10236-1 both look up the Star Wars Ewok Village. When a set has more than one variation, the variation number is required, as in 10236-2.
Query Parameters
currencystringdefaults to USD
This query parameter determines the currency format for displaying values. You must use valid currency codes (ISO 4217 format), as detailed in the currency section. If no currency code is specified, the default is set to USD (US dollar).
Headers
x-apikeystringrequired
Your API key
Example request
GET /api/v1/set/10236-1 HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
Example response
{ "data": { "retired": true, "set_number": "10236-1", "name": "Ewok Village", "theme": "Star Wars", "subtheme": "Ultimate Collector Series", "year": 2013, "pieces_count": 1990, "minifigs_count": 17, "minifigs": [ "sw0011a", "sw0236", "sw0338", "sw0365", "sw0366", "sw0367", "sw0451", "sw0504", "sw0505", "sw0508", "sw0509", "sw0510", "sw0511", "sw0512", "sw0513" ], "minifigs_quantities": { "sw0011a": 1, "sw0236": 1, "sw0338": 1, "sw0365": 1, "sw0366": 2, "sw0367": 1, "sw0451": 1, "sw0504": 1, "sw0505": 2, "sw0508": 1, "sw0509": 1, "sw0510": 1, "sw0511": 1, "sw0512": 1, "sw0513": 1 }, "availability": "exclusive", "retail_price_us": 249.99, "retail_price_uk": 199.99, "retail_price_ca": 299.99, "retail_price_eu": 249.99, "retail_price_au": 359.99, "ean": "5702014974777", "upc": "673419191425", "released_date": "2013-09-01", "retired_date": "2016-11-29", "current_value_new": 604.61, "current_value_used": 519.99, "current_value_used_low": 475.00, "current_value_used_high": 623.99, "forecast_value_new_2_years": 723.35, "forecast_value_new_5_years": 863.23, "rolling_growth_12months": 7.23, "price_events_new": [ { "date": "2024-01-14", "value": 604.61 }, { "date": "2023-12-31", "value": 627.74 }, { "date": "2023-12-18", "value": 577.19 }, { "date": "2023-12-01", "value": 577.83 }, { "date": "2023-11-11", "value": 598.90 }, { "date": "2023-11-03", "value": 609.91 }, { "date": "2023-10-17", "value": 624.34 }, { "date": "2023-10-03", "value": 567.68 }, { "date": "2023-10-01", "value": 559.24 }, { "date": "2023-09-18", "value": 528.48 }, { "date": "2023-09-04", "value": 518.89 }, { "date": "2023-08-15", "value": 520.80 } ], "market_momentum": { "stage": "retired", "position": 64, "reading": "bullish", "line": "Ewok Village has grown faster than similar retired sets over the past year, and member interest is rising.", "helper": "Growth and demand are leaning upward.", "scored_date": "2026-10-20", "boxes": [ { "key": "demand", "label": "Demand", "value": "Very high demand", "demand_level": 5, "trend": "Rising", "notes": [ "Upper half in Star Wars" ], "chart_help": "Member interest over the last 12 months, in four-week steps.", "interest_by_month_index": [ 62.0, 70.0, 58.0, 66.0, 74.0, 71.0, 80.0, 77.0, 85.0, 90.0, 88.0, 95.0, 100.0 ] } ], "split_percent": { "bullish": 41, "neutral": 52, "bearish": 7 }, "drivers": [ { "name": "Theme peers", "direction": "up", "strength": "strong", "share_percent": 55, "description": "It has outgrown similar retired sets this past year" } ], "signals": [ { "title": "Value climbing", "description": "Over the last 3 months", "direction": "up" } ], "what_would_change": [ { "text": "Would turn neutral if member interest stops rising.", "detail": "...", "turns": "neutral" } ], "outlook": { "text": "...", "risks": [ "..." ], "opportunities": [ "..." ], "updated_date": "2026-10-18" } }, "currency": "USD" } }

Please note: Although the set object tries to return all values, in many instances certain JSON nodes may not be included in the response. This depends on the context or current state of the set. For instance, if a set has not been retired, the retired_date node will be absent. The values are the ones shown on the set's page on BrickEconomy. When the page does not show a value, the node is left out.

Set object attributes
  • retired: <boolean> Indication if the set has been retired from first party retail sales. Always present, as true or false.
  • set_number: <string> The number of the set that corresponds to the path parameter set number.
  • name: <string> The name of the set.
  • theme: <string> The set's top level theme.
  • subtheme: <string> The set's second level theme/subtheme.
  • year: <integer> The year the set was initially released.
  • pieces_count: <integer> Number of pieces in the set.
  • minifigs_count: <integer> Number of minifigures in the set, if any.
  • minifigs: <list of strings> The minifig numbers of each of the minifigs in the set. This can be used to query the minifig objects where each value here is a minifig number.
  • minifigs_quantities: <object> How many of each minifig the set includes, keyed by minifig number.
  • availability: <string> The general sales availability of the set (retail, retaillimited, exclusive, exclusivelegoland, promotional, notforretail).
  • retail_price_us: <decimal> The actual retail price the set was released for in the United States as USD.
  • retail_price_uk: <decimal> The actual retail price the set was released for in the United Kingdom as GBP.
  • retail_price_ca: <decimal> The actual retail price the set was released for in Canada as CAD.
  • retail_price_eu: <decimal> The actual retail price the set was released for in the European Union (the most common) as EUR.
  • retail_price_au: <decimal> The actual retail price the set was released for in Australia as AUD.
  • ean: <string> The EAN, European Article Number, barcode number.
  • upc: <string> The UPC, Universal Product Code, barcode number.
  • released_date: <string> The date the set was released as YYYY-MM-DD.
  • retired_date: <string> The date the set was retired as YYYY-MM-DD.
  • current_value_new: <decimal> The current value of a new, factory sealed set in the currency specified. For a retired set this is the estimated value. For a set still available at retail it is the market price shown on the set's page when there is one, otherwise the retail price. Left out when the value is unknown.
  • current_value_used: <decimal> The current estimated value of a used (complete with all parts) set in the currency specified. Retired sets only, when a used value is available.
  • current_value_used_low: <decimal> The current estimated low value range of a used (complete with all parts) set in the currency specified. Returned together with the high value.
  • current_value_used_high: <decimal> The current estimated high value range of a used (complete with all parts) set in the currency specified. Returned together with the low value.
  • forecast_value_new_2_years: <decimal> The forecasted future estimated value in 2 years from today, of a new, factory sealed set in the currency specified. Retired sets only.
  • forecast_value_new_5_years: <decimal> The forecasted future estimated value in 5 years from today, of a new, factory sealed set in the currency specified. Retired sets only.
  • rolling_growth_lastyear: <decimal> This is the average rolling growth, in percent, of the set over the previous full year. Rolling growth calculates the growth rate over a fixed period as new data points are added, providing a smoothed, continuous perspective. Retired sets only. Either this or rolling_growth_12months is returned, whichever the set's page shows.
  • rolling_growth_12months: <decimal> This is the average rolling growth, in percent, of the set over the last 12 months. Retired sets only. Either this or rolling_growth_lastyear is returned, whichever the set's page shows.
  • price_events_new: <collection> The price events of the last 11 months that put various pressure on the set's price, newest first. Retired sets only. The collection is an array of date (YYYY-MM-DD) and value in the specified currency.
  • market_momentum: <object> The Market Momentum section of the set's page, the full Premium view. Left out when the set has too little data for a reading, as the page then shows no section. Percentages and words only, never prices. Updated nightly; the outlook weekly.
    • stage: <string> How the set is read: at_retail, retirement_pop (from shortly before retirement to about a year after) or retired.
    • position: <integer> Where the gauge's marker sits, 0 (strongly bearish) to 100 (strongly bullish).
    • reading: <string> The label beside the section title: bullish, neutral or bearish.
    • line: <string> The summary above the gauge.
    • helper: <string> The short text in the callout on the gauge's marker.
    • scored_date: <string> The date of the reading as YYYY-MM-DD.
    • boxes: <collection> The boxes under the gauge, up to three, each with key (demand, supply, stock, price, pop or peers), label, value and notes. Depending on the box: demand_level (1 to 5), trend, lego_in_stock by region (the stock box is sent only for a set on sale whose LEGO stock moved in the last 30 days, out of stock in some region now or on some day), lego_stock_by_day (by region, one letter a day oldest first: i in stock, o out of stock, - not known; the box shows only when LEGO stock moved), months_since_retirement, chart_help, and the box's chart as interest_by_month_index or copies_for_sale_by_month_index (13 four-week or monthly points, 0 to 100 against the set's own highest, never counts), copies_for_sale_against_a_year_ago (fewer, about_the_same, more or none), pop_by_month_percent with typical_pop_by_month_percent or expected_pop_by_month_percent, value_change_by_month_percent with typical_change_by_month_percent, or daily_price_vs_retail_percent.
    • split_percent: <object> The bull and bear balance: bullish, neutral and bearish percentages adding to 100, from the parts of the reading and the bearish and bullish views. Left out when nothing is known.
    • drivers: <collection> Why it's moving: each part's name, direction (up, level or down), strength as the page shows it (strong, moderate or small; slight with a share_percent of 0 for the parts that lean a little when nothing else moves the reading), share_percent of the move and description.
    • signals: <collection> Up to five signals, strongest first, each with title, description and direction.
    • what_would_change: <collection> What would change the reading: text, detail and the reading it turns to (bullish, neutral or bearish). An empty list when nothing would; left out on a reading saved before these were kept.
    • outlook: <object> The weekly outlook: text, the bearish view as risks and the bullish view as opportunities (usually two each), and updated_date. Left out while the outlook is being written.
    • history: <collection> The reading over the last 90 days as date and position. Returned once the record spans two weeks, as the page's chart.
    • reading_since: <object> Since when the current reading has held, returned with history: date (YYYY-MM-DD), since_tracking_began (true when it has held since the set's tracking began on that date) and whole_window (true when it has held for all 90 days, the date then left out).
  • currency: <string> The currency code of the values in the set object. The currency is either USD by default or the ISO 4217 currency code specified by the currency query parameter.

Get a minifig

GEThttps://www.brickeconomy.com/api/v1/minifig/<minifig number>

Returns a JSON object of a LEGO minifig (minifigure).

Path Parameters
minifig numberstringrequired
The minifig number of the minifig to look up. For example, sw0509 looks up the Luke Skywalker from the Star Wars Ewok Village.
Query Parameters
currencystringdefaults to USD
This query parameter determines the currency format for displaying values. You must use valid currency codes (ISO 4217 format), as detailed in the currency section. If no currency code is specified, the default is set to USD (US dollar).
Headers
x-apikeystringrequired
Your API key
Example request
GET /api/v1/minifig/sw0509 HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
Example response
{ "data": { "minifig_number": "sw0451", "name": "Han Solo", "description": "Han Solo, reddish brown legs with holster pattern, vest with pockets", "set_count": 2, "sets": [ "10236-1", "75003-1" ], "theme": "Star Wars", "year": 2013, "released_date": "2012-12-01", "current_value_new": 7.27, "currency": "USD" } }

Please note: Although the minifig object tries to return all values, in many instances certain JSON nodes may not be included in the response. This depends on the context or current state of the minifig.

Minifig object attributes
  • minifig_number: <string> The number of the minifig that corresponds to the path parameter minifig number.
  • name: <string> The name of the minifig.
  • theme: <string> The minifig's top level theme.
  • subtheme: <string> The minifig's second level theme/subtheme.
  • year: <integer> The year the minifig was initially released.
  • released_date: <string> The earliest date a set with the minifig was released as YYYY-MM-DD. Left out when only the year is known.
  • current_value_new: <decimal> The current estimated value of a new minifig in the currency specified.
  • currency: <string> The currency code of the values in the set object. The currency is either USD by default or the ISO 4217 currency code specified by the currency query parameter.

Search sets

GEThttps://www.brickeconomy.com/api/v1/search/sets

Finds sets the same way the search on the website does, by set number, name, theme and subtheme. It can also find the sets with a given barcode. A search returns basic details and the address of the full set endpoint. It returns no values, request the set for those.

A search returns at most 100 sets, in the order the website's search lists them. There are no further pages, so use more specific words when more is true. The website shows gear (key chains, books and other merchandise) on a tab of its own. Here those items are in the same list, with the theme Gear.

Query Parameters
querystringrequired, unless barcode is given
The words to search for, from 3 to 99 characters. Remember to URL encode them.
barcodestring
A UPC or EAN of 8 to 14 digits, as printed on the box. Returns the sets with that barcode. A barcode can belong to more than one set.
limitintegerdefaults to 100
The number of sets to return, from 1 to 100.
Headers
x-apikeystringrequired
Your API key
Example request
GET /api/v1/search/sets?query=titanic HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
Example response
{ "data": { "count": 1, "more": false, "sets": [ { "set_number": "10294-1", "name": "Titanic", "theme": "Icons", "subtheme": "", "year": 2021, "pieces_count": 9090, "url": "https://www.brickeconomy.com/set/10294-1/lego-titanic", "api_url": "https://www.brickeconomy.com/api/v1/set/10294-1" } ] } }
Search object attributes
  • count: <integer> The number of sets returned.
  • more: <boolean> True when the search reached its limit of 100 sets, or found more than the limit you asked for. There may be more matching sets.
  • sets: <collection> Each set found.
    • set_number: <string> The number of the set.
    • name: <string> The name of the set.
    • theme: <string> The set's top level theme.
    • subtheme: <string> The set's second level theme/subtheme.
    • year: <integer> The year the set was initially released.
    • pieces_count: <integer> Number of pieces in the set.
    • url: <string> The set's page on BrickEconomy.
    • api_url: <string> The address of the set endpoint for this set. Missing for a very small number of catalogue items whose number the set endpoint cannot take.

Search minifigs

GEThttps://www.brickeconomy.com/api/v1/search/minifigs

Finds minifigs the same way the search on the website does, by minifig number and name. It returns at most 100 minifigs, with the address of the full minifig endpoint for each.

Query Parameters
querystringrequired
The words to search for, from 3 to 99 characters. Remember to URL encode them.
limitintegerdefaults to 100
The number of minifigs to return, from 1 to 100.
Headers
x-apikeystringrequired
Your API key
Example request
GET /api/v1/search/minifigs?query=sw0509 HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
Example response
{ "data": { "count": 1, "more": false, "minifigs": [ { "minifig_number": "sw0509", "name": "Luke Skywalker", "url": "https://www.brickeconomy.com/minifig/sw0509/luke-skywalker", "api_url": "https://www.brickeconomy.com/api/v1/minifig/sw0509" } ] } }
Search object attributes
  • count: <integer> The number of minifigs returned.
  • more: <boolean> True when the search reached its limit of 100 minifigs, or found more than the limit you asked for. There may be more matching minifigs.
  • minifigs: <collection> Each minifig found.
    • minifig_number: <string> The number of the minifig.
    • name: <string> The name of the minifig.
    • url: <string> The minifig's page on BrickEconomy.
    • api_url: <string> The address of the minifig endpoint for this minifig.

Get my sets

GEThttps://www.brickeconomy.com/api/v1/collection/sets

Returns your entire set collection data. This is closely related to the CSV generated by the Premium export with additional header information and various data enrichments.

Each instance of the same set in your inventory will have its own separate set object. This design allows for distinct attributes (such as paid price, notes, etc.) for each set, even if they are the same set. These are intentional, not duplicates, and reflect the individual items in your inventory.

Query Parameters
currencystringdefaults to USD
This query parameter determines the currency format for displaying values. You must use valid currency codes (ISO 4217 format), as detailed in the currency section. If no currency code is specified, the default is set to USD (US dollar).
Headers
x-apikeystringrequired
Your API key
Example request
GET /api/v1/collection/sets HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
Example response
{ "data": { "sets_count": 828, "sets_unique_count": 625, "sets_new_count": 726, "sets_used_count": 102, "sets_pieces_count": 581548, "sets_minifigs_count": 2591, "current_value": 101124.68, "currency": "USD", "sets": [ { "retired": true, "set_number": "75144-1", "name": "Snowspeeder", "theme": "Star Wars", "subtheme": "Ultimate Collector Series", "year": 2017, "pieces_count": 1703, "minifigs_count": 2, "retail_price": 199.99, "released_date": "2017-01-01", "retired_date": "2019-01-01", "aquired_date": "2018-11-01", "collection": "Investments", "condition": "new", "paid_price": 199.99, "current_value": 382.00, "growth": 91.01 }, { "retired": true, "set_number": "10251-1", "name": "Brick Bank", "theme": "Icons", "subtheme": "Modular Buildings", "year": 2016, "pieces_count": 2380, "minifigs_count": 6, "retail_price": 169.99, "released_date": "2016-01-01", "retired_date": "2018-11-01", "aquired_date": "2019-10-01", "collection": "Investments", "condition": "new", "paid_price": 169.99, "current_value": 600.37, "growth": 253.18 }, { "retired": true, "set_number": "10253-1", "name": "Big Ben", "theme": "Icons", "subtheme": "Buildings", "year": 2016, "pieces_count": 4163, "retail_price": 249.99, "released_date": "2016-01-01", "retired_date": "2018-11-01", "aquired_date": "2016-02-01", "collection": "Holding", "condition": "new", "paid_price": 249.99, "current_value": 389.56, "growth": 55.83 } ], "periods": [ { "value": 102554.69, "date": "2024-01-25", "sets_count": 828, "sets_count_new": 740, "sets_count_used": 88 }, { "value": 101984.64, "date": "2024-01-01", "sets_count": 828, "sets_count_new": 740, "sets_count_used": 88 }, { "value": 100176.00, "date": "2023-12-01", "sets_count": 813, "sets_count_new": 733, "sets_count_used": 80 }, { "value": 99028.09, "date": "2023-11-01", "sets_count": 775, "sets_count_new": 696, "sets_count_used": 79 }, { "value": 98658.07, "date": "2023-10-01", "sets_count": 768, "sets_count_new": 690, "sets_count_used": 78 } ] } }

Please note: The above example was truncated for brevity. The API will return all sets in the collection.

Set collection object attributes
  • sets_count: <integer> The number of total sets in the collection.
  • sets_unique_count: <integer> The number of unique sets in the collection.
  • sets_new_count: <integer> The number of new/factory sealed sets in the collection.
  • sets_used_count: <integer> The number of used sets in the collection.
  • sets_pieces_count: <integer> The total number of pieces in all sets in the collection.
  • sets_minifigs_count: <integer> The total number of minifigs in all sets in the collection.
  • current_value: <decimal> The current estimated value of the collection in the currency specified.
  • currency: <string> The currency code of the current_value and the values in the set's object. The currency is either USD by default or the ISO 4217 currency code specified by the currency query parameter.
  • sets: <collection> Each set in the collection.
    • item_id: <integer> Identifies this copy in the endpoints that change your collection. Only present for a copy that has details saved (a price, date, notes, condition or named collection).
    • set_number: <string> The number of the set.
    • name: <string> The name of the set.
    • theme: <string> The set's top level theme.
    • subtheme: <string> The set's second level theme/subtheme.
    • year: <integer> The year the set was initially released.
    • pieces_count: <integer> Number of pieces in the set.
    • minifigs_count: <integer> Number of minifigures in the set, if any.
    • retail_price: <decimal> The actual retail price the set was released for in the currency specified.
    • retired: <boolean> Indication if the set has been retired from first party retail sales. Always present, as true or false.
    • released_date: <string> The date the set was released as YYYY-MM-DD.
    • retired_date: <string> The date the set was retired as YYYY-MM-DD.
    • collection: <string> If the set belongs to a user named collection, this is the name. Only for members with collections enabled.
    • aquired_date: <string> The date the set was originally acquired.
    • condition: <string> The specified condition of the set (new, used_as_new, used_complete, used_incomplete).
    • paid_price: <decimal> Price you paid for the set in the currency specified. For a set with no details saved this is the retail price. Left out when no price was entered.
    • current_value: <decimal> The current estimated value of the set based on the condition in the currency specified.
    • growth: <decimal> The percent of growth based on the current value and the paid price. Left out when there is no paid price.
  • periods: <collection> These are snapshots of the value of your collection. The periods are sorted by date, newest first, up to 48 periods (each period is roughly a month). The first period is always the current day.
    • value: <decimal> The value of the collection at the period specified by the date. The value is in the currency specified.
    • date: <string> The date of the period in YYYY-MM-DD.
    • sets_count: <int> The number of sets in the collection during that period.
    • sets_count_new: <int> The number of sets in new, factory sealed condition in the collection during that period.
    • sets_count_used: <int> The number of sets in used condition in the collection during that period.

Get my minifigs

GEThttps://www.brickeconomy.com/api/v1/collection/minifigs

Returns your entire minifig collection data. This is closely related to the CSV generated by the Premium export with additional header information and various data enrichments.

Each instance of the same minifig in your inventory will have its own separate minifig object. This design allows for distinct attributes (such as paid price, notes, etc.) for each minifig, even if they are the same. These are intentional, not duplicates, and reflect the individual items in your inventory.

Query Parameters
currencystringdefaults to USD
This query parameter determines the currency format for displaying values. You must use valid currency codes (ISO 4217 format), as detailed in the currency section. If no currency code is specified, the default is set to USD (US dollar).
Headers
x-apikeystringrequired
Your API key
Example request
GET /api/v1/collection/minifigs HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
Example response
{ "data": { "minifigs_count": 23, "minifigs_unique_count": 22, "current_value": 554.04, "currency": "USD", "minifigs": [ { "minifig_number": "scd003", "name": "Shaggy Rogers", "aquired_date": "2023-12-29", "collection": "Investments", "paid_price": 4.91, "current_value": 7.67, "growth": 156.52 }, { "minifig_number": "scd005", "name": "Velma Dinkley", "aquired_date": "2020-06-20", "collection": "Investments", "paid_price": 6.17, "current_value": 120.10, "growth": 1847.01 }, { "minifig_number": "gb013", "name": "Dr. Raymond Stantz", "aquired_date": "2022-02-01", "paid_price": 7.43, "current_value": 48.74, "growth": 555.99 }, { "minifig_number": "idea028", "name": "Ringo", "aquired_date": "2021-10-21", "paid_price": 6.75, "current_value": 30.52, "growth": 352.15 }, { "minifig_number": "dim042", "name": "Michael Knight", "aquired_date": "2020-09-01", "paid_price": 2.10, "current_value": 10.55, "growth": 402.38 }, { "minifig_number": "col208", "name": "Hot Dog Man", "aquired_date": "2022-07-10", "paid_price": 3.99, "current_value": 13.44, "growth": 236.84 } ], "periods": [ { "value": 587.28, "date": "2024-01-01", "minifigs_count": 23 }, { "value": 583.29, "date": "2023-12-01", "minifigs_count": 23 }, { "value": 574.85, "date": "2023-11-01", "minifigs_count": 22 }, { "value": 485.50, "date": "2023-10-01", "minifigs_count": 19 } ] } }

Please note: The above example was truncated for brevity. The API will return all minifigs in the collection.

Minifig collection object attributes
  • minifigs_count: <integer> The number of total minifigs in the collection.
  • minifigs_unique_count: <integer> The number of unique minifigs in the collection.
  • current_value: <decimal> The current estimated value of the collection in the currency specified.
  • currency: <string> The currency code of the current_value and the values in the set's object. The currency is either USD by default or the ISO 4217 currency code specified by the currency query parameter.
  • minifigs: <collection> Each minifig in the collection.
    • item_id: <integer> Identifies this copy in the endpoints that change your collection. Only present for a copy that has details saved (a price, date, notes or named collection).
    • minifig_number: <string> The number of the minifig.
    • name: <string> The name of the minifig.
    • collection: <string> If the minifig belongs to a user named collection, this is the name. Only for members with collections enabled.
    • aquired_date: <string> The date the minifig was originally acquired.
    • paid_price: <decimal> Price you paid for the minifig in the currency specified. Left out when no price was entered.
    • current_value: <decimal> The current estimated value of the minifig in the currency specified.
    • growth: <decimal> The percent of growth based on the current value and the paid price, or since the minifig was first valued when no price was entered.
  • periods: <collection> These are snapshots of the value of your collection. The periods are sorted by date, newest first, up to 48 periods (each period is roughly a month). The first period is always the current day.
    • value: <decimal> The value of the collection at the period specified by the date. The value is in the currency specified.
    • date: <string> The date of the period in YYYY-MM-DD.
    • minifigs_count: <int> The number of minifigs in the collection during that period.

Get my collection summary

GEThttps://www.brickeconomy.com/api/v1/collection/summary

Returns the figures of your My Collection page: the value of your collection, how it has changed, where it is projected to go, and your best performing sets and minifigs.

A node is left out when the page has nothing to show for it, for example a change when your collection does not have enough history yet. The two projected values are returned for Premium members.

Query Parameters
currencystringdefaults to USD
The currency of the values returned. You must use valid currency codes (ISO 4217 format), as detailed in the currency section.
scopestring
Use sets or minifigs for the figures of your sets or your loose minifigs alone. Leave it out for both together.
Headers
x-apikeystringrequired
Your API key
Example request
GET /api/v1/collection/summary HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
Example response
{ "data": { "currency": "USD", "scope": "all", "current_value": 24310.52, "paid_total": 15120.00, "gain_vs_paid": 9190.52, "gain_vs_paid_percent": 60.78, "projected_value_2_years": 27988.10, "projected_value_2_years_percent": 15.13, "projected_value_5_years": 33870.44, "projected_value_5_years_percent": 39.32, "change_30_days": { "period": "30 days", "percent": 0.30, "amount": 72.61 }, "change_long": { "period": "1 year", "percent": 13.08, "amount": 2811.90 }, "change_ytd": { "period": "year to date", "percent": 12.67, "amount": 2733.75 }, "sets": { "owned": 142, "owned_unique": 118, "owned_new": 139, "owned_used": 3, "pieces_count": 104230, "minifigs_count": 431, "current_value": 23755.48, "current_value_new": 23381.21, "current_value_used": 374.27, "paid": 15021.00, "gain_vs_paid_percent": 58.15 }, "minifigs": { "owned": 24, "owned_unique": 23, "current_value": 555.04, "paid": 99.00, "gain_vs_paid_percent": 460.65 }, "top_gainers_30_days": [ { "set_number": "75144-1", "name": "Snowspeeder", "url": "https://www.brickeconomy.com/set/75144-1/lego-star-wars-snowspeeder", "owned": 1, "percent": 18.75, "from_value": 484.20, "to_value": 575.00, "gain": 90.80 } ], "best_buys": [ { "set_number": "10212-1", "name": "Imperial Shuttle", "url": "https://www.brickeconomy.com/set/10212-1/lego-star-wars-imperial-shuttle", "owned": 1, "percent": 696.92, "from_value": 250.00, "to_value": 1992.29 } ], "biggest_wins": [ { "set_number": "10212-1", "name": "Imperial Shuttle", "url": "https://www.brickeconomy.com/set/10212-1/lego-star-wars-imperial-shuttle", "owned": 1, "percent": 696.92, "from_value": 250.00, "to_value": 1992.29, "gain": 1742.29 } ], "top_predicted": [ { "set_number": "10251-1", "name": "Brick Bank", "url": "https://www.brickeconomy.com/set/10251-1/lego-brick-bank", "owned": 1, "percent": 36.62, "from_value": 638.63, "to_value": 872.49 } ], "top_predicted_by_gain": [ { "set_number": "10251-1", "name": "Brick Bank", "url": "https://www.brickeconomy.com/set/10251-1/lego-brick-bank", "owned": 1, "percent": 36.62, "from_value": 638.63, "to_value": 872.49, "gain": 233.86 } ] } }

Please note: The above example was truncated for brevity. Each list holds up to 5 items.

Summary object attributes
  • currency: <string> The currency code of every value in the response.
  • scope: <string> all, sets or minifigs.
  • current_value: <decimal> The current estimated value of your sets and loose minifigs.
  • paid_total: <decimal> What you paid, adding the paid of the sets and minifigs nodes. A set with no price entered counts at its retail price.
  • gain_vs_paid, gain_vs_paid_percent: <decimal> The current value against what you paid.
  • projected_value_2_years, projected_value_5_years: <decimal> The forecast value of your collection, each with a _percent node comparing it with the current value. Premium members only.
  • change_30_days, change_long, change_ytd: <object> How the value of your collection has changed.
    • period: <string> The time covered. change_long covers 1 year once your collection has more than a year of history, and 90 days before that.
    • percent: <decimal> The change in percent.
    • amount: <decimal> The change in the currency specified.
    • market_estimate: <boolean> True when a collection of loose minifigs has no history yet and the change is estimated from the market.
  • sets: <object> Your owned sets: the number owned, unique, new and used, pieces and minifigs, the current value in total and for new and used sets, what you paid, and the gain in percent.
  • minifigs: <object> Your owned loose minifigs: the number owned and unique, the current value, what you paid, and the gain in percent.
  • top_gainers_30_days: <collection> Your retired sets that gained the most value in the last 30 days.
  • best_buys: <collection> Ranked by the change in percent against what you paid. Counts the copies that have details saved. A copy given details without a price counts at the set's retail price.
  • biggest_wins: <collection> The same copies, ranked by the amount gained. In both lists the figures are negative for a copy worth less than you paid.
  • top_predicted: <collection> Ranked by the percent the 2 year forecast is above the current value.
  • top_predicted_by_gain: <collection> Ranked by the amount the 2 year forecast is above the current value.
    • set_number or minifig_number: <string> The number of the set or minifig.
    • name: <string> Its name.
    • url: <string> Its page on BrickEconomy.
    • owned: <integer> The number of copies counted.
    • percent: <decimal> The change in percent.
    • from_value: <decimal> The starting amount: the value 30 days ago, what you paid, or the current value for the forecast lists.
    • to_value: <decimal> The amount it is compared with: the current value, or the 2 year forecast for the forecast lists.
    • gain: <decimal> The gain across the copies counted. Only in the lists ranked by gain.

Change my collection

POSThttps://www.brickeconomy.com/api/v1/collection/sets/add
POSThttps://www.brickeconomy.com/api/v1/collection/sets/update
POSThttps://www.brickeconomy.com/api/v1/collection/sets/remove
POSThttps://www.brickeconomy.com/api/v1/collection/minifigs/add
POSThttps://www.brickeconomy.com/api/v1/collection/minifigs/update
POSThttps://www.brickeconomy.com/api/v1/collection/minifigs/remove

Adds, changes and removes the sets and loose minifigs you own. Each request works on one set or minifig.

Write access is off until you switch it on. Open your API profile page and switch on write access for your API key. Until then these endpoints return 403 with ForbiddenError. Changing your API key switches it off again.

These endpoints take POST with a JSON body in UTF-8. Send numbers as numbers and true as true, not as text. A body with a field the endpoint does not know is refused, so a misspelled field is never ignored.

How your collection is stored
For each set or minifig you own, your collection holds the number of copies. A copy only has details (a price, date, notes, condition or named collection) once you enter one. A copy with details has an item_id, which the collection endpoints return. A copy without details has none.
Body, all three actions
set_number or minifig_numberstringrequired
The number of the set (for example 10294-1) on the sets endpoints, or of the minifig (for example sw0509) on the minifigs endpoints.
Body, add
quantityintegerdefaults to 1
The number of copies to add, from 1 to 100. You can own up to 1,000 copies of a set and 2,000 of a minifig.
Any of the detail fields below. When you send one, every copy added gets those details and its own item_id.
Body, update
item_idinteger
The copy to change.
blank_copyboolean
Send true to put the details on a copy that has none yet. That copy then gets an item_id. Sending the same request again would fill a second copy.
When you own exactly one copy, neither is needed. With more than one, send one of the two.
One or more of the detail fields below. Only the fields you send are changed.
Body, remove
Exactly one of the following, and nothing else.
item_idinteger
Removes that copy.
quantityinteger
Removes that many copies without details. When the copies left all have details, name one by item_id.
allboolean
Send true to remove every copy and all their details.
Detail fields, for add and update
paid_pricedecimal
What you paid for the copy. When a set is given details without a price, its retail price is used, as on the website.
currencystringdefaults to the currency of your profile's region
The currency of paid_price, as detailed in the currency section. Only together with paid_price.
conditionstring
Sets only: new, used_as_new, used_complete or used_incomplete.
acquired_datestring
The date you got the copy, as YYYY-MM-DD, not in the future. An empty text clears the date.
notesstring
Up to 250 characters, without < or >. An empty text clears the notes.
collectionstring
The name of one of your named collections. An empty text moves the copy back to your default collection. Only for members with collections enabled.
Headers
x-apikeystringrequired
Your API key
Example request
POST /api/v1/collection/sets/add HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
Content-Type: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
 
{ "set_number": "10294-1", "quantity": 1, "paid_price": 629.99, "currency": "USD", "condition": "new", "acquired_date": "2026-09-30", "notes": "Birthday gift" }
Example response
{ "data": { "set_number": "10294-1", "owned": 1, "wanted": false, "item_ids": [ 9413784 ] } }
Example request, remove one copy
POST /api/v1/collection/sets/remove HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
Content-Type: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
 
{ "set_number": "10294-1", "item_id": 9413784 }
Example error
{ "error": "InvalidArgumentError", "message": "the copies left have details, give an item_id or all" }
Response attributes
  • set_number or minifig_number: <string> The number of the set or minifig that was changed.
  • owned: <integer> The number of copies you own after the change.
  • wanted: <boolean> Whether it is on your wanted list. Owning and wanting are independent.
  • item_ids: <collection> The item_id of each copy that was given details or changed by this request.

If a change request returns GeneralError, request your collection before sending it again, since part of the change may have been made.

Get my wanted lists

GEThttps://www.brickeconomy.com/api/v1/wanted/sets
GEThttps://www.brickeconomy.com/api/v1/wanted/minifigs

Returns your wanted sets or your wanted loose minifigs, with the totals shown on your wanted pages. An empty list returns a count of 0.

Query Parameters
currencystringdefaults to USD
The currency of the values returned. You must use valid currency codes (ISO 4217 format), as detailed in the currency section.
Headers
x-apikeystringrequired
Your API key
Example request
GET /api/v1/wanted/sets HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
Example response
{ "data": { "sets_count": 2, "sets_pieces_count": 11597, "sets_minifigs_count": 8, "retiring_soon_count": 1, "still_at_retail_count": 1, "still_at_retail_value": 679.99, "retail_value": 879.98, "current_value": 1215.42, "currency": "USD", "sets": [ { "set_number": "10294-1", "name": "Titanic", "theme": "Icons", "subtheme": "", "year": 2021, "pieces_count": 9090, "minifigs_count": 0, "retired": false, "retiring_soon": true, "retail_price": 679.99, "current_value": 795.42, "url": "https://www.brickeconomy.com/set/10294-1/lego-titanic" } ] } }

Please note: The above example was truncated for brevity. The API will return all sets on your wanted list.

Wanted sets object attributes
  • sets_count, sets_pieces_count, sets_minifigs_count: <integer> The number of wanted sets, and the pieces and minifigs in them.
  • retiring_soon_count: <integer> The number of wanted sets expected to retire within a year.
  • still_at_retail_count, still_at_retail_value: The wanted sets that can still be bought at retail, and their retail value.
  • retail_value: <decimal> The retail value of all wanted sets.
  • current_value: <decimal> The current estimated value of all wanted sets.
  • currency: <string> The currency code of the values.
  • sets: <collection> Each wanted set, sorted by set number, with its number, name, theme, subtheme, year, pieces, minifigs, whether it is retired or retiring_soon, its retail_price, its current_value and its page url.
Wanted minifigs object attributes
  • minifigs_count: <integer> The number of wanted minifigs.
  • current_value: <decimal> Their current estimated value.
  • currency: <string> The currency code of the values.
  • minifigs: <collection> Each wanted minifig, sorted by minifig number, with its minifig_number, name, current_value and page url.

Change my wanted lists

POSThttps://www.brickeconomy.com/api/v1/wanted/sets/add
POSThttps://www.brickeconomy.com/api/v1/wanted/sets/remove
POSThttps://www.brickeconomy.com/api/v1/wanted/minifigs/add
POSThttps://www.brickeconomy.com/api/v1/wanted/minifigs/remove

Puts a set or minifig on your wanted list, or takes it off. These endpoints follow the same rules as Change my collection: write access must be switched on, and the body is JSON. Sending the same request twice does no harm.

Body
set_number or minifig_numberstringrequired
The number of the set or minifig. A wanted item has no quantity or details, so no other field is taken.
Headers
x-apikeystringrequired
Your API key
Example request
POST /api/v1/wanted/sets/add HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
Content-Type: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
 
{ "set_number": "10294-1" }
Example response
{ "data": { "set_number": "10294-1", "owned": 0, "wanted": true, "item_ids": [] } }

Get my sales ledger

GEThttps://www.brickeconomy.com/api/v1/salesledger

Returns your sales ledger. The values of each sale are in the currency that was saved with the sale. Unlike the other endpoints, the sales ledger takes no currency parameter and does not convert.

Headers
x-apikeystringrequired
Your API key
Example request
GET /api/v1/salesledger HTTP/1.1
Host: www.brickeconomy.com
Accept: application/json
User-Agent: <your user agent>
x-apikey: <your api key>
Example response
{ "data": { "set_sales_count": 6, "minifig_sales_count": 1, "set_sales": [ { "set_number": "10292-1", "name": "The Friends Apartments", "theme": "Icons", "year": 2021, "pieces_count": 2048, "minifigs_count": 7, "currency": "USD", "sale_price_total": 84.00, "sale_price_unit": 78.00, "sale_price_shipping": 5.00, "sale_price_fees": 5.00, "sale_quantity": 1, "sale_condition": "new", "sale_date": "2021-03-03", "buy_date": "2020-01-01", "buy_condition": "new", "buy_price": 78.00 }, { "set_number": "7190-1", "name": "Millennium Falcon", "theme": "Star Wars", "subtheme": "Episode IV", "year": 2000, "pieces_count": 663, "minifigs_count": 6, "currency": "USD", "sale_price_total": 425.00, "sale_price_unit": 415.00, "sale_price_shipping": 10.00, "sale_quantity": 1, "sale_condition": "new", "sale_date": "2022-02-11", "buy_date": "2022-01-01", "buy_condition": "new", "buy_price": 90.00 } ], "minifig_sales": [ { "minifig_number": "sw0451", "name": "Han Solo", "currency": "USD", "sale_price_total": 64.00, "sale_price_unit": 58.00, "sale_price_shipping": 5.00, "sale_price_fees": 5.00, "sale_quantity": 10, "sale_date": "2021-03-03", "buy_date": "2020-01-01", "buy_price": 38.00 } ] } }

Please note: The above example was truncated for brevity. The API will return all data in your sales ledger.

Sales ledger object attributes
  • set_sales_count: <integer> The number of sets sold, the quantities of all set sales added together.
  • minifig_sales_count: <integer> The number of minifigs sold, the quantities of all minifig sales added together.
  • set_sales: <collection> Each set sale.
    • set_number: <string> The number of the set.
    • name: <string> The name of the set.
    • theme: <string> The set's top level theme.
    • subtheme: <string> The set's second level theme/subtheme.
    • year: <integer> The year the set was initially released.
    • pieces_count: <integer> Number of pieces in the set.
    • currency: <string> The currency code that pertains to all values, both sale and buy.
    • sale_price_total: <decimal> The total sold price of the sale.
    • sale_price_unit: <decimal> The unit sold price of the sale.
    • sale_price_shipping: <decimal> Additional shipping price of the sale.
    • sale_price_fees: <decimal> Additional unspecified fees of the sale.
    • sale_quantity: <integer> The number of sets in the sale.
    • sale_condition: <string> The condition of the set(s) in the sale (new, used_as_new, used_complete, used_incomplete). Left out when no condition was entered.
    • sale_date: <string> The date the set(s) were sold (YYYY-MM-DD).
    • sale_notes: <string> Any sales notes.
    • buy_date: <string> The date the original items were purchased (YYYY-MM-DD).
    • buy_notes: <string> Any purchase notes.
    • buy_condition: <string> The condition the set(s) were originally purchased in (new, used_as_new, used_complete, used_incomplete). Left out when no condition was entered.
    • buy_price: <decimal> The price originally paid for the set(s).
  • minifig_sales: <collection> Each minifig sale.
    • minifig_number: <string> The number of the minifig.
    • name: <string> The name of the minifig.
    • currency: <string> The currency code that pertains to all values, both sale and buy.
    • sale_price_total: <decimal> The total sold price of the sale.
    • sale_price_unit: <decimal> The unit sold price of the sale.
    • sale_price_shipping: <decimal> Additional shipping price of the sale.
    • sale_price_fees: <decimal> Additional unspecified fees of the sale.
    • sale_quantity: <integer> The number of minifigs in the sale.
    • sale_condition: <string> The condition of the minifig(s) in the sale (new, used_as_new, used_complete, used_incomplete). Left out when no condition was entered.
    • sale_date: <string> The date the minifig(s) were sold (YYYY-MM-DD).
    • sale_notes: <string> Any sales notes.
    • buy_date: <string> The date the original items were purchased (YYYY-MM-DD).
    • buy_notes: <string> Any purchase notes.
    • buy_condition: <string> The condition the minifig(s) were originally purchased in (new, used_as_new, used_complete, used_incomplete). Left out when no condition was entered.
    • buy_price: <decimal> The price originally paid for the minifig(s).