
Your app needs trustworthy specs and safety data from a VIN. By the end of this guide you will be able to call a single VIN lookup endpoint server-side, read specs, recalls, complaint counts and NCAP ratings from the response, handle errors, cache decoded VINs, and ship a production-ready integration with clear rate-limit and quota behavior.
What you get from the VIN report
The Vehicle API VIN report consolidates decoding and safety data into one call. It returns:
- VIN decoding worldwide from NHTSA vPIC: year, make, model, trim, body, doors, engine, transmission (when present in source), assembly plant, manufacturer.
- US-market safety coverage: recall campaigns, owner complaint counts, and NCAP crash ratings, matched by make + model + year.
Coverage specifics:
- VIN decoding works worldwide and returns 200 when successful.
- Recalls, complaints and NCAP ratings are US-market only. A non-US VIN still returns 200 with specs only; safety fields may be null or empty.
- Dutch plates are supported via RDW open data and never include a VIN. This guide focuses on VIN lookup.
- This is not a vehicle history report (no title, accident or ownership history).
The base URL is https://vehicles-api.com/api/v1 and authentication uses the X-API-Key header. You can also use Authorization: Bearer. Get started with the 7‑day free trial on the Register page. For platform overview, visit vehicles-api.com.
Endpoint and response envelope
Endpoint:
- POST https://vehicles-api.com/api/v1/vin/report
Authentication:
- Header X-API-Key: YOUR_API_KEY (or Authorization: Bearer YOUR_API_KEY)
Every response is wrapped in an envelope:
- On success: status, source, data
- On error: status="error", error.code, error.message
Nullability notes:
- Fields not applicable to a fuel type or model (for example electrification_level, ev_drive_unit, battery_kwh, charger_level, charger_power_kw) may be null.
- Safety fields for non-US coverage may be null or omitted as applicable to the dataset.
Quick start with cURL
Run this server-side. Do not embed keys in client-side JavaScript. The example uses the control VIN 1HGCM82633A004352 (a 2003 Honda Accord) from the official docs.
curl -X POST "https://vehicles-api.com/api/v1/vin/report" -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{"vin":"1HGCM82633A004352"}'
Python server-side example (requests)
Use a short timeout, pass JSON in the body, and branch on the status field. This sample demonstrates reading the fields you’re most likely to use, including handling of nulls.
import requests
API_URL = "https://vehicles-api.com/api/v1/vin/report"
API_KEY = "YOUR_API_KEY"
def fetch_vin_report(vin: str, timeout_sec: float = 6.0) -> dict:
headers = {
"X-API-Key": API_KEY,
"Content-Type": "application/json",
}
payload = {"vin": vin}
try:
resp = requests.post(API_URL, headers=headers, json=payload, timeout=timeout_sec)
except requests.exceptions.Timeout:
raise SystemExit("Request timed out")
except requests.exceptions.RequestException as e:
raise SystemExit(f"Network error: {e}")
# Parse envelope
data = resp.json()
status = data.get("status")
if status != "success":
err = data.get("error", {})
code = err.get("code", "unknown_error")
msg = err.get("message", "Unknown error")
raise SystemExit(f"API error [{code}]: {msg}")
src = data.get("source")
vehicle = data.get("data", {}) # payload with decoded fields
# Core decoded fields
vin_value = vehicle.get("vin")
year = vehicle.get("year")
make = vehicle.get("make")
model = vehicle.get("model")
trim = vehicle.get("trim")
body = vehicle.get("body")
doors = vehicle.get("doors")
vehicle_type = vehicle.get("vehicle_type")
# Engine object and null-safe reads
engine = vehicle.get("engine") or {}
cylinders = engine.get("cylinders")
displacement_l = engine.get("displacement_l")
fuel = engine.get("fuel") or vehicle.get("fuel_type")
# Plant info
plant = vehicle.get("plant") or {}
plant_country = plant.get("country")
plant_state = plant.get("state")
plant_city = plant.get("city")
# US safety (may be null or missing for non-US coverage)
recalls_count = vehicle.get("recalls_count")
recalls = vehicle.get("recalls") or []
complaints_count = vehicle.get("complaints_count")
safety_ratings = vehicle.get("safety_ratings") or {}
return {
"source": src,
"vin": vin_value,
"year": year,
"make": make,
"model": model,
"trim": trim,
"body": body,
"doors": doors,
"vehicle_type": vehicle_type,
"engine": {
"cylinders": cylinders,
"displacement_l": displacement_l,
"fuel": fuel,
},
"plant": {
"country": plant_country,
"state": plant_state,
"city": plant_city,
},
"recalls_count": recalls_count,
"first_recall_campaign": recalls[0]["campaign"] if recalls else None,
"complaints_count": complaints_count,
"safety_ratings_match": safety_ratings.get("match"),
"safety_ratings_overall": safety_ratings.get("overall"),
}
if __name__ == "__main__":
report = fetch_vin_report("1HGCM82633A004352")
print(report)
PHP (cURL) server-side example
Send JSON in the POST body, set headers, and use sane timeouts. Handle the response envelope and surface error.code to the caller.
<?php
$apiUrl = "https://vehicles-api.com/api/v1/vin/report";
$apiKey = "YOUR_API_KEY";
$payload = json_encode(["vin" => "1HGCM82633A004352"]);
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: " . $apiKey,
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 4);
curl_setopt($ch, CURLOPT_TIMEOUT, 8);
$response = curl_exec($ch);
if ($response === false) {
$err = curl_error($ch);
curl_close($ch);
http_response_code(502);
die(json_encode(["status" => "error", "error" => ["code" => "upstream_unreachable", "message" => $err]]));
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$data = json_decode($response, true);
if (!isset($data["status"])) {
http_response_code(502);
die(json_encode(["status" => "error", "error" => ["code" => "invalid_response", "message" => "Missing status field"]]));
}
if ($data["status"] !== "success") {
$code = $data["error"]["code"] ?? "unknown_error";
$msg = $data["error"]["message"] ?? "Unknown error";
http_response_code($httpCode);
die(json_encode(["status" => "error", "error" => ["code" => $code, "message" => $msg]]));
}
// Success: map only the fields you need
$vehicle = $data["data"] ?? [];
$result = [
"vin" => $vehicle["vin"] ?? null,
"year" => $vehicle["year"] ?? null,
"make" => $vehicle["make"] ?? null,
"model" => $vehicle["model"] ?? null,
"trim" => $vehicle["trim"] ?? null,
"engine" => $vehicle["engine"] ?? null,
"plant" => $vehicle["plant"] ?? null,
"recalls_count" => $vehicle["recalls_count"] ?? null,
"complaints_count" => $vehicle["complaints_count"] ?? null,
"safety_ratings" => $vehicle["safety_ratings"] ?? null,
];
header("Content-Type: application/json");
echo json_encode($result);
?>
Official example response
This example is from the official documentation and includes specs plus US safety data for the control VIN. Live counts and campaigns change as NHTSA and RDW publish new data.
{
"status": "success",
"source": "nhtsa",
"data": {
"vin": "1HGCM82633A004352",
"valid": true,
"year": 2003,
"make": "HONDA",
"model": "Accord",
"trim": "EX-V6",
"body": "Coupe",
"doors": 2,
"vehicle_type": "PASSENGER CAR",
"engine": {
"cylinders": 6,
"displacement_l": 3,
"fuel": "Gasoline"
},
"fuel_type": "Gasoline",
"electrification_level": null,
"ev_drive_unit": null,
"battery_kwh": null,
"charger_level": null,
"charger_power_kw": null,
"plant": {
"country": "UNITED STATES (USA)",
"city": "MARYSVILLE",
"state": "OHIO"
},
"manufacturer": "AMERICAN HONDA MOTOR CO., INC.",
"coverage": "us",
"recalls_count": 24,
"recalls": [
{
"campaign": "19V182000",
"component": "AIR BAGS:FRONTAL:DRIVER SIDE:INFLATOR MODULE",
"received": "2019-03-06",
"summary": "Replacement driver air bag inflator may explode.",
"consequence": "Sharp metal fragments may strike occupants.",
"remedy": "Dealers will replace the inflator, free of charge."
}
],
"complaints_count": 2013,
"safety_ratings": {
"match": "partial",
"vehicle_description": "2003 Honda Accord 2-DR.",
"overall": null,
"front": {
"driver": 5,
"passenger": 5
},
"side": {
"driver": 5,
"passenger": 5
},
"rollover": 4
}
}
}
Fields you will actually use
Common fields for dealer tools, marketplaces, fleet and insurance apps:
- Identification and classification: vin, valid, year, make, model, trim, body, doors, vehicle_type.
- Powertrain: engine.cylinders, engine.displacement_l, engine.fuel (fallback to fuel_type). Electrification-related fields may be null for ICE vehicles.
- Manufacturing: plant.country, plant.state, plant.city, manufacturer.
- Coverage hint: coverage indicates the market basis for safety data aggregation; expect us for US-market coverage.
- Safety aggregation (US-only): recalls_count, recalls[] (campaign, component, received, summary, consequence, remedy), complaints_count.
- NCAP (US-only): safety_ratings.match (exact/partial), safety_ratings.vehicle_description, safety_ratings.overall (may be null), safety_ratings.front/side/rollover.
Nulls you should anticipate:
- Electrification fields: electrification_level, ev_drive_unit, battery_kwh, charger_level, charger_power_kw often null for non-EV/HEV.
- safety_ratings.overall may be null while sub-areas are populated, depending on NCAP availability for that configuration.
- Recalls array may exist with zero length; handle both empty and populated cases.
Error and edge-case JSON examples
Handle error envelopes by checking status first. Here are complete, copy-pasteable examples you can use in tests:
401 Unauthorized (bad or missing key)
{
"status": "error",
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}
422 Invalid request (missing VIN)
{
"status": "error",
"error": {
"code": "invalid_request",
"message": "Request body must include field: vin"
}
}
429 Too many requests (rate limited)
{
"status": "error",
"error": {
"code": "too_many_requests",
"message": "Rate limit exceeded. Please retry later."
}
}
502 Upstream timeout (network or upstream dependency)
{
"status": "error",
"error": {
"code": "upstream_timeout",
"message": "The upstream provider did not respond in time."
}
}
Caching, rate limits and monthly quota
VIN decoding is deterministic and stable for a given VIN. Cache decoded reports keyed by VIN to reduce latency, control cost, and avoid rate limits. Recommended approach:
- Cache successful envelopes (status=success) with the full data object. Many apps set a long TTL (for example, days or weeks) and refresh opportunistically.
- Do not cache error envelopes aggressively; use exponential backoff for transient errors (429, 5xx). Avoid hammering after a 429.
- Normalize keys (uppercase VIN) to avoid duplicates.
Rate limits and quotas:
- Each plan enforces per-interval rate limits and a monthly quota. Exact thresholds vary by plan; consult your dashboard and the Documentation.
- On 429, back off and retry after a short delay. Respect any Retry-After header if present.
- Monitor your monthly usage to avoid surprises. Cache hits do not consume API calls in your infrastructure.
Pricing starts with Starter at $19/month, and every plan includes a 7‑day free trial. You can compare options and start building at vehicles-api.com.
Production behaviors to validate
- Timeouts: set client timeouts on both connect and total request time to avoid hanging workers.
- Idempotency: POST with the same VIN returns the same decoded specs; safety data can update over time as NHTSA publishes new entries.
- Null safety: treat missing or null electrification fields as “not applicable.”
- Safety data scope: recalls, complaints, and NCAP are US-market only and matched on make + model + year. Do not assume global coverage for these fields.
- Logging: log status, error.code and error.message on failures; avoid logging full PII or secrets.
- Backoff: use progressive backoff on 429 and 5xx. Do not retry 4xx invalid_request without fixing the payload.
Mapping the response to your domain
Common integrations:
- Dealer listings: show year + make + model + trim, doors, body. Use engine.cylinders and engine.displacement_l to populate powertrain badges.
- Insurance quotes: verify decoded VIN validity and core attributes (vehicle_type, doors, body). Use plant.country and manufacturer for underwriting rules.
- Fleet operations: alert if recalls_count > 0; surface first recall.campaign and summary to drivers or maintenance staff.
- AI agents: ground LLM responses using authoritative fields like year, make, model, and count fields; avoid hallucinations by only using provided keys.
MCP server option for agents and tools
If you are building AI agents or plugins, the Vehicle API is also available as an MCP server at MCP. The MCP endpoint exposes the same underlying VIN decoding and US safety data you see in the REST example here, so you can choose the transport that fits your runtime.
Security and deployment checklist
- Keep API keys server-side only. Never ship a key in browser code or mobile apps.
- Rotate keys periodically and on any suspicion of compromise.
- Rate-limit your own endpoints to prevent replay abuse.
- Validate VIN format before calling the API to reduce needless requests.
- Instrument end-to-end latency and cache hit ratio.
Testing scenarios with expected outcomes
- Valid US VIN: expect status=success, source=nhtsa, non-null year/make/model/trim, and US-only fields potentially populated (recalls, complaints_count, safety_ratings).
- Valid non-US VIN: expect status=success, specs populated, US-only fields null or empty (keep code null-safe).
- Missing body: expect 422 invalid_request. Fix payload.
- Bad key: expect 401 unauthorized. Replace key.
- High QPS load test: expect 429 too_many_requests under sustained spikes. Add backoff and caching.
FAQ
Does the VIN report include accident or ownership history?
No. It provides decoded specs and US safety data (recalls, owner complaint counts, NCAP ratings). It is not a vehicle history report.
Will I get recalls and NCAP ratings for non-US vehicles?
No. Those fields are US-market only and matched by make + model + year. Non-US VINs still return decoded specs with status=success.
Can I call this from the browser?
Do not embed API keys in client-side code. Call the API from your server and forward only the fields your UI needs.
Do Dutch plates include a VIN?
No. Dutch plate lookups use RDW open data and do not include a VIN. This article focuses on VIN lookup via POST /vin/report.
How should I handle null fields?
Treat nulls as “not applicable” or “not available.” Common nulls include electrification fields and some safety ratings for specific configurations.
Ready to build? Start your 7‑day free trial and get your API key at Register. Then ship your first integration with the Documentation and keep iterating. Visit vehicles-api.com anytime for product updates and platform status.