VIN Validator API: The Complete Guide

Need to validate Vehicle Identification Numbers in your application? This guide covers everything you need to know about VIN validation via API, including VIN structure, the check digit algorithm, and implementation examples in multiple languages.

What is a VIN?

A VIN (Vehicle Identification Number) is a unique 17-character code assigned to every motor vehicle when manufactured. It serves as the vehicle's fingerprint, providing information about the manufacturer, vehicle attributes, and serial number.

A typical VIN looks like this: 1HGBH41JXMN109186

VIN Structure Explained

A VIN consists of three main sections:

World Manufacturer Identifier (WMI) - Characters 1-3

Identifies the manufacturer and country of origin. For example, "1HG" indicates Honda manufactured in the USA.

Vehicle Descriptor Section (VDS) - Characters 4-9

Describes vehicle attributes including model, body type, engine type, and includes the check digit (position 9).

Vehicle Identifier Section (VIS) - Characters 10-17

Contains the model year, plant code, and sequential production number.

Note: VINs never include the letters I, O, or Q to avoid confusion with numbers 1 and 0.

Using the VIN Validator API

TinyFn provides a simple endpoint to validate VINs:

API Request
GET https://api.tinyfn.io/v1/validate/vin?vin=1HGBH41JXMN109186
Headers: X-API-Key: your-api-key
Response
{
  "valid": true,
  "vin": "1HGBH41JXMN109186",
  "wmi": "1HG",
  "vds": "BH41JX",
  "vis": "MN109186",
  "check_digit": "X",
  "model_year": "1991",
  "manufacturer": "Honda"
}

Parameters

Parameter Type Description
vin string VIN to validate (required)

Code Examples

JavaScript / Node.js

const response = await fetch(
  'https://api.tinyfn.io/v1/validate/vin?vin=1HGBH41JXMN109186',
  { headers: { 'X-API-Key': 'your-api-key' } }
);
const result = await response.json();
console.log(result.valid); // true
console.log(result.manufacturer); // "Honda"

Python

import requests

response = requests.get(
    'https://api.tinyfn.io/v1/validate/vin',
    params={'vin': '1HGBH41JXMN109186'},
    headers={'X-API-Key': 'your-api-key'}
)
result = response.json()
print(result['valid'])  # True
print(result['manufacturer'])  # "Honda"

cURL

curl "https://api.tinyfn.io/v1/validate/vin?vin=1HGBH41JXMN109186" \
  -H "X-API-Key: your-api-key"

Common Use Cases

  • Car Dealerships: Validate VINs during vehicle intake
  • Insurance Applications: Verify vehicle identification for policies
  • Auto Parts: Ensure correct vehicle matching for parts orders
  • Vehicle History: Validate VINs before running history reports
  • Fleet Management: Verify vehicle data accuracy

Best Practices

  1. Uppercase conversion: Always convert VINs to uppercase before validation
  2. Remove spaces: Strip any spaces or dashes from user input
  3. Verify check digit: The 9th character is a calculated check digit
  4. Cross-reference: Consider additional VIN decoding for detailed vehicle info

Use via MCP

Your AI agent can call this tool directly via Model Context Protocol — no HTTP code needed. Add TinyFn to Claude Desktop, Cursor, or any MCP client:

{
  "mcpServers": {
    "tinyfn-validate": {
      "url": "https://api.tinyfn.io/mcp/validate/",
      "headers": {
        "X-API-Key": "your-api-key"
      }
    }
  }
}

See all validation tools available via MCP in our Validation MCP Tools for AI Agents guide.

Try the VIN Validator API

Get your free API key and start validating VINs in seconds.

Get Free API Key

Ready to try TinyFn?

Get your free API key and start building in minutes.

Get Free API Key