NHTSA Vehicle API

Government API · United States · Vehicle safety recalls and ratings

TL;DR

The NHTSA (National Highway Traffic Safety Administration) API provides official US government data on vehicle safety — recalls, complaints, investigations, and 5-star safety ratings. Decode VINs (Vehicle Identification Numbers), search recalls by make/model/year, access consumer complaints, and retrieve safety test results. Covers cars, trucks, motorcycles, buses, RVs, and more. The authoritative source for US vehicle safety information, used by Carfax, AutoTrader, and countless automotive applications.

Quick start: https://api.nhtsa.gov/recalls/recallsByVehicle?make=Toyota&model=Camry&year=2020

No API key needed — just make a request!

2020 Toyota Camry recalls: https://api.nhtsa.gov/recalls/recallsByVehicle?make=Toyota&model=Camry&year=2020

How to Use This API

1. Recalls by Vehicle

https://api.nhtsa.gov/recalls/recallsByVehicle?make=Honda&model=Accord&year=2019

2. VIN Decoding

https://api.nhtsa.gov/vehicles/DecodeVin/1HGCM82633A004352

3. Safety Ratings

https://api.nhtsa.gov/SafetyRatings/modelyear/2023/make/Ford/model/Explorer

4. Complaints by Vehicle

https://api.nhtsa.gov/complaints/complaintsByVehicle?make=Tesla&model=Model%203&year=2022

5. JavaScript — Recall Checker

async function checkRecalls(make, model, year) {
  const resp = await fetch(
    `https://api.nhtsa.gov/recalls/recallsByVehicle?` +
    `make=${make}&model=${model}&year=${year}`
  );
  const data = await resp.json();
  
  if (!data.results?.length) {
    console.log(`No recalls found for ${year} ${make} ${model}`);
    return;
  }
  
  console.log(`${data.results.length} recall(s) found:`);
  data.results.forEach(r => {
    console.log(`- ${r.Summary?.slice(0, 100)}...`);
    console.log(`  NHTSA ID: ${r.NHTSACampaignNumber}`);
  });
}

checkRecalls('Honda', 'Accord', 2019);

6. Python — Bulk VIN Decode

import requests

def decode_vin(vin):
    resp = requests.get(
        f'https://api.nhtsa.gov/vehicles/DecodeVin/{vin}'
    )
    data = resp.json()
    
    results = data.get('Results', [])
    decoded = {}
    for item in results:
        var = item.get('Variable', '')
        val = item.get('Value', '')
        if val:
            decoded[var] = val
    
    print(f'VIN: {vin}')
    print(f'Make: {decoded.get("Make", "N/A")}')
    print(f'Model: {decoded.get("Model", "N/A")}')
    print(f'Year: {decoded.get("Model Year", "N/A")}')
    print(f'Engine: {decoded.get("Engine", "N/A")}')

decode_vin('1HGCM82633A004352')

Frequently Asked Questions

What data is available?
Safety recalls (with NHTSA campaign numbers, summaries, and dates), consumer complaints, vehicle investigations, 5-star safety ratings, and VIN decoding results.
Do I need an API key?
No. NHTSA data is public government information. The API is free and open with no authentication.
How far back does the data go?
Recalls and complaints data goes back to the 1960s. VIN decoding covers all vehicles manufactured after 1981 (when 17-digit VINs became standard).
What vehicles are covered?
All passenger vehicles, trucks, motorcycles, buses, and RVs sold in the United States. International vehicles sold outside the US may not be in the database.
How often is data updated?
NHTSA updates recall data in real-time as new recalls are announced. Complaint data is updated as submitted. The API reflects the latest official data.
Can I decode a partial VIN?
Yes, use the DecodeVinValues endpoint with the modelyear parameter for partial VINs to narrow results.

API Details

API URL
https://api.nhtsa.gov/
Documentation
vpic.nhtsa.dot.gov/api
Category
Government
Authentication
Not Required
Geographic Coverage
United States

What You Can Build