# Vehicle VIN Decoder + Recall & Complaint Check (NHTSA) (`kdhan/nhtsa-vehicle-check`) Actor

Decode US VINs with the official NHTSA vPIC service (make, model, year, engine, plant country, with decoder error codes shown) and add the recalls and consumer complaint count NHTSA lists for that make, model and year. Official public data, no API key.

- **URL**: https://apify.com/kdhan/nhtsa-vehicle-check.md
- **Developed by:** [Doohan Kim](https://apify.com/kdhan) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 vehicle records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Vehicle VIN Decoder + Recall & Complaint Check (NHTSA)

Decode vehicle identification numbers (VINs) and see the safety recalls and consumer complaints
that the US National Highway Traffic Safety Administration (NHTSA) lists for that make, model and
model year. Built on three official public NHTSA services, no scraping and no API key:

- **vPIC** VIN decoder (`vpic.nhtsa.dot.gov/api`)
- **Recalls by vehicle** (`api.nhtsa.gov/recalls/recallsByVehicle`)
- **Complaints by vehicle** (`api.nhtsa.gov/complaints/complaintsByVehicle`)

Typical uses: used-car lead lists, fleet and dealer intake, insurance and lending checks, data
enrichment of a VIN column.

### Important: recalls are per model, not per VIN

NHTSA publishes no open API that tells whether a **specific VIN** still has an **unrepaired** recall
(the VIN lookup on nhtsa.gov/recalls is a web form). This Actor therefore returns the recalls that
exist for the decoded make, model and model year (`recalls[]`, `recallsScope`). It cannot say whether
this particular car has already been fixed. Use the official NHTSA VIN lookup for that final check.

### What you get (one row per VIN or vehicle)

| Section | Fields |
|---|---|
| Decoded vehicle (`decoded`) | `make`, `manufacturer`, `model`, `modelYear`, `series`, `trim`, `bodyClass`, `vehicleType`, `doors`, `driveType`, `gvwr`, `transmission`, `engine{cylinders, displacementL, horsepower, model, configuration, fuelTypePrimary, electrificationLevel}`, `plant{country, state, city, company}` |
| Decoder errors (never hidden) | `decoderErrorCodes[]`, `decoderErrors[]` (code + NHTSA message), `decoderAdditionalErrorText`, `suggestedVin`, `possibleValues` |
| VIN check | `checkDigit.valid` (computed locally), `checkDigit.required` (true for vehicles built in North America) |
| Recalls | `recallsCount`, `recalls[]`: `campaignNumber`, `actionNumber`, `reportReceivedDate`, `manufacturer`, `component`, `summary`, `consequence`, `remedy`, `parkIt`, `parkOutSide`, `overTheAirUpdate` (newest first) |
| Complaints | `complaintsCount`, `complaintsSummary{crashes, fires, injuries, deaths}` (counts only; complaint texts are not returned) |
| Name check | when a model has 0 recalls: `modelKnownToNhtsa` (true / false / null = could not check) and `modelSuggestions[]` |
| Freshness | `dataAsOf.decoder`, `dataAsOf.recalls`, `dataAsOf.complaints` (time of the query), `recallLookup` (the exact make/model/year queried), `disclaimer` |

An empty decoded field means NHTSA has no data for it, **not** that the vehicle lacks the feature.

#### No silent failures

- A VIN with the wrong length or illegal letters (I, O, Q) is returned as `found: false` with an
  English reason and is not looked up (not charged).
- If the decoder reports an error that makes the result unreliable (incomplete VIN, manufacturer not
  registered for the US market, invalid characters, no make/model/year, or a wrong check digit on a
  North American VIN), the row is `found: false` and **not charged**, but the full decoder output and
  error codes are still included so you can see what NHTSA said.
- If NHTSA cannot be reached the row has `found: null` and an `error`; it never claims the VIN is
  invalid or that there are no recalls. If only the recall or complaint service fails, the decoded
  vehicle is returned and the failed count is `null` (not 0) with the reason in `sectionErrors`.
- Non-US VINs: the decoder knows many foreign makes, but a vehicle not sold in the US may have a
  partial or empty decode (error codes 7, 14 and 400 are shown as returned).

### Input

```json
{
  "vins": ["1HGCM82633A004352"],
  "vehicles": [{"make": "Honda", "model": "Accord", "modelYear": 2003}],
  "includeComplaints": true
}
```

All fields are optional; with an empty input the Actor decodes the example VIN above (a 2003 Honda
Accord). Up to 200 VINs and 100 vehicles per run. VINs are cleaned (spaces removed, upper-cased) and
duplicates are processed once. `vehicles` rows return recalls and complaints only; NHTSA spells models
its own way (`F-150`, not `F150`), so use `modelSuggestions` when a model is not found.
`includeComplaints: false` skips the complaint lookup, which is the slowest call (the full complaint
list of a popular model is about 1 MB and has taken up to 20 seconds). A malformed input
(for example `vins` that is not an array) fails the run with an English error message.

### Pricing

Pay-per-event, event name `vehicle-record` (one successfully decoded vehicle, or one make/model/year
with at least one recall or complaint). Rows that are not found, are rejected or fail are not charged.

### Data sources and limits

- vPIC: VINs are decoded in batches of up to 50 through `DecodeVINValuesBatch`; NHTSA's FAQ states
  the service is free for public use and asks heavy users to run large jobs at night (US Eastern) or
  at weekends. This Actor makes one batch request per 50 VINs, one recall request, one complaint
  request and (only for 0-recall models) one model-list request per distinct make/model/year, with a
  pause between requests and exponential back-off on throttling or server errors.
- The decoder is reliable for model years 1995 and later; NHTSA states lower confidence for 1980-1994
  and no data before 1980.
- Recall and complaint data are reported by manufacturers and consumers and are not verified by this
  Actor. NHTSA public data, provided for informational purposes only; verify open recalls for a
  specific vehicle on nhtsa.gov/recalls before relying on it.

# Actor input Schema

## `vins` (type: `array`):

17-character Vehicle Identification Numbers, for example 1HGCM82633A004352. Up to 200.

## `vehicles` (type: `array`):

Objects like {"make": "Honda", "model": "Accord", "modelYear": 2003}. Returns recalls and the complaint count for that model; nothing is decoded. Up to 100.

## `includeComplaints` (type: `boolean`):

Fetch the NHTSA consumer complaint count per model. Complaint lists are large and slow (up to about 20 seconds per model); turn off for faster runs.

## Actor input object example

```json
{
  "vins": [
    "1HGCM82633A004352"
  ],
  "includeComplaints": true
}
```

# Actor output Schema

## `vehicles` (type: `string`):

Decoded VIN fields with decoder error codes, recalls and complaint count for the make/model/year, data freshness and disclaimer.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "vins": [
        "1HGCM82633A004352"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kdhan/nhtsa-vehicle-check").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "vins": ["1HGCM82633A004352"] }

# Run the Actor and wait for it to finish
run = client.actor("kdhan/nhtsa-vehicle-check").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "vins": [
    "1HGCM82633A004352"
  ]
}' |
apify call kdhan/nhtsa-vehicle-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kdhan/nhtsa-vehicle-check"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/h5C11bXZ1YitccqSq/builds/5UJ7zV62mmYLPPOPX/openapi.json
