Public vehicle records / TypeScript

Public vehicle records for TypeScript.

VIN decode, recall campaigns, owner complaints, crash ratings, and fuel economy from US public sources. No API key. No vendor account.

npm install vinplain

MIT · v0.2.3 · 0 runtime dependencies

Vehicle recordPublic
1HGCM82633A004352

Check digit

Make
Honda
Model
Accord
Year
2003
Recalls
24
Complaints
2013
Fuel
22 mpg
Sources / vPIC · NHTSA · EPANo key
01

One call

The summary decodes the VIN, then runs the record lookups in parallel. Each section resolves on its own, so a slow complaint database does not hold up the recall list.

import { getVehicleSummary } from 'vinplain';

const record = await getVehicleSummary({ vin: '1HGCM82633A004352' });

record.specs;           // 2003 Honda Accord EX-V6
record.recalls.length;  // 24
record.status.recalls;  // 'ok'
02

What it returns

SectionContents
DecodeEngine, displacement, horsepower, transmission, drivetrain, body, plant, airbags, seating, driver assistance.
RecallsCampaign number, component, summary, consequence, remedy, date. Up to 50 campaigns.
ComplaintsTotals by component, plus crash, fire, injury, and death counts.
SafetyOverall, frontal, side, side-pole, rollover, rollover probability, ADAS availability.
FuelCity, highway, combined MPG, annual cost, CO2, volumes, EV range, EPA variant.
InvestigationsWhether the model appears in NHTSA's investigations list for the year.
03

When a source fails

null means the request failed. [] means the source answered and there is nothing on file. The summary reports the same distinction in a status for each section, so a failed recall check cannot render as a clean record.

if (record.status.recalls === 'unavailable') {
  renderUnavailable('Recalls');
} else if (record.status.recalls === 'empty') {
  renderEmpty('No recalls on file');
} else {
  renderRecalls(record.recalls);
}
04

Sources

SourceUsed forAuth
NHTSA vPICVIN decode, makes, models, yearsNone
NHTSARecalls, complaints, investigations, NCAPNone
fueleconomy.govMPG, fuel cost, CO2, EV rangeNone

US federal services. Check each source's terms before commercial use. The package does not relicense their data.

05

What it does not do

It does not include title brands, accidents, odometer readings, auctions, valuations, or listings. It does not decode a VIN offline. It does not host an API. It reads the public record and stops.

The companion expo-vin-ocr reads a VIN from a photo with Apple Vision, on device, and hands the text to the same validation layer.