SFOLN

Demos / VIN Decoder API – Specs, Recalls & Safety

Turn a scanned VIN into a finished vehicle listing

A used-car dealer takes in a dozen trade-ins a day. Typing each car into the inventory system by hand takes minutes and produces listings with the wrong trim or engine. Here the lot attendant scans the VIN and the system does the rest: it fills the listing, catches mistyped VINs before they cost anything and holds cars with recalls until the service desk has looked.

Workflow

Where the API sits

  1. Trigger

    VIN scanned

    The lot attendant scans the door-jamb barcode into the inventory system.

  2. API call

    Decode and check safety

    One call per batch of VINs with includeSafetyReport on. Invalid VINs are caught before any charge.

    sfoln/vin-decoder

  3. Your logic

    Map and decide

    Fill the listing fields; hold the car if safetyReport.recallCount is above the dealer's threshold.

  4. Result

    Listing draft

    A complete draft for the sales team, a service task for held cars, a rescan prompt for bad VINs.

Wired as a webhook: the inventory system posts each scanned VIN to a small function that calls the API synchronously and writes the record back. The same call takes a nightly batch of thousands of VINs for a fleet or an auction feed.

Result

The intake form fills itself

After the scan

InventoryNew vehicle · stock no. T-2291filled in 2 s
VIN1HGCM82633A004352Check digit valid
Year2003
MakeHonda
ModelAccord
TrimEX-V6
BodyCoupe, 2 doors
Engine3.0 L V6, 240 hp
Transmission5-speed automatic
FuelGasoline
Listing title2003 Honda Accord EX-V6

Safety check before listing

Recalls for this model year

24

Service desk task created

Complaints on file

2,013

Defect investigations

5

Recalls are issued per make, model and model year. The service desk checks this VIN's repair status with the manufacturer before the car is listed.

Save draftSend to service desk

Before

InventoryNew vehicle · stock no. T-2291manual entry
VIN1HGCM82633A004352Scanned from the door-jamb label
Year 
Make 
Model 
Trim 
Body 
Engine 
Transmission 
Fuel 
Listing title 

Nine fields to type per car, from memory or the paperwork.

InventoryIntake queueMon 9 Nov
Today's trade-ins · 5 scanned
VINDecoded asDrivetrainRecallsListing
1HGCM82633A0043522003 Honda Accord EX-V6V6 · automatic24Hold: recall check
5YJ3E1EA2KF3170002019 Tesla Model 3 Standard Range PlusElectric · BEV9Hold: recall check
1FTFW1E53MFA000012021 Ford F-150 XLTV8 · 4x4 · 10-speed17Hold: recall check
2T1BURHE5JC0344612018 Toyota Corolla LE1.8 L · CVT2Draft ready
1HGCM82633A0O4352Not decoded: letter O in position 13——Rescan VIN
Four VINs decoded and charged; the mistyped one was rejected locally at no cost.

Highlighted values are read from the API response. The data is a sample in the API's real output shape; names and figures are illustrative.

Call

The call behind it

One request with this input produces the 5 records the screen above is drawn from. Prices are the ones on the API page; records that fail or come back empty are not charged.

Input · POST /v2/actors/sfoln~vin-decoder/run-sync-get-dataset-items
{
  "vins": [
    "1HGCM82633A004352",
    "5YJ3E1EA2KF317000",
    "1FTFW1E53MFA00001",
    "2T1BURHE5JC034461",
    "1HGCM82633A0O4352"
  ],
  "includeSafetyReport": true
}
First record of 5
Response · record 1 of 5 · sample data
{
  "input": "1HGCM82633A004352",
  "vin": "1HGCM82633A004352",
  "decoded": true,
  "make": "HONDA",
  "manufacturer": "AMERICAN HONDA MOTOR CO., INC.",
  "model": "Accord",
  "modelYear": 2003,
  "trim": "EX-V6",
  "series": null,
  "bodyClass": "Coupe",
  "vehicleType": "PASSENGER CAR",
  "doors": 2,
  "engineCylinders": 6,
  "displacementL": 3,
  "engineHp": 240,
  "engineModel": "J30A4",
  "fuelTypePrimary": "Gasoline",
  "fuelTypeSecondary": null,
  "electrificationLevel": null,
  "driveType": null,
  "transmissionStyle": "Automatic",
  "transmissionSpeeds": 5,
  "gvwr": "Class 1C: 4,001 - 5,000 lb (1,814 - 2,268 kg)",
  "plantCity": "MARYSVILLE",
  "plantState": "OHIO",
  "plantCountry": "UNITED STATES (USA)",
  "checkDigitOk": true,
  "errorCodes": [
    "0"
  ],
  "errorText": "0 - VIN decoded clean. Check Digit (9th position) is correct",
  "suggestedVin": null,
  "safetyReport": {
    "make": "HONDA",
    "model": "Accord",
    "modelYear": 2003,
    "recallScope": "make-model-year",
    "recallCount": 24,
    "complaintCount": 2013,
    "overallRating": null,
    "investigationCount": 5
  },
  "warnings": [],
  "status": "ok",
  "charged": true,
  "source": "nhtsa-vpic",
  "fetchedAt": "2026-11-09T14:02:11.000Z"
}
Charged eventCountPriceTotal
Decoded VIN
vin-decoded
4$0.001$0.004
Vehicle safety report
vehicle-safety-report
4$0.002$0.008
This run$0.012

Fields

Which output fields do the work

Output fieldUsed for
modelYear make model trimListing title and the four identity fields of the form.
bodyClass doors vehicleTypeBody style filter on the dealer website.
engineCylinders displacementL engineHp fuelTypePrimary electrificationLevelEngine line of the listing; electric vehicles get the EV badge.
transmissionStyle transmissionSpeeds driveTypeDrivetrain line and the 4x4 filter.
safetyReportrecallCount decides whether the car is held; complaints and investigations are shown to the service desk.
checkDigitOk status warningsA mistyped VIN comes back skipped_invalid with the reason, so the attendant rescans instead of saving a wrong car.

All output fields are listed on the API page.

Build

Build it

A handler of about twenty lines: call the API with the scanned VINs, then write each record to the inventory system.

Node.js · webhook handler
const res = await fetch('https://api.apify.com/v2/actors/sfoln~vin-decoder/run-sync-get-dataset-items', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.APIFY_TOKEN}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ vins: scannedVins, includeSafetyReport: true }),
});

for (const car of await res.json()) {
  if (car.status !== 'ok') { await inventory.askRescan(car.input, car.warnings); continue; }
  await inventory.saveDraft(car.vin, {
    title: `${car.modelYear} ${car.make} ${car.model} ${car.trim ?? ''}`.trim(),
    body: car.bodyClass, fuel: car.fuelTypePrimary, transmission: car.transmissionStyle,
    hold: (car.safetyReport?.recallCount ?? 0) > RECALL_THRESHOLD,
  });
}
  • The safety report is charged only for vehicles NHTSA has safety data for, and needs a paid Apify plan.
  • For an auction feed, schedule the same call nightly with up to 10,000 VINs per run.

Authentication, the MCP endpoint and the asynchronous variant are on the API page.

More

Other things teams build with it

  • Insurance quote forms that prefill the vehicle from the VIN
  • Fleet registers checked nightly for new recalls
  • Marketplace listing validation: reject ads whose title contradicts the VIN
  • Loan underwriting that needs the exact model year and trim

Related demos

All demos · VIN Decoder API – Specs, Recalls & Safety: prices, input and output · /actors/vin-decoder.json carries this demo as demo