Piloterr

LEGO Product

Use in bulk with DataflowRun this endpoint over a file or a list, once or on a schedule.

GET
/v2/lego/product

Read a LEGO set on www.lego.com, including the selling price and whether it can be added to the cart.

Credit cost: 2 credits per call

Authorization

ApiKeyAuth
headerx-api-key<token>

Your API key. Include it in the x-api-key header for every request.

Query Parameters

query*string

Product URL on a kept locale, a slug such as taj-mahal-21056, or a set number such as 21056.

region?string

Shop locale when query is a slug or a set number. One of: cs-cz, da-dk, de-at, de-ch, de-de, de-lu, en-at, en-au, en-be, en-ca, en-ch, en-cz, en-de, en-dk, en-ee, en-es, en-fi, en-fr, en-gb, en-gr, en-hu, en-ie, en-it, en-lt, en-lu, en-lv, en-mx, en-my, en-nl, en-no, en-nz, en-pl, en-pt, en-se, en-sg, en-si, en-sk, en-us, es-es, es-mx, es-us, et-ee, fi-fi, fr-be, fr-ca, fr-ch, fr-fr, fr-lu, hu-hu, it-it, ja-jp, ko-kr, lt-lt, lv-lv, nb-no, nl-be, nl-nl, pl-pl, pt-pt, ro-ro, sk-sk, sv-se.

Default"fr-fr"
return_page_source?boolean

Return the rendered page HTML instead of the parsed product.

Defaultfalse
fields?string

Comma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).

is_async?boolean

Run the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.

Defaultfalse
soft_fail?boolean

Return HTTP 200 even when the request fails; the error is in the error field of the body.

Defaultfalse

Response Body

Successful response

application/json
  1. response
age?string
sku?string
url?string
brand?string
image?string
price?number
title?string
currency?string
in_stock?boolean
product_id?string
piece_count?integer
availability?string
price_display?string
compare_at_price?unknown
Example Request
curl -X GET 'https://api.piloterr.com/v2/lego/product?query=string'
Example Response
{
  "age": "18+",
  "sku": "6333038",
  "url": "https://www.lego.com/fr-fr/product/taj-mahal-21056",
  "brand": "LEGO®",
  "image": "https://www.lego.com/cdn/cs/set/assets/blt5d868260e893b88d/21056.jpg",
  "price": 119.99,
  "title": "Le Taj Mahal",
  "currency": "EUR",
  "in_stock": false,
  "product_id": "21056",
  "piece_count": 2022,
  "availability": "Discontinued",
  "price_display": "119,99 €",
  "compare_at_price": null
}