# VIN Decoder (NHTSA vPIC) (`klyve1/vin-decoder`) Actor

Decode vehicle identification numbers in bulk with the official NHTSA vPIC database: make, model, year, body, engine, fuel, drive, plant, safety equipment and check digit validation.

- **URL**: https://apify.com/klyve1/vin-decoder.md
- **Developed by:** [Nico Klyve](https://apify.com/klyve1) (community)
- **Categories:** Developer tools, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 vin decodeds

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

## VIN Decoder (NHTSA vPIC)

Decode **vehicle identification numbers (VINs) in bulk** with **vPIC**, the official vehicle database of the U.S. National Highway Traffic Safety Administration (NHTSA). For each VIN you get the make, model, model year, trim, body, engine, fuel and electrification, transmission, weight class and assembly plant, the **check digit validation**, and on demand more than 100 extra fields such as airbags, driver assistance systems, battery and base price.

Requests are sent in batches of 50, so thousands of VINs decode in minutes.

### Who uses it

- **Car dealers, marketplaces and auction sites**: fill vehicle listings automatically from a VIN.
- **Insurers, leasing and fleet managers**: check and enrich a fleet file, spot VINs with typos.
- **Parts sellers and garages**: identify the exact engine and trim before ordering parts.
- **Data teams**: normalise make, model and year in large vehicle datasets.

### Example output

```json
{
  "input": "5YJ3E1EA2JF000316",
  "vin": "5YJ3E1EA2JF000316",
  "make": "TESLA",
  "model": "Model 3",
  "modelYear": 2018,
  "manufacturer": "TESLA, INC.",
  "vehicleType": "PASSENGER CAR",
  "bodyClass": "Sedan/Saloon",
  "doors": 4,
  "fuelTypePrimary": "Electric",
  "electrificationLevel": "BEV (Battery Electric Vehicle)",
  "transmissionStyle": "Automatic",
  "transmissionSpeeds": 1,
  "gvwr": "Class 1C: 4,001 - 5,000 lb (1,814 - 2,268 kg)",
  "plantCity": "FREMONT",
  "plantState": "CALIFORNIA",
  "plantCountry": "UNITED STATES (USA)",
  "checkDigitValid": true,
  "decoded": true,
  "errorCodes": ["0"],
  "messages": ["0 - VIN decoded clean. Check Digit (9th position) is correct"],
  "details": { "ABS": "Standard", "AdaptiveCruiseControl": "Optional", "BlindSpotMon": "Standard", "CurbWeightLB": 4072, "EVDriveUnit": "Single Motor", "LaneKeepSystem": "Standard" },
  "error": null
}
```

Fields NHTSA has no data for are `null`. `messages` explains any problem (wrong check digit, invalid characters, unknown positions) and `suggestedVin` proposes a fix when NHTSA has one.

### Input

| Field | What it does | Default |
|---|---|---|
| `vins` | VINs, one per line. Add the model year after a comma (`JH4KA7561PC008269,1993`) for older or ambiguous VINs | required |
| `modelYear` | Model year used for VINs given without one | none |
| `includeAllFields` | Add a `details` object with every other decoded field | true |

### Pricing

Pay per result: **$0.001 per VIN decoded**. VINs that cannot be decoded at all, duplicates and service errors are free.

### Good to know

- vPIC is most complete for vehicles sold in the United States and Canada (all makes, from 1981). European and Asian VINs usually decode the make, the year and the plant country, with fewer details, and they have no check digit, so `checkDigitValid` is often false for them.
- A VIN describes the vehicle model, never its owner: no personal data is involved.
- Data comes live from the official NHTSA vPIC API (U.S. government, public domain).

# Actor input Schema

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

Vehicle identification numbers, one per line (17 characters; \* can stand for an unknown character). You can add the model year after a comma (1HGCM82633A004352,2003) to help decode older or ambiguous VINs.

## `modelYear` (type: `integer`):

Optional model year used for VINs given without one.

## `includeAllFields` (type: `boolean`):

Add a details object with every other field NHTSA decodes (airbags, safety systems, battery, wheelbase, brakes...). Turn off for a compact table.

## Actor input object example

```json
{
  "vins": [
    "1HGCM82633A004352",
    "5YJ3E1EA2JF000316",
    "1FTFW1ET9DFC10312"
  ],
  "includeAllFields": true
}
```

# Actor output Schema

## `results` (type: `string`):

All rows produced by the run.

# 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",
        "5YJ3E1EA2JF000316",
        "1FTFW1ET9DFC10312"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("klyve1/vin-decoder").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",
        "5YJ3E1EA2JF000316",
        "1FTFW1ET9DFC10312",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("klyve1/vin-decoder").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",
    "5YJ3E1EA2JF000316",
    "1FTFW1ET9DFC10312"
  ]
}' |
apify call klyve1/vin-decoder --silent --output-dataset

```

## MCP server setup

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

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/pkoVYDPX4RuBe9VVs/builds/Hq4FEqj4iQVpAGgS7/openapi.json
