
Vehicle Data for Machine Learning: Turn VINs Into Model-Ready Features
A machine learning model is only as good as the data it learns from, and for vehicle models that data starts with the VIN. A single VIN column can be expanded into dozens of clean, consistent features, such as make, model, year, engine, body type and drivetrain, without your team scraping sources or hand-cleaning spreadsheets.
This guide shows data science and analytics teams how to turn a list of VINs into a model-ready feature table using a vehicle data API. It covers who benefits, which models improve, and the data quality and licensing checks to run before you train.
In short
- Vehicle data enrichment replaces months of sourcing, cleaning and standardising with an API call per VIN.
- Better vehicle features improve price prediction, insurance and credit risk scoring, recommendations, fleet analytics and predictive maintenance.
- Before you train, confirm coverage for your markets, how the provider handles missing values, and whether the licence allows storing the data and using it for model training.
Which Teams Use Vehicle Data for Machine Learning
Any team that models vehicles, the people who drive them or the money tied up in them can use VIN data. The need is the same everywhere: consistent vehicle attributes for every row.
Team | What they model | Vehicle data they need |
|---|---|---|
| Insurers | Claim frequency, loss ratio, premium pricing, retention | Body type, engine size, horsepower, weight, safety ratings, vehicle age |
| Auto lenders and banks | Residual value, default risk, loan-to-value | Market value, MSRP, sales history, trim and options |
| Vehicle marketplaces and classifieds | Price prediction, listing quality, recommendations, search | Make, model, trim, options, comparable sales |
| OEM suppliers and parts companies | Demand forecasting, parts fitment | Year, make, model, engine, drivetrain, transmission |
| Telematics and fleet-analytics companies | Fuel efficiency, predictive maintenance, cost per kilometre | Engine, fuel type, fuel economy, weight, maintenance and recall data |
| AI and analytics startups | Products built on top of vehicle data | Clean, structured data at scale through one API |
| Research firms | Market sizing, depreciation and demand trends | Decoded fleets and historical sales records |
Why Raw Vehicle Data Slows Machine Learning Projects
With a vehicle modelling project, setting up the data usually takes longer than creating the model. Here are five issues that can make this process drag.
- Scattered sources
Specifications sit with manufacturers, valuations with pricing guides, sales with auctions and marketplaces. Joining them by hand takes weeks.
- Inconsistent labels
The same vehicle appears as "Civic", "CIVIC LX" and "Honda Civic 4dr". Models treat each spelling as a different category and learn noise.
- Missing and mistyped values
Typed or scraped VINs contain transposed characters. Free-text trims and engine descriptions are blank or wrong.
- Scraping and licence risk
Scraped data breaks when pages change, and its terms often forbid commercial or model-training use.
- Constant change
Every model year adds trims, options and powertrains, so a dataset you cleaned last year is already incomplete.
A vehicle data API moves this work to the provider. You send a VIN and get the same fields, in the same format, every time. Your team keeps the work that matters: choosing features, training and testing the model.
READ ALSO: What is a VIN Lookup API? How Does It Work?
What One VIN Column Becomes After Enrichment
One Basic VIN Decode call per VIN turns a single VIN column into more than a dozen model-ready columns.
The example below uses the sample VIN from the Vehicle Databases documentation, JTEDW21A860014011. The mileage, sale year and sale price are made-up example values; the vehicle fields are the documentation's sample response.
Before enrichment
VIN | mileage | sale_year | sale_price |
|---|---|---|---|
| JTEDW21A860014011 | 118000 | 2024 | 6900 |
After enrichment with the Basic VIN Decode API
| Column | Value | How a model treats it |
|---|---|---|
| year | 2006 | Number |
| make | Toyota | Category |
| model | Highlander | Category |
| trim | STD | Category |
| body_type | Sport Utility Vehicle (SUV)/Multi-Purpose Vehicle (MPV) | Category |
| doors | 5 | Number |
| seats | 7 | Number |
| cylinders | 6 | Number |
| engine_size_l | 3.3 | Number |
| electrification | Strong HEV (Hybrid Electric Vehicle) | Category |
| drive_type | 4x2 | Category |
| fuel_type | Gasoline | Category |
| gvwr_class | Class 1D: 5,001 - 6,000 lb (2,268 - 2,722 kg) | Ordered category |
| built_in | Japan | Category |
| age_at_sale | 18 (2024 minus 2006) | Number you derive yourself |
Four Machine Learning Use Cases And The Business Result Of Each
Better vehicle features improve models in four common areas. Each result below is what the model is for, not a promised improvement; measure the gain against your own baseline.
1. Used-vehicle price and residual value prediction
- Model: Regression that predicts sale price or end-of-term value.
- Features: Year, make, model, trim, body type, engine, drivetrain and mileage from the decode. Market Value and Sales History records serve as benchmarks and, with care, as training targets.
- Business result: Sharper acquisition bids, trade-in offers and loan-to-value limits. Dealers, marketplaces and lenders stop pricing from a spreadsheet of averages.
2. Insurance and credit risk scoring
- Model: Classification or regression that predicts claim frequency, loss ratio or default.
- Features: Body type, engine size, horsepower, curb weight, safety ratings, vehicle age and original price, joined to each policy or loan by VIN.
- Business result: Premiums and rates that follow the real risk of each vehicle. Enriching existing policies with vehicle specifications is often the quickest way to add signal to a loss-ratio model. The same features also feed retention and churn models.
3. Recommendation engines and search ranking
- Model: Similarity search or ranking over vehicle attributes.
- Features: Make, model, trim, body type, engine, options and packages, price and sales history.
- Business result: Buyers who see comparable alternatives instead of dead-end searches, and listings that carry complete, consistent attributes.
4. Fleet analytics and predictive maintenance
- Model: Time-to-failure or cost-per-kilometre prediction, usually combined with telematics.
- Features: Engine, fuel type, fuel economy, weight and vehicle age, plus maintenance schedules, recalls and warranty data by VIN.
- Business result: Fewer unplanned breakdowns, maintenance booked at the right time, and a fleet-wide view of which vehicles cost the most to run.
Which Vehicle Databases API Supplies the Features for Each Model
Each endpoint adds a different layer of features. Most models combine two or three of them. All requests are GET calls with your key in the x-authkey header.
API | Endpoint | What it returns | Typical use in a model |
|---|---|---|---|
| Basic VIN Decode | /vin-decode/{vin} | Make, model, year, trim, body type, engine, drivetrain, fuel, manufacturer country. US and Canadian VINs from 1981. | Base features for every model. |
| Advanced VIN Decode | /advanced-vin-decode/v2/{vin} | MSRP and invoice price, dimensions, specifications, colours, options and packages, safety ratings, recalls. US, Canada and Europe from 1980. | Risk scoring, pricing, recommendations. |
| Market Value | /market-value/v2/{vin} with optional mileage and state | Trade-in, private-party and dealer-retail values for four conditions: Outstanding, Clean, Average and Rough. | Benchmarks and labels for price models. |
| Sales History | /saleshistory/{vin} | Past listing and auction records with odometer, location, sale status and damage fields. US vehicles. | Comparable sales, depreciation and condition features. |
| Vehicle Maintenance | /vehicle-maintenance/v4/{vin} | Maintenance schedule data by VIN. | Predictive maintenance and fleet cost models. |
| Vehicle Recalls and Vehicle Warranty | vehicle-recalls/{vin} and /vehicle-warranty/{year}/{make}/{model} | Recall campaigns and warranty terms by VIN. | Risk and maintenance features. |
Three practical points before you plan volumes:
- Decoding is one VIN per request
The documented decode endpoints take a single VIN. For a large file you run them in a loop that respects your plan's rate limit, cache every response and skip VINs you already decoded, as the tutorial below does. For very large or recurring volumes, ask Vehicle Databases about bulk data licensing and bulk pricing.
- Rate limits depend on the endpoint
Some endpoints, such as VIN OCR and the plate lookups, are limited to 1 request per second. Limits on the others depend on your package. See the rate-limit page. A rate-limited call returns 429, and some endpoint pages list 422 or 403 instead, so handle all three.
- Market Value returns formatted strings
Values such as "$6,829" need the dollar sign and commas stripped before you use them as numbers.
How To Engineer Features From Decoded Vehicle Data
Decoded fields are a starting point. These steps turn them into features that models can use well.
Feature or step | How to build it | Why it helps |
|---|---|---|
| Vehicle age at the event | Event year (sale, policy start, loan date) minus year. | Age at the time of the event is what the market priced. Age today leaks the future into old rows. |
| Missing-value handling | Convert empty strings to missing values. Add a _missing flag when missingness carries meaning. | An empty string is not a category, and it trains the model on noise if left as one. |
| High-cardinality categories | Group rare models and trims into "other", or use a model that handles categories natively. | Hundreds of models and thousands of trims overfit if one-hot encoded. |
| Power-to-weight ratio | Advanced decode horsepower divided by curb_weight_base | Captures performance in one number that insurers and price models use. |
| Retained value | Sale price divided by base_msrp | Shows depreciation independent of the vehicle's absolute price. |
| Electrified flag | True when electrification_level shows a hybrid or electric value. | Hybrids and EVs price and fail differently from combustion vehicles. |
| One unit system | Pick metric or imperial for dimensions and weights. | The Advanced decode returns both for each value, so keep one. |
| Grouped train-test split | Keep all rows for the same VIN on one side of the split. | The same vehicle in train and test makes the score look better than it is. |
Avoid target leakage.
Leakage is the most common reason a vehicle model works in testing and fails in production. Use only information available at the moment you would make the prediction.
If you predict a vehicle's sale price, do not feed in the listing price, the Market Value result for that sale, or any field that already contains the outcome. Market Value and Sales History fields are good benchmarks and, used carefully, labels. They are poor inputs for a model that predicts the same price.
Data Quality, Licensing And Privacy Checks To Run Before You Train
Run these checks on a sample before you decode a full dataset, and repeat them on the full file.
Check | What to do | Why it matters |
|---|---|---|
| Coverage | Measure the share of VINs that decode, split by make, model year and market. | Basic VIN Decode covers US and Canadian VINs. Vehicles from other markets may return no record, and the gaps are rarely random. |
| Missing values | Profile the share of empty strings per field, per make and per year. | Older vehicles and some brands have more empty fields, which biases the model if you ignore it. |
| Accuracy | Spot-check 50 to 100 VINs against vehicles you know or manufacturer data. | You find systematic errors before they become model errors. |
| Reproducibility | Save the raw JSON response for every VIN with the date you fetched it. | Vehicle data is updated, and you need to rebuild the exact training set later. |
| Licence terms | Confirm in writing that you may store the data, use it to train models and use the model's output commercially. | These rights differ between providers, and the documentation pages do not state them, so ask before you build. |
| Personal data | Drop fields that identify people, such as seller phone and email in Sales History records. Treat a VIN linked to a named policyholder or borrower as personal data. | A VIN can identify an individual once it is joined to their policy, loan or listing. Data protection law then applies to your training set. |
| Fairness | Test whether vehicle features act as a proxy for protected characteristics in pricing and credit models. | Insurers and lenders face regulator scrutiny of model inputs. Ask your compliance team which tests you need. |
FAQs on Vehicle Data for Machine Learning
Is there a batch endpoint for decoding a whole file of VINs?
The decode endpoints documented by Vehicle Databases take one VIN per request. For a large file, run them in a loop that respects your plan's limits and cache every response. For very large or recurring volumes, ask about bulk data licensing and bulk pricing.
Which markets does vehicle data cover?
The markets covered depends on the API you want. Basic VIN Decode covers US and Canadian VINs. Advanced VIN Decode also covers Europe, and a separate Europe VIN Decode endpoint exists. Sales History is for US vehicles, and Market Value takes a US state. Check each endpoint's documentation for your markets.
Can I use Market Value as the label for a price model?
Use it as a benchmark, or as a label when you have no sales. It is an estimate, not a price a buyer paid. Real sale prices make a better label, and Market Value is useful for comparing your model's output against the market.
What should I do with VINs that return no record?
Keep them as their own outcome and report the share. Do not fill in their features silently. If the share is large, find out which makes, years or markets are missing before you train.
How do I avoid paying for the same VIN twice?
Save the raw response for each VIN the first time you fetch it and read from that store afterwards, as the tutorial does. Deduplicate the VIN column before you start.
How many vehicles do I need to train a price model?
It depends on how many makes, models and years you want to price. A model can only price vehicles similar to those it has seen, so measure error per make and model segment, not only overall.
Can I use the data to train commercial models?
Check the provider's licence. Rights to store data and train on it differ between providers, so get the answer in writing before you build on it.
About Joses Peter
11 articles published
Joses Peter is a seasoned writer with a portfolio of 100+ blog posts and two published papers. Currently, she contributes as a professional writer in the automotive industry, with a great passion for technology and automobiles. This passion keeps her constantly learning and translating complex tech concepts into accessible content.


