Legacy v1
VIN Decoding
Last updated:
API reference for decoding Vehicle Identification Numbers (VINs) and retrieving vehicle information.
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
| Parameter | Type | Description |
|---|---|---|
vin | string | A 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); // 2021import requests
response = requests.get(
'https://api.cardog.app/v1/vin/1HGBH41JXMN109186',
headers={'x-api-key': 'your-api-key'}
)
data = response.json()Example
3 keysBatch 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
| Parameter | Type | Description |
|---|---|---|
vins | string[] | 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/corgiwhich 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 keysDecode 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
| Parameter | Type | Description |
|---|---|---|
vin | string | A 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.95Example
7 keysBatch 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
| Parameter | Type | Description |
|---|---|---|
vins | string[] | 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 keysBatch 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
| Parameter | Type | Description |
|---|---|---|
vins | string[] | 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 keysDecode 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
| Parameter | Type | Description |
|---|---|---|
vin | string | A 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); // 22350import requests
response = requests.get(
'https://api.cardog.app/v1/vin/nano/1HGBH41JXMN109186',
headers={'x-api-key': 'your-api-key'}
)
data = response.json()Example
9 keysDecode 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
| Parameter | Type | Description |
|---|---|---|
vin | string | A 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); // trueimport requests
response = requests.get(
'https://api.cardog.app/v1/vin/corgi/1HGBH41JXMN109186',
headers={'x-api-key': 'your-api-key'}
)
data = response.json()Example
5 keysRead 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
| Parameter | Type | Description |
|---|---|---|
image | string | Base64-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 keysError Responses
All VIN endpoints return structured error responses when validation fails or processing errors occur:
Example
1 keysExample
1 keysExample
1 keysA photo with no legible identifier is a 422:
Example
1 keysExample
2 keysFor batch requests, individual VIN decode failures are returned inline with the results rather than failing the entire request:
Example
5 keysVIN Format Support
The VIN decoding endpoints accept these VIN formats:
| Format | Description |
|---|---|
| 17-character VIN | Full standard VIN format (e.g., "1HGBH41JXMN109186") |
| 11-character VIN | VIN with check digit included (e.g., "1HGBH41JXMN") |
| 10-character VIN | Nano VIN without check digit (e.g., "1HGBH41JMN") |
Use Cases
| Use case | Endpoint |
|---|---|
| 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?