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

The BrickEconomy API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

The BrickEconomy API doesn’t support bulk updates. You can work on only one object per request.

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 API keys to authenticate requests. You can view and manage your API keys in your profile page.

For authenticating with the API you must include the x-apikey header with your personal API key in all your requests.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth. Always use HTTPS instead of HTTP for making your requests.

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

Important, all of the headers above Accept, User-Agent, x-apikey are requerd or you will receive an authentication error from the server.

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.

Exceeding the daily rate limit results in all API requests returning a 429 error code with an error message (refer to the Errors section).

Your API profile page displays and tracks your daily API limits and quotas.

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.

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> }
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.

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 request for the object is unknown. For example when calling the set endpoint, if the number is not known this will be the response.
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.
403 ForbiddenError You are not allowed to perform the requested operation.
404 NotFoundError The requested resource was not found.
429 QuotaExceededError You have exceeded one of your daily quota. Daily quotas are reset every day at 00:00 UTC.
429 TooManyRequestsError Too many requests.

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:

Curency 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
RUB Russian Ruble Russia
ZAR South African Rand South Africa
MXN Mexican Peso Mexico
SGD Singapore Dollar Singapore
HKD Hong Kong Dollar Hong Kong
SEK Swedish Krona Sweden
NZD New Zealand Dollar New Zealand
NOK Norwegian Krone Norway
TRY Turkish Lira Turkey
DKK Danish Krone Denmark
PLN Polish Zloty Poland
Example request
GET /api/v1/minifig?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?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 provided API key ans <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 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 set number of a set to lookup. For example 10236 or 10236-1 is acceptable to lookup the Star Wars Ewok Village. If a set has multiple variations, appending the variation number, -1 as in 10236-1 is requierd.
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" ], "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_lastyear": 8.56, "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 } ], "price_events_used": [ { "date": "2024-01-16", "value": 519.99 }, { "date": "2024-01-02", "value": 439.41 }, { "date": "2023-12-20", "value": 404.03 }, { "date": "2023-12-02", "value": 404.48 }, { "date": "2023-11-12", "value": 419.23 }, { "date": "2023-10-19", "value": 455.76 }, { "date": "2023-10-10", "value": 403.05 }, { "date": "2023-07-21", "value": 390.32 }, { "date": "2023-07-04", "value": 372.58 }, { "date": "2023-06-23", "value": 385.99 }, { "date": "2023-06-06", "value": 355.17 } ], "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.

Set object attributes
  • retired: <boolean> Indication if the set has been retired from first party retail sales.
  • set_number: <string> The number of the set that corresponds to the path paramater 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 exists.
  • 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.
  • availability: <string> The general sales availability of the set (retail, relaillimited, exclusive, exclusivelegoland, promotion, 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 estimated value of a new, factory sealed set in the currency specified.
  • current_value_used: <decimal> The current estimated value of a used (complete with all parts) set in the currency specified.
  • current_value_used_low: <decimal> The current estimated value of a used (complete with all parts) set in the currency specified.
  • current_value_used_high: <decimal> The current estimated high value range of a used (complete with all parts) set in the currency specified.
  • 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.
  • forecast_value_new_5_years: <decimal> The forecasted future estimated value in 2 years from today, of a new, factory sealed set in the currency specified.
  • rolling_growth_lastyear: <decimal> This is the average rolling growth, in percent, of the set over previous full year. Rolling growth calculates the growth rate over a fixed period as new data points are added, providing a smoothed, continuous perspective..
  • rolling_growth_12months: <decimal> This is the average rolling growth, in percent, of the set over the last 12 months.
  • price_events_new: <collection> The last 12 interesting price events that put various pressure on the set's price. The collection is an array of date (YYYY-MM-DD) and value in the specified currency.
  • 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 paramater.

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 minifig number of the minifg to lookup. For example sw0509 is acceptable to lookup the Luke Skywalker of 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": "December 2012", "current_value_new": 7.27, "price_events_new": [ { "date": "2024-01-14", "value": 7.26 }, { "date": "2023-12-31", "value": 7.20 }, { "date": "2023-12-18", "value": 7.18 }, { "date": "2023-12-01", "value": 7.10 }, { "date": "2023-11-11", "value": 7.12 }, { "date": "2023-11-03", "value": 7.13 }, { "date": "2023-10-17", "value": 7.11 }, { "date": "2023-10-03", "value": 7.09 }, { "date": "2023-10-01", "value": 7.08 }, { "date": "2023-09-18", "value": 7.07 }, { "date": "2023-09-04", "value": 7.05 }, { "date": "2023-08-15", "value": 7.03 } ], "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 minifig.

Minifig object attributes
  • minifig_number: <string> The number of the minifig that corresponds to the path paramater minifig number.
  • name: <string> The name of the minifig.
  • theme: <string> The minifigs's top level theme.
  • subtheme: <string> The minifigs's second level theme/subtheme.
  • year: <integer> The year the minifig was initially released.
  • released_date: <string> The date the minifig was released as YYYY-MM-DD.
  • current_value_new: <decimal> The current estimated value of a new minifig in the currency specified.
  • price_events_new: <collection> The last 12 interesting price events that put various pressure on the minifig's price. The collection is an array of date (YYYY-MM-DD) and value in the specified currency.
  • 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 paramater.

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 paramater.
  • sets: <collection> Each set in the 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 exists.
    • retail_price: <decimal> The actual retail price the set was released for in the currency specified.
    • 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.
    • aquired_date: <string> The date the set was originally aquired.
    • condition: <string> The spcified condition of the set (new, used_as_new, used_complete, used_incomplete).
    • paid_price: <decimal> Price you paid for the set.
    • current_value: <decimal> The current estimated value of a 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.
  • periods: <collection> These are snapshots of the value of your collection. Each growth peroid in the collection sorted by date descending up to 48 periods (each period is roughly a month). The first period is always the current day.
    • value: <decimal> The value of the set at the peroid 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 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 paramater.
  • minifigs: <collection> Each minifig in the 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.
    • aquired_date: <string> The date the minifig was originally aquired.
    • paid_price: <decimal> Price you paid for the minifig.
    • current_value: <decimal> The current estimated value of a of the minifig.
    • growth: <decimal> The percent of growth based on the current value and the paid price.
  • periods: <collection> These are snapshots of the value of your collection. Each peroid in the collection sorted by date descending up to 48 periods (each period is roughly a month). The first period is always the current day.
    • value: <decimal> The value of the set at the peroid 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 minifigs in the collection during that period.

Get my sales ledger

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

Returns your sale ledger data set. Each sales record values are based on the currency defined in the record at the time of recording. Unlike many APIs, the sales ledger by default uses the currency of record.

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 yoru sales ledger.

Sales ledger object attributes
  • set_sales_count: <integer> The number of set sales.
  • minifig_sales_count: <integer> The number of minifig sales.
  • 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 set's in the sale.
    • sale_condition: <string> The condition of the set(s) in the sale (new, used_as_new, used_complete, used_incomplete).
    • 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).
    • 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 minifig's in the sale.
    • sale_condition: <string> The condition of the minifig(s) in the sale (new, used_as_new, used_complete, used_incomplete).
    • 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).
    • buy_price: <decimal> The price originally paid for the minifig(s).