
You need to know exactly where a vehicle was built for compliance, logistics, insurance rating, or marketplace listings. By the end of this guide, you’ll be able to decode a VIN with Vehicle API and reliably read the assembly plant fields (country, city, state) for downstream use in your apps and automations.
What the assembly plant “plant” field provides
The Vehicle API returns assembly plant information as the plant object inside the VIN decode response. It includes:
- plant.country: Country where the vehicle was assembled.
- plant.city: Assembly city, when published by the source.
- plant.state: State or region, when applicable (e.g., US states).
These values come from NHTSA’s vPIC data in the United States and are included in the same decode payload as year, make, model, trim, engine, and transmission. VIN decoding works worldwide, though plant granularity is fullest for US-market vehicles. When NHTSA does not publish an attribute, Vehicle API returns null for that field rather than omitting it.
Vehicle API is a single JSON REST API and also available as an MCP server for AI agents. You can learn more at vehicles-api.com and connect agents via MCP.
Endpoint overview: decode a VIN and read the assembly plant
Use the VIN Decode endpoint to retrieve plant information:
- Method and URL: POST https://vehicles-api.com/api/v1/vin/decode
- Headers: X-API-Key: YOUR_API_KEY and Content-Type: application/json
- Body: JSON with a single vin field (17-character string)
Response envelope:
- status: "success" on success; "error" on failure
- source: "nhtsa" for vPIC-powered decodes
- data: object with decoded fields, including plant
- On errors: error.code and error.message are provided in the envelope
Coverage notes you should account for in your code:
- VIN decoding works worldwide, with the fullest attributes for US-market vehicles.
- US recalls, owner complaints, and NCAP crash ratings are separate datasets matched by make + model + year; those are US-market only. They are not part of the assembly plant field and not shown here.
- Dutch plate lookups use RDW open data and do not include a VIN; they are separate from VIN decoding and unrelated to the plant field.
- This is not a vehicle history report: no title, accident, or ownership history is provided.
Copy-paste cURL: decode and inspect plant.country, plant.city, plant.state
Send one POST request with your API key and the VIN. Below is the official sample. It uses a known control VIN to demonstrate the plant object; it is not your vehicle.
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"}'
Official JSON response and the plant object
This is the official example JSON from the documentation. Note that electrification fields are null because the control VIN is a gasoline vehicle. Your integration should handle nulls without error.
{
"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."
}
}
Fields you will typically use from the plant object:
- data.plant.country: "UNITED STATES (USA)"
- data.plant.city: "MARYSVILLE"
- data.plant.state: "OHIO"
Integration tips:
- All three fields can be present, or any may be null if not provided by the source. Always null-check.
- If you need a human-friendly label, you may want to title-case city/state for UI only; keep the raw value for storage and auditing.
- The plant’s country and state are useful for trade compliance or regional filtering in dealer and fleet tooling.
Python example: decode and consume the assembly plant fields
This sample calls the same endpoint and extracts plant details. It also demonstrates safe handling of nulls and the response envelope.
import json
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://vehicles-api.com/api/v1"
def decode_vin(vin: str) -> dict:
url = f"{BASE_URL}/vin/decode"
headers = {
"X-API-Key": API_KEY,
"Content-Type": "application/json",
}
payload = {"vin": vin}
resp = requests.post(url, headers=headers, data=json.dumps(payload), timeout=15)
resp.raise_for_status()
body = resp.json()
if body.get("status") != "success":
# Error envelope shape: {status: "error", error: {code, message}}
err = body.get("error", {})
raise RuntimeError(f"VIN decode failed: {err.get('code')} - {err.get('message')}")
data = body.get("data", {})
plant = data.get("plant") or {}
# Read assembly plant fields defensively
return {
"vin": data.get("vin"),
"year": data.get("year"),
"make": data.get("make"),
"model": data.get("model"),
"plant_country": plant.get("country"),
"plant_city": plant.get("city"),
"plant_state": plant.get("state"),
"source": body.get("source"),
}
if __name__ == "__main__":
# Control VIN for testing and integration development
result = decode_vin("1HGCM82633A004352")
print(result)
How to use assembly plant data in your workflows
Common use cases for the plant fields include:
- Inventory and listing enrichment: Display “Assembled in Marysville, Ohio, USA” under the vehicle’s primary specs.
- Regional compliance: Apply business rules based on plant.country or plant.state (e.g., tax implications, tariffs, trade rules).
- Fleet analytics: Group vehicles by assembly region to analyze warranty, parts sourcing, or logistics KPIs.
Remember to cache VIN decodes: a VIN’s decode and plant location do not change over time. Caching decoded VINs prevents unnecessary calls, reduces latency, and helps you stay within your rate limits and monthly quota. Many apps cache for the lifetime of the asset record and refresh only if you change decoder providers or notice a schema update in the Documentation.
Handling nulls, errors, and the response envelope
Null fields are normal when the data source does not publish a value, and should not be treated as an error. Specifically for plant:
- country may be the only populated field for some vehicles.
- city and state may be null, especially outside the US or where the source lacks detail.
Error handling pattern:
- Check HTTP 2xx first; non-2xx indicates transport or gateway failure.
- Then check status in the JSON envelope. On "error", read error.code and error.message for diagnostics.
- For invalid VIN input (e.g., not 17 characters), expect an error status; correct the input and retry.
Rate limits and monthly quota:
- Vehicle API enforces request rate limiting and plan quotas. If you integrate at scale, implement backoff and retries where appropriate, and cache successful decodes by VIN string.
- For specific plan quotas and rate limits, see the Documentation. Every plan includes a 7-day free trial, and the Starter plan begins at $19/mo.
Source, coverage, and when to expect plant fields
Vehicle API’s VIN decoding uses NHTSA vPIC where applicable. The source field will be "nhtsa" when the decoder is vPIC-backed, as shown in the sample. Decoding works for any 17-character VIN worldwide; however, the plant details are most complete for US-market vehicles, and fields NHTSA does not publish are returned as null.
Additional datasets in the platform are US-focused and joined by make, model, and year:
- Recalls: US-market only; not part of the plant field.
- Owner complaints: US-market only.
- NCAP crash ratings: US-market only.
Dutch registration data: Vehicle API also provides Dutch plates from RDW open data; those plate lookups never include a VIN and are not used for assembly plant decoding.
Integration checklist for the plant field
- Use POST https://vehicles-api.com/api/v1/vin/decode with X-API-Key: YOUR_API_KEY.
- Store the full response envelope for audit: status, source, and data.
- Parse data.plant.country, data.plant.city, and data.plant.state defensively.
- Cache by VIN string; VIN decodes are static for a given VIN.
- Handle null fields gracefully in UI and data pipelines.
- Implement retry/backoff for rate-limited responses and respect your quota.
MCP access for AI agents
If you are building an AI agent that needs to reason about vehicle specs and assembly plants, you can attach Vehicle API as an MCP server at MCP. MCP access uses the same data model: status, source, and data with the plant object inside the VIN decode result.
For general product info and additional endpoints, see vehicles-api.com and the endpoint-specific guides in the Documentation.
Developer notes that will save you time
- Idempotency: A VIN uniquely identifies the vehicle build; your decode result is stable for that VIN. Favor caching and deduplicate calls in your queue/worker.
- Normalization: Keep raw text as provided (e.g., uppercase city/state) for storage. Normalize to title case only when rendering.
- Field presence: The API returns a consistent schema; missing values are null, not omitted. Avoid attribute errors by defaulting to None/null in your language.
- International VINs: Expect plant fields to be present when published by the source. Some regions may only include country.
- Electrification fields: For non-EVs and many legacy models, electrification_level, battery_kwh, charger_level, and charger_power_kw will be null. Don’t invent or infer values.
- Downstream joins: If you plan to join to US recalls or safety datasets, join on (year, make, model). These datasets are US-only and separate from plant.
Quality, reliability, and operational considerations
Because plant data comes from NHTSA vPIC, it inherits the reliability of that source. The API’s response includes source so you can track provenance across your pipeline. For operational readiness:
- Logging: Log vin, status, and source for each request. On error, capture error.code and error.message for triage.
- Backoff strategy: If you encounter throttling or transient errors, implement exponential backoff and respect Retry-After headers if present in transport-level responses.
- Resilience: Consider a small on-disk or in-memory cache for recent decodes to ride out short outages without user impact.
- Testing: Use the provided control VIN in your CI smoke tests to check for schema stability around the plant object.
Security and access
Authenticate via the X-API-Key request header. Authorization Bearer also works, but the examples here use X-API-Key for clarity. Never hardcode your live key in client code; terminate requests on your server or use environment variables and secrets management in serverless workers.
To get started and enable the 7-day free trial, create an account here: Register. Starter is $19/mo; all plans include the same free trial window so you can integrate before committing.
FAQ
Does the VIN decoder always return plant.city and plant.state?
No. All plant fields are returned when published by the source. It’s common for country to be present and city/state to be null for some vehicles. Always null-check.
What datasets power the plant field, and what does source mean?
The plant object comes from NHTSA vPIC for VIN decoding. The response includes a source field (e.g., "nhtsa") so you can confirm data provenance.
Is the assembly plant information available for non-US vehicles?
VIN decoding works worldwide. Plant coverage is fullest for US-market vehicles. Outside the US, availability of city/state can vary; country is more commonly present.
How should I handle errors and rate limits?
Check the JSON envelope. On error, read error.code and error.message. Implement caching per VIN, retries with backoff, and avoid duplicate decodes. For quotas and rate limits, see the Documentation.
Can I access the same plant data through an AI agent?
Yes. Vehicle API is available as an MCP server at MCP. You’ll get the same envelope and plant object in agent tools.
Ready to implement VIN assembly plant decoding in your app? Start your 7-day free trial and get an API key here: Register. For endpoint details and field references, check the Documentation, and explore agent integrations via MCP.




