Price statistics
const url = 'https://api.avtopodatki.si/v1/market/stats/prices?include_damaged=false&status=active';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.avtopodatki.si/v1/market/stats/prices?include_damaged=false&status=active' \ --header 'Authorization: Bearer <token>'Price statistics for the listings matching your filters: minimum, quartiles, median, maximum and mean price, plus median mileage, year and days on the market.
Listings declared damaged are left out unless you pass
include_damaged=true. Vehicles sold for parts are always left out, and so
are vans and trucks sold together with a trailer, whose price is for both.
GET /v1/market/listings still returns them.
Takes the same filters as GET /v1/market/listings — so cars only, unless
you pass category — and requires at least one of site_id, make,
category (other than all), seller_id, year_min or year_max
(model and family come with make). If the selection is still too
broad you get 503 asking you to narrow it.
sample_size is how many listings the figures are based on; treat small
samples with caution.
Requires the market.read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Also count the listings the seller declares damaged or faulty (damaged = true on the listing). Left out by default: they price far below the rest. Vehicles sold for parts (for_parts) stay out even then.
Also count the listings the seller declares damaged or faulty (damaged = true on the listing). Left out by default: they price far below the rest. Vehicles sold for parts (for_parts) stay out even then.
active (still advertised, the default), removed (sold or withdrawn) or unknown. A removed listing with reposted_as_id (on its detail) was reposted, not sold; the price statistics leave such ads out.
active (still advertised, the default), removed (sold or withdrawn) or unknown. A removed listing with reposted_as_id (on its detail) was reposted, not sold; the price statistics leave such ads out.
Vehicle class: car (the default), lcv (vans), hcv (trucks), bus, moto, other — or all for every class.
Vehicle class: car (the default), lcv (vans), hcv (trucks), bus, moto, other — or all for every class.
Make, the same for every marketplace: a slug (mercedes-benz) or a name in any case or spelling (Mercedes Benz, MB, VW). Values from GET /v1/market/filter-values. An unknown make is a 422 naming the nearest ones.
Make, the same for every marketplace: a slug (mercedes-benz) or a name in any case or spelling (Mercedes Benz, MB, VW). Values from GET /v1/market/filter-values. An unknown make is a 422 naming the nearest ones.
With make: the canonical model line, a slug or a name within that make (golf, GLC); bodies are included (golf takes the Golf Variant), separate models are not (golf-sportsvan). Values from GET /v1/market/filter-values?make=…. Needs make.
With make: the canonical model line, a slug or a name within that make (golf, GLC); bodies are included (golf takes the Golf Variant), separate models are not (golf-sportsvan). Values from GET /v1/market/filter-values?make=…. Needs make.
Fuel type: petrol, diesel, electric, hybrid, plugin_hybrid, lpg, cng, hydrogen, other.
How the vehicle is powered.
HYBRID is a full hybrid. A mild hybrid is its fuel (PETROL or
DIESEL) with Powertrain.MHEV; a range extender is PLUGIN_HYBRID.
Fuel type: petrol, diesel, electric, hybrid, plugin_hybrid, lpg, cng, hydrogen, other.
Transmission: manual, automatic, semi_automatic, cvt, other.
Gearbox type.
Transmission: manual, automatic, semi_automatic, cvt, other.
Exact VIN. Finds every advert for one vehicle, e.g. one advertised twice or relisted. Searches every vehicle class unless you pass category. Most adverts have no VIN.
Exact VIN. Finds every advert for one vehicle, e.g. one advertised twice or relisted. Searches every vehicle class unless you pass category. Most adverts have no VIN.
Body, any of these (repeat the parameter). Each vehicle class has its own list (GET /v1/market/filter-values?category=…); a body outside the class’s list is a 422.
Body, any of these (repeat the parameter). Each vehicle class has its own list (GET /v1/market/filter-values?category=…); a body outside the class’s list is a 422.
Colour, any of these (repeat the parameter).
Colour, any of these (repeat the parameter).
Drive, any of these, as the advert states it. avto.net cars state only four-wheel drive, so fwd and rwd find none of them.
Drive, any of these, as the advert states it. avto.net cars state only four-wheel drive, so fwd and rwd find none of them.
Powertrain, any of these. Use it beside fuel_type: a petrol mild hybrid is fuel_type=petrol and powertrain=mhev. Every electrified one: all values but ice. Mild hybrids a seller doesn’t name are ice.
Powertrain, any of these. Use it beside fuel_type: a petrol mild hybrid is fuel_type=petrol and powertrain=mhev. Every electrified one: all values but ice. Mild hybrids a seller doesn’t name are ice.
Emission class, any of these (repeat the parameter).
Emission class, any of these (repeat the parameter).
This emission class or a later one: euro_6d takes euro_6d, euro_6e and euro_7. Plain euro_6 (stage not stated) ranks below euro_6c.
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.
This emission class or a later one: euro_6d takes euro_6d, euro_6e and euro_7. Plain euro_6 (stage not stated) ranks below euro_6c.
new, used, demo or pre_registered, any of these. Use it rather than is_new, the marketplace’s own flag.
new, used, demo or pre_registered, any of these. Use it rather than is_new, the marketplace’s own flag.
Gross weight band, any of these: vans and trucks. avto.net states none.
Gross weight band, any of these: vans and trucks. avto.net states none.
Responses
Section titled “Responses”Successful Response
Price statistics for a set of listings.
object
Cars the figures are based on. A car reposted (taken down and advertised again) counts once, as its latest ad.
Example generated
{ "sample_size": 1, "price_min": "example", "price_p25": "example", "price_median": "example", "price_p75": "example", "price_max": "example", "price_mean": "example", "mileage_median": 1, "year_median": 1, "median_days_on_market": 1}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}