NHTSA API

Beginner's Pick Vehicle / No Auth Required Beginner HTTPS
Free to Use
46 D
Measured Score 0 50 100 Speed 2/30 Consistency 1/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

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.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVin/1HGBH41JXMN109186?format=json
Result
HTTP 200 · application/json · 11,759 bytes · compressed
Response time
1159 ms (median of 3) · fastest 234 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by DigiCert Inc
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
Count integer 140
Message string Results returned successfully. NOTE: Any miss…
SearchCriteria string VIN:1HGBH41JXMN109186
Results array [1 item]

Captured Response

Captured from a real request to https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVin/1HGBH41JXMN109186?format=json on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "Count": 140,
  "Message": "Results returned successfully. NOTE: Any missing decoded values should be interpreted as NHTSA does not have data on the specific variable. Missing value sho…",
  "SearchCriteria": "VIN:1HGBH41JXMN109186",
  "Results": [
    {
      "Value": "",
      "ValueId": "",
      "Variable": "Suggested VIN",
      "VariableId": 142
    }
  ]
}

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").

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVin/1HGBH41JXMN109186?format=json";
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.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/html

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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/.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 2/30
Consistency 1/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 1159ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Vehicle
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →