# Bulk VIN Decoder & Recall Checker (`devilscrapes/vin-decoder-scraper`) Actor

Bulk-decode US VINs via NHTSA's free vPIC REST API into make, model, year, trim, engine and plant data, enriched with recall and crash-safety ratings. Local ISO-3779 check-digit validation catches a typo'd VIN before you get billed for NHTSA's own uncorrected decode.

- **URL**: https://apify.com/devilscrapes/vin-decoder-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Bulk VIN Decoder & Recall Checker

**💰 $2.70 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Bulk-decode US VINs via NHTSA's free vPIC REST API into make, model, year, trim, engine and plant data, enriched with recall and crash-safety ratings. Local ISO-3779 check-digit validation catches a typo'd VIN before you get billed for NHTSA's own uncorrected decode.

</div>

***

### 🎯 What this scrapes

NHTSA's free `vPIC` service decodes any 17-character string you throw at it, valid or not, and hands back roughly 150 mostly-empty-string fields with no warning that the VIN itself was garbage. This Actor validates the ISO-3779 check digit locally first, for free, before any network call or billed event, then batch-decodes the survivors and normalizes NHTSA's noisy payload into a clean flat row — optionally joined with recall and crash-safety-rating data for the same make/model/year.

### 🔥 What we handle for you

- 🔍 **Local check-digit validation, free** — every VIN is validated against ISO-3779 before any network call, so a typo never costs you a billed row.
- 🧹 **NHTSA's noisy payload, cleaned** — every empty-string field NHTSA returns becomes a proper `null`, not a string you have to filter yourself.
- 🔁 **Retries with exponential backoff** on `408 / 429 / 5xx` — up to 5 attempts, `Retry-After` honoured.
- 🫠 **One bad batch never fails the run** — a failed decode chunk or enrichment lookup is logged and skipped; the rest of your VINs still ship.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, stable fields, JSON / CSV / Excel export straight from the Apify Console.
- 💰 **Pay-Per-Event pricing** — you only pay for VINs that actually decode. Invalid or no-match VINs are free.

### 💡 Use cases

- Bulk-normalize a dealer inventory feed's raw VINs into make/model/year/trim before listing.
- Screen an incoming used-car lead list against NHTSA recall data before appraisal.
- Back a fleet manager's maintenance system with structured engine/plant/spec data.
- Feed an insurer's underwriting model with decoded vehicle attributes plus crash-safety ratings.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `vins` | `array` | **yes** | \['1HGCM82633A004352', '3VWD07AJ5EM388202', '1G1ZT53826F109149'] | 17-character US Vehicle Identification Numbers to decode, 1-500 per run. Each one is validated locally (ISO-3779 check… |
| `include_recalls` | `boolean` | no | True | Join NHTSA recall records for each decoded VIN's make/model/model-year. One lookup per unique combination, cached and… |
| `include_safety_ratings` | `boolean` | no | False | Join NHTSA crash-safety ratings (overall, front, side, rollover) for each decoded VIN's make/model/model-year. Off by… |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': False} | NHTSA's vPIC and api.nhtsa.gov services are public, keyless US government APIs with no anti-bot surface and need no… |

#### Example input

```json
{
  "vins": [
    "1HGCM82633A004352",
    "3VWD07AJ5EM388202",
    "1G1ZT53826F109149"
  ],
  "include_recalls": true,
  "include_safety_ratings": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `vin` | `string` | Input VIN, uppercased. |
| `is_valid` | `boolean` | Local ISO-3779 check-digit validation result. |
| `validation_error` | `string` | Reason the VIN failed local validation; null when valid. |
| `nhtsa_error_code` | `string` | NHTSA's own ErrorCode from the decode response. |
| `nhtsa_error_text` | `string` | NHTSA's own ErrorText from the decode response. |
| `make` | `string` | Decoded vehicle make. |
| `model` | `string` | Decoded vehicle model. |
| `model_year` | `string` | Decoded model year. |
| `trim` | `string` | Decoded trim level. |
| `body_class` | `string` | Decoded body class (e.g. Sedan/Saloon). |
| `drive_type` | `string` | Decoded drive type (e.g. FWD, AWD). |
| `series` | `string` | Decoded series designation. |
| `engine_cylinders` | `string` | Decoded engine cylinder count. |
| `engine_displacement_l` | `string` | Decoded engine displacement, liters. |
| `engine_hp` | `string` | Decoded engine horsepower. |
| `fuel_type_primary` | `string` | Decoded primary fuel type. |
| `transmission_style` | `string` | Decoded transmission style. |
| `plant_country` | `string` | Decoded assembly plant country. |
| `plant_city` | `string` | Decoded assembly plant city. |
| `gvwr_class` | `string` | Decoded gross vehicle weight rating class. |
| `doors` | `string` | Decoded door count. |
| `airbag_front` | `string` | Decoded front airbag location. |
| `airbag_side` | `string` | Decoded side airbag location. |
| `recall_count` | `integer` | Number of recalls found for this make/model/model-year; null unless recall enrichment is enabled. |
| `recalls` | `array` | Recall summaries ({nhtsa\_campaign\_number, component, summary}) for this make/model/model-year; null unless recall… |
| `safety_overall_rating` | `string` | NHTSA overall crash-safety rating; null unless safety-rating enrichment is enabled. |
| `safety_frontcrash_rating` | `string` | NHTSA frontal-crash rating; null unless safety-rating enrichment is enabled. |
| `safety_sidecrash_rating` | `string` | NHTSA side-crash rating; null unless safety-rating enrichment is enabled. |
| `safety_rollover_rating` | `string` | NHTSA rollover rating; null unless safety-rating enrichment is enabled. |
| `decoded_at` | `string` | ISO-8601 timestamp when this row was decoded. |

#### Example output

```json
{
  "vin": "1HGCM82633A004352",
  "is_valid": true,
  "validation_error": null,
  "nhtsa_error_code": "0",
  "nhtsa_error_text": "VIN decoded clean. Check Digit (9th position) is correct",
  "make": "HONDA",
  "model": "Accord",
  "model_year": "2003",
  "trim": "EX",
  "body_class": "Sedan/Saloon",
  "drive_type": "FWD",
  "series": null,
  "engine_cylinders": "6",
  "engine_displacement_l": "3.0",
  "engine_hp": "240",
  "fuel_type_primary": "Gasoline",
  "transmission_style": "Automatic",
  "plant_country": "UNITED STATES (USA)",
  "plant_city": "MARYSVILLE",
  "gvwr_class": null,
  "doors": "4",
  "airbag_front": "1st Row (Driver and Passenger)",
  "airbag_side": null,
  "recall_count": 3,
  "recalls": [
    {
      "nhtsa_campaign_number": "04V123000",
      "component": "AIR BAGS",
      "summary": "..."
    }
  ],
  "safety_overall_rating": null,
  "safety_frontcrash_rating": null,
  "safety_sidecrash_rating": null,
  "safety_rollover_rating": null,
  "decoded_at": "2026-09-03T00:00:00Z"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.20 | One-off warm-up charge per run |
| `result-row` | $0.0025 | Per unique dataset item |

Example: 1 000 results at the rates above ≈ **$2.70**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- Up to 500 VINs per run — chunked into batches of 50 per NHTSA's documented per-call ceiling.
- Non-US-market VINs vPIC can't resolve are returned best-effort, often mostly null — NHTSA covers the US market.
- Safety-rating enrichment resolves the first matching NHTSA VehicleId when a make/model/year has multiple trims or body styles — it isn't a per-VIN exact trim match.
- Recall and safety data reflect NHTSA's own records at request time; this Actor doesn't backfill or correct upstream gaps.

### ❓ FAQ

**Do I need an API key?**

No. NHTSA's vPIC and api.nhtsa.gov services are keyless, public US government APIs — no auth, no login.

**Why do some VINs come back with mostly null fields?**

NHTSA decodes even VINs it can barely parse and returns empty strings for unknown fields — this Actor converts every empty string to null so you can filter cleanly instead of guessing what '' means.

**Do I get charged for an invalid VIN?**

No. This Actor validates the ISO-3779 check digit locally, for free, before any NHTSA call. A VIN that fails validation costs nothing and never leaves your run.

**What's the difference between decode-only and enrichment?**

Recall and safety-rating enrichment are joined on the decoded make/model/model-year and ride the same per-row charge — no extra billed event, just turn on the checkbox.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

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

17-character US Vehicle Identification Numbers to decode, 1-500 per run. Each one is validated locally (ISO-3779 check digit) before any NHTSA call — invalid VINs never touch the network and are never billed.

## `include_recalls` (type: `boolean`):

Join NHTSA recall records for each decoded VIN's make/model/model-year. One lookup per unique combination, cached and reused across matching VINs — never per VIN.

## `include_safety_ratings` (type: `boolean`):

Join NHTSA crash-safety ratings (overall, front, side, rollover) for each decoded VIN's make/model/model-year. Off by default — it's a two-step lookup per unique combination and slows the run.

## `proxyConfiguration` (type: `object`):

NHTSA's vPIC and api.nhtsa.gov services are public, keyless US government APIs with no anti-bot surface and need no proxy. Leave this off unless your account requires egress through Apify Proxy.

## Actor input object example

```json
{
  "vins": [
    "1HGCM82633A004352",
    "3VWD07AJ5EM388202",
    "1G1ZT53826F109149"
  ],
  "include_recalls": true,
  "include_safety_ratings": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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",
        "3VWD07AJ5EM388202",
        "1G1ZT53826F109149"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/vin-decoder-scraper").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",
        "3VWD07AJ5EM388202",
        "1G1ZT53826F109149",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/vin-decoder-scraper").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",
    "3VWD07AJ5EM388202",
    "1G1ZT53826F109149"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call devilscrapes/vin-decoder-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/vin-decoder-scraper"
        }
    }
}

```

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/3AeDHgMeZZPUh4zhr/builds/JzRYPyffwB6dHvWwr/openapi.json
