Vehicle Report API Example

By Vehicle API
Vehicle Report API Example

You need vehicle specifications and US safety data without assembling separate lookups in your application. By the end of this guide, you can call the Vehicle Report endpoint, read its response, and distinguish decoded VIN data from model-level safety information.

Request a vehicle report

Vehicle Report accepts a VIN and returns specifications, recall information, a complaint count, and NCAP safety ratings in one call. The endpoint is POST https://vehicles-api.com/api/v1/vin/report, and the request body contains the vin field.

Illustration: Vehicle Report API Example

Use the X-API-Key header for authentication. Authorization Bearer also works, but the examples here use X-API-Key. Replace YOUR_API_KEY with your key before running the request.

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"}'

The VIN in this request is the documentation’s control example: it decodes to a 2003 Honda Accord. It is not a representation of a reader’s vehicle. The response below illustrates the fields and values returned for that example; live safety counts and campaigns can change as NHTSA publishes new data.

Read the official response

A successful response has an envelope containing status, source, and data. The vehicle and safety fields are inside data, not at the top level.

{
    "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
        }
    }
}

Start with status before reading data. Here, source is nhtsa, and data.vin identifies the VIN the report describes. The decoded identity fields support a vehicle listing; the counts, recall entries, and ratings support a separate safety section.

Vehicle identity and specifications

valid is the report’s validity indicator. The fields year, make, model, and trim identify the decoded vehicle, while body, doors, and vehicle_type describe its configuration. Keep the VIN with these fields so the result can be associated with the request that produced it.

The nested engine object contains cylinders, displacement_l, and fuel. Displacement is measured in liters; in this example, its value is 3. The top-level fuel_type is also present, so read the field appropriate to your display rather than assuming the two fuel fields are interchangeable in every response.

plant.country, plant.city, and plant.state describe the assembly plant, while manufacturer identifies the manufacturer. These are decoded specifications, not evidence of where the vehicle is currently located or who owns it.

The electrification fields in the example are all null: electrification_level, ev_drive_unit, battery_kwh, charger_level, and charger_power_kw. Battery capacity, when supplied, is in kilowatt-hours; charger power is in kilowatts. Treat null as unavailable or not supplied, not as zero or a positive assertion about the vehicle.

Recalls, complaints, and ratings

coverage is us in the example. The safety data is US-market only and is matched by make, model, and year. It is useful context for the decoded vehicle, but it does not by itself establish that an individual vehicle is affected by a campaign or that a repair has been completed.

recalls_count gives a count, and recalls contains recall entries. In the official example the count is 24, while one entry is shown. Do not calculate the reported total from the length of the example array or assume the example array represents every campaign.

Each shown recall has a campaign identifier and a component. The summary, consequence, and remedy fields give the description, potential consequence, and proposed remedy. received is a date in the example, not a timestamp with a timezone; display it as a date rather than converting it to a local time.

complaints_count is a count of owner complaints associated with the matching US-market make, model, and year. It is not a count of complaints filed about the individual VIN. Likewise, a complaint count is not proof that a particular defect exists on the vehicle being viewed.

safety_ratings contains the NCAP match and rating details. In the example, match is partial, and vehicle_description identifies the vehicle description used for the rating. Show that context alongside the ratings rather than presenting the result as an exact VIN-specific crash test.

overall is null, but front.driver, front.passenger, side.driver, side.passenger, and rollover contain ratings. Render the available values individually and leave the overall rating unavailable; do not derive an overall value from the other fields.

Call the endpoint from Python

This example uses Python’s standard library. It reads the same control VIN as the curl request, checks the response envelope, and handles both an HTTP error response and an API error envelope without assuming that vehicle data is present.

import json
from urllib.error import HTTPError, URLError
from urllib.request import Request, urlopen

url = "https://vehicles-api.com/api/v1/vin/report"
body = json.dumps({"vin": "1HGCM82633A004352"}).encode("utf-8")
request = Request(
url,
data=body,
headers={
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
method="POST",
)

try:
with urlopen(request) as response:
payload = json.load(response)
except HTTPError as exc:
try:
payload = json.load(exc)
except (ValueError, UnicodeDecodeError):
raise SystemExit("HTTP error: " + str(exc.code))
except URLError as exc:
raise SystemExit("Request failed: " + str(exc.reason))

if payload.get("status") != "success":
error = payload.get("error") or {}
raise SystemExit(
"API error: "
+ str(error.get("code"))
+ " — "
+ str(error.get("message"))
)

data = payload.get("data") or {}
ratings = data.get("safety_ratings") or {}

print("Source:", payload.get("source"))
print("VIN:", data.get("vin"), "Valid:", data.get("valid"))
print("Vehicle:", data.get("year"), data.get("make"), data.get("model"))
print("Trim:", data.get("trim"))
print("Coverage:", data.get("coverage"))
print("Recall count:", data.get("recalls_count"))
print("Complaint count:", data.get("complaints_count"))
print("Rating match:", ratings.get("match"))
print("Overall rating:", ratings.get("overall"))

for recall in data.get("recalls") or []:
print("Campaign:", recall.get("campaign"))
print("Summary:", recall.get("summary"))
print("Remedy:", recall.get("remedy"))

Replace the control VIN with the VIN submitted to your application and supply your API key securely. In a production service, keep the key on the server rather than embedding it in client-side code. Preserve missing and null values in your application model so the interface can distinguish “not available” from a numeric zero.

Build for coverage, errors, and changing data

VIN decoding works worldwide and is fullest for US-market vehicles. A non-US VIN can still receive a successful HTTP 200 response with specifications only. Do not interpret that successful response as evidence that US recalls, complaints, or ratings were checked for that market.

For US safety information, keep the make, model, year, and rating match context visible wherever the result influences a user’s decision. A partial NCAP match deserves a label, and an unavailable rating should remain unavailable. The report is not a vehicle history report: it does not provide title, accident, or ownership history.

Vehicle API also uses RDW open data for Dutch plates, but Dutch plate data never includes a VIN. If a workflow begins with a Dutch plate, do not assume its result supplies the VIN needed for this report; obtain the VIN separately.

An error response has status set to error, with details in error.code and error.message. Check both the HTTP result and the envelope, and record the error code for diagnosis rather than treating an error as an empty vehicle report. Network failures also need separate handling because they may not contain a JSON envelope.

Plan for both rate limits and the monthly quota when deciding how frequently to request reports. Check the current plan details and Documentation for the limits that apply to your account; handle limit or quota errors without repeatedly sending the same request.

Cache decoded VIN specifications to avoid unnecessary repeat calls for the same VIN. Keep their freshness policy separate from safety data: recall campaigns and counts can change, so refresh safety information according to your application’s needs rather than treating a cached report as permanently current. Retain the retrieval time in your own system if users need to know when the data was last checked.

For agent workflows, MCP is available at the Vehicle API MCP server. Apply the same distinctions between VIN specifications, model-level US safety matches, and missing values when an agent presents a vehicle report.

FAQ

Does a successful report include safety data for every VIN?

No. A non-US VIN can return HTTP 200 with specifications only. Recalls, complaints, and NCAP ratings cover US-market vehicles and are matched by make, model, and year.

Does a recall entry confirm that this VIN needs a repair?

No. The report’s safety match provides make-, model-, and year-level context. It does not establish individual VIN applicability or repair completion.

What should I display for a null rating or specification?

Display it as unavailable or omit it from the relevant section. Do not convert null to zero, and do not calculate an overall NCAP rating from the individual ratings.

Can a Dutch plate supply the VIN for this request?

No. Dutch plate data from RDW never includes a VIN. A Vehicle Report request needs the VIN supplied separately.

Is this a vehicle history report?

No. Vehicle Report combines decoded specifications with available US safety data; it does not include title, accident, or ownership history.

Ready to try the report with your own VIN? Register to start a 7-day free trial. Starter is $19 per month, and every plan includes the trial.

Keep reading