How to Use the Vehicle Complaints API

By Vehicle API
How to Use the Vehicle Complaints API

You need to surface trustworthy vehicle owner complaint data in your transportation app: things like airbag warnings, brake issues, and when they were reported to NHTSA. By the end of this guide you’ll query the Vehicle Complaints API endpoint, authenticate with your key, parse the official JSON response, handle coverage constraints (US-only), and ship a production-ready integration with clear error handling and caching.

What this endpoint returns and when to use it

The Vehicle Complaints endpoint returns owner complaints filed with NHTSA’s Office of Defects Investigation (ODI). It delivers the 50 most recent complaints plus the true total count for that vehicle’s make, model, and year. Use it to:

Illustration: How to Use the Vehicle Complaints API
  • Flag potential safety issues in dealer listings and marketplaces.
  • Enhance underwriting and risk scoring for insurance apps.
  • Give fleet and maintenance teams a quick read on known issues.
  • Feed AI agents with structured, recent safety-related signals.

Important coverage details:

  • Complaints are US-market only. For non-US vehicles, this endpoint returns an error indicating US coverage only.
  • Matching is by make + model + year, not by a per-VIN complaint identity; the response includes the VIN you asked for to help you correlate results.
  • This is not a vehicle history report. It does not include ownership, title, accident, or service history.
  • Dutch plates from RDW are supported by Vehicles API for other use cases, but RDW plates never include a VIN and are unrelated to NHTSA complaints.

Get access and authenticate

Start with the 7-day free trial on the Starter plan ($19/mo after trial). Register, copy your API key from the dashboard, and call the endpoint using the documented header.

  • Base URL: https://vehicles-api.com/api/v1
  • Endpoint (GET): /vin/complaints
  • Query parameter: vin
  • Authentication header: X-API-Key: YOUR_API_KEY (Authorization: Bearer YOUR_API_KEY also works)

Sign up here: Register. You can also browse the Documentation and the MCP server if you prefer the Model Context Protocol for agent integrations.

Make your first request

Below is the official cURL example from the docs. The VIN used here (1HGCM82633A004352) is a known control sample for a 2003 Honda Accord to help you get a predictable response while testing. It’s not your user’s car.

cURL (official)

curl "https://vehicles-api.com/api/v1/vin/complaints?vin=1HGCM82633A004352" -H "X-API-Key: YOUR_API_KEY"

Python example

This Python snippet calls the same endpoint, checks the response envelope (status, source, data), and extracts the fields most apps use: the total complaint count, the most recent complaint summary, involved components, and basic vehicle descriptors.

import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://vehicles-api.com/api/v1"
VIN = "1HGCM82633A004352"

url = f"{BASE_URL}/vin/complaints"
headers = {"X-API-Key": API_KEY}
params = {"vin": VIN}

resp = requests.get(url, headers=headers, params=params, timeout=15)
resp.raise_for_status()
payload = resp.json()

if payload.get("status") != "success":
# All errors share the same envelope shape: status=error, error.code, error.message
err = payload.get("error", {})
raise RuntimeError(f"Vehicle Complaints API error: {err.get('code')} - {err.get('message')}")

data = payload["data"]
vin = data.get("vin")
year = data.get("year")
make = data.get("make")
model = data.get("model")
coverage = data.get("coverage")
total_count = data.get("count", 0)
complaints = data.get("complaints") or []

# Example: read the first (most recent) complaint if present
first = complaints[0] if complaints else None
if first:
odi = first.get("odi_number")
date = first.get("date")
components = first.get("components") or []
summary = first.get("summary")
crash = first.get("crash")
injured = first.get("injured")
# Use these in your UI or risk logic as needed

print({
"vin": vin,
"vehicle": f"{year} {make} {model}",
"coverage": coverage,
"total_complaints": total_count,
"has_recent": bool(first)
})

Understand the response

Every Vehicles API response is wrapped in a consistent envelope. For successful calls, you’ll receive status=success, a source string (here, “nhtsa”), and a data object. For errors, you’ll receive status=error along with error.code and error.message.

Official JSON example

{
    "status": "success",
    "source": "nhtsa",
    "data": {
        "vin": "1HGCM82633A004352",
        "year": 2003,
        "make": "HONDA",
        "model": "Accord",
        "coverage": "us",
        "count": 2013,
        "complaints": [
            {
                "odi_number": "11459899",
                "date": "2022-03-15",
                "crash": false,
                "fire": false,
                "injured": 0,
                "deaths": 0,
                "components": [
                    "AIR BAGS"
                ],
                "summary": "Driver airbag warning light illuminated."
            }
        ]
    }
}

Fields you will actually use

  • status: "success" for successful calls; otherwise "error".
  • source: "nhtsa" indicates ODI as the data provider.
  • data.vin: Echoes the VIN you queried, to correlate results.
  • data.year, data.make, data.model: The model year and descriptor used for NHTSA matching.
  • data.coverage: "us" confirms US-market scope for these results.
  • data.count: The total number of ODI complaints for this make+model+year, not limited to the 50 included items.
  • data.complaints: Array of the 50 most recent complaints, each with:
    • odi_number: ODI case identifier (string).
    • date: YYYY-MM-DD (local date of filing as provided by NHTSA).
    • crash, fire: Booleans indicating whether a crash or fire occurred.
    • injured, deaths: Integers with reported counts.
    • components: Array of affected systems, e.g., "AIR BAGS".
    • summary: Short description from the filer.

Nulls: Some subfields can be null or omitted in NHTSA source data. Always code defensively: default missing arrays to [], missing booleans to False/None per your language, and missing strings to an empty string if needed.

Error handling and coverage nuances

This endpoint only covers US-market complaints. If you pass a valid non-US VIN, you will receive an error indicating US-only coverage, with a consistent error envelope. Match by make+model+year is handled server-side; you only supply a VIN.

Typical error envelope

  • Always check payload.status before reading payload.data.
  • Log error.code for observability; display or map error.message as appropriate.
  • If you encounter throttling or quota issues, you’ll also receive status=error with an error.code. Inspect your dashboard to confirm current monthly quotas and rate limits.

Design notes for production

Request shape and headers

  • GET https://vehicles-api.com/api/v1/vin/complaints?vin=...
  • Authentication: X-API-Key: YOUR_API_KEY. Authorization: Bearer YOUR_API_KEY is also supported if your client standardizes on Bearer tokens.
  • Use a sane timeout (e.g., 10–20 seconds) and retries with backoff on transient network failures.

Caching strategy

  • Complaints change as NHTSA publishes new data. For marketplace and dealer UIs, cache by VIN for a short period and revalidate on a schedule appropriate to your freshness needs.
  • Because the array includes only the 50 most recent items but count reflects the true total, cache both and refresh if users request deeper history (e.g., on-demand re-fetch and paginate in your own store if needed).
  • If you also decode VINs elsewhere in your app, cache decoded VIN attributes separately; they change infrequently compared to safety data.

Pagination and counts

  • The endpoint returns up to 50 complaint records in data.complaints and the full total in data.count.
  • If you need to browse older records beyond the 50 returned, use data.count to inform the UI and implement a server-side store where you periodically sync older pages from your own workflows.

Rate limits and monthly quota

  • All plans include a monthly quota and rate limits. When you exceed them, the API responds with status=error and an error.code describing the condition.
  • Build client-side backoff and display helpful UI messaging when you hit limits. Monitor usage in your dashboard.

Data provenance and trust

  • source: "nhtsa" in the envelope gives you an auditable chain back to the official US data provider.
  • Live counts and complaint details evolve as NHTSA publishes new records; never hardcode counts in business logic.

MCP integration

If you’re building an AI agent or tool that prefers MCP over HTTP, the Vehicles API is also available as an MCP server at https://vehicles-api.com/mcp. The same coverage rules apply. Use the MCP transport to request complaints for a VIN and parse the same fields described above, with equivalent envelopes and error semantics.

End-to-end checklist

  • Start a free trial and copy your API key from the dashboard.
  • Call GET /vin/complaints with X-API-Key: YOUR_API_KEY.
  • Verify status=success; on status=error, read error.code and error.message.
  • Parse data.year, data.make, data.model for display; data.count for totals; data.complaints[0] for the most recent details.
  • Show components and summary to highlight key issues; handle booleans and integers for crash, fire, injured, deaths.
  • Implement caching and graceful handling for US-only coverage cases.
  • Monitor rate limits and quotas; add backoff and retries for transient errors.

Reference: endpoint and fields

  • Endpoint: GET https://vehicles-api.com/api/v1/vin/complaints
  • Query: vin
  • Envelope (success): status, source, data
  • Envelope (error): status, error.code, error.message
  • Core fields (data):
    • vin, year, make, model, coverage
    • count (total complaints for make+model+year)
    • complaints[] with odi_number, date, crash, fire, injured, deaths, components[], summary
  • Coverage constraints: US-market only; matched by make+model+year

Explore more at vehicles-api.com and the full Documentation for transport-focused endpoints.

FAQ

Does this endpoint return every complaint ever filed?
It returns the 50 most recent complaints and the true total number in data.count. Use count for summaries and consider syncing older records to your own store if you need deeper history.

Is the data tied to a specific VIN or to a model/year?
Complaints are matched by make + model + year. The response echoes the VIN you queried, but the underlying complaint data is grouped at the model-year level.

What happens if I query a non-US VIN?
You’ll receive a status=error with error.code indicating US-only coverage. Handle this by informing users or by skipping complaint rendering for non-US vehicles.

How should I cache results?
Cache by VIN and revalidate on a schedule that balances freshness with traffic. Safety data changes over time as NHTSA publishes updates, so avoid long-term pinning without periodic refresh.

Can I call this from an AI agent without HTTP?
Yes. Use the Vehicles API MCP server at MCP and parse the same envelope fields.

Ready to integrate? Start your 7-day free trial and get your key now: Register. If you need field-by-field details or other transportation endpoints, see the Documentation and the homepage at vehicles-api.com.