Skip to content

Accepted values for every listing filter

GET
/v1/market/filter-values
curl --request GET \
--url 'https://api.avtopodatki.si/v1/market/filter-values?lang=sl' \
--header 'Authorization: Bearer <token>'

Every value the filters of GET /v1/market/listings accept, each with a label to show and a count of active listings.

Build every filter from this; don’t hard-code values or labels.

  • Counts are active listings in category (cars by default) on site_id (or every marketplace you may see). They don’t follow the other filters, and are a few minutes old at most. null where a count means nothing (status, sort).
  • Fixed lists (fuel, transmission, class) keep values with no listings, at count: 0, so a filter’s options don’t come and go. Makes and models list only those with listings, most first.
  • Makes and models are the same for every marketplace: each site’s wording is mapped onto them when it is scraped. Send the value (a slug) as make= and model=.

Requires the market.read permission.

site_id
Site Id

Count this marketplace’s listings only. Without it, counts cover every marketplace you may see.

Any of:
integer

Count this marketplace’s listings only. Without it, counts cover every marketplace you may see.

category
Category

The vehicle class the counts, makes and models are for: car (the default), lcv, hcv, … or all.

Any of:
CategoryFilter
string
Allowed values: car lcv hcv bus moto other all

The vehicle class the counts, makes and models are for: car (the default), lcv, hcv, … or all.

make
Make

Also list this make’s models (model): a slug or a name.

Any of:
string
<= 120 characters

Also list this make’s models (model): a slug or a name.

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.

Successful Response

Media typeapplication/json
FilterValuesOut

Accepted values for the market listing filters.

object
site_id
Site Id

The marketplace these values are for, if one was given.

Any of:
integer
category
Category

The vehicle class the counts are for, or all.

string
default: car
lang
Lang

The labels’ language.

string
default: sl
fields
required
Fields
Array<object>
FilterField

The accepted values for one filter.

object
field
required
Field

Filter parameter name on GET /v1/market/listings.

string
vocabulary
required
Vocabulary

canonical: the same values for every marketplace (every field now). market was a marketplace’s own values.

string
values
required
Values
Array<object>
FilterValue

One accepted filter value.

object
value
required
Value

What to send as the filter value.

string
label
Label

How to show it, in the language asked for (lang); a make’s or model’s name.

Any of:
string
count
Count

Active listings with this value, in the class and marketplace asked for. null where a count means nothing (status, sort).

Any of:
integer
note
Note

Usage note.

Any of:
string

Example

{
"category": "car",
"lang": "sl"
}

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": {}
}
]
}