Inventory

Count and aggregate listings by facet

Count listings matching the filters, grouped by the facets you name (facets=make,model,price), with stats for numeric facets. Use it for totals, filter values, market mix, and grouped averages or percentiles; use GET /v1/listings for listing rows. Supported facets: make, model, model_code, inventory_type, year, trim, version, base_exterior_color, exterior_color, base_interior_color, interior_color, seating_capacity, doors, engine, state, drivetrain, assembly_location, assembly_country, original_market, transmission, fuel_type, powertrain_type, body_type, cylinders, dealer_type, availability_status, options_packages, features, keywords, upfitter, price, msrp, miles, days_on_market.

Required API key scope: inventory.read. Billable as facet_counts, or facet_counts_historical for sold or snapshot_date inventory. Each response reports its metering class and cost in the X-Usage-Class and X-Usage-Cost-Micros headers.

get/v1/facets

Request

  • Base URL: https://api.visor.vin
  • URL: https://api.visor.vin/v1/facets
  • Auth: HTTP bearer

Query parameters

facetsstring[] required

Required comma-separated facet names to return. Supported facets: make, model, model_code, inventory_type, year, trim, version, base_exterior_color, exterior_color, base_interior_color, interior_color, seating_capacity, doors, engine, state, drivetrain, assembly_location, assembly_country, original_market, transmission, fuel_type, powertrain_type, body_type, cylinders, dealer_type, availability_status, options_packages, features, keywords, upfitter, price, msrp, miles, days_on_market.

facet_value_limitinteger

Maximum number of values returned per categorical facet. Defaults to 20; maximum 100. Numeric range facets always return fixed buckets.

metricstring

Metric used to compute an optional per-bucket aggregate. Defaults to count. Supported measures: price, miles, msrp, days_on_market, discount_from_msrp. Supported aggregates: mean, p5, p25, median, p75, p95. Use <measure>.<aggregate>, for example price.p95 or days_on_market.median. Non-count metrics require exactly one categorical facet.

sort'count' | '-count' | 'metric' | '-metric'

Facet bucket ordering. Defaults to -count. With metrics, metric and -metric sort by the first requested metric.

makestring[]

Comma-separated make names or slugs to apply before counting facet buckets. Values: GET /v1/facets?facets=make.

modelstring[]

Comma-separated model names or slugs to apply before counting facet buckets. Values: GET /v1/facets?facets=model.

model_codestring[]

Comma-separated manufacturer model codes to apply before counting facet buckets. Values: GET /v1/facets?facets=model_code.

trimstring[]

Comma-separated trim names to apply before counting facet buckets. Values: GET /v1/facets?facets=trim.

yearinteger[]

Comma-separated model years to apply before counting facet buckets.

statestring[]

Comma-separated two-letter dealer states to apply before counting facet buckets. Values: GET /v1/facets?facets=state.

dealer_idstring[]

Comma-separated dealer UUIDs to apply before counting facet buckets. Accepts up to 50 dealer IDs.

dealer_group_idstring[]

Comma-separated dealer-group IDs to apply before counting facet buckets. Matches current member locations and accepts up to 50 group IDs.

dealer_typestring[]

Comma-separated dealer types to apply before counting facet buckets.

availability_statusstring[]

Comma-separated availability statuses to apply before counting facet buckets: stock, transit, build.

inventory_typestring[]

Comma-separated inventory classes to apply before counting facet buckets: new, used, certified. cpo is accepted as an alias for certified.

body_typestring[]

Comma-separated body types. Values: GET /v1/facets?facets=body_type.

transmissionstring[]

Comma-separated transmission values, case-insensitive: Automatic, CVT, Manual.

drivetrainstring[]

Comma-separated drivetrain values, case-insensitive: AWD, FWD, 4WD, RWD.

assembly_locationstring[]

Pipe-separated assembly locations. Uses | because locations often contain commas. Values: GET /v1/facets?facets=assembly_location.

assembly_countrystring[]

Comma-separated assembly country values. Values: GET /v1/facets?facets=assembly_country.

original_marketstring[]

Comma-separated original markets read from the window sticker, case-insensitive: us, canada.

fuel_typestring[]

Comma-separated fuel type values, case-insensitive: Gas only, Hybrid, Diesel, Full Electric, Plug-in Hybrid, Flex-fuel, Biodiesel, Fuel Cell Electric, Natural Gas (CNG), LPG, Other.

powertrain_typestring[]

Comma-separated powertrain type values, case-insensitive: Combustion, HEV, MHEV, BEV, PHEV, FCEV, EREV.

enginestring[]

Comma-separated engine descriptions. Values: GET /v1/facets?facets=engine.

versionstring[]

Comma-separated vehicle version values. Values: GET /v1/facets?facets=version.

exterior_colorstring[]

Comma-separated exterior color values. Values: GET /v1/facets?facets=exterior_color.

interior_colorstring[]

Comma-separated interior color values. Values: GET /v1/facets?facets=interior_color.

base_exterior_colorstring[]

Comma-separated normalized exterior color values (Tan also matches Beige, Burgundy also matches Red), case-insensitive: Black, White, Silver, Gray, Red, Blue, Green, Yellow, Orange, Brown, Tan, Beige, Gold, Purple, Burgundy.

base_interior_colorstring[]

Comma-separated normalized interior color values (Tan also matches Beige, Burgundy also matches Red), case-insensitive: Black, White, Silver, Gray, Red, Blue, Green, Yellow, Orange, Brown, Tan, Beige, Gold, Purple, Burgundy.

seating_capacityinteger[]

Comma-separated seating capacity integers.

cylindersinteger[]

Comma-separated cylinder count integers.

doorsinteger[]

Comma-separated door count integers.

options_packagesstring[]

Comma-separated manufacturer option/package codes. Values: GET /v1/facets?facets=options_packages.

option_slugstring[]

Comma-separated source-stable option slugs. Additive to options_packages; package-code semantics are unchanged.

exclude_option_slugstring[]

Comma-separated source-stable option slugs to exclude.

featuresstring[]

Comma-separated feature tokens. Values: GET /v1/facets?facets=features.

upfitterstring[]

Comma-separated post-production upfitter ids; matches listings carrying any of them. Factory editions such as the Shelby GT500, the Mustang RTR package, or the AT4X AEV Edition are trims or options, not upfitters. Values: aev (AEV), airstream (Airstream), ams_vans (AMS Vans), armored (Armored (B4-B7)), brabus (Brabus), braunability (BraunAbility), callaway (Callaway), dinan (Dinan), driverge (Driverge), explorer_van (Explorer Van), fox_factory (Fox Factory), fr_conversions (FR Conversions), freedom_motors (Freedom Motors), harley_davidson (Harley-Davidson Edition), hennessey (Hennessey), lingenfelter (Lingenfelter), mansory (Mansory), midwest_automotive (Midwest Automotive Designs), ogv (OGV Luxury Coach), overfinch (Overfinch), revability (RevAbility), rocky_ridge (Rocky Ridge), rollx (Rollx Vans), roush (Roush), rtr (RTR), saleen (Saleen), sca_black_widow (Black Widow (SCA Performance)), shelby_american (Shelby American), sherrod (Sherrod), singer (Singer), storyteller (Storyteller Overland), tuscany (Tuscany), urban_automotive (Urban Automotive), vmi (VMI), waldoch (Waldoch), winnebago (Winnebago).

keywordsstring[]

Comma-separated provenance/history keyword tokens to apply before counting facet buckets. Supported values: one_owner, clean_title, branded, fleet.

vin_patternstring[]

Comma-separated VIN masks, up to 10 distinct patterns. VIN characters match themselves, ? matches one VIN position, and * is allowed only at the end. Short masks are treated as prefixes, for example 1HG or 1HGCM826*.

exclude_makestring[]

Comma-separated makes to exclude. Values: GET /v1/facets?facets=make.

exclude_modelstring[]

Comma-separated models to exclude. Values: GET /v1/facets?facets=model.

exclude_trimstring[]

Comma-separated trims to exclude. Values: GET /v1/facets?facets=trim.

exclude_yearinteger[]

Comma-separated model years to exclude.

exclude_statestring[]

Comma-separated dealer states to exclude. Values: GET /v1/facets?facets=state.

exclude_dealer_idstring[]

Comma-separated dealer UUIDs to exclude before counting facet buckets. Accepts up to 50 dealer IDs.

exclude_dealer_group_idstring[]

Comma-separated dealer-group IDs whose current member locations should be excluded before counting facet buckets. Accepts up to 50 group IDs.

exclude_inventory_typestring[]

Comma-separated inventory classes to exclude: new, used, certified. cpo is accepted as an alias for certified.

exclude_body_typestring[]

Comma-separated body types to exclude. Values: GET /v1/facets?facets=body_type.

exclude_transmissionstring[]

Comma-separated transmission values to exclude, case-insensitive: Automatic, CVT, Manual.

exclude_drivetrainstring[]

Comma-separated drivetrain values to exclude, case-insensitive: AWD, FWD, 4WD, RWD.

exclude_versionstring[]

Comma-separated vehicle versions to exclude. Values: GET /v1/facets?facets=version.

exclude_enginestring[]

Comma-separated engine descriptions to exclude. Values: GET /v1/facets?facets=engine.

exclude_assembly_locationstring[]

Pipe-separated assembly locations to exclude. Uses | because locations often contain commas. Values: GET /v1/facets?facets=assembly_location.

exclude_assembly_countrystring[]

Comma-separated assembly countries to exclude. Values: GET /v1/facets?facets=assembly_country.

exclude_original_marketstring[]

Comma-separated original markets to exclude (listings with no known original market are kept), case-insensitive: us, canada.

exclude_exterior_colorstring[]

Comma-separated exterior colors to exclude. Values: GET /v1/facets?facets=exterior_color.

exclude_interior_colorstring[]

Comma-separated interior colors to exclude. Values: GET /v1/facets?facets=interior_color.

exclude_base_exterior_colorstring[]

Comma-separated normalized exterior colors to exclude (Tan also matches Beige, Burgundy also matches Red), case-insensitive: Black, White, Silver, Gray, Red, Blue, Green, Yellow, Orange, Brown, Tan, Beige, Gold, Purple, Burgundy.

exclude_base_interior_colorstring[]

Comma-separated normalized interior colors to exclude (Tan also matches Beige, Burgundy also matches Red), case-insensitive: Black, White, Silver, Gray, Red, Blue, Green, Yellow, Orange, Brown, Tan, Beige, Gold, Purple, Burgundy.

exclude_options_packagesstring[]

Comma-separated manufacturer option/package codes to exclude. Values: GET /v1/facets?facets=options_packages.

exclude_featuresstring[]

Comma-separated feature tokens to exclude. Values: GET /v1/facets?facets=features.

exclude_upfitterstring[]

Comma-separated upfitter ids to exclude: aev, airstream, ams_vans, armored, brabus, braunability, callaway, dinan, driverge, explorer_van, fox_factory, fr_conversions, freedom_motors, harley_davidson, hennessey, lingenfelter, mansory, midwest_automotive, ogv, overfinch, revability, rocky_ridge, rollx, roush, rtr, saleen, sca_black_widow, shelby_american, sherrod, singer, storyteller, tuscany, urban_automotive, vmi, waldoch, winnebago.

exclude_fuel_typestring[]

Comma-separated fuel types to exclude, case-insensitive: Gas only, Hybrid, Diesel, Full Electric, Plug-in Hybrid, Flex-fuel, Biodiesel, Fuel Cell Electric, Natural Gas (CNG), LPG, Other.

exclude_powertrain_typestring[]

Comma-separated powertrain types to exclude, case-insensitive: Combustion, HEV, MHEV, BEV, PHEV, FCEV, EREV.

exclude_keywordsstring[]

Comma-separated keyword tokens to exclude.

inventory_status'active' | 'sold'

Inventory mode used for facet counts. active is the default.

listed_afterstring date-time

Filter to listings first observed by Visor on or after this ISO 8601 timestamp.

sold_within_daysinteger

Positive integer day window for sold inventory facets.

snapshot_datestring date

Historical active-inventory snapshot date in YYYY-MM-DD format.

min_priceinteger

Minimum listed price in whole dollars.

max_priceinteger

Maximum listed price in whole dollars.

min_mileageinteger

Minimum odometer mileage.

max_mileageinteger

Maximum odometer mileage.

min_msrpinteger

Minimum combined MSRP in whole dollars.

max_msrpinteger

Maximum combined MSRP in whole dollars.

min_days_on_marketinteger

Minimum days on market.

max_days_on_marketinteger

Maximum days on market.

latitudenumber

Search origin latitude for radius filtering.

longitudenumber

Search origin longitude for radius filtering.

postal_codestring

US ZIP/postal search origin for radius filtering.

radiusnumber

Maximum distance from the search origin, in miles. Requires postal_code or latitude and longitude. Maximum 500.

bboxnumber[]

Map viewport as west,south,east,north. Cannot be combined with radius. Maximum diagonal is 1000 miles.

metricsstring[]

Comma-separated list of 1 to 6 distinct non-count metrics, for example price.mean,price.median,days_on_market.mean. Requires exactly one categorical facet. Cannot be combined with metric. Each bucket returns metrics keyed by name, with null values for samples below ten. sort=metric or -metric orders by the first requested metric; defaults to -count.

Response

Successful public API response.

Changes

No recorded changes to this operation across all 1 revision of this API.