# 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:** 38 total users, 1 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/platform/actors/running/actors-in-store#rental-actors

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apipi/vin-decoder-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Vin Decoder Api",
        "description": "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",
        "version": "1.0",
        "x-build-id": "mJ0opQXWpdh2CMzSG"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apipi~vin-decoder-api/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apipi-vin-decoder-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/apipi~vin-decoder-api/runs": {
            "post": {
                "operationId": "runs-sync-apipi-vin-decoder-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/apipi~vin-decoder-api/run-sync": {
            "post": {
                "operationId": "run-sync-apipi-vin-decoder-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "vin_codes"
                ],
                "properties": {
                    "vin_codes": {
                        "title": "VIN Codes",
                        "type": "array",
                        "description": "List of VIN codes to decode (up to 50 per batch). You can also provide a comma or semicolon separated string.",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
