Skip to content

Filter values

GET
/v1/catalog/facets
curl --request GET \
--url 'https://api.avtopodatki.si/v1/catalog/facets?lang=sl&available=true' \
--header 'Authorization: Bearer <token>'

Filter values with counts and labels, for building filters.

Takes the same filters as GET /v1/catalog/variants. Each group’s counts apply every filter except its own: with fuel_type=diesel chosen, the fuel group still shows how many petrol cars the other filters leave, while every other group counts diesels only. variants and models count what the whole filter set matches.

The values are the market API’s, labelled as GET /v1/market/filter-values labels them.

Requires the catalog.read permission.

lang
Lang

The labels’ language: sl (the default), en or hr.

string
default: sl
Allowed values: sl en hr

The labels’ language: sl (the default), en or hr.

brand_id
Brand Id

Repeat to match several.

Any of:
Array<integer>

Repeat to match several.

model_id
Model Id

Repeat to match several.

Any of:
Array<integer>

Repeat to match several.

brand
Brand

Brand name, case-insensitive. Repeat to match several; combines with brand_id (both must hold).

Any of:
Array<string>

Brand name, case-insensitive. Repeat to match several; combines with brand_id (both must hold).

q
Q

Substring of variant, model or brand.

Any of:
string
>= 1 characters <= 80 characters

Substring of variant, model or brand.

make
Make

Make, as on the market API: a slug (mercedes-benz) or a name in any spelling (Mercedes Benz, VW). An unknown make is a 422 naming the nearest.

Any of:
string
<= 120 characters

Make, as on the market API: a slug (mercedes-benz) or a name in any spelling (Mercedes Benz, VW). An unknown make is a 422 naming the nearest.

fuel_type
Fuel Type

Fuel, the market API’s values (petrol, diesel, electric, plugin_hybrid, …); repeat to match several. A mild hybrid is its fuel: find mild hybrids with powertrain=mhev.

Any of:
Array<string>
Allowed values: petrol diesel electric hybrid plugin_hybrid lpg cng hydrogen other

Fuel, the market API’s values (petrol, diesel, electric, plugin_hybrid, …); repeat to match several. A mild hybrid is its fuel: find mild hybrids with powertrain=mhev.

transmission
Transmission

manual, automatic, semi_automatic or cvt. Repeatable.

Any of:
Array<string>
Allowed values: manual automatic semi_automatic cvt other

manual, automatic, semi_automatic or cvt. Repeatable.

drive
Drive

fwd, rwd or awd. Repeatable.

Any of:
Array<string>
Allowed values: fwd rwd awd chain belt shaft other

fwd, rwd or awd. Repeatable.

powertrain
Powertrain

ice, mhev, hev, phev, erev, bev or fcev. Repeatable.

Any of:
Array<string>
Allowed values: ice mhev hev phev erev bev fcev

ice, mhev, hev, phev, erev, bev or fcev. Repeatable.

body_style
Body Style

Body, the market API’s car bodies (suv, hatchback, …). Repeatable.

Any of:
Array<string>
Allowed values: sedan hatchback wagon suv coupe convertible van minivan pickup microcar panel_van minibus chassis_cab dropside curtainsider box refrigerated tipper hooklift swap_body tractor_unit car_transporter tow_truck crane platform tanker concrete_mixer refuse timber livestock special city_bus intercity_bus coach scooter maxi_scooter naked touring sport enduro motocross supermoto trial cruiser moped minibike quad utv three_wheeler snowmobile ebike kick_scooter other

Body, the market API’s car bodies (suv, hatchback, …). Repeatable.

emission_class
Emission Class

Emission class (euro_6d, euro_6e, …). Repeatable.

Any of:
Array<string>
Allowed values: euro_1 euro_2 euro_3 euro_4 euro_5 euro_6 euro_6c euro_6d_temp euro_6d euro_6e euro_7 other

Emission class (euro_6d, euro_6e, …). Repeatable.

emission_class_min
Emission Class Min

This emission class or a later one: euro_6d takes euro_6e too.

Any of:
EmissionClass

European emission standard (Euro 1 … Euro 7).

EURO_6 is Euro 6 with its stage not stated. Rank with :data:avtopodatki_shared.values.EMISSION_ORDER, never by the value string.

string
Allowed values: euro_1 euro_2 euro_3 euro_4 euro_5 euro_6 euro_6c euro_6d_temp euro_6d euro_6e euro_7 other

This emission class or a later one: euro_6d takes euro_6e too.

price_min
Price Min

Minimum price in EUR.

Any of:
integer

Minimum price in EUR.

price_max
Price Max

Maximum price in EUR.

Any of:
integer

Maximum price in EUR.

power_kw_min
Power Kw Min

Minimum power in kW.

Any of:
integer

Minimum power in kW.

power_kw_max
Power Kw Max

Maximum power in kW.

Any of:
integer

Maximum power in kW.

range_km_min
Range Km Min

Minimum electric range in km.

Any of:
integer

Minimum electric range in km.

battery_kwh_min
Battery Kwh Min

Minimum battery capacity in kWh. Excludes vehicles without a battery.

Any of:
number

Minimum battery capacity in kWh. Excludes vehicles without a battery.

seats
Seats

Repeat to match several.

Any of:
Array<integer>

Repeat to match several.

doors
Doors

Repeat to match several.

Any of:
Array<integer>

Repeat to match several.

changed_30d
Changed 30D

true: only variants whose price changed in the last 30 days.

Any of:
boolean

true: only variants whose price changed in the last 30 days.

available
Available

true (default): currently on sale; false: no longer on sale; any: both.

string
default: true /^(true|false|any)$/

true (default): currently on sale; false: no longer on sale; any: both.

has_full_specs
Has Full Specs

true: only variants with full specifications; false: only those without (about 4%).

Any of:
boolean

true: only variants with full specifications; false: only those without (about 4%).

Successful Response

Media typeapplication/json
FacetsOut

Filter values with counts.

object
fuel_type
required
Fuel Type
Array<object>
FacetValue
object
value
required
Value
string
count
required
Count
integer
label
Label

How to show it, in the language asked for (lang), as GET /v1/market/filter-values labels the same values. A brand’s name.

Any of:
string
id
Id

The brand’s id, in brands only.

Any of:
integer
transmission
required
Transmission
Array<object>
FacetValue
object
value
required
Value
string
count
required
Count
integer
label
Label

How to show it, in the language asked for (lang), as GET /v1/market/filter-values labels the same values. A brand’s name.

Any of:
string
id
Id

The brand’s id, in brands only.

Any of:
integer
drive
required
Drive
Array<object>
FacetValue
object
value
required
Value
string
count
required
Count
integer
label
Label

How to show it, in the language asked for (lang), as GET /v1/market/filter-values labels the same values. A brand’s name.

Any of:
string
id
Id

The brand’s id, in brands only.

Any of:
integer
powertrain
required
Powertrain
Array<object>
FacetValue
object
value
required
Value
string
count
required
Count
integer
label
Label

How to show it, in the language asked for (lang), as GET /v1/market/filter-values labels the same values. A brand’s name.

Any of:
string
id
Id

The brand’s id, in brands only.

Any of:
integer
body_style
required
Body Style
Array<object>
FacetValue
object
value
required
Value
string
count
required
Count
integer
label
Label

How to show it, in the language asked for (lang), as GET /v1/market/filter-values labels the same values. A brand’s name.

Any of:
string
id
Id

The brand’s id, in brands only.

Any of:
integer
emission_class
required
Emission Class
Array<object>
FacetValue
object
value
required
Value
string
count
required
Count
integer
label
Label

How to show it, in the language asked for (lang), as GET /v1/market/filter-values labels the same values. A brand’s name.

Any of:
string
id
Id

The brand’s id, in brands only.

Any of:
integer
brands
required
Brands
Array<object>
FacetValue
object
value
required
Value
string
count
required
Count
integer
label
Label

How to show it, in the language asked for (lang), as GET /v1/market/filter-values labels the same values. A brand’s name.

Any of:
string
id
Id

The brand’s id, in brands only.

Any of:
integer
seats
Seats
Array<object>
FacetValue
object
value
required
Value
string
count
required
Count
integer
label
Label

How to show it, in the language asked for (lang), as GET /v1/market/filter-values labels the same values. A brand’s name.

Any of:
string
id
Id

The brand’s id, in brands only.

Any of:
integer
price_min
Price Min
Any of:
string
price_max
Price Max
Any of:
string
power_kw_min
Power Kw Min
Any of:
integer
power_kw_max
Power Kw Max
Any of:
integer
price_histogram
Price Histogram

Variants per 10.000 € of price, from 0 to 90.000 € and an open top bin. Variants without a published price are left out.

Array<object>
PriceBin
object
from
required
From

EUR, inclusive.

integer
to
To

EUR, exclusive; null for the top bin.

Any of:
integer
count
required
Count
integer
variants
Variants

Variants matching every filter.

integer
0
models
Models

Models with at least one of them.

integer
0

Example

{
"variants": 0,
"models": 0
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}