Skip to content

VIN decoding

POST /vin decodes a Vehicle Identification Number: check digit, region and model year locally, plus make, model, trim, body, engine and plant from NHTSA vPIC.

POSThttps://api.qelka.com/v1/vin

Decode a Vehicle Identification Number (VIN) to learn whether it is well formed, where and when the vehicle was made, and its make, model, trim, body, engine and assembly plant. Each lookup costs 1 credit, valid or not; errors and test keys are never billed.

Request

Send the 17-character VIN. The structure, check digit, region and model year are decoded on our servers; the vehicle details come from vPIC, the decoder of the U.S. National Highway Traffic Safety Administration (NHTSA).

vinstringRequired
The VIN, 1 to 40 characters before spaces and hyphens are removed. Lower case is accepted.
freshbooleanDefault false
true skips the 30-day result cache and asks vPIC again.

The call waits for vPIC, so every snippet sets a 30-second client timeout.

curl https://api.qelka.com/v1/vin \
  --max-time 30 \
  -H "Authorization: Bearer $QELKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vin": "1HGCM82633A004352"}'
const response = await fetch('https://api.qelka.com/v1/vin', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ vin: '1HGCM82633A004352' }),
  signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os

import requests

api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
    "https://api.qelka.com/v1/vin",
    headers={"Authorization": f"Bearer {api_key}"},
    json={"vin": "1HGCM82633A004352"},
    timeout=30,
)
result = response.json()
print(result)
<?php
$ch = curl_init('https://api.qelka.com/v1/vin');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('QELKA_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode(['vin' => '1HGCM82633A004352']),
    CURLOPT_TIMEOUT => 30,
]);
$result = json_decode(curl_exec($ch), true);
print_r($result);
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
	"time"
)

func main() {
	payload, _ := json.Marshal(map[string]any{"vin": "1HGCM82633A004352"})
	request, _ := http.NewRequest(http.MethodPost, "https://api.qelka.com/v1/vin", bytes.NewReader(payload))
	request.Header.Set("Authorization", "Bearer "+os.Getenv("QELKA_API_KEY"))
	request.Header.Set("Content-Type", "application/json")

	client := &http.Client{Timeout: 30 * time.Second}
	response, err := client.Do(request)
	if err != nil {
		panic(err)
	}
	defer response.Body.Close()

	var result map[string]any
	if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
		panic(err)
	}
	fmt.Println(result)
}
require 'json'
require 'net/http'

uri = URI('https://api.qelka.com/v1/vin')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{ENV.fetch('QELKA_API_KEY')}"
request['Content-Type'] = 'application/json'
request.body = JSON.generate({ vin: '1HGCM82633A004352' })

response = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 30) do |http|
  http.request(request)
end
result = JSON.parse(response.body)
puts result

Response

Every VIN gets a 200, valid or not. Read valid first; vehicle is filled when vPIC knows the vehicle.

idstring
Identifier of this lookup: lkp_ followed by 26 characters.
objectstring
Always vin.
inputstring
The vin you sent, without surrounding spaces.
validboolean
true when the VIN has 17 allowed characters and, for North American manufacturers, a correct check digit.
statusstring
valid or invalid.
reasonstring or null
invalid_length, invalid_characters or invalid_check_digit. null when the VIN is valid.
vinstring or null
The VIN, upper case, without separators. null when it is not 17 characters long.
wmiobject or null
World Manufacturer Identifier. null, like vds, vis, check_digit, model_year, plant_code and serial_number, when the VIN is not 17 allowed characters.
wmi.codestring
Positions 1 to 3.
wmi.regionstring
africa, asia, europe, north_america, oceania or south_america, from the first character: A to H Africa, J to R Asia, S to Z Europe, 1 to 5 North America, 6 and 7 Oceania, 8, 9 and 0 South America (ISO 3780 zones).
wmi.small_manufacturerboolean
true when the third character is 9: small manufacturers share the code and are told apart by positions 12 to 14.
vdsstring or null
Vehicle Descriptor Section: positions 4 to 8, chosen by the manufacturer to describe the model.
visstring or null
Vehicle Identifier Section: positions 10 to 17.
check_digitobject or null
The check digit at position 9.
check_digit.valuestring
Position 9 as written.
check_digit.expectedstring
The check digit computed from the 16 other characters.
check_digit.validboolean
true when value equals expected.
check_digit.requiredboolean
true for North American manufacturers, which must use the check digit.
model_yearobject or null
The model year read from position 10.
model_year.codestring
Position 10.
model_year.candidatesarray of integers
The years the code stands for, up to next year's models.
model_year.estimateinteger or null
The most likely year: from position 7 for North American manufacturers, else the latest candidate.
plant_codestring or null
Position 11: the assembly plant code of North American manufacturers.
serial_numberstring or null
Positions 12 to 17.
vehicleobject or null
What NHTSA vPIC decodes. null when vPIC has no make, model or year for the VIN, or was not asked because the VIN is not 17 allowed characters. Each field inside is null when vPIC has no value.
vehicle.makestring or null
Make, such as HONDA.
vehicle.modelstring or null
Model, such as Accord.
vehicle.model_yearinteger or null
Model year as NHTSA decodes it. Prefer it to model_year.estimate when both exist.
vehicle.trimstring or null
Trim level.
vehicle.seriesstring or null
Series.
vehicle.body_classstring or null
Body class, such as Coupe.
vehicle.vehicle_typestring or null
Vehicle type, such as PASSENGER CAR.
vehicle.doorsinteger or null
Number of doors.
vehicle.drive_typestring or null
Drive type.
vehicle.fuel_typestring or null
Primary fuel type.
vehicle.engineobject
Engine details.
vehicle.engine.cylindersinteger or null
Number of cylinders.
vehicle.engine.displacement_lnumber or null
Displacement in litres, rounded to one decimal.
vehicle.engine.horsepowernumber or null
Engine power in horsepower.
vehicle.engine.configurationstring or null
Engine configuration, such as V-Shaped.
vehicle.engine.modelstring or null
Engine model code.
vehicle.transmissionobject
Transmission details.
vehicle.transmission.stylestring or null
Transmission style, such as Automatic.
vehicle.transmission.speedsinteger or null
Number of speeds.
vehicle.manufacturerstring or null
Manufacturer name as filed with NHTSA.
vehicle.plantobject
Assembly plant.
vehicle.plant.citystring or null
Plant city.
vehicle.plant.statestring or null
Plant state.
vehicle.plant.countrystring or null
Plant country.
vehicle.plant.companystring or null
Plant company name, as vPIC lists it.
vehicle.gvwrstring or null
Gross vehicle weight rating class, as vPIC writes it.
nhtsaobject or null
vPIC's own decoding notes. null when vPIC was not asked or returned nothing.
nhtsa.error_codesarray of strings
vPIC decoding codes. 0 means the VIN decoded clean; other codes flag a wrong check digit, an incomplete decode or an unknown manufacturer.
nhtsa.messagestring or null
vPIC's explanation of the codes.
credits_usedinteger
Credits debited for this call: 1 with a live key, 0 with a test key.
cachedboolean
true when the answer came from the 30-day cache.
Response
{
  "id": "lkp_01M85RBTDRPFW1TC1KY1CSMHRJ",
  "object": "vin",
  "input": "1HGCM82633A004352",
  "valid": true,
  "status": "valid",
  "reason": null,
  "vin": "1HGCM82633A004352",
  "wmi": { "code": "1HG", "region": "north_america", "small_manufacturer": false },
  "vds": "CM826",
  "vis": "3A004352",
  "check_digit": { "value": "3", "expected": "3", "valid": true, "required": true },
  "model_year": { "code": "3", "candidates": [2003], "estimate": 2003 },
  "plant_code": "A",
  "serial_number": "004352",
  "vehicle": {
    "make": "HONDA",
    "model": "Accord",
    "model_year": 2003,
    "trim": "EX-V6",
    "series": null,
    "body_class": "Coupe",
    "vehicle_type": "PASSENGER CAR",
    "doors": 2,
    "drive_type": null,
    "fuel_type": "Gasoline",
    "engine": { "cylinders": 6, "displacement_l": 3, "horsepower": 240, "configuration": "V-Shaped", "model": "J30A4" },
    "transmission": { "style": "Automatic", "speeds": 5 },
    "manufacturer": "AMERICAN HONDA MOTOR CO., INC.",
    "plant": { "city": "MARYSVILLE", "state": "OHIO", "country": "UNITED STATES (USA)", "company": null },
    "gvwr": "Class 1C: 4,001 - 5,000 lb (1,814 - 2,268 kg)"
  },
  "nhtsa": {
    "error_codes": ["0"],
    "message": "0 - VIN decoded clean. Check Digit (9th position) is correct"
  },
  "credits_used": 1,
  "cached": false
}

Act on the result

status reason What it means What to do
valid null 17 allowed characters and, for a North American manufacturer, a correct check digit. Use vehicle when it is filled. When it is null, the VIN is well formed but vPIC does not know the vehicle.
invalid invalid_length Not 17 characters once spaces and hyphens are removed. Ask for the VIN again.
invalid invalid_characters A character VINs never use: I, O, Q, or anything other than letters and digits. Ask for the VIN again: an O is probably a 0, an I a 1.
invalid invalid_check_digit Position 9 does not match the other characters, for a North American manufacturer. Ask the user to check each character: it is usually a typo.

Every answer is billed 1 credit, including invalid VINs. A VIN describes a vehicle, never its owner.

How the check digit works

Position 9 is computed from the 16 other characters, as 49 CFR 565.15 specifies. Each letter gets a value (A = 1 to H = 8, J = 1 to N = 5, P = 7, R = 9, S = 2 to Z = 9), each position a weight (8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2), and the weighted sum is divided by 11. The remainder is the check digit, written X when it is 10.

U.S. rules make the check digit mandatory, and North American manufacturers apply it. Elsewhere, position 9 is not always a check digit. So invalid_check_digit is only reported when the first character is 1 to 5 (North America). For other VINs a mismatch shows in check_digit.valid, and valid stays true.

How the model year is read

Position 10 is a code that repeats every 30 years:

Code Years Code Years
A 1980, 2010 S 1995, 2025
B 1981, 2011 T 1996, 2026
C 1982, 2012 V 1997, 2027
D 1983, 2013 W 1998, 2028
E 1984, 2014 X 1999, 2029
F to H 1985 to 1987, 2015 to 2017 Y 2000, 2030
J to N 1988 to 1992, 2018 to 2022 1 to 9 2001 to 2009, 2031 to 2039
P, R 1993, 1994, 2023, 2024

For North American manufacturers, the API picks the cycle from position 7, the rule 49 CFR 565.15 sets for passenger cars, multipurpose passenger vehicles and trucks of 10,000 lb or less: a digit means 1980 to 2009, a letter 2010 to 2039. For other VINs the estimate is the most recent matching year. Outside North America position 10 is not always a year, so treat model_year.estimate as a hint there.

Where the data comes from

The local decoding follows 49 CFR Part 565 and the ISO 3780 regions. Vehicle details come from NHTSA vPIC, a public U.S. Government service built from the data manufacturers file with NHTSA. vPIC covers vehicles made for the U.S. market: other VINs often decode partially or not at all, and vehicle is then null. See the data sources page.

Spot a letter VINs never use

This VIN has a letter O where a zero belongs. The API answers at once without calling vPIC, and the answer is billed because the check ran.

curl https://api.qelka.com/v1/vin \
  --max-time 30 \
  -H "Authorization: Bearer $QELKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vin": "1HGCM82633A0O4352"}'
const response = await fetch('https://api.qelka.com/v1/vin', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ vin: '1HGCM82633A0O4352' }),
  signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os

import requests

api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
    "https://api.qelka.com/v1/vin",
    headers={"Authorization": f"Bearer {api_key}"},
    json={"vin": "1HGCM82633A0O4352"},
    timeout=30,
)
result = response.json()
print(result)
Response
{
  "id": "lkp_01M8714DYDTVQ8XFRVNFDDR2TA",
  "object": "vin",
  "input": "1HGCM82633A0O4352",
  "valid": false,
  "status": "invalid",
  "reason": "invalid_characters",
  "vin": "1HGCM82633A0O4352",
  "wmi": null,
  "vds": null,
  "vis": null,
  "check_digit": null,
  "model_year": null,
  "plant_code": null,
  "serial_number": null,
  "vehicle": null,
  "nhtsa": null,
  "credits_used": 1,
  "cached": false
}

Test without calling vPIC

Test keys decode the VIN on our servers and return a sample vehicle, make TEST MAKE, without calling vPIC. With a test key in QELKA_API_KEY, this request returns:

curl https://api.qelka.com/v1/vin \
  --max-time 30 \
  -H "Authorization: Bearer $QELKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"vin": "1HGCM82633A004352"}'
const response = await fetch('https://api.qelka.com/v1/vin', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ vin: '1HGCM82633A004352' }),
  signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os

import requests

api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
    "https://api.qelka.com/v1/vin",
    headers={"Authorization": f"Bearer {api_key}"},
    json={"vin": "1HGCM82633A004352"},
    timeout=30,
)
result = response.json()
print(result)
Response
{
  "id": "lkp_01M8714EVPB58KPCJ0K935XXMY",
  "object": "vin",
  "input": "1HGCM82633A004352",
  "valid": true,
  "status": "valid",
  "reason": null,
  "vin": "1HGCM82633A004352",
  "wmi": { "code": "1HG", "region": "north_america", "small_manufacturer": false },
  "vds": "CM826",
  "vis": "3A004352",
  "check_digit": { "value": "3", "expected": "3", "valid": true, "required": true },
  "model_year": { "code": "3", "candidates": [2003], "estimate": 2003 },
  "plant_code": "A",
  "serial_number": "004352",
  "vehicle": {
    "make": "TEST MAKE",
    "model": "TEST MODEL",
    "model_year": null,
    "trim": null,
    "series": null,
    "body_class": null,
    "vehicle_type": "PASSENGER CAR",
    "doors": null,
    "drive_type": null,
    "fuel_type": null,
    "engine": { "cylinders": null, "displacement_l": null, "horsepower": null, "configuration": null, "model": null },
    "transmission": { "style": null, "speeds": null },
    "manufacturer": null,
    "plant": { "city": null, "state": null, "country": null, "company": null },
    "gvwr": null
  },
  "nhtsa": {
    "error_codes": ["0"],
    "message": "0 - Simulated decode of 1HGCM82633A004352 for a test key."
  },
  "credits_used": 0,
  "cached": false
}

Errors

Status Type When
400 invalid_request vin is missing, empty or longer than 40 characters, the body is not a JSON object, or it has a field the request table does not list
401 invalid_api_key The key is missing, unknown or revoked
402 insufficient_credits Your balance is less than 1 credit (live keys only)
403 forbidden The key is restricted to other endpoints
405 invalid_request The method is not POST
429 rate_limited Too many requests: wait Retry-After seconds
500 internal_error Unexpected error on our side: retry with backoff
502 upstream_unavailable NHTSA vPIC could not be reached, answered with an error or did not answer in time: retry later

No error is billed. A VIN that fails a check is not an error: it is a 200 with valid: false.

Stuck? Write to support@qelka.com and include the X-Request-Id of the call.

Last updated 2026-11-24