
You need to turn a 17-character VIN into concrete engine specs you can trust: cylinder count, displacement in liters, horsepower, fuel type, and related drivetrain details. By the end of this guide you will be able to call the VIN decode endpoint, extract the engine object, handle nulls and units correctly, cache results safely, and ship an integration that scales with your app’s rate limits and monthly quota.
What this endpoint returns and when to use it
The VIN decode endpoint provides a normalized engine object for any 17-character VIN worldwide, with the most complete coverage for US-market vehicles. For developers building dealer tools, marketplaces, fleet and insurance apps, and AI agents, this is the canonical source for engine specs: cylinders, displacement in liters, configuration, internal model code, horsepower, and fuel type.
This is not a vehicle history report. It does not include title events, ownership changes, or accident history. Safety datasets (recalls, complaints, NCAP ratings) are US-market only and matched by make + model + year, while Dutch plates come from RDW open data and never include a VIN. The VIN decode endpoint focuses on static build attributes, including engine data.
Endpoint and authentication
Base URL: https://vehicles-api.com/api/v1
- Endpoint: POST /vin/decode
- Headers: X-API-Key: YOUR_API_KEY (Authorization: Bearer YOUR_API_KEY also works)
- Body: JSON with a single key vin (17 characters)
Response envelope: every successful response includes status, source, and data. Error responses include status set to error and an error object with error.code and error.message.
For detailed request/response semantics, see the Documentation. If you prefer an MCP integration, the server is available at MCP.
Official curl and JSON example
The following is the official example for decoding a known VIN (control VIN used in the docs) and reading engine specs. It is a 2003 US-market Honda Accord with a gasoline engine. Electrification fields are null because the vehicle is not electrified.
cURL
curl -X POST "https://vehicles-api.com/api/v1/vin/decode" -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" -d '{"vin":"1HGCM82633A004352"}'
JSON
{
"status": "success",
"source": "nhtsa",
"data": {
"vin": "1HGCM82633A004352",
"valid": true,
"year": 2003,
"make": "HONDA",
"model": "Accord",
"trim": "EX-V6",
"body": "Coupe",
"doors": 2,
"vehicle_type": "PASSENGER CAR",
"engine": {
"cylinders": 6,
"displacement_l": 3,
"configuration": "V-Shaped",
"model": "J30A4",
"hp": 240,
"fuel": "Gasoline"
},
"fuel_type": "Gasoline",
"electrification_level": null,
"ev_drive_unit": null,
"battery_kwh": null,
"charger_level": null,
"charger_power_kw": null,
"drive": null,
"transmission": {
"style": "Automatic",
"speeds": 5
},
"plant": {
"country": "UNITED STATES (USA)",
"city": "MARYSVILLE",
"state": "OHIO"
},
"manufacturer": "AMERICAN HONDA MOTOR CO., INC."
}
}
Field-by-field: extracting engine specs correctly
Focus on the data.engine object. Below are the fields you will typically surface or normalize, with notes on units and nullability.
- data.engine.cylinders (integer): Number of cylinders. Example: 6.
- data.engine.displacement_l (number): Engine displacement in liters. Example: 3 (3.0L). Always treat as liters; do not assume cc unless you convert explicitly.
- data.engine.configuration (string): Block configuration label, e.g., “V-Shaped”, “Inline”. Use as a display label or map to application-specific enums.
- data.engine.model (string): Manufacturer internal engine code. Example: J30A4. Useful for part compatibility and performance mappings.
- data.engine.hp (number): Horsepower. Treat as SAE net horsepower where applicable; do not convert to kW unless your UI requires it.
- data.engine.fuel (string): Fuel type label. Example: “Gasoline”. For EV/HEV/PHEV, see electrification fields below.
Additional related fields adjacent to engine can help contextualize or display drivetrain:
- data.fuel_type (string): Redundant fuel label at the vehicle level. Use engine.fuel as primary when present.
- data.drive (string or null): Drivetrain label (e.g., FWD/AWD) when published. Null when not provided by the source.
- data.transmission.style (string): Transmission style label (e.g., “Automatic”).
- data.transmission.speeds (integer): Number of forward gears.
Electrification fields will be null for internal-combustion vehicles. For EV/PHEV/HEV when supported by the source, use these for energy and charging context:
- data.electrification_level (string or null)
- data.ev_drive_unit (string or null)
- data.battery_kwh (number or null): Battery capacity in kilowatt-hours.
- data.charger_level (string or null)
- data.charger_power_kw (number or null): Charger power in kW.
Null semantics: When the source (NHTSA vPIC) does not publish a field for a given VIN, Vehicle API returns null. This is expected and not an error; always code for null-safe reads on optional fields.
JavaScript example: decode a VIN and read engine specs
The snippet below posts the VIN to the decode endpoint, checks the response envelope, and maps the engine object into your application model. It demonstrates handling nulls and extracting units without conversion.
async function getEngineSpecs(vin) {
const resp = await fetch("https://vehicles-api.com/api/v1/vin/decode", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
// Or: Authorization: `Bearer YOUR_API_KEY`
},
body: JSON.stringify({ vin })
});
const json = await resp.json();
if (!resp.ok || json.status !== "success") {
const code = json?.error?.code || resp.status;
const message = json?.error?.message || "VIN decode failed";
throw new Error(`${code}: ${message}`);
}
const d = json.data || {};
const eng = d.engine || {};
return {
vin: d.vin,
valid: d.valid === true,
year: d.year,
make: d.make,
model: d.model,
trim: d.trim,
// Engine fields (units preserved as-is)
cylinders: eng.cylinders ?? null,
displacement_l: eng.displacement_l ?? null, // liters
configuration: eng.configuration ?? null,
engine_model: eng.model ?? null,
horsepower_hp: eng.hp ?? null, // horsepower
fuel: eng.fuel ?? d.fuel_type ?? null,
// Related drivetrain fields
transmission_style: d.transmission?.style ?? null,
transmission_speeds: d.transmission?.speeds ?? null,
drive: d.drive ?? null
};
}
// Example usage
getEngineSpecs("1HGCM82633A004352")
.then(specs => console.log(specs))
.catch(err => console.error(err));
Practical integration details that save time
Global coverage and scope
- VIN decoding: worldwide, with the most complete coverage for US-market vehicles.
- US safety data: recalls, complaints, and NCAP crash ratings are US-market only and matched by make + model + year (not by VIN).
- Dutch plates: sourced from RDW open data, do not include a VIN, and are separate from VIN decode.
Caching strategy for decoded VINs
- VIN decode results are stable for a given VIN. Cache decoded results aggressively (e.g., long TTL) to reduce latency and cost.
- If your workflow updates from OEM bulletins, you can periodically revalidate by scheduling background refreshes, not on every user request.
- Treat nulls as authoritative absence: a later refresh may still return null if the source does not publish the field.
Error handling and envelope
- Success: status is "success", source is "nhtsa", and data contains the decoded attributes.
- Error: status is "error" with error.code and error.message. Do not parse HTTP status alone; always check the response envelope.
- Invalid VIN format or non-17-character strings will return an error. Validate VIN length client-side to fail fast.
Authentication and headers
- Preferred header: X-API-Key: YOUR_API_KEY
- Alternative: Authorization: Bearer YOUR_API_KEY
- Content-Type: application/json for POST bodies.
Rate limits and monthly quota
- Per-plan rate limits and monthly quotas apply. Implement retries with backoff for 429 responses and respect Retry-After when returned.
- Cache results to minimize duplicate decodes for the same VIN within your quota window.
- For current plan details and quota guidance, see the Documentation.
Null fields and defaults
- Fields not published by NHTSA return null. Do not substitute arbitrary defaults; instead, hide the field in UI or present a clear “Not published” label.
- For EVs and hybrids, do not guess battery_kwh or charger_power_kw. Use the electrification fields exactly as returned or leave them null.
- Avoid unit conversions unless required by your app. If you convert hp to kW or liters to cc, do so explicitly and test rounding rules.
End-to-end workflow: from VIN to engine specs UI
1) Input validation
Ensure vin is 17 characters. Reject or sanitize whitespace and lowercase/lowercase differences do not matter; treat VIN as case-insensitive.
2) Call the endpoint
Send a POST to /vin/decode with the required headers and body. Use the official curl provided above to verify connectivity. For programmatic calls, use a simple wrapper as shown in the JavaScript sample.
3) Parse the envelope and engine object
Check status === "success", then read data.engine. Expect nulls. Persist the raw JSON in your datastore if you need reprocessing later.
4) Normalize and display
- Displacement: display data.engine.displacement_l with “L” suffix (e.g., 3.0L) when present.
- Horsepower: display data.engine.hp with “hp” suffix if your UI uses imperial units.
- Configuration: surface as-is; you can map “V-Shaped” to “V6” or “V8” using cylinder count if your UI prefers a combined label (e.g., “3.0L V6”).
- Engine code: display data.engine.model for parts and trim disambiguation (e.g., J30A4).
5) Cache and respect limits
Store a long-lived cache keyed by VIN. Reuse across your app (inventory pages, quote flows, claims intake) to avoid repeat decodes. Monitor rate limits and monthly usage; throttle calls if you approach plan limits.
Troubleshooting common edge cases
- status is error with a code: Check your API key and body format. Ensure Content-Type is application/json and the body includes a valid 17-character vin string.
- valid is false: The VIN did not pass validation at the source; do not assume engine data is reliable. Prompt for correction.
- engine object missing or sparsely populated: Some markets or years may not publish certain attributes. Your integration should gracefully render only available fields.
- drive is null: Drivetrain is not always published at the VIN-level. Avoid filling with make/model defaults unless you have your own authoritative mapping.
- Electrification fields are null for ICE vehicles: This is expected; do not surface “0 kWh” or similar. Leave out EV-only UI.
Security, environments, and MCP
- Keep YOUR_API_KEY server-side when possible. For browser-only integrations, use short-lived tokens or a thin server proxy.
- Use separate keys per environment (dev, staging, prod), and segregate caches to avoid cross-environment pollution.
- If you are building an AI agent or tool that uses Model Context Protocol, consider the MCP server at vehicles-api.com/mcp for direct tool integration.
Notes on related datasets (context only)
VIN engine specs come from NHTSA vPIC. Recalls, owner complaints, and NCAP ratings are US-market only and matched by make + model + year; they do not change engine fields in the VIN decode response. Dutch plates originate from RDW open data and are handled via plate-specific endpoints; RDW datasets do not include a VIN and therefore are not used to enrich engine specs from this VIN endpoint.
FAQ
Does the VIN decode include horsepower for every vehicle?
Not always. If horsepower is not published by the source for that VIN, engine.hp will be null. Your code should handle null fields gracefully.
Are recalls and crash ratings included in the same response?
No. The VIN decode focuses on build attributes like engine, transmission, and plant. US-market safety datasets (recalls, complaints, NCAP) are available separately and are matched by make + model + year, not by VIN.
Can I use Authorization: Bearer instead of X-API-Key?
Yes. Both headers are supported. The examples here use X-API-Key: YOUR_API_KEY for clarity.
How should I cache VIN decodes?
Cache responses for a long TTL because VIN build attributes are static. Periodic background revalidation is optional; avoid re-decoding on every user request.
What are the rate limits and monthly quota?
Plans include per-plan rate limits and monthly quotas. Implement retry with backoff for 429s and consult the Documentation for current limits.
Build your VIN Engine Specs integration now. Starter is $19/month and every plan includes a 7-day free trial. Create your key and start decoding in minutes: Register. For API and MCP details, visit Documentation and MCP.