
You need trusted side crash test ratings for a VIN so you can score vehicles, enforce underwriting rules, or label listings. By the end of this guide, you’ll call the Side Crash Rating API, parse the JSON you need (side.driver and side.passenger), and ship a production-ready integration that handles U.S.-only coverage, null fields, and errors.
What the Side Crash Rating endpoint returns and when to use it
The Side Crash Rating API exposes NHTSA NCAP safety ratings for U.S.-market vehicles. Ratings are reported in stars (1–5) for frontal, side, and rollover. The “overall” fields can be null if NHTSA did not publish a combined score for that category or model year. Results are matched by make + model + year; the API also echoes the VIN you queried and a brief vehicle description to help you confirm the match quality.
For the Side Crash Rating specifically, you will use fields under data.side: data.side.driver and data.side.passenger. The API also includes data.rollover and frontal ratings in the same response if you need a complete safety view for the same vehicle. Coverage is U.S.-market only for NCAP: a valid non-U.S. VIN will return an error with code coverage_us_only.
Note that Vehicle API also covers VIN decoding worldwide (year, make, model, trim, engine, transmission, assembly plant), U.S. safety data (recalls, owner complaints, crash ratings), and Dutch plates from RDW open data. Dutch plates never include a VIN. This is not a vehicle history report: it does not include title events, accidents, or ownership history.
You can use both the REST API and the MCP server to power apps and AI agents. The REST base URL is https://vehicles-api.com/api/v1. For AI agents, see the MCP server at MCP.
Access: start the free trial, get your key, and authenticate
Every plan includes a 7-day free trial. Create your account, copy your API key from the dashboard, and you’re ready to call the API.
- Sign up: Register
- REST base URL: https://vehicles-api.com/api/v1
- Authentication: send your key via the header X-API-Key: YOUR_API_KEY. Authorization: Bearer YOUR_API_KEY also works if you prefer an Authorization header.
Keep your key secret and use different keys per environment if you need to separate dev and prod usage. The API is hosted at https://vehicles-api.com.
Make your first request with curl
The example below uses the control VIN 1HGCM82633A004352 (a 2003 Honda Accord) and the Side Crash Rating endpoint. Replace YOUR_API_KEY with your dashboard key to run it.
curl
curl "https://vehicles-api.com/api/v1/vin/safety-ratings?vin=1HGCM82633A004352" -H "X-API-Key: YOUR_API_KEY"
Understand the JSON response
Every response is wrapped in a consistent envelope with status, source, and data. On success, status is success and data contains the fields. On error, status is error and the payload includes error.code and error.message. Ratings are integers (stars) or null when NHTSA did not publish the value.
Official JSON example
{
"status": "success",
"source": "nhtsa",
"data": {
"vin": "1HGCM82633A004352",
"coverage": "us",
"match": "partial",
"vehicle_description": "2003 Honda Accord 2-DR.",
"overall": null,
"front": {
"overall": null,
"driver": 5,
"passenger": 5
},
"side": {
"overall": null,
"driver": 5,
"passenger": 5
},
"rollover": 4,
"nhtsa_vehicle_id": 4736
}
}
Fields you will actually use
- status: "success" on success; "error" on errors.
- source: "nhtsa" indicates the NCAP source.
- data.vin: echoes the VIN you requested.
- data.coverage: "us" confirms U.S.-market coverage applied. Safety ratings are U.S.-only.
- data.match: "partial" or "exact" indicates how closely NHTSA’s dataset matches the year/make/model derived from the VIN. Build trims and options are often not available, so partial is normal.
- data.vehicle_description: short descriptor suitable for a UI label.
- data.side.driver and data.side.passenger: the star ratings (1–5) for side-impact tests by seating position. These are the core fields for side crash safety logic.
- data.side.overall: overall side rating (can be null if not published).
- data.front.driver and data.front.passenger: available if you also display frontal results (optional for this article’s focus).
- data.rollover: the rollover resistance rating (integer stars).
- data.overall: combined overall rating (can be null if not published by NHTSA).
- data.nhtsa_vehicle_id: internal NHTSA ID; store if you need to cross-reference or de-duplicate.
Null values are expected when NHTSA did not publish a rating for that category and model year. Write your UI to display “Not rated” or omit the value when it is null.
Call the API from your application
Below is a minimal Python example that fetches the side ratings and safely reads the fields you need. It includes guards for nulls and absent keys so your code won’t crash when an overall rating is missing.
Python
import os
import requests
API_KEY = os.getenv("VEHICLES_API_KEY", "YOUR_API_KEY")
BASE_URL = "https://vehicles-api.com/api/v1"
VIN = "1HGCM82633A004352" # Control VIN example from docs
def get_side_crash_ratings(vin: str):
url = f"{BASE_URL}/vin/safety-ratings"
params = {"vin": vin}
headers = {
"X-API-Key": API_KEY,
# Alternatively:
# "Authorization": f"Bearer {API_KEY}"
}
r = requests.get(url, params=params, headers=headers, timeout=10)
# On error, API returns { "status": "error", "error": { "code": "...", "message": "..." } }
resp = r.json()
if resp.get("status") != "success":
err = resp.get("error", {})
raise RuntimeError(f"Vehicle API error: {err.get('code')} - {err.get('message')}")
data = resp.get("data", {}) or {}
coverage = data.get("coverage")
match_quality = data.get("match")
vehicle_description = data.get("vehicle_description")
side = data.get("side", {}) or {}
side_overall = side.get("overall") # may be None
side_driver = side.get("driver") # int or None
side_passenger = side.get("passenger") # int or None
return {
"vin": data.get("vin"),
"coverage": coverage,
"match": match_quality,
"vehicle_description": vehicle_description,
"side_overall": side_overall,
"side_driver": side_driver,
"side_passenger": side_passenger,
"rollover": data.get("rollover"), # optional for side workflows
"nhtsa_vehicle_id": data.get("nhtsa_vehicle_id"),
}
if __name__ == "__main__":
try:
ratings = get_side_crash_ratings(VIN)
print("Vehicle:", ratings["vehicle_description"])
print("Side (driver):", ratings["side_driver"])
print("Side (passenger):", ratings["side_passenger"])
print("Side (overall):", ratings["side_overall"])
except Exception as e:
print("Error:", e)
Practical details: envelope, errors, rate limits, caching, and nulls
Response envelope
- On success: status is success, source is nhtsa, data contains the ratings and identifiers.
- On error: status is error with error.code and error.message. Your code should branch on status before reading data.
Error handling
- coverage_us_only (HTTP 422): You will see this when you send a valid non-U.S. VIN to the safety-ratings endpoint. NCAP coverage is U.S.-market only.
- Other validation errors: Check error.code and error.message to present a clear message or fallback behavior.
Implement structured logging for error.code and error.message so you can monitor integration issues in production.
Coverage and matching
- NCAP coverage is U.S.-market only and matched by make + model + year derived from the VIN. The match field will be exact or partial; partial is common because trims and options are not always differentiated in NCAP publications.
- VIN decoding works worldwide, but that is a separate capability. Safety ratings are strictly U.S.-market.
- Dutch plates (RDW) never include a VIN. If you have a Dutch plate workflow, resolve the plate via RDW first, then handle safety ratings only when you have a U.S.-market year/make/model equivalent. Do not expect NCAP ratings from a plate alone.
Null fields
- overall and side.overall can be null if NHTSA did not publish an overall rating.
- Your schema should permit null for any overall fields and your UI should explicitly account for “Not rated”.
Rate limits and monthly quota
- Vehicle API enforces rate limits and plan quotas. Exact limits vary by plan; see the Documentation or your dashboard for current values.
- Use client-side caching to avoid duplicate lookups, especially when users refresh the same detail page repeatedly.
Caching strategies
- Cache safety ratings by VIN and the returned nhtsa_vehicle_id. Ratings change infrequently; a cache TTL measured in days is typical for production apps.
- Because NCAP is matched by make + model + year, no trim- or option-level changes will alter the side ratings response for the same generation/year; you can reuse cached results for vehicles that map to the same nhtsa_vehicle_id.
- If you also decode VINs elsewhere in your stack, cache the decoded year/make/model so you can short-circuit redundant calls and only hit the safety endpoint when needed.
Resilience and timeouts
- Set an HTTP timeout (for example, 10 seconds in the Python sample) and implement a small number of retries on transient 5xx errors.
- Fail open or provide a fallback label (“Not rated”) when overall fields are null.
Field-by-field usage patterns for side crash safety
- Eligibility rules: Require data.side.driver ≥ 4 and data.side.passenger ≥ 4 to qualify a vehicle for listing or insurance tiers.
- Sorting and badging: Use data.side.driver and data.side.passenger to create badges in search results; show the integer star count.
- Auditing and analytics: Store data.nhtsa_vehicle_id alongside your VIN to deduplicate ratings across identical year/make/model sets.
- UI text: Display data.vehicle_description to let users confirm they’re viewing the correct body style.
Common integration sequence
Step 1 — Start your 7-day trial
Sign up and copy your key from the dashboard: Register.
Step 2 — Store and scope the key
Place the key in your secrets manager and inject it into your application as an environment variable. Use distinct keys per environment to track usage.
Step 3 — Call the endpoint
Send a GET to /vin/safety-ratings with the vin query parameter and your key in X-API-Key.
Step 4 — Parse and validate
- Check status == "success". If not, read error.code and error.message to decide whether to retry or return a user-facing message.
- Confirm data.coverage == "us". If not present or not "us", do not assume ratings exist.
- Read data.side.driver and data.side.passenger to power your safety logic; handle nulls gracefully.
- Optionally log data.match and data.nhtsa_vehicle_id for audit trails.
Step 5 — Cache and re-use
Cache the response by VIN and nhtsa_vehicle_id with an appropriate TTL. Invalidate cautiously; NCAP data does not change frequently.
Using the MCP server for AI agents
If you are building an agent that needs to ask for side crash safety on demand, connect to the Vehicle API MCP server at MCP and expose a tool that calls the same endpoint behind the scenes. The JSON envelope is identical, so your agent logic can reuse the same parsing code and validation. Keep your MCP tool output focused on data.side fields for safe, deterministic prompts.
For broader API capabilities and request/response schemas, see the Documentation and the site at https://vehicles-api.com.
Testing tips
- Use the provided control VIN 1HGCM82633A004352 for predictable test responses while you build your integration.
- Simulate non-U.S. scenarios to verify you handle 422 coverage_us_only correctly. Your code should not retry indefinitely on this error; it’s a hard constraint.
- Add unit tests that verify your UI labels correctly display when data.side.overall is null.
Security and compliance notes
- Never log your API key or store it in client-side code.
- Log request IDs from your platform alongside error.code and error.message for traceability.
- When sharing sample payloads in issues or tickets, redact the API key and any user identifiers; the control VIN is safe to share as it is public and used by the docs.
FAQ
Does the Side Crash Rating endpoint return non-U.S. safety ratings?
No. NCAP crash ratings (frontal, side, rollover) are U.S.-market only. A valid non-U.S. VIN will return an error with code coverage_us_only for this endpoint.
Why is data.side.overall null?
NHTSA does not always publish an overall side rating. Use data.side.driver and data.side.passenger individually when overall is null.
What does match: "partial" mean?
NCAP data is matched by make + model + year derived from the VIN. Trims/options are often not distinguished, so partial is common and expected.
Can I rely on the same rating for vehicles with the same nhtsa_vehicle_id?
Yes. Use nhtsa_vehicle_id to deduplicate and cache ratings across vehicles matched to the same NCAP record.
Where can I find rate limits and quotas?
Rate limits and monthly quotas depend on your plan. See your dashboard or the Documentation for details.
Ready to ship Side Crash Ratings in your app? Start your 7-day free trial and get your API key now: Register. Explore endpoints, error formats, and examples in the Documentation and visit vehicles-api.com for platform updates.