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 vinplainCheck digit
- Make
- Honda
- Model
- Accord
- Year
- 2003
- Recalls
- 24
- Complaints
- 2013
- Fuel
- 22 mpg
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'
What it returns
| Section | Contents |
|---|---|
| Decode | Engine, displacement, horsepower, transmission, drivetrain, body, plant, airbags, seating, driver assistance. |
| Recalls | Campaign number, component, summary, consequence, remedy, date. Up to 50 campaigns. |
| Complaints | Totals by component, plus crash, fire, injury, and death counts. |
| Safety | Overall, frontal, side, side-pole, rollover, rollover probability, ADAS availability. |
| Fuel | City, highway, combined MPG, annual cost, CO2, volumes, EV range, EPA variant. |
| Investigations | Whether the model appears in NHTSA's investigations list for the year. |
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);
}
Sources
| Source | Used for | Auth |
|---|---|---|
| NHTSA vPIC | VIN decode, makes, models, years | None |
| NHTSA | Recalls, complaints, investigations, NCAP | None |
| fueleconomy.gov | MPG, fuel cost, CO2, EV range | None |
US federal services. Check each source's terms before commercial use. The package does not relicense their data.
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.