How to Use the VIN Lookup API

By Vehicle API
How to Use the VIN Lookup API

You need to turn a VIN into trustworthy specs and US safety data without stitching five feeds together. By the end of this guide, you’ll sign up, grab your API key, make one POST to the VIN Lookup endpoint, and reliably parse specs, recall campaigns, owner complaint counts, and NCAP crash ratings from a single response envelope.

What the VIN Lookup endpoint returns

The VIN Lookup endpoint is a single-call report that covers:

Illustration: How to Use the VIN Lookup API
  • VIN decoding: year, make, model, trim, body, doors, vehicle type, engine details, manufacturer, and assembly plant.
  • US safety data: recall campaigns, owner complaint counts, and NCAP crash ratings, matched on make + model + year.

Coverage notes you should code for:

  • VIN decoding works worldwide, with fullest detail for US-market vehicles.
  • Recalls, complaints, and NCAP ratings are US-market only. For non-US VINs, you’ll still get a 200 response with specs only.
  • Dutch plates are supported through RDW open data and never include a VIN. This article focuses on VIN Lookup.
  • This is not a vehicle history report. There is no title, accident, or ownership history.

All responses use the same envelope structure: status and source, plus a data object when successful, or status: "error" with error.code and error.message if something goes wrong.

Get access and your API key

Every plan includes a 7‑day free trial. Start here and create your key:

Register

After sign-up, copy your key from the dashboard. Use it in the X-API-Key header for REST. Authorization: Bearer also works, but we’ll keep examples consistent with X-API-Key.

Base URL for REST: https://vehicles-api.com/api/v1

Make your first VIN report request

The VIN Lookup endpoint is a POST with a small JSON body. It aggregates specs, recalls, complaint counts, and NCAP ratings into one response. The following official example uses a control VIN for a 2003 Honda Accord. Use it to verify your integration; it’s not your user’s vehicle.

cURL (copy and run)

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

Understand the response envelope

Every success has status = "success", a source indicating the upstream provider (NHTSA in this example), and a data object with normalized fields. Non-US VINs return status = "success" with specs but no US safety supplements.

Official JSON example

{
    "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’ll typically use

  • Identification: data.vin, data.valid
  • Core specs: data.year, data.make, data.model, data.trim, data.body, data.doors, data.vehicle_type
  • Engine: data.engine.cylinders, data.engine.displacement_l, data.engine.fuel; data.fuel_type is a normalized top-level alias
  • Electrification: data.electrification_level, data.ev_drive_unit, data.battery_kwh, data.charger_level, data.charger_power_kw (may be null for non-EVs/hybrids)
  • Assembly plant: data.plant.country, data.plant.city, data.plant.state; data.manufacturer
  • Coverage context: data.coverage = "us" indicates the US market context for safety supplements
  • Recalls: data.recalls_count, data.recalls[] with campaign, component, received (YYYY-MM-DD), summary, consequence, remedy
  • Owner complaints: data.complaints_count (count only; no narrative text stream)
  • NCAP ratings: data.safety_ratings with match status, vehicle_description, and ratings segments (null when not available)

Nulls are expected when a field is not applicable or not present in the source. Always code defensively against nulls for electrification fields and for safety ratings that may be absent or partially matched.

Parse the VIN report in code

The snippet below shows how to call the endpoint and safely read the fields you’ll display or index. It demonstrates defensive handling for nulls and optional arrays.

Python example

import os
import json
import requests

API_KEY = os.getenv("VEHICLES_API_KEY", "YOUR_API_KEY")
URL = "https://vehicles-api.com/api/v1/vin/report"

payload = {"vin": "1HGCM82633A004352"}
headers = {
"X-API-Key": API_KEY,
"Content-Type": "application/json",
}

resp = requests.post(URL, headers=headers, json=payload, timeout=20)
resp.raise_for_status()
envelope = resp.json()

if envelope.get("status") != "success":
err = envelope.get("error", {})
raise RuntimeError(f"VIN report error: {err.get('code')} {err.get('message')}")

data = envelope.get("data", {})

# Core specs
vin = data.get("vin")
year = data.get("year")
make = data.get("make")
model = data.get("model")
trim = data.get("trim")
body = data.get("body")
doors = data.get("doors")
vehicle_type = data.get("vehicle_type")

# Engine and fuel
engine = data.get("engine") or {}
cyl = engine.get("cylinders")
disp_l = engine.get("displacement_l")
fuel = engine.get("fuel") or data.get("fuel_type")

# Assembly and manufacturer
plant = data.get("plant") or {}
plant_city = plant.get("city")
plant_state = plant.get("state")
plant_country = plant.get("country")
manufacturer = data.get("manufacturer")

# US safety supplements (only if available)
recalls = data.get("recalls") or []
recalls_count = data.get("recalls_count") or 0
complaints_count = data.get("complaints_count")
ratings = data.get("safety_ratings") or {}

print(f"VIN: {vin} ({year} {make} {model} {trim or ''})")
print(f"Body: {body}, doors: {doors}, type: {vehicle_type}")
print(f"Engine: {cyl} cyl, {disp_l} L, fuel: {fuel}")
print(f"Built in: {plant_city}, {plant_state}, {plant_country} by {manufacturer}")
print(f"Recalls: {recalls_count}, Complaints: {complaints_count}")
print(f"NCAP match: {ratings.get('match')}, desc: {ratings.get('vehicle_description')}")
if recalls:
first = recalls[0]
print(f"Example campaign: {first.get('campaign')} - {first.get('component')}")

This pattern generalizes to your stack: check the response envelope, branch on success vs. error, parse the data subtree, and guard against nulls.

Coverage and sources to expect per VIN

  • Worldwide decoding: VIN structure and core specs are decoded globally using NHTSA vPIC. Expect greatest detail for vehicles intended for the US market.
  • US safety supplements: Recalls, owner complaints, and NCAP crash ratings are US-market only and matched by make, model, and year. Some trims may not have a perfect NCAP match; check safety_ratings.match and handle null ratings.
  • Dutch plates: Sourced from RDW open data and never include a VIN. If you serve the Netherlands, integrate plate flows separately from VIN flows.

For implementers, the main outcome is to always treat safety supplements as optional and to display them only when present. The base specs are present for valid VINs regardless of country of sale.

Handling errors, rate limits, and caching

Error envelope

On any failure, you’ll get status = "error" with error.code and error.message. Use the HTTP status for transport-level handling and the error.code/message to render a clear message or to trigger a retry/backoff where appropriate.

Rate limits and monthly quota

  • Rate limits and monthly quota vary by plan. Do not assume unlimited throughput.
  • Read your dashboard and the Documentation for the current limits on your account.
  • Implement short-term client-side throttling if you expect bursts (for example, batch VIN uploads).

Caching strategy

  • VIN decoding is deterministic for a given model year; cache the full response keyed by VIN. A 24-hour TTL is a practical minimum for UI flows; longer is fine for static specs.
  • US safety supplements (recalls, complaints_count, safety_ratings) evolve as NHTSA publishes updates. If you separate storage, consider shorter TTL (e.g., daily refresh) for those fields; always rehydrate stale cached entries on demand.
  • Honor nulls: cache nulls as real values to avoid redundant re-queries for unavailable fields.

Practical details that save time

  • Authentication: Set X-API-Key: YOUR_API_KEY on every request. Authorization: Bearer YOUR_API_KEY is also accepted.
  • Method and endpoint: POST https://vehicles-api.com/api/v1/vin/report with a JSON body containing "vin".
  • Response envelope: Always check status first. On success, read source and data. On error, read error.code and error.message.
  • Units and formats:
    • Engine displacement is in liters (displacement_l).
    • Dates are ISO 8601 YYYY-MM-DD (e.g., recalls[].received).
    • NCAP ratings are integers where provided; some may be null.
  • Safety matching: safety_ratings.match indicates how closely an NCAP entry maps to the decoded vehicle (e.g., "partial"). Use vehicle_description to label the rating.
  • Null handling: Electrification fields are frequently null for ICE vehicles. Do not coerce to zero or "N/A"; check for null explicitly.
  • This endpoint is not a vehicle history report. Do not communicate or imply title, accident, or ownership coverage in your UI.

Add VIN Lookup to your AI agent or tools via MCP

If you’re building an AI agent or toolstack that speaks the Model Context Protocol (MCP), Vehicle API also runs an MCP server. This is the same data, packaged for agentic use.

MCP

For REST-only systems, keep using the POST endpoint shown above. For agentic workflows, configure the MCP server at https://vehicles-api.com/mcp and route VIN queries through it to centralize decoding and safety checks.

QA checklist before you ship

  • Use your key via X-API-Key and verify at least one successful report with the control VIN before switching to user VINs.
  • Assert response envelope: status must be "success" before reading data.
  • Guard all optional fields for nulls. Especially electrification fields and NCAP ratings.
  • Render safety supplements only when present; include the campaign ID when you show recalls.
  • Implement caching keyed by VIN and refresh cadence for safety fields.
  • Backoff or queue when your dashboard indicates rate-limit responses during bursts.

Common implementation patterns

Dealer and marketplace forms

On VIN entry, POST once, cache the response, and auto-fill year/make/model/trim, body, doors, vehicle type, engine specs, and manufacturer. If data.coverage is "us", show recall count and a link-out or modal with the recall campaigns you received. If safety_ratings.overall is null but individual segment ratings exist, display the available segments clearly.

Fleet and insurance workflows

When onboarding vehicles in bulk, enqueue VINs, respect the rate limit, and store the normalized fields. Revisit safety supplements on a daily job to capture new recalls or changes in complaints_count. For EVs and hybrids, watch electrification_level and charger_* fields; they may be null for ICE units.

AI agents

Whether you call REST or the MCP server, ensure the agent checks status, cites source = "nhtsa" for US data, and never promises history data that isn’t provided by this endpoint. For summarization, include recall campaign IDs and dates verbatim to maintain traceability.

Troubleshooting quick notes

  • 200 with sparse data: This is normal for non-US VINs; safety supplements are US-only. Use the specs and omit safety panels.
  • Null NCAP or partial match: Keep rendering the parts you have; show match as "partial" and include vehicle_description for context.
  • Invalid VIN: status may be "success" with valid=false in some cases, or an error depending on input. Handle both by checking data.valid when present and the envelope status.
  • Time-outs: Retry idempotently with exponential backoff. Caching prevents rework on success.

FAQ

Does the VIN Lookup include accident, title, or ownership history?
No. It returns decoded specs and, for US-market vehicles, recall campaigns, owner complaint counts, and NCAP ratings. It is not a vehicle history report.

What happens if I query a non-US VIN?
You’ll receive a 200 response with decoded specs. US safety supplements (recalls, complaints, NCAP) are not available for non-US VINs and may be absent or null.

How are NCAP ratings matched?
By make, model, and year. Some trims may not align perfectly, so check safety_ratings.match and vehicle_description. Ratings can be null if no match exists.

Will Dutch plate data give me the VIN?
No. Dutch plates use RDW open data and never include a VIN. Treat plate-based flows separately from VIN flows.

Where do I find my rate limits and monthly quota?
They depend on your plan. Check your dashboard and the Documentation for your account’s current limits.

Start your 7‑day free trial and ship your VIN Lookup integration today. Create your key here: Register. Explore the endpoints and field definitions in the Documentation, and use the MCP server at MCP for agentic integrations.