How to Use the Vehicle Report API

By Vehicle API
How to Use the Vehicle Report API

You need reliable specs, US safety data, and recall context from a single call so your app can show a trustworthy vehicle view without juggling multiple feeds. By the end of this guide, you’ll create a working integration that calls the Vehicle Report endpoint, parses the official JSON envelope, handles nulls and errors, and ships with sane caching and rate-limit hygiene.

What you get from the Vehicle Report endpoint

The Vehicle Report endpoint aggregates VIN decoding and US safety coverage into one JSON response:

Illustration: How to Use the Vehicle Report API
  • VIN decoding (year, make, model, trim, body, engine, assembly plant) from NHTSA vPIC; works worldwide, most complete for US-market vehicles.
  • US safety data when available: recall campaigns, owner complaint counts, NCAP crash ratings (matched by make + model + year).
  • Consistent response envelope with status, source, and data.

Coverage details you should design for:

  • VINs from any market return specs. If the VIN is non-US or the US safety match isn’t available, the response is still HTTP 200 with specs only and some safety fields null.
  • US recalls, complaints, and NCAP ratings are US-market only and matched by make, model, and year, not by VIN string.
  • Dutch plates are available from RDW open data via other endpoints and never include a VIN; they’re out of scope for this VIN endpoint.
  • This is not a vehicle history report: no title, accident, or ownership history.

Account setup and authentication

Every plan starts with a 7-day free trial and includes the Vehicle Report API. Create an account and grab your API key:

  1. Start your trial: Register (Starter is $19/mo after trial).
  2. Open your dashboard and copy your API key.
  3. Use the base URL https://vehicles-api.com/api/v1 and send your key in the X-API-Key header. Authorization: Bearer also works if you prefer.

You can always refer to the Documentation for endpoint details, examples, and platform notes.

Endpoint: Vehicle Report (VIN)

The Vehicle Report endpoint consolidates decoding and US safety data in one call.

  • Method: POST
  • URL: https://vehicles-api.com/api/v1/vin/report
  • Headers: X-API-Key: YOUR_API_KEY and Content-Type: application/json
  • Body: {"vin":"..."} (use the provided control VIN below to test your integration)

Send your first request with cURL

Copy, paste, and run this exact example. It 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"}'

JavaScript example (fetch)

async function fetchVehicleReport() {
const res = await fetch("https://vehicles-api.com/api/v1/vin/report", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({ vin: "1HGCM82633A004352" })
});

// Handle HTTP-level errors first
if (!res.ok) {
// Rate limits, auth, or server errors surface here with non-200
const text = await res.text().catch(() => "");
throw new Error(`HTTP ${res.status} - ${text || "Request failed"}`);
}

const payload = await res.json();

// The API always wraps responses in an envelope
if (payload.status !== "success") {
const code = payload?.error?.code || "unknown_error";
const message = payload?.error?.message || "Unexpected error";
throw new Error(`${code}: ${message}`);
}

const data = payload.data;

// Core specs you can show immediately
const {
vin,
valid,
year,
make,
model,
trim,
body,
doors,
vehicle_type,
engine,
plant,
manufacturer,
coverage
} = data;

// Safety coverage may be partial depending on US-market match
const recallsCount = data.recalls_count; // integer
const recalls = data.recalls || []; // array (possibly empty)
const complaintsCount = data.complaints_count; // integer
const safety = data.safety_ratings || {}; // may be missing fields or nulls

// Example: normalize possibly-null fields
const overallRating = safety.overall ?? null; // explicit null if absent
const frontDriver = safety.front?.driver ?? null;
const rollover = safety.rollover ?? null;

// Use the structured engine object safely
const cylinders = engine?.cylinders ?? null;
const displacementL = engine?.displacement_l ?? null;
const fuel = engine?.fuel ?? data.fuel_type ?? null;

return {
vin,
valid,
year,
make,
model,
trim,
body,
doors,
vehicle_type,
manufacturer,
plant, // { country, city, state }
cylinders,
displacementL, // liters
fuel, // e.g., "Gasoline"
coverage, // "us" if US-market context applied
recallsCount,
recalls,
complaintsCount,
safety: {
match: safety.match ?? null,
vehicle_description: safety.vehicle_description ?? null,
overall: overallRating,
frontDriver,
rollover
}
};
}

fetchVehicleReport()
.then(console.log)
.catch(console.error);

Understand the JSON envelope

Every response is an envelope with three top-level fields:

  • status: "success" or "error".
  • source: data origin (e.g., "nhtsa").
  • data: the decoded vehicle record on success. On error, you’ll receive status "error" and an error object with error.code and error.message.

Official example JSON for the control VIN, exactly as documented:

{
    "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 typically render or store:

  • data.vin and data.valid: show the decoded VIN and whether it’s structurally valid.
  • Core specs: year, make, model, trim, body, doors, vehicle_type.
  • Engine details: engine.cylinders, engine.displacement_l (liters), engine.fuel, and fuel_type (string fallback).
  • Plant and manufacturer: plant.country, plant.city, plant.state; manufacturer.
  • coverage: "us" when US-market context is applied for safety matching.
  • recalls_count and recalls[]: campaign code, component, received date (YYYY-MM-DD), summary, consequence, remedy.
  • complaints_count: total owner complaints count (US-only).
  • safety_ratings: includes match detail, optional overall, per-position star ratings (integers), and rollover rating.

Expect nulls for fields that don’t apply (e.g., electrification fields for ICE vehicles, safety fields for non-US contexts, overall when a subtest lacks an aggregate). Always code defensively with null coalescing.

Handling errors, rate limits, and quotas

Transport-level errors surface as non-200 HTTP codes. Within 200 responses, API-level errors will set status to "error" and populate error.code and error.message. Your client should:

  • Check res.ok (or the HTTP status) first; surface 401/403 for auth issues and 429 for rate limit exceed if returned.
  • Parse the JSON envelope and branch on status. If status === "error", read error.code and error.message for a precise reason.

Plans include a monthly quota and rate limits. When you approach or exceed them, you may receive throttling responses. For exact limits and remaining usage, consult your dashboard and the Documentation.

Caching strategy and data freshness

VIN decodes are largely static for a given VIN. Cache successful VIN reports aggressively in your database or edge cache to minimize latency and quota usage. Recommended practices:

  • Primary key by VIN; store the entire data object plus the envelope source for traceability.
  • Set a long TTL for the specs portion (months). Refresh on user demand or on schedule.
  • For US safety data (recalls, complaints_count, safety_ratings), consider a shorter TTL. Recalls and complaints can change as NHTSA updates their datasets.
  • Normalize dates (e.g., recalls[].received) as ISO 8601 strings in UTC; the API returns dates as YYYY-MM-DD.

Working with partial coverage

Because safety coverage is matched by make + model + year for the US market, you may see:

  • data.coverage = "us" with recalls_count >= 0 and safety_ratings present if a US match is found.
  • Nulls for safety_ratings.overall or specific subtests when not published for that configuration.
  • recalls[] present but safety_ratings.overall null (as in the sample), which is normal.

Render your UI to tolerate missing safety fields gracefully. For example, show the subtest ratings you have and omit or grey out the aggregate when null.

Production checklist

  • Authentication: use the X-API-Key header with the key from your dashboard.
  • Envelope: always branch on status; on error, read error.code and error.message.
  • Null safety: treat null electrification and safety fields as expected for non-applicable cases.
  • Caching: cache decodes long-term; refresh safety data on a shorter cadence.
  • Compliance: label safety coverage as US-only; do not present this as a title/accident/ownership history.
  • Monitoring: log source for observability (e.g., "nhtsa") and VIN for traceability.

Build with the MCP server (for AI agents and tools)

If you’re integrating with AI agents or tools that speak the Model Context Protocol (MCP), the same capabilities are available at the MCP server endpoint. See MCP for connection details and tool schemas. This is useful for function-calling agents that need to fetch trustworthy specs and US safety context from a VIN.

End-to-end example flow

  1. User or intake provides a VIN.
  2. Check your cache for an existing record keyed by VIN.
  3. On miss, POST to /api/v1/vin/report with X-API-Key and the VIN in JSON.
  4. Verify status === "success"; store payload.source and payload.data.
  5. Render specs immediately. Render recalls_count, complaints_count, and safety_ratings if present; tolerate nulls.
  6. Backfill or schedule a refresh job for safety data TTLs to keep recall details current.

Field-by-field notes you’ll actually use

  • data.year, data.make, data.model, data.trim: canonical identity fields to generate display names and search facets.
  • data.body, data.doors, data.vehicle_type: body configuration for UI badges and filters.
  • data.engine.cylinders, data.engine.displacement_l, data.engine.fuel: specs for valuation rules or parts fitment.
  • data.plant.country, data.plant.city, data.plant.state and data.manufacturer: assembly and OEM metadata for audits and compliance.
  • data.recalls_count and data.recalls[]: show the count and summarize the latest items; each recall includes campaign, component, received (date), summary, consequence, remedy.
  • data.complaints_count: single integer for market sentiment; attribution to US NHTSA.
  • data.safety_ratings: structured stars per position; overall may be null; include rollover for SUV/truck risk presentation.

Testing tips

  • Use the control VIN 1HGCM82633A004352 to validate decoding and safety matching logic.
  • Test null handling by explicitly checking electrification_* fields on ICE vehicles and overall when the sample shows null.
  • Exercise your retry/backoff logic by simulating non-200 responses and envelope-level status: "error".

FAQ

Does the Vehicle Report endpoint include title, accident, or ownership history?
No. It returns decoded specs and US safety data (recalls, owner complaints count, NCAP ratings). It is not a vehicle history report.

Will non-US VINs return safety data?
Non-US VINs still decode successfully and return HTTP 200, but US safety fields may be missing or null if a US-market match is not available.

How are US safety ratings matched?
By make + model + year. They are not matched by the specific VIN string, so expect partial matches and nulls in some fields.

Do Dutch plates include a VIN?
No. Dutch plate data is sourced from RDW open data and does not include a VIN. It’s a separate flow from this VIN endpoint.

How should I handle rate limits and quotas?
Implement retries with backoff on transient errors, surface 429s to your logs, and cache VIN results to minimize calls. Check your dashboard for plan limits and remaining quota.

Ready to ship your integration? Start your 7-day free trial and get your API key today: Register. Explore more endpoints and examples in the Documentation, and check out the MCP server if you’re building tool-enabled agents.