← Back to API Reference Hub

Vehicles API Reference

Search active and historical dealer inventory across all tracked domains, look up any 17-character VIN with decoded specs and price history, inspect field population quality, or synchronously refresh a single vehicle from its dealer page.

Vehicle Endpoints - search, VIN lookup, price history & refresh.

All endpoints accept X-API-Key or Authorization: Bearer authentication under https://api.motorsdynamic.com/api (or /v1).

MethodEndpointPurpose
GET/api/vehiclesSearch and filter active or historical vehicle listings across all tracked domains with full-text search, spec filters, sorting, and VIN deduplication.
GET/api/vehicles/{vin}Retrieve every listing for a 17-character VIN across all tracked dealer domains, together with VIN-decoded specifications, price summary, and price history.
GET/api/vehicles/{vin}/{domain}Retrieve a single VIN listing at a specific dealer domain, along with its price history and any concurrent listings of the same VIN on other domains.
GET/api/vehicles/{vin}/price-historyReturn the chronological timeline of observed listing prices for a VIN.
GET/api/vehicles/domain/{domainId}Return all vehicle listings belonging to a tracked dealer domain specified by its numeric domain ID.
GET/api/vehicles/statsReturn aggregate vehicle counts broken down by status, condition, vehicle_type, make, and domain.
GET/api/vehicles/field-qualityReturn the population percentage for each canonical vehicle field across all active listings.
POST/api/scrape/vehicleRe-read a single vehicle's dealer detail page synchronously and return a verdict indicating whether photos and fields were updated, unchanged, absent on source, or fetch-degraded.

Canonical vehicle schema and decoded fields

Every vehicle listing returned by /api/vehicles, /api/domains/{clean_domain}/vehicles, and /api/vehicles/{vin} uses the canonical vehicle schema below, combining dealer website pricing, MSRP and window-sticker specification fields, VIN-decoded attributes, photo URLs, and lifecycle timestamps. On the MCP server, the get_vehicle tool additionally returns window sticker figures and applicable manufacturer offers alongside these fields.

FieldTypeDescription
idintegerInternal MotorsDynamic listing ID
vinstring17-character Vehicle Identification Number (VIN)
yearintegerFour-digit model year (for example, 2023)
makestringNormalized manufacturer name (for example, Honda)
modelstringNormalized model name (for example, Accord)
trimstringVehicle trim level (for example, EX-L)
conditionstringListing condition: New, Used, or Certified
is_cpobooleanTrue when the listing is Certified Pre-Owned
vehicle_typestringcar, motorcycle, rv, or heavy_equipment
pricestringCurrent dealer website listing price in decimal USD (for example, "28995.00")
msrpstring | nullManufacturer Suggested Retail Price (window sticker MSRP) in decimal USD when available
mileageintegerOdometer reading in miles
exterior_colorstring | nullExterior color as listed on the VDP or window sticker
interior_colorstring | nullInterior color or upholstery material
body_typestring | nullBody style (for example, Sedan, SUV, Truck)
fuel_typestring | nullFuel or powertrain type (for example, Gasoline, Hybrid, Electric)
transmissionstring | nullTransmission specification
drivetrainstring | nullDrivetrain layout (FWD, RWD, AWD, 4WD)
enginestring | nullEngine displacement and cylinder configuration
stock_numberstring | nullDealer stock number
urlstringDirect URL to the vehicle detail page (VDP) on the dealer website
imagesstring[]Ordered array of vehicle photo URLs
image_countintegerTotal number of photos in images
primary_imagestring | nullFirst (hero) photo URL
is_activebooleanTrue while the vehicle is actively listed on the dealer website
first_seen_atstring (date-time)ISO 8601 timestamp when the listing was first observed
last_seen_atstring (date-time)ISO 8601 timestamp when the listing was most recently verified active
removed_atstring (date-time) | nullISO 8601 timestamp when the vehicle left the dealer website, or null if active
domain_idintegerNumeric ID of the dealer domain that owns the listing
clean_domainstringBare lowercase hostname of the dealer website (for example, example-dealer.com)

List and search vehicles

GET/api/vehicles

Search and filter active or historical vehicle listings across all tracked domains with full-text search, spec filters, sorting, and VIN deduplication.

NameTypeRequiredDescription
domainstring (query)NoFilter by clean domain
domain_idinteger (query)NoFilter by domain ID
statusstring (query)Noactive | removed | all
active_fromstring (query)NoISO date
active_tostring (query)NoISO date
conditionstring (query)Nonew | used | cpo
vehicle_typestring (query)Nocar | motorcycle | rv | heavy_equipment
makestring (query)NoVehicle manufacturer name (for example, Honda, Toyota)
modelstring (query)NoVehicle model name (for example, Accord, Camry)
year_mininteger (query)NoMinimum model year (inclusive)
year_maxinteger (query)NoMaximum model year (inclusive)
price_minnumber (query)NoMinimum listing price in USD
price_maxnumber (query)NoMaximum listing price in USD
mileage_mininteger (query)NoMinimum odometer mileage
mileage_maxinteger (query)NoMaximum odometer mileage
has_imagesboolean (query)NoWhen true, return only vehicles with at least one photo
has_priceboolean (query)NoWhen true, return only vehicles with a listed price
searchstring (query)NoFull-text on VIN, make, model, stock_number
sortstring (query)Nolast_seen_at | first_seen_at | price | year | make
orderstring (query)Noasc | desc
limitinteger (query)NoDefault 50, max 500
offsetinteger (query)NoZero-based pagination offset
dedupeboolean (query)NoDedupe by VIN (default true unless filtering by single domain)
CURLGET /api/vehicles
curl -sS "https://api.motorsdynamic.com/api/vehicles?make=Honda&model=Accord&condition=used&year_min=2022&has_price=true&limit=50&offset=0" \
  -H "X-API-Key: YOUR_API_KEY"
RESPONSE200 OK
{
  "vehicles": [
    {
      "id": 887412,
      "vin": "1HGCV1F34LA123456",
      "year": 2023,
      "make": "Honda",
      "model": "Accord",
      "trim": "EX-L",
      "condition": "Used",
      "is_cpo": true,
      "vehicle_type": "car",
      "price": "28995.00",
      "msrp": "31500.00",
      "mileage": 18420,
      "exterior_color": "Platinum White Pearl",
      "interior_color": "Black",
      "body_type": "Sedan",
      "fuel_type": "Gasoline",
      "transmission": "Automatic",
      "drivetrain": "FWD",
      "engine": "1.5L Turbo I4",
      "stock_number": "H23091A",
      "url": "https://www.example-dealer.com/used/Honda/2023-Honda-Accord-1HGCV1F34LA123456.htm",
      "images": [
        "https://www.example-dealer.com/photos/1HGCV1F34LA123456-1.jpg"
      ],
      "image_count": 28,
      "primary_image": "https://www.example-dealer.com/photos/1HGCV1F34LA123456-1.jpg",
      "is_active": true,
      "first_seen_at": "2026-09-14T06:10:00.000Z",
      "last_seen_at": "2026-10-30T06:12:00.000Z",
      "removed_at": null,
      "domain_id": 42,
      "clean_domain": "example-dealer.com"
    }
  ],
  "total": 1240,
  "limit": 50,
  "offset": 0,
  "dedupe": true
}

Get vehicle by VIN (cross-domain)

GET/api/vehicles/{vin}

Retrieve every listing for a 17-character VIN across all tracked dealer domains, together with VIN-decoded specifications, price summary, and price history.

NameTypeRequiredDescription
vinstring (path)Yes17-character VIN
CURLGET /api/vehicles/{vin}
curl -sS "https://api.motorsdynamic.com/api/vehicles/1HGCV1F34LA123456" \
  -H "X-API-Key: YOUR_API_KEY"
RESPONSE200 OK
{
  "vin": "1HGCV1F34LA123456",
  "decoded": {
    "year": 2023,
    "make": "Honda",
    "model": "Accord",
    "trim": "EX-L",
    "body_style": "Sedan",
    "drive_type": "FWD"
  },
  "summary": {
    "total_listings": 2,
    "active_listings": 2,
    "domains_count": 2,
    "min_price": 28795,
    "max_price": 28995,
    "price_variance": 200
  },
  "listings": [
    {
      "id": 887412,
      "domain_id": 42,
      "clean_domain": "example-dealer.com",
      "price": "28995.00",
      "msrp": "31500.00",
      "mileage": 18420,
      "condition": "Used",
      "is_active": true,
      "last_seen_at": "2026-10-30T06:12:00.000Z"
    }
  ],
  "price_history": [
    { "observed_at": "2026-09-14T06:10:00.000Z", "price": "29495.00" },
    { "observed_at": "2026-10-12T06:15:00.000Z", "price": "28995.00" }
  ]
}

Get vehicle by VIN and domain

GET/api/vehicles/{vin}/{domain}

Retrieve a single VIN listing at a specific dealer domain, along with its price history and any concurrent listings of the same VIN on other domains.

NameTypeRequiredDescription
vinstring (path)Yes17-character Vehicle Identification Number (VIN)
domainstring (path)YesClean domain
CURLGET /api/vehicles/{vin}/{domain}
curl -sS "https://api.motorsdynamic.com/api/vehicles/1HGCV1F34LA123456/example-dealer.com" \
  -H "X-API-Key: YOUR_API_KEY"
RESPONSE200 OK
{
  "vehicle": {
    "id": 887412,
    "vin": "1HGCV1F34LA123456",
    "year": 2023,
    "make": "Honda",
    "model": "Accord",
    "trim": "EX-L",
    "price": "28995.00",
    "msrp": "31500.00",
    "mileage": 18420,
    "domain_id": 42,
    "clean_domain": "example-dealer.com",
    "is_active": true
  },
  "price_history": [
    { "observed_at": "2026-09-14T06:10:00.000Z", "price": "29495.00" },
    { "observed_at": "2026-10-12T06:15:00.000Z", "price": "28995.00" }
  ],
  "other_listings": []
}

Get VIN price history

GET/api/vehicles/{vin}/price-history

Return the chronological timeline of observed listing prices for a VIN.

NameTypeRequiredDescription
vinstring (path)Yes17-character Vehicle Identification Number (VIN)
CURLGET /api/vehicles/{vin}/price-history
curl -sS "https://api.motorsdynamic.com/api/vehicles/1HGCV1F34LA123456/price-history" \
  -H "X-API-Key: YOUR_API_KEY"
RESPONSE200 OK
{
  "vin": "1HGCV1F34LA123456",
  "history": [
    { "observed_at": "2026-09-14T06:10:00.000Z", "price": "29995.00" },
    { "observed_at": "2026-09-28T06:11:00.000Z", "price": "29495.00" },
    { "observed_at": "2026-10-12T06:15:00.000Z", "price": "28995.00" }
  ]
}

List vehicles for a domain by numeric ID

GET/api/vehicles/domain/{domainId}

Return all vehicle listings belonging to a tracked dealer domain specified by its numeric domain ID.

NameTypeRequiredDescription
domainIdinteger (path)YesNumeric domain identifier
CURLGET /api/vehicles/domain/{domainId}
curl -sS "https://api.motorsdynamic.com/api/vehicles/domain/42" \
  -H "X-API-Key: YOUR_API_KEY"
RESPONSE200 OK
{
  "vehicles": [
    {
      "id": 887412,
      "vin": "1HGCV1F34LA123456",
      "year": 2023,
      "make": "Honda",
      "model": "Accord",
      "price": "28995.00",
      "domain_id": 42,
      "clean_domain": "example-dealer.com",
      "is_active": true
    }
  ],
  "total": 412
}

Get aggregate vehicle stats

GET/api/vehicles/stats

Return aggregate vehicle counts broken down by status, condition, vehicle_type, make, and domain.

NameTypeRequiredDescription
domain_idinteger (query)NoFilter by numeric domain identifier
CURLGET /api/vehicles/stats
curl -sS "https://api.motorsdynamic.com/api/vehicles/stats?domain_id=42" \
  -H "X-API-Key: YOUR_API_KEY"
RESPONSE200 OK
{
  "total": 485,
  "active": 412,
  "removed": 73,
  "by_condition": { "new": 190, "used": 182, "cpo": 40 },
  "by_vehicle_type": { "car": 412 },
  "top_makes": [
    { "make": "Honda", "count": 298 },
    { "make": "Toyota", "count": 44 }
  ]
}

Get per-field population quality report

GET/api/vehicles/field-quality

Return the population percentage for each canonical vehicle field across all active listings.

NameTypeRequiredDescription
None--No parameters required
CURLGET /api/vehicles/field-quality
curl -sS "https://api.motorsdynamic.com/api/vehicles/field-quality" \
  -H "X-API-Key: YOUR_API_KEY"
RESPONSE200 OK
{
  "active_vehicles": 12508,
  "fields": {
    "vin": { "populated": 12508, "rate": 1.0 },
    "year": { "populated": 12508, "rate": 1.0 },
    "make": { "populated": 12508, "rate": 1.0 },
    "model": { "populated": 12504, "rate": 0.9997 },
    "price": { "populated": 12190, "rate": 0.9746 },
    "mileage": { "populated": 12310, "rate": 0.9842 },
    "images": { "populated": 12055, "rate": 0.9638 }
  }
}

Refresh a single vehicle from its dealer page

POST/api/scrape/vehicle

Re-read a single vehicle's dealer detail page synchronously and return a verdict indicating whether photos and fields were updated, unchanged, absent on source, or fetch-degraded.

NameTypeRequiredDescription
vehicle_idinteger (body)YesInternal MotorsDynamic vehicle listing ID to refresh synchronously (rate limit: 1 refresh per vehicle per 60 seconds, max 3 concurrent per domain)
CURLPOST /api/scrape/vehicle
curl -sS -X POST "https://api.motorsdynamic.com/api/scrape/vehicle" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vehicle_id": 7939333}'
RESPONSE200 OK
{
  "verdict": "updated",
  "vehicle_id": 7939333,
  "vin": "JTEBU5JR1L5123456",
  "images": 35,
  "previous_images": 0,
  "duration_ms": 942
}