# Vin Decoder Api (`apipi/vin-decoder-api`) Actor

VIN decoder API that decodes Vehicle Identification Numbers (VIN) using the NHTSA database. Perfect for automotive applications, car dealerships, insurance companies, and vehicle data platforms

- **URL**: https://apify.com/apipi/vin-decoder-api.md
- **Developed by:** [ApiPi](https://apify.com/apipi) (community)
- **Categories:** Other, Developer tools, Automation
- **Stats:** 43 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$13.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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

## 🚗 VIN Decoder API - Apify Actor

**VIN Check API | VIN Code Check API | VIN Decoder API | Vehicle Information API**

This Apify actor provides a powerful **VIN decoder API** that decodes Vehicle Identification Numbers (VIN) using the NHTSA (National Highway Traffic Safety Administration) database. Perfect for automotive applications, car dealerships, insurance companies, and vehicle data platforms.

### ⚡ Features

- ✅ **VIN Check API** - Decode up to 50 VIN codes per batch
- ✅ **Bulk VIN Decoder** - Automatic batching for large lists of VINs
- ✅ **Comprehensive Data** - Returns 70-100+ vehicle information fields
- ✅ **Smart Processing** - Handles duplicates automatically
- ✅ **Flexible Input** - Supports multiple formats (array, comma-separated, semicolon-separated)
- ✅ **Free NHTSA Database** - No API key required
- ✅ **REST API** - Easy integration via Apify API

### 🔧 Use Cases

- 🚙 **Car Dealerships** - Quick VIN lookup for inventory management
- 🏢 **Insurance Companies** - Vehicle verification and risk assessment
- 🔍 **Vehicle History Services** - Comprehensive vehicle data retrieval
- 📱 **Mobile Apps** - VIN scanner and decoder integration
- 💼 **Auto Parts Retailers** - Parts compatibility checking
- 🏭 **Fleet Management** - Bulk vehicle information processing

### 📥 Input

The VIN code check API accepts the following input parameters:

```json
{
  "vin_codes": [
    "4JGDA6EB8JB018467",
    "4JGDA6DB1GA739858"
  ]
}
```

#### Parameters

- **vin\_codes** (required): List of VIN codes to decode. Can be:
  - Array of strings: `["VIN1", "VIN2", "VIN3"]`
  - Comma-separated string: `"VIN1,VIN2,VIN3"`
  - Semicolon-separated string: `"VIN1;VIN2;VIN3"`

### 📤 Output

The VIN decoder API returns data in the following format:

```json
[
  {
    "vin": "4JGDA6EB8JB018467",
    "scrapedAt": "2025-10-25T12:30:45.123Z",
    "vehicleInfo": {
      "Make": "MERCEDES-BENZ",
      "Manufacturer Name": "DAIMLER AG",
      "Model": "GLE-Class",
      "Model Year": "2018",
      "Vehicle Type": "MULTIPURPOSE PASSENGER VEHICLE (MPV)",
      "Body Class": "Sport Utility Vehicle (SUV)/Multi-Purpose Vehicle (MPV)",
      "Doors": "4",
      "Engine Number of Cylinders": "6",
      "Displacement (L)": "3.0",
      "Fuel Type - Primary": "Gasoline",
      "Transmission Style": "Automatic",
      "Plant Country": "UNITED STATES (USA)",
      ...
    }
  }
]
```

#### 📋 Output Fields

- **vin**: The VIN code that was decoded
- **scrapedAt**: ISO timestamp when the data was scraped
- **vehicleInfo**: Object containing all available vehicle information fields (typically 70-100+ fields depending on vehicle):
  - 🚗 Make and Model
  - 📅 Year
  - 🔧 Engine specifications
  - 🏗️ Body type and features
  - 🏭 Manufacturing details
  - 🛡️ Safety features
  - 🔋 Battery information (for EVs)
  - 🤖 Advanced driver assistance systems
  - ✅ Only fields with actual data are included (null values are excluded)

### 💡 Example Usage

#### 📝 Input Examples

**Example 1: VIN Check API - Simple array**

```json
{
  "vin_codes": ["4JGDA6EB8JB018467", "4JGDA6DB1GA739858"]
}
```

**Example 2: VIN Code Check - Comma-separated string**

```json
{
  "vin_codes": "4JGDA6EB8JB018467,4JGDA6DB1GA739858"
}
```

**Example 3: Bulk VIN Decoder - Large batch**

```json
{
  "vin_codes": [
    "VIN1", "VIN2", "VIN3", ... (up to hundreds)
  ]
}
```

### 🌐 API Information

This VIN decoder API uses the NHTSA database:

- **Batch Limit**: 50 VINs per request
- **Response Format**: JSON
- **Authentication**: No API key required

### ⚠️ Error Handling

- Invalid VINs will still return data with error codes in the `vehicleInfo`
- Failed batches are logged but don't stop the entire run
- Network errors are caught and logged
- Duplicate VINs are automatically removed

### 📌 Notes

- 🔄 The VIN check API automatically handles batching for more than 50 VINs
- 🔤 VIN codes are case-insensitive (automatically converted to uppercase)
- 🧹 Empty or whitespace-only VINs are filtered out
- 🌍 Works with VINs from all countries
- ⚡ Fast processing: ~2-3 seconds per 50 VINs

### 🚀 Getting Started

1. **Test the API**: Use the provided test VIN codes
2. **Deploy to Apify**: Follow the deployment guide
3. **Integrate**: Use REST API or Apify SDK
4. **Scale**: Process thousands of VINs automatically

***

**Tags**: VIN Decoder API, VIN Check API, VIN Code Check, Vehicle Information API, Auto VIN Lookup, Car Data API, NHTSA VIN Decoder

# Actor input Schema

## `vin_codes` (type: `array`):

List of VIN codes to decode (up to 50 per batch). You can also provide a comma or semicolon separated string.

## Actor input object example

```json
{
  "vin_codes": [
    "4JGDA6EB8JB018467",
    "4JGDA6DB1GA739858"
  ]
}
```

# 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 = {
    "vin_codes": [
        "4JGDA6EB8JB018467",
        "4JGDA6DB1GA739858"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apipi/vin-decoder-api").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 = { "vin_codes": [
        "4JGDA6EB8JB018467",
        "4JGDA6DB1GA739858",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("apipi/vin-decoder-api").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 '{
  "vin_codes": [
    "4JGDA6EB8JB018467",
    "4JGDA6DB1GA739858"
  ]
}' |
apify call apipi/vin-decoder-api --silent --output-dataset

```

## MCP server setup

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

```

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/xBTzcqWo3Od7rkn5T/builds/mJ0opQXWpdh2CMzSG/openapi.json
