{"openapi":"3.1.0","info":{"title":"Brick Storage LEGO® API","version":"1.1.0","description":"LEGO® set data, minifigures, market values & price history. All via a free LEGO® REST API. 25 requests per day free.","termsOfService":"https://brick-storage.com/agb","contact":{"name":"Brick Storage","url":"https://brick-storage.com/api-docs"}},"externalDocs":{"description":"Documentation","url":"https://brick-storage.com/api-docs"},"servers":[{"url":"https://api.brick-storage.com/functions/v1/api-gateway"}],"security":[{"apiKey":[]}],"tags":[{"name":"Sets"},{"name":"Minifigs"},{"name":"Batch"},{"name":"Themes"},{"name":"Meta"}],"paths":{"/sets":{"get":{"operationId":"searchSets","summary":"Search LEGO® Sets","description":"Search and filter the set catalog: search from 3 characters, theme, year, lifecycle, piece and price range, sorting. As on the website, books, CMF packs, gear and DUPLO are hidden; hide_books=false etc. includes them. Page with offset up to 1,000, beyond that with cursor.\n\nBatch Set Lookup: Up to 50 set numbers in one request, with the same fields as the set details. Each id counts as one request against the daily limit and credits; the per-minute limit counts the call once. If the quota does not cover every id, nothing is counted (429). Numbers without a match are listed in not_found.","tags":["Sets","Batch"],"parameters":[{"name":"search","in":"query","required":false,"description":"Search term: name or set number, 3 to 100 characters. Results come in relevance order.","schema":{"type":"string"},"example":"millennium falcon"},{"name":"theme","in":"query","required":false,"description":"Theme","schema":{"type":"string"},"example":"Star Wars"},{"name":"subtheme","in":"query","required":false,"description":"Subtheme","schema":{"type":"string"},"example":"Ultimate Collector Series"},{"name":"year","in":"query","required":false,"description":"Catalog year (four digits)","schema":{"type":"integer"},"example":2024},{"name":"lifecycle","in":"query","required":false,"description":"Comma-separated lifecycle filter: upcoming, available, retiring, retired (all when absent)","schema":{"type":"string"},"example":"retiring,retired"},{"name":"min_parts","in":"query","required":false,"description":"Minimum piece count","schema":{"type":"integer","minimum":0},"example":1000},{"name":"max_parts","in":"query","required":false,"description":"Maximum piece count","schema":{"type":"integer","minimum":0}},{"name":"min_price","in":"query","required":false,"description":"Minimum retail price in EUR","schema":{"type":"number","minimum":0}},{"name":"max_price","in":"query","required":false,"description":"Maximum retail price in EUR","schema":{"type":"number","minimum":0},"example":200},{"name":"hide_books","in":"query","required":false,"description":"Hide books (as the website does); false includes them","schema":{"type":"boolean","default":true}},{"name":"hide_cmf","in":"query","required":false,"description":"Hide collectible minifigure packs; false includes them","schema":{"type":"boolean","default":true}},{"name":"hide_gear","in":"query","required":false,"description":"Hide gear (bags, clocks, key chains, ...); false includes it","schema":{"type":"boolean","default":true}},{"name":"hide_duplo","in":"query","required":false,"description":"Hide DUPLO; false includes it","schema":{"type":"boolean","default":true}},{"name":"sort_by","in":"query","required":false,"description":"Sort field; with search, relevance comes first and this orders equally relevant sets. current_value_new lists only sets with a market value from at least 3 sellers that is not flagged as suspect.","schema":{"type":"string","enum":["year","name","num_parts","current_value_new"],"default":"year"},"example":"current_value_new"},{"name":"sort_order","in":"query","required":false,"description":"Sort direction; missing values come last either way","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"limit","in":"query","required":false,"description":"Results per page (larger values are capped at 100)","schema":{"type":"integer","default":24,"minimum":1},"example":24},{"name":"offset","in":"query","required":false,"description":"Offset, at most 1000. Deeper pages: cursor. With search, results are the 1,000 best matches.","schema":{"type":"integer","default":0,"minimum":0,"maximum":1000},"example":0},{"name":"cursor","in":"query","required":false,"description":"next_cursor of the previous page (browse without search only). Stable order, no depth limit; bound to the same filters and sort.","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated fields to return per item (all when absent). The catalog number, quantity and requested_id always stay; an unknown field is a 400.","schema":{"type":"string"},"example":"set_num,title,market_value_new"},{"name":"lang","in":"query","required":false,"description":"Language of title and description","schema":{"type":"string","enum":["en","de"],"default":"en"},"example":"de"},{"name":"ids","in":"query","required":false,"description":"Batch lookup: up to 50 comma-separated set numbers. Each id counts as one request against the daily limit and credits; the per-minute limit counts the call once. Cannot be combined with list parameters.","schema":{"type":"string"},"example":"75192,10497-1,99999"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Daily request limit of the key","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left today before credits are used","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next reset (ISO 8601, midnight UTC)","schema":{"type":"string","format":"date-time"}},"ETag":{"description":"Weak validator of the payload (meta excluded); send it back as If-None-Match","schema":{"type":"string"}},"Cache-Control":{"description":"private, max-age in seconds","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"},"examples":{"search-sets":{"summary":"Search LEGO® Sets","value":{"success":true,"data":[{"set_num":"75192","title":"Millennium Falcon","year":2017,"theme":"Star Wars","subtheme":"Ultimate Collector Series","num_parts":7541,"image_url":"https://...","retail_price_eur":849.99,"market_value_new":758.46,"market_value_used":null,"value_source":"market_median","value_at":"2026-09-28T04:12:00+00:00","value_suspect":false,"offers_from_new":null,"lifecycle":"available","retired":false,"growth_12m_percent":-3.1,"url":"https://brick-storage.com/sets/75192"}],"pagination":{"total":1,"limit":24,"offset":0,"has_more":false,"next_cursor":null,"next_offset":null},"meta":{"requests_remaining":17,"daily_limit":25,"request_credits":0,"request_cost":1,"resets_at":"2026-10-01T00:00:00.000Z"}}},"batch-sets":{"summary":"Batch Set Lookup","value":{"success":true,"data":[{"requested_id":"75192","set_num":"75192","title":"Millennium Falcon","market_value_new":758.46,"lifecycle":"available"},{"requested_id":"10497-1","set_num":"10497","title":"Galaxy Explorer","market_value_new":112.9,"lifecycle":"retired"}],"not_found":["99999"],"meta":{"requests_remaining":14,"daily_limit":25,"request_credits":0,"request_cost":3,"resets_at":"2026-10-01T00:00:00.000Z"}}}}}}},"304":{"description":"Not modified (If-None-Match matched). Counted like a 200."},"400":{"description":"Invalid parameter (bad_request). Not counted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key deactivated (api_key_inactive)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown endpoint or item (not_found). Not counted for an unknown endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-minute limit (rate_limited), daily limit without credits (quota_exceeded) or too many failed authentications from this IP (too_many_auth_failures)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait (rate_limited, too_many_auth_failures)","schema":{"type":"integer"}}}},"500":{"description":"Internal error (internal_error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Query timeout (timeout) or limiter unavailable (unavailable); retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sets/{set_num}":{"get":{"operationId":"getSet","summary":"Get Set Details","description":"Get all details for a specific LEGO® set, including market values, forecasts, ratings and physical dimensions.","tags":["Sets"],"parameters":[{"name":"set_num","in":"path","required":true,"description":"Set number, with or without the \"-1\" suffix (75192 or 75192-1). A merged duplicate number answers with the kept set and \"redirected_from\".","schema":{"type":"string"},"example":"75192-1"},{"name":"fields","in":"query","required":false,"description":"Comma-separated fields to return per item (all when absent). The catalog number, quantity and requested_id always stay; an unknown field is a 400.","schema":{"type":"string"},"example":"set_num,title,market_value,lifecycle"},{"name":"lang","in":"query","required":false,"description":"Language of title and description","schema":{"type":"string","enum":["en","de"],"default":"en"},"example":"de"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Daily request limit of the key","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left today before credits are used","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next reset (ISO 8601, midnight UTC)","schema":{"type":"string","format":"date-time"}},"ETag":{"description":"Weak validator of the payload (meta excluded); send it back as If-None-Match","schema":{"type":"string"}},"Cache-Control":{"description":"private, max-age in seconds","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"},"examples":{"get-set":{"summary":"Get Set Details","value":{"success":true,"data":{"set_num":"75192","title":"Millennium Falcon","year":2017,"theme":"Star Wars","num_parts":7541,"image_url":"https://...","description":"Build and display the ultimate Millennium Falcon...","retail_price":{"eur":849.99,"usd":849.99,"gbp":734.99,"cad":null,"aud":null},"market_value":{"new":758.46,"used":null,"used_low":null,"used_high":null},"market_value_new":758.46,"value_source":"market_median","value_at":"2026-09-28T04:12:00+00:00","value_suspect":false,"forecast":{"value_2y":null,"value_5y":null,"is_estimate":true},"lifecycle":"available","retired":false,"availability":"available","retired_date":null,"retired_date_precision":null,"released_date":"2018-01-10","growth_12m_percent":-3.1,"rating":4.8,"rating_count":245,"dimensions":"21 x 84 x 56 cm","weight":"14.5 kg","url":"https://brick-storage.com/sets/75192"},"meta":{"requests_remaining":17,"daily_limit":25,"request_credits":0,"request_cost":1,"resets_at":"2026-10-01T00:00:00.000Z"}}}}}}},"304":{"description":"Not modified (If-None-Match matched). Counted like a 200."},"400":{"description":"Invalid parameter (bad_request). Not counted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key deactivated (api_key_inactive)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown endpoint or item (not_found). Not counted for an unknown endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-minute limit (rate_limited), daily limit without credits (quota_exceeded) or too many failed authentications from this IP (too_many_auth_failures)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait (rate_limited, too_many_auth_failures)","schema":{"type":"integer"}}}},"500":{"description":"Internal error (internal_error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Query timeout (timeout) or limiter unavailable (unavailable); retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sets/{set_num}/minifigs":{"get":{"operationId":"setMinifigs","summary":"Set Minifigures","description":"List of all minifigures included in a specific set, including quantity and market value.","tags":["Sets","Minifigs"],"parameters":[{"name":"set_num","in":"path","required":true,"description":"Set number, with or without \"-1\"","schema":{"type":"string"},"example":"75192"},{"name":"fields","in":"query","required":false,"description":"Comma-separated fields to return per item (all when absent). The catalog number, quantity and requested_id always stay; an unknown field is a 400.","schema":{"type":"string"},"example":"fig_num,title,market_value"},{"name":"lang","in":"query","required":false,"description":"Language of title and description","schema":{"type":"string","enum":["en","de"],"default":"en"},"example":"de"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Daily request limit of the key","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left today before credits are used","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next reset (ISO 8601, midnight UTC)","schema":{"type":"string","format":"date-time"}},"ETag":{"description":"Weak validator of the payload (meta excluded); send it back as If-None-Match","schema":{"type":"string"}},"Cache-Control":{"description":"private, max-age in seconds","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"},"examples":{"set-minifigs":{"summary":"Set Minifigures","value":{"success":true,"data":[{"quantity":1,"fig_num":"sw0532","title":"Chewbacca","year":2014,"theme":"Star Wars","image_url":"https://...","market_value":4.4,"value_source":"single_market","value_at":"2026-09-20T03:00:00+00:00","value_suspect":false,"offers_from_new":null,"url":"https://brick-storage.com/minifigs/sw0532"}],"meta":{"requests_remaining":17,"daily_limit":25,"request_credits":0,"request_cost":1,"resets_at":"2026-10-01T00:00:00.000Z"}}}}}}},"304":{"description":"Not modified (If-None-Match matched). Counted like a 200."},"400":{"description":"Invalid parameter (bad_request). Not counted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key deactivated (api_key_inactive)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown endpoint or item (not_found). Not counted for an unknown endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-minute limit (rate_limited), daily limit without credits (quota_exceeded) or too many failed authentications from this IP (too_many_auth_failures)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait (rate_limited, too_many_auth_failures)","schema":{"type":"integer"}}}},"500":{"description":"Internal error (internal_error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Query timeout (timeout) or limiter unavailable (unavailable); retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sets/{set_num}/price-history":{"get":{"operationId":"setPriceHistory","summary":"Set Price History","description":"Historical market value development of a set over time.","tags":["Sets"],"parameters":[{"name":"set_num","in":"path","required":true,"description":"Set number, with or without \"-1\"","schema":{"type":"string"},"example":"75192"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Daily request limit of the key","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left today before credits are used","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next reset (ISO 8601, midnight UTC)","schema":{"type":"string","format":"date-time"}},"ETag":{"description":"Weak validator of the payload (meta excluded); send it back as If-None-Match","schema":{"type":"string"}},"Cache-Control":{"description":"private, max-age in seconds","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"},"examples":{"set-price-history":{"summary":"Set Price History","value":{"success":true,"set_url":"https://brick-storage.com/sets/75192","data":[{"date":"2026-01-15","value_new":780,"value_used":610,"currency":"EUR"},{"date":"2026-06-15","value_new":765,"value_used":600,"currency":"EUR"}],"meta":{"requests_remaining":17,"daily_limit":25,"request_credits":0,"request_cost":1,"resets_at":"2026-10-01T00:00:00.000Z"}}}}}}},"304":{"description":"Not modified (If-None-Match matched). Counted like a 200."},"400":{"description":"Invalid parameter (bad_request). Not counted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key deactivated (api_key_inactive)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown endpoint or item (not_found). Not counted for an unknown endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-minute limit (rate_limited), daily limit without credits (quota_exceeded) or too many failed authentications from this IP (too_many_auth_failures)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait (rate_limited, too_many_auth_failures)","schema":{"type":"integer"}}}},"500":{"description":"Internal error (internal_error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Query timeout (timeout) or limiter unavailable (unavailable); retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/minifigs":{"get":{"operationId":"searchMinifigs","summary":"Search Minifigures","description":"Search the minifigure database by name, number, theme or year (search from 3 characters). Page with offset up to 1,000, beyond that with cursor.\n\nBatch Minifigure Lookup: Up to 50 figure numbers in one request, with the same fields as the minifigure details. Each id counts as one request against the daily limit and credits; the per-minute limit counts the call once. If the quota does not cover every id, nothing is counted (429). Numbers without a match are listed in not_found.","tags":["Minifigs","Batch"],"parameters":[{"name":"search","in":"query","required":false,"description":"Search term: name or figure number, 3 to 100 characters. Results come in relevance order.","schema":{"type":"string"},"example":"darth vader"},{"name":"theme","in":"query","required":false,"description":"Theme","schema":{"type":"string"},"example":"Star Wars"},{"name":"subtheme","in":"query","required":false,"description":"Subtheme","schema":{"type":"string"}},{"name":"year","in":"query","required":false,"description":"Release year (four digits)","schema":{"type":"integer"},"example":2024},{"name":"limit","in":"query","required":false,"description":"Results per page (larger values are capped at 100)","schema":{"type":"integer","default":24,"minimum":1},"example":24},{"name":"offset","in":"query","required":false,"description":"Offset, at most 1000. Deeper pages: cursor. With search, results are the 1,000 best matches.","schema":{"type":"integer","default":0,"minimum":0,"maximum":1000},"example":0},{"name":"cursor","in":"query","required":false,"description":"next_cursor of the previous page (browse without search only). Stable order, no depth limit; bound to the same filters and sort.","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated fields to return per item (all when absent). The catalog number, quantity and requested_id always stay; an unknown field is a 400.","schema":{"type":"string"},"example":"fig_num,title,market_value"},{"name":"lang","in":"query","required":false,"description":"Language of title and description","schema":{"type":"string","enum":["en","de"],"default":"en"},"example":"de"},{"name":"ids","in":"query","required":false,"description":"Batch lookup: up to 50 comma-separated figure numbers. Each id counts as one request against the daily limit and credits; the per-minute limit counts the call once. Cannot be combined with list parameters.","schema":{"type":"string"},"example":"sw0209,sw0532,fig-000001"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Daily request limit of the key","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left today before credits are used","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next reset (ISO 8601, midnight UTC)","schema":{"type":"string","format":"date-time"}},"ETag":{"description":"Weak validator of the payload (meta excluded); send it back as If-None-Match","schema":{"type":"string"}},"Cache-Control":{"description":"private, max-age in seconds","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"},"examples":{"search-minifigs":{"summary":"Search Minifigures","value":{"success":true,"data":[{"fig_num":"sw0209","title":"Darth Vader","year":2008,"theme":"Star Wars","num_parts":null,"image_url":"https://...","market_value":18.76,"value_source":"single_market","value_at":"2026-09-20T03:00:00+00:00","value_suspect":false,"offers_from_new":null,"url":"https://brick-storage.com/minifigs/sw0209"}],"pagination":{"total":42,"limit":24,"offset":0,"has_more":true,"next_cursor":null,"next_offset":24},"meta":{"requests_remaining":17,"daily_limit":25,"request_credits":0,"request_cost":1,"resets_at":"2026-10-01T00:00:00.000Z"}}},"batch-minifigs":{"summary":"Batch Minifigure Lookup","value":{"success":true,"data":[{"requested_id":"sw0209","fig_num":"sw0209","title":"Darth Vader","market_value":18.76},{"requested_id":"sw0532","fig_num":"sw0532","title":"Chewbacca","market_value":4.4}],"not_found":["fig-000001"],"meta":{"requests_remaining":14,"daily_limit":25,"request_credits":0,"request_cost":3,"resets_at":"2026-10-01T00:00:00.000Z"}}}}}}},"304":{"description":"Not modified (If-None-Match matched). Counted like a 200."},"400":{"description":"Invalid parameter (bad_request). Not counted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key deactivated (api_key_inactive)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown endpoint or item (not_found). Not counted for an unknown endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-minute limit (rate_limited), daily limit without credits (quota_exceeded) or too many failed authentications from this IP (too_many_auth_failures)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait (rate_limited, too_many_auth_failures)","schema":{"type":"integer"}}}},"500":{"description":"Internal error (internal_error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Query timeout (timeout) or limiter unavailable (unavailable); retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/minifigs/{fig_num}":{"get":{"operationId":"getMinifig","summary":"Get Minifigure Details","description":"All details for a specific minifigure including market data.","tags":["Minifigs"],"parameters":[{"name":"fig_num","in":"path","required":true,"description":"Figure number (BrickLink style like sw0209, or a Rebrickable fig-... number)","schema":{"type":"string"},"example":"sw0209"},{"name":"fields","in":"query","required":false,"description":"Comma-separated fields to return per item (all when absent). The catalog number, quantity and requested_id always stay; an unknown field is a 400.","schema":{"type":"string"},"example":"fig_num,title,market_value,offers"},{"name":"lang","in":"query","required":false,"description":"Language of title and description","schema":{"type":"string","enum":["en","de"],"default":"en"},"example":"de"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Daily request limit of the key","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left today before credits are used","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next reset (ISO 8601, midnight UTC)","schema":{"type":"string","format":"date-time"}},"ETag":{"description":"Weak validator of the payload (meta excluded); send it back as If-None-Match","schema":{"type":"string"}},"Cache-Control":{"description":"private, max-age in seconds","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"},"examples":{"get-minifig":{"summary":"Get Minifigure Details","value":{"success":true,"data":{"fig_num":"sw0209","title":"Darth Vader","year":2008,"theme":"Star Wars","num_parts":null,"image_url":"https://...","description":"Darth Vader minifigure...","market_value":18.76,"value_source":"single_market","value_at":"2026-09-20T03:00:00+00:00","value_suspect":false,"offers_from_new":null,"set_count":3,"offers":{"lowest_eur":7.31,"average_eur":14.16,"sellers_count":12,"qty_for_sale":30,"updated_at":"2026-02-23T21:42:17+00:00","fresh":false},"market_price_avg":null,"market_price_min":null,"sellers_count":null,"qty_for_sale":null,"url":"https://brick-storage.com/minifigs/sw0209"},"meta":{"requests_remaining":17,"daily_limit":25,"request_credits":0,"request_cost":1,"resets_at":"2026-10-01T00:00:00.000Z"}}}}}}},"304":{"description":"Not modified (If-None-Match matched). Counted like a 200."},"400":{"description":"Invalid parameter (bad_request). Not counted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key deactivated (api_key_inactive)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown endpoint or item (not_found). Not counted for an unknown endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-minute limit (rate_limited), daily limit without credits (quota_exceeded) or too many failed authentications from this IP (too_many_auth_failures)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait (rate_limited, too_many_auth_failures)","schema":{"type":"integer"}}}},"500":{"description":"Internal error (internal_error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Query timeout (timeout) or limiter unavailable (unavailable); retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/themes":{"get":{"operationId":"getThemes","summary":"All Available Themes","description":"List of all LEGO® themes in the database.","tags":["Themes"],"parameters":[{"name":"format","in":"query","required":false,"description":"simple: array of theme names; full: objects with counts, years and logo","schema":{"type":"string","enum":["simple","full"],"default":"simple"},"example":"full"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"description":"Daily request limit of the key","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left today before credits are used","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next reset (ISO 8601, midnight UTC)","schema":{"type":"string","format":"date-time"}},"ETag":{"description":"Weak validator of the payload (meta excluded); send it back as If-None-Match","schema":{"type":"string"}},"Cache-Control":{"description":"private, max-age in seconds","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"},"examples":{"get-themes":{"summary":"All Available Themes","value":{"success":true,"data":["Architecture","City","Creator","Friends","Harry Potter","Star Wars","Technic","..."],"meta":{"requests_remaining":17,"daily_limit":25,"request_credits":0,"request_cost":1,"resets_at":"2026-10-01T00:00:00.000Z"}}}}}}},"304":{"description":"Not modified (If-None-Match matched). Counted like a 200."},"400":{"description":"Invalid parameter (bad_request). Not counted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key (missing_api_key, invalid_api_key)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key deactivated (api_key_inactive)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Unknown endpoint or item (not_found). Not counted for an unknown endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-minute limit (rate_limited), daily limit without credits (quota_exceeded) or too many failed authentications from this IP (too_many_auth_failures)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait (rate_limited, too_many_auth_failures)","schema":{"type":"integer"}}}},"500":{"description":"Internal error (internal_error)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Query timeout (timeout) or limiter unavailable (unavailable); retry after Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"operationId":"getOpenApiSpec","summary":"This OpenAPI document","description":"Public, no API key, not counted.","tags":["Meta"],"security":[],"responses":{"200":{"description":"OpenAPI 3.1 document","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"bkv_ followed by 32 hex characters","description":"Create the key in Settings → API access. It is shown once; store it safely."}},"schemas":{"Error":{"type":"object","required":["success","error","code"],"properties":{"success":{"type":"boolean","const":false},"error":{"type":"string","description":"Human-readable message (may change)"},"code":{"type":"string","enum":["missing_api_key","invalid_api_key","api_key_inactive","too_many_auth_failures","rate_limited","quota_exceeded","bad_request","not_found","method_not_allowed","timeout","unavailable","internal_error"],"description":"Stable machine-readable code"},"meta":{"type":"object"}}}}}}