Legacy v1

VIN Decoding

Last updated:

API reference for decoding Vehicle Identification Numbers (VINs) and retrieving vehicle information.

Docs for the previous API generation. v1 endpoints keep working, but new work should target v2. See v2 VIN reference.

The VIN decoding endpoints decode Vehicle Identification Numbers (VINs) into vehicle specifications and variants, extract VINs from images, and batch decode up to 1000 VINs in a single request.

Decode VIN (Full)

GET /v1/vin/:vin

This endpoint returns the fullest decode: VIN pattern matching plus vehicle variant data. It decodes the VIN with our Corgi decoder, then adds variant information from our vehicle database.

Required parameters

ParameterTypeDescription
vinstringA valid 17-character Vehicle Identification Number.
curl "https://api.cardog.app/v1/vin/1HGBH41JXMN109186" \
  -H "x-api-key: your-api-key"
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: "your-api-key" });
const vehicle = await client.vin.decode("1HGBH41JXMN109186");

console.log(vehicle.variants[0].make);  // Honda
console.log(vehicle.variants[0].model); // Civic
console.log(vehicle.variants[0].year);  // 2021
import requests
response = requests.get(
  'https://api.cardog.app/v1/vin/1HGBH41JXMN109186',
  headers={'x-api-key': 'your-api-key'}
)
data = response.json()

Example

3 keys
"response": {
"variants": [
0: {10 items}
],
"pass": {
"vin": "1HGBH41JXMN109186",
"valid": true,
"components": {3 items}
},
"vin": "1HGBH41JXMN109186"
}

Batch Decode VINs

POST /v1/vin/batch

Decode multiple VINs in a single request. The endpoint processes up to 1000 VINs in parallel and returns a decode result for each. Use it for fleet management, inventory systems, and bulk vehicle data enrichment.

Required parameters

ParameterTypeDescription
vinsstring[]An array of 17-character VINs to decode. Minimum 1, maximum 1000 VINs per request.

Performance

  • Throughput: ~50 VINs/second (D1-based)
  • Success Rate: 97%+ for valid VINs
  • Max Batch Size: 1000 VINs

Note: For higher throughput, use /v1/vin/batch/corgi which achieves ~6000 VINs/second using binary indexes.

curl "https://api.cardog.app/v1/vin/batch" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "vins": [
      "1HGBH41JXMN109186",
      "2HGFC2F77GH036115",
      "3GCUKDED0SG211499"
    ]
  }'
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: "your-api-key" });

const results = await client.vin.batch([
  "1HGBH41JXMN109186",
  "2HGFC2F77GH036115",
  "3GCUKDED0SG211499"
]);

console.log(`Decoded ${results.successful} of ${results.count} VINs`);
for (const result of results.results) {
  console.log(result.result?.components.vehicle.make);
}
import requests

response = requests.post(
  'https://api.cardog.app/v1/vin/batch',
  headers={
    'x-api-key': 'your-api-key',
    'Content-Type': 'application/json'
  },
  json={
    'vins': [
      '1HGBH41JXMN109186',
      '2HGFC2F77GH036115',
      '3GCUKDED0SG211499'
    ]
  }
)
data = response.json()

Example

7 keys
"response": {
"success": true,
"count": 3,
"successful": 3,
"failed": 0,
"processingTime": "156.42ms",
"avgTimePerVin": "52.14ms",
"results": [
0: {2 items},
1: {2 items},
2: {2 items}
]
}

Decode VIN (Corgi v3)

GET /v1/vin/corgi/v3/:vin

VIN decoding using pre-built binary indexes. This endpoint is ~3x faster than the standard Corgi decoder and makes no database calls. Use it for high-throughput applications.

Required parameters

ParameterTypeDescription
vinstringA valid 17-character Vehicle Identification Number.

Performance

  • Latency: ~12ms average
  • Throughput: ~80 VINs/second (single requests)
  • No database calls: Fully offline decoding
curl "https://api.cardog.app/v1/vin/corgi/v3/5YJ3E1EA1PF123456" \
  -H "x-api-key: your-api-key"
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: "your-api-key" });

// High-performance v3 decoder
const decoded = await client.vin.corgiV3("5YJ3E1EA1PF123456");

console.log(decoded.valid);           // true
console.log(decoded.vehicle?.make);   // Tesla
console.log(decoded.vehicle?.model);  // Model 3
console.log(decoded.confidence);      // 0.95

Example

7 keys
"response": {
"vin": "5YJ3E1EA1PF123456",
"valid": true,
"components": {
"wmi": "5YJ",
"vds": "3E1EA1",
"vis": "PF123456",
"modelYear": 2023,
"checkDigit": "1",
"serialNumber": "123456"
},
"vehicle": {
"make": "Tesla",
"model": "Model 3",
"year": 2023,
"bodyType": "Sedan",
"fuelType": "Electric"
},
"confidence": 0.95,
"warnings": [
],
"errors": [
]
}

Batch Decode (Corgi v3)

POST /v1/vin/batch/corgi

Batch VIN decoding using Corgi v3 binary indexes. It processes ~6000 VINs/second synchronously with no database rate limits. Use it for fleet management, inventory systems, and bulk data processing.

Required parameters

ParameterTypeDescription
vinsstring[]An array of 17-character VINs to decode. Minimum 1, maximum 1000 VINs per request.

Performance

  • Throughput: ~6000 VINs/second
  • Batch 100 VINs: ~27ms
  • Batch 500 VINs: ~88ms
  • No rate limits: Synchronous processing
curl "https://api.cardog.app/v1/vin/batch/corgi" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "vins": [
      "5YJ3E1EA1PF123456",
      "JN8BT3DD3RW250328",
      "1HGBH41JXMN109186"
    ]
  }'
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: "your-api-key" });

// High-throughput batch decoding
const results = await client.vin.batchCorgi([
  "5YJ3E1EA1PF123456",
  "JN8BT3DD3RW250328",
  "1HGBH41JXMN109186"
]);

console.log(`Decoded ${results.successful} of ${results.count} VINs`);
console.log(`Processing time: ${results.processingTime}`);

for (const result of results.results) {
  if (result.result?.valid) {
    console.log(`${result.vin}: ${result.result.vehicle?.make} ${result.result.vehicle?.model}`);
  }
}

Example

7 keys
"response": {
"success": true,
"count": 3,
"successful": 3,
"failed": 0,
"processingTime": "4.52ms",
"avgTimePerVin": "1.51ms",
"results": [
0: {2 items},
1: {2 items},
2: {2 items}
]
}

Batch Decode (Nano)

POST /v1/vin/batch/nano

Batch VIN lookup using the nano database. Returns variant information for multiple VINs. Use it when you need trim and MSRP data.

Required parameters

ParameterTypeDescription
vinsstring[]An array of VINs to look up. Minimum 1, maximum 1000 VINs per request.
curl "https://api.cardog.app/v1/vin/batch/nano" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "vins": [
      "1HGBH41JXMN109186",
      "JN8BT3DD3RW250328"
    ]
  }'
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: "your-api-key" });

const results = await client.vin.batchNano([
  "1HGBH41JXMN109186",
  "JN8BT3DD3RW250328"
]);

for (const result of results.results) {
  if (result.result) {
    console.log(`${result.vin}: ${result.result}`);
  }
}

Example

7 keys
"response": {
"success": true,
"count": 2,
"successful": 2,
"failed": 0,
"processingTime": "45.23ms",
"avgTimePerVin": "22.62ms",
"results": [
0: {2 items},
1: {2 items}
]
}

Decode VIN (Nano)

GET /v1/vin/nano/:vin

This endpoint is a lightweight VIN lookup against our nano VIN database. It skips the full decode and returns basic variant information. Nano VINs are condensed 11-character identifiers that exclude the check digit.

Required parameters

ParameterTypeDescription
vinstringA valid VIN (17, 11, or 10 characters). Will be automatically converted to nano format.
curl "https://api.cardog.app/v1/vin/nano/1HGBH41JXMN109186" \
  -H "x-api-key: your-api-key"
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: "your-api-key" });

// Fast nano lookup for basic variant info
const variant = await client.vin.nano("1HGBH41JXMN109186");

console.log(variant.make);     // Honda
console.log(variant.model);    // Civic
console.log(variant.trim);     // LX
console.log(variant.msrp);     // 22350
import requests
response = requests.get(
  'https://api.cardog.app/v1/vin/nano/1HGBH41JXMN109186',
  headers={'x-api-key': 'your-api-key'}
)
data = response.json()

Example

9 keys
"response": {
"id": "honda-civic-2021-lx",
"make": "Honda",
"model": "Civic",
"year": 2021,
"trim": "LX",
"msrp": 22350,
"bodyStyle": "Sedan",
"styleName": "Civic LX 4dr Sedan",
"region": "US"
}

Decode VIN (Corgi)

GET /v1/vin/corgi/:vin

This endpoint runs the raw Corgi decoder. It returns pattern matching results, component analysis, and validation information without variant enrichment. Use it when you need low-level VIN analysis.

Required parameters

ParameterTypeDescription
vinstringA valid 17-character Vehicle Identification Number.
curl "https://api.cardog.app/v1/vin/corgi/1HGBH41JXMN109186" \
  -H "x-api-key: your-api-key"
import { CardogClient } from "@cardog/api";

const client = new CardogClient({ apiKey: "your-api-key" });

// Raw Corgi decoder for detailed VIN analysis
const decoded = await client.vin.corgi("1HGBH41JXMN109186");

console.log(decoded.valid);                    // true
console.log(decoded.components.wmi.make);      // Honda
console.log(decoded.components.vehicle.model); // Civic
console.log(decoded.components.checkDigit.isValid); // true
import requests
response = requests.get(
  'https://api.cardog.app/v1/vin/corgi/1HGBH41JXMN109186',
  headers={'x-api-key': 'your-api-key'}
)
data = response.json()

Example

5 keys
"response": {
"vin": "1HGBH41JXMN109186",
"valid": true,
"components": {
"checkDigit": {4 items},
"modelYear": {3 items},
"wmi": {6 items},
"vds": {2 items},
"vis": {2 items},
"vehicle": {7 items}
},
"errors": [
],
"metadata": {
"processingTime": 45.2,
"confidence": 0.96,
"schemaVersion": "1.0"
}
}

Read a VIN or Chassis Number from an Image

POST /v1/vin/image

This endpoint reads the vehicle identifier off a photo of a dashboard, a door jamb or a Japanese chassis plate. It accepts a base64-encoded image and returns the identifier it read, with kind naming which it is: vin for a 17-character VIN, ready for the VIN endpoints, or chassis for a Japanese chassis number such as ZRR80-0143041, which is not a VIN and must not be sent to a VIN decode. A photo with no legible identifier returns 422.

Required parameters

ParameterTypeDescription
imagestringBase64-encoded image data (without data URL prefix).
curl "https://api.cardog.app/v1/vin/image" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="
  }'
import { CardogClient } from "@cardog/api";
import { readFileSync } from "fs";

const client = new CardogClient({ apiKey: "your-api-key" });

// Read and encode image
const imageBuffer = readFileSync("vin_image.jpg");
const base64 = imageBuffer.toString("base64");

// Read the identifier off the photo
const result = await client.vin.image(base64);

console.log(result.kind, result.result); // "vin" "1HGBH41JXMN109186"
import base64
import requests

# Read and encode image
with open('vin_image.jpg', 'rb') as image_file:
    base64_image = base64.b64encode(image_file.read()).decode('utf-8')

response = requests.post(
  'https://api.cardog.app/v1/vin/image',
  headers={
    'x-api-key': 'your-api-key',
    'Content-Type': 'application/json'
  },
  json={'image': base64_image}
)
data = response.json()

Example

3 keys
"response": {
"success": true,
"result": "1HGBH41JXMN109186",
"kind": "vin"
}

Error Responses

All VIN endpoints return structured error responses when validation fails or processing errors occur:

Example

1 keys
"response": {
"error": "Invalid VIN"
}

Example

1 keys
"response": {
"error": "No variant found"
}

Example

1 keys
"response": {
"error": "Image data is required as base64 string"
}

A photo with no legible identifier is a 422:

Example

1 keys
"response": {
"error": "No VIN or chassis number could be read from the image"
}

Example

2 keys
"response": {
"success": false,
"error": {
"issues": [1 item]
}
}

For batch requests, individual VIN decode failures are returned inline with the results rather than failing the entire request:

Example

5 keys
"response": {
"success": true,
"count": 3,
"successful": 2,
"failed": 1,
"results": [
0: {2 items},
1: {2 items},
2: {2 items}
]
}

VIN Format Support

The VIN decoding endpoints accept these VIN formats:

FormatDescription
17-character VINFull standard VIN format (e.g., "1HGBH41JXMN109186")
11-character VINVIN with check digit included (e.g., "1HGBH41JXMN")
10-character VINNano VIN without check digit (e.g., "1HGBH41JMN")

Use Cases

Use caseEndpoint
Full Decode/v1/vin/:vin: vehicle information including variants, specifications, and decoding results
High-Performance Decode/v1/vin/corgi/v3/:vin: offline VIN decoding, ~3x faster than standard. Use for real-time applications
Ultra High-Throughput Batch/v1/vin/batch/corgi: highest throughput (~6000 VINs/sec). Use for fleet management and bulk processing
Standard Batch Processing/v1/vin/batch: database-backed batch decoding. Supports up to 1000 VINs per request
Quick Lookup/v1/vin/nano/:vin: variant lookup when you only need basic vehicle information
Raw Analysis/v1/vin/corgi/:vin: VIN pattern analysis and component breakdown
Image Processing/v1/vin/image: read a VIN or a Japanese chassis number off a photo of a dashboard, door jamb or chassis plate

Was this helpful?