NHTSA API

Beginner's Pick Vehicle / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

The NHTSA vPIC API provides free access to the U.S. National Highway Traffic Safety Administration's vehicle product information catalog, including VIN decoding, make/model lookups, and recall data. No API key is required, making it one of the easiest vehicle APIs to start using. It is the official government source for vehicle identification in the United States.

Beginner Tip

The most useful endpoint for beginners is the VIN decoder — just pass any U.S. vehicle's 17-character VIN and get back detailed specs including make, model, year, engine, and body style. Always append ?format=json to get JSON instead of XML.

Available Data

vehicle make and model
year and specifications
fuel economy
VIN decode data

Example Response

JSON Response
{
  "make": "Toyota",
  "model": "Camry",
  "year": 2025,
  "engine": "2.5L 4-cylinder",
  "fuel_economy": {
    "city_mpg": 28,
    "highway_mpg": 39
  },
  "msrp": 28400
}

Field Reference

Results Array of decoded vehicle attribute objects, each with Variable, Value, and VariableId fields.
Variable Name of the vehicle attribute (e.g., "Make", "Model", "Model Year", "Body Class").
Value Decoded value for the corresponding variable — may be null if not determinable from the VIN.
Count Total number of result records returned in this response.
Message Status message from the API (e.g., "Results returned successfully").
ErrorCode Error code if the VIN could not be fully decoded — "0" means no errors.

Implementation Example

Request
// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://vpic.nhtsa.dot.gov/api/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Missing ?format=json By default the API returns XML, which can be confusing for beginners.
Always add ?format=json to the end of every request URL to receive JSON responses.
Null or empty values in response The VIN may be partially invalid or for a vehicle not in the NHTSA database.
Check the "ErrorCode" and "ErrorText" fields in the Results array — they will indicate what part of the VIN could not be decoded.
404 Not Found The endpoint path is incorrect.
Double-check the endpoint URL — common paths include /vehicles/DecodeVin/, /vehicles/GetAllMakes/, and /vehicles/GetModelsForMake/.

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Vehicle
Difficulty Beginner
Verified: 2026-04-04

Related Tags

Similar APIs

View All →