DEV Community

Ava Torres
Ava Torres

Posted on

How to Search NHTSA Vehicle Complaints by Make, Model, and Component (Consumer Safety Data API)

The National Highway Traffic Safety Administration (NHTSA) maintains a database of every consumer vehicle safety complaint filed in the United States. When someone reports a defect -- brakes failing, airbags deploying unexpectedly, engines stalling at highway speed -- it goes into this database. The data includes crash and fire flags, injury and death counts, the specific vehicle component involved, and the consumer's full narrative description.

This is the same data NHTSA uses to decide whether to open a defect investigation, which can lead to mandatory recalls. It is public, free, and updated continuously. But the NHTSA website search is limited to one make/model at a time, results are paginated manually, and there is no bulk export.

What each complaint record contains

  • odiNumber -- the unique NHTSA complaint identifier
  • make, model, modelYear -- the vehicle involved
  • component -- the affected system (AIR BAGS, BRAKES, ENGINE, POWER TRAIN, ELECTRICAL SYSTEM, FUEL SYSTEM, STEERING, etc.)
  • crashFlag and fireFlag -- whether the complaint involved a crash or fire
  • injuriesCount and deathsCount -- reported injury and death numbers
  • dateOfIncident and dateComplaintFiled -- when it happened and when it was reported
  • summary -- the consumer's full written complaint narrative
  • vin -- partial vehicle identification number

The crash/fire flags and injury counts are what make this data particularly valuable. A cluster of complaints with crashFlag: true for the same make/model/component is often a leading indicator of an upcoming recall investigation.

Who uses this data

Lemon law attorneys use complaint patterns as evidence. If your client's 2022 Honda CR-V has repeated transmission failures, and NHTSA has 300 other complaints about the same issue, that's material evidence for a warranty or buyback claim.

Auto journalists and safety advocates track complaint trends to identify emerging defects before they become recalls. A spike in "ENGINE STALL" complaints for a specific model year is newsworthy.

Used vehicle buyers and dealers check complaint histories before purchasing. A model with dozens of airbag complaints is a different risk profile than one with zero.

Fleet managers monitor complaints for vehicles in their fleet to anticipate maintenance issues and recall exposure.

Insurance and warranty companies analyze complaint density by make, model, and component to price risk more accurately.

Searching via API

I built an Apify actor that wraps the NHTSA complaints database and returns structured JSON. Search by make, model, year, and component.

import requests

API_TOKEN = "your_apify_token"

# Find all brake-related complaints for 2020 Toyota Camry
run = requests.post(
    f"https://api.apify.com/v2/acts/pink_comic~nhtsa-vehicle-complaints/runs?token={API_TOKEN}",
    json={
        "make": "Toyota",
        "model": "Camry",
        "modelYear": 2020,
        "component": "BRAKES",
        "maxResults": 100
    }
).json()

print(f"Run started: {run['data']['id']}")
Enter fullscreen mode Exit fullscreen mode

Fetch results:

dataset_id = run["data"]["defaultDatasetId"]
items = requests.get(
    f"https://api.apify.com/v2/datasets/{dataset_id}/items?token={API_TOKEN}"
).json()

for complaint in items:
    crash = "CRASH" if complaint.get("crashFlag") else ""
    fire = "FIRE" if complaint.get("fireFlag") else ""
    flags = " | ".join(filter(None, [crash, fire])) or "no incident"
    print(f"ODI#{complaint['odiNumber']} | {complaint['make']} {complaint['model']} "
          f"{complaint['modelYear']} | {complaint['component']} | {flags}")
    print(f"  {complaint['summary'][:120]}...")
Enter fullscreen mode Exit fullscreen mode

Example queries

All Tesla complaints involving fires:

{
    "make": "Tesla",
    "maxResults": 500
}
Enter fullscreen mode Exit fullscreen mode

Then filter results client-side for fireFlag: true. Or narrow by component:

{
    "make": "Tesla",
    "component": "ELECTRICAL SYSTEM",
    "maxResults": 200
}
Enter fullscreen mode Exit fullscreen mode

Engine complaints for a specific model year:

{
    "make": "Ford",
    "model": "Explorer",
    "modelYear": 2021,
    "component": "ENGINE",
    "maxResults": 100
}
Enter fullscreen mode Exit fullscreen mode

All complaints for a make/model (no filters):

{
    "make": "Hyundai",
    "model": "Tucson",
    "maxResults": 500
}
Enter fullscreen mode Exit fullscreen mode

Results typically come back in seconds. Export as JSON, CSV, or Excel directly from Apify.

Combining with recall data

NHTSA complaints and recalls are related but separate. Complaints are filed by consumers. Recalls are issued by manufacturers (sometimes prompted by complaint patterns). If you are building a complete vehicle safety profile, pair this with NHTSA recall data for the same make and model.

Data source

All data comes from the NHTSA Complaints API (api.nhtsa.gov). This is official federal safety data, publicly available with no API key required.

The actor is here: NHTSA Vehicle Complaints Search

It's part of a collection of public data tools covering government records, business filings, and regulatory data -- all built in Go, all on Apify.

Top comments (0)