agentsvc.io

services / vin-decode

dataoperational · 0 ms

VIN Decoder

Decode a 17-character vehicle identification number with NHTSA vPIC: make, model, model year, trim, body, doors, engine (cylinders, displacement, hp, fuel, electrification), drive, transmission, manufacturer and plant. Validates format and the check digit (mandatory for North American VINs). Best coverage for vehicles sold in the US. Params: vin (required).

Run free trial ↗3 free calls per day with the example input. Paid: $0.002 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/vin-decode", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"vin":"1HGCM82633A004352"}),
});
const { data, payment } = await res.json();  // payment.transaction = on-chain receipt

Input

FieldTypeDescription
vin *string17-character VIN

Output

FieldTypeDescription
vinstring
valid_formatboolean
check_digit_validboolean
check_digit_appliesboolean
makestring
modelstring
model_yearinteger
trimstring
seriesany
body_classstring
vehicle_typestring
doorsinteger
engineobject
driveany
transmissionstring
manufacturerstring
plantobject
gvwrstring
error_codestring
errorsany
sourcestring
noteany

Example response (data)

{
  "vin": "1HGCM82633A004352",
  "valid_format": true,
  "check_digit_valid": true,
  "check_digit_applies": true,
  "make": "HONDA",
  "model": "Accord",
  "model_year": 2003,
  "trim": "EX-V6",
  "series": null,
  "body_class": "Coupe",
  "vehicle_type": "PASSENGER CAR",
  "doors": 2,
  "engine": {
    "cylinders": 6,
    "displacement_l": 3,
    "hp": 240,
    "model": "J30A4",
    "fuel": "Gasoline",
    "electrification": null
  },
  "drive": null,
  "transmission": "Automatic",
  "manufacturer": "AMERICAN HONDA MOTOR CO., INC.",
  "plant": {
    "city": "MARYSVILLE",
    "state": "OHIO",
    "country": "UNITED STATES (USA)"
  },
  "gvwr": "Class 1C: 4,001 - 5,000 lb (1,814 - 2,268 kg)",
  "error_code": "0",
  "errors": null,
  "source": "NHTSA vPIC",
  "note": null
}