Price statistics by make and model
const url = 'https://api.avtopodatki.si/v1/market/stats/prices/by-model?group_by_year=false&min_sample=5&limit=100&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/by-model?group_by_year=false&min_sample=5&limit=100&include_damaged=false&status=active' \ --header 'Authorization: Bearer <token>'The same price statistics, one row per make and model, largest groups
first. They leave out the same listings: damaged ones unless
include_damaged=true, and vans and trucks sold with a trailer.
Makes and models are the canonical ones, the same on every marketplace.
A listing with no canonical model is grouped by the marketplace’s model
text instead (model: null, site_model set): motorbikes, for now.
Groups smaller than min_sample (default 5) are left out, since a median of
two listings says little. Show sample_size alongside any figure. Same filter
requirement as GET /v1/market/stats/prices.
Requires the market.read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Also split each group by model year. Groups get smaller, so consider lowering min_sample.
Also split each group by model year. Groups get smaller, so consider lowering min_sample.
Leave out groups with fewer listings than this.
Leave out groups with fewer listings than this.
Maximum groups to return.
Maximum groups to return.
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 one make and model.
A listing with no canonical model is grouped by the marketplace’s model
text: such a group has model: null and site_model set (and the same
for the make). Motorbikes are grouped that way for now.
object
Cars the figures are based on. A car reposted (taken down and advertised again) counts once, as its latest ad.
The canonical make. null: the marketplace named no make, or something that is none (“Ostale marke”, an ATV). Can differ from site_make: Mitsubishi’s “Canter” is a FUSO.
A canonical make: the same for every marketplace.
object
What make= takes: mercedes-benz.
How to show it: Mercedes-Benz.
The canonical model. null: no model was found. Today cars and vans, and trucks and buses where the advert names one (Atego, TGL); motorbikes have none yet.
A canonical model line, the same for every marketplace. Bodies are
folded in (a Golf Variant is a golf); a separate product is a model of
its own (golf-sportsvan, m3).
object
What model= takes, with make=.
The maker’s international name: 3 Series, C-Class.
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, "make": { "slug": "example", "name": "example" }, "model": { "slug": "example", "name": "example", "family": { "slug": "example", "name": "example" } }, "site_make": "example", "site_model": "example", "year": 1 }]Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}