LEGO Search
Use in bulk with DataflowRun this endpoint over a file or a list, once or on a schedule.
Search a LEGO shop on www.lego.com and return set cards with the selling price.
Credit cost: 2 credits per call
ApiKeyAuthx-api-key<token>Your API key. Include it in the x-api-key header for every request.
query*stringKeyword, or a www.lego.com search URL on a kept locale.
page?numberPage number, starting at 1.
region?stringShop locale when query is a keyword. 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.
"fr-fr"return_page_source?booleanReturn the rendered page HTML instead of the parsed search.
falsefields?stringComma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).
is_async?booleanRun the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.
falsesoft_fail?booleanReturn HTTP 200 even when the request fails; the error is in the error field of the body.
falseSuccessful response
application/json- response
results?array<>pagination?curl -X GET 'https://api.piloterr.com/v2/lego/search?query=string'{
"results": [
{
"age": "18+",
"url": "https://www.lego.com/fr-fr/product/the-mandalorians-n-1-starfighter-75442",
"image": "https://www.lego.com/cdn/cs/set/assets/bltac214edb04c74236/blt2f8fb720e38f6e09-75442_Prod.png?fit=bounds&quality=80&width=400&height=400&dpr=1",
"price": 249.99,
"title": "Le chasseur N-1 du Mandalorien",
"rating": 4.8,
"currency": "EUR",
"product_id": "75442",
"piece_count": 1809,
"price_display": "249,99 €",
"compare_at_price": null
}
],
"pagination": {
"next": "https://www.lego.com/fr-fr/search?q=star+wars&page=2",
"page": 1,
"per_page": 24,
"total_pages": 22,
"total_results": 511
}
}