Guide
Search filter syntax
Filters are query parameters in the PHP bracket format. The same filters work on /search and /search/count; /cars accepts domains[] and is_leasing.
| Kind | Syntax |
|---|---|
| List of IDs | fuels[]=2&fuels[]=3 — repeat the key; commas aren't split |
| Brand + models | brands[0][id]=88&brands[0][models][]=573 |
| Several brands | brands[0][id]=88&brands[1][id]=13 |
| Range | year_from=2018&year_to=2022 — both ends inclusive |
| Flag | has_inspections=1 — send 1 or 0; true returns 422 |
| Leasing | is_leasing=0 — also matches listings with no flag |
| Price | price_from=10000¤cy=eur — filters in that currency |
| Location | countries[0][id]=208&countries[0][regions][]=1841610 |
- Categorical filters take numeric IDs. See Enum values for every ID.
currencyonly affects price filtering and sorting. Listing prices are always returned in their original currency.- For an exact VIN use
/cars/vin/{vin}. Thevinfilter on/searchis a partial match. - Omit filters you don't use. Empty values are validated and can return 422.
Filtered search
curl -g "https://api.lotarius.com/search?brands[0][id]=88&brands[0][models][]=573&year_from=2018&fuels[]=1&fuels[]=3&price_to=30000¤cy=eur&has_inspections=1&sort=newest&perPage=20&api_key=$CARS_API_KEY" \
-H "Accept: application/json"