NCAP Crash Ratings Data API

By Vehicle API
NCAP Crash Ratings Data API

Your app needs trustworthy NCAP crash-test ratings from a VIN, but juggling NHTSA data structures, coverage quirks, and error handling slows you down. By the end of this guide you will query the Vehicle API’s NCAP Crash Ratings endpoint, parse the response envelope, handle US-only coverage and null fields, cache results effectively, and ship a clean safety-ratings feature for dealer, fleet, marketplace, insurance, or transportation AI workflows.

What the NCAP Crash Ratings endpoint provides

The Vehicle API exposes NHTSA New Car Assessment Program (NCAP) crash-test ratings—frontal, side, and rollover—matched by make + model + year from a VIN. It returns a stable envelope with a source and data payload you can rely on in production.

Illustration: NCAP Crash Ratings Data API
  • Endpoint: GET https://vehicles-api.com/api/v1/vin/safety-ratings
  • Auth: X-API-Key: YOUR_API_KEY (Authorization: Bearer also supported)
  • Coverage: US-market vehicles only for ratings; matches are by make + model + year, not by an individual VIN test
  • Nullability: overall ratings can be null if NHTSA didn’t publish them for that vehicle
  • Error behavior: A valid non-US VIN returns an error with code coverage_us_only and HTTP 422

VIN decoding in the Vehicle API works for vehicles worldwide, but NCAP crash-test ratings, recall campaigns, owner complaints, and crash ratings coverage are US-market only. Dutch plate lookups come from RDW open data and never include a VIN. This is not a vehicle history report—it does not include title, accident, or ownership history.

Base information: https://vehicles-api.com. For programmatic agents, the MCP server is available at MCP.

When and why to use safety-ratings by VIN

Many transportation apps display safety badges, sort inventory by safety, or surface warnings in claims and underwriting workflows. Using a VIN lets you standardize the vehicle identity workflow (VIN decode → year/make/model/trim) and then attach NCAP ratings that NHTSA publishes at the model-year level.

  • Dealers and marketplaces: Display star ratings on VDPs and SRPs, or use rollover risk as a sort/filter attribute.
  • Fleet and insurance: Flag lower-rated vehicles or add a safety index to underwriting rules.
  • AI agents: Cite authoritative NHTSA ratings for recommendations or Q&A, via REST or via the MCP endpoint.

Authentication and request structure

Set your API key in the X-API-Key header. Authorization: Bearer YOUR_API_KEY also works if that’s easier in your stack. The base URL is https://vehicles-api.com/api/v1. All responses use the same envelope: a top-level status and source, plus a data object on success—or an error object if anything goes wrong.

Endpoint and query parameters:

  • GET /vin/safety-ratings
  • Query: vin

Official cURL example

Copy and run this cURL. It uses the control VIN 1HGCM82633A004352 (a 2003 Honda Accord). Replace YOUR_API_KEY with your own key.

curl "https://vehicles-api.com/api/v1/vin/safety-ratings?vin=1HGCM82633A004352" -H "X-API-Key: YOUR_API_KEY"

Official JSON example

The Vehicle API wraps NHTSA data and returns this response envelope. Fields that NHTSA did not publish can be null. This example is the public documentation fixture and may differ from live queries as NHTSA updates data.

{
    "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
    }
}

What each field means and how to use it

  • status: "success" for successful lookups. On errors, you will receive status: "error".
  • source: "nhtsa" indicates the origin of the safety ratings.
  • data.vin: The VIN you queried, echoed for correlation.
  • data.coverage: "us" confirms US-market coverage for NCAP ratings. Non-US VINs will not have ratings.
  • data.match: "partial" means ratings are matched by make + model + year; they are not per-VIN tests. Treat these as the official NCAP ratings for that configuration class.
  • data.vehicle_description: A short description from NHTSA (e.g., "2003 Honda Accord 2-DR.").
  • data.overall: The overall NCAP star rating when available; null if NHTSA did not publish it for this vehicle configuration.
  • data.front: Frontal crash ratings. Contains:
    • front.overall: Overall frontal stars when available; may be null.
    • front.driver: Driver frontal crash star rating (integer scale; typical 1–5).
    • front.passenger: Passenger frontal crash star rating.
  • data.side: Side crash ratings. Contains:
    • side.overall: Overall side stars when available; may be null.
    • side.driver: Driver-side crash star rating.
    • side.passenger: Passenger-side crash star rating.
  • data.rollover: Rollover star rating.
  • data.nhtsa_vehicle_id: NHTSA’s internal vehicle ID reference for cross-checking in their datasets.

Field comparison and nullability

Use this quick reference when mapping ratings into your data model. Be prepared for nulls whenever NHTSA has not published a specific overall category.

Field Type Example Nullable Notes
overall integer or null null Yes Overall NCAP star rating; may be missing for some vehicles.
front.overall integer or null null Yes Frontal overall star rating; may be missing.
front.driver integer 5 No Driver frontal star rating.
front.passenger integer 5 No Passenger frontal star rating.
side.overall integer or null null Yes Side overall star rating; may be missing.
side.driver integer 5 No Driver side star rating.
side.passenger integer 5 No Passenger side star rating.
rollover integer 4 No Rollover star rating.

A copy-paste Python example

This snippet calls the same endpoint, validates the response envelope, handles US-only coverage and null fields, and renders a compact ratings summary. Replace YOUR_API_KEY before running.

import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://vehicles-api.com/api/v1/vin/safety-ratings"
VIN = "1HGCM82633A004352" # control VIN for docs demonstration

def get_safety_ratings(vin: str):
resp = requests.get(
BASE_URL,
params={"vin": vin},
headers={"X-API-Key": API_KEY, "Accept": "application/json"},
timeout=10,
)
# Parse the envelope
payload = resp.json()
status = payload.get("status")

if status != "success":
# Expect an error object on failures
err = payload.get("error", {})
code = err.get("code")
msg = err.get("message")
raise RuntimeError(f"Vehicle API error: {code} - {msg}")

data = payload.get("data", {})
if data.get("coverage") != "us":
# Ratings are US-only
raise RuntimeError("NCAP ratings available for US-market vehicles only.")

return data

def format_summary(data: dict) -> str:
desc = data.get("vehicle_description") or "Vehicle"
overall = data.get("overall")
front = data.get("front", {})
side = data.get("side", {})
rollover = data.get("rollover")

def fmt_star(value):
return "N/A" if value is None else f"{value}★"

rows = [
f"{desc}",
f"Overall: {fmt_star(overall)}",
f"Front (Driver/Passenger): {fmt_star(front.get('driver'))}/{fmt_star(front.get('passenger'))}",
f"Side (Driver/Passenger): {fmt_star(side.get('driver'))}/{fmt_star(side.get('passenger'))}",
f"Rollover: {fmt_star(rollover)}",
f"NHTSA Vehicle ID: {data.get('nhtsa_vehicle_id')}",
f"Match type: {data.get('match')}", # usually 'partial' i.e., model-year level
]
return "\n".join(rows)

if __name__ == "__main__":
try:
data = get_safety_ratings(VIN)
print(format_summary(data))
except Exception as e:
print(str(e))

Error handling and coverage boundaries

Every Vehicle API response uses the same envelope. Successful calls return status: "success" with source and data. Failed calls return status: "error" with an error object. For NCAP ratings:

  • Non-US VINs: You will receive an error with HTTP 422 and error.code set to coverage_us_only. Ratings are US-market only.
  • Null fields: If NHTSA has not published an overall rating for the vehicle configuration, overall (and sometimes front.overall or side.overall) will be null. Do not coerce null to 0; display “N/A” or omit the field.
  • Match semantics: The match field communicates how the VIN mapped to ratings. Expect "partial" to indicate a model-year level mapping via make + model + year.

If your workflow requires full VIN decoding before attaching ratings, use the Vehicle API’s VIN decoding capability to obtain make, model, year first, then call safety-ratings. VIN decoding has global coverage but is fullest for US-market vehicles. Keep in mind that NCAP safety data, recall campaigns, owner complaints, and crash ratings are US-market only.

Performance, caching, and data freshness

Practical strategies to reduce latency and quota consumption:

  • Cache by VIN: Cache successful safety-ratings responses keyed by VIN together with the resolved year/make/model that produced the ratings. Ratings for a given model-year do not change frequently; a cache TTL of days or weeks is typically appropriate.
  • Handle null fields gracefully: Cache even when some fields are null, so you do not re-request missing data unnecessarily.
  • De-duplicate: If you ingest inventory feeds, deduplicate VINs before calling the endpoint.

Live counts and ratings evolve as NHTSA publishes updates. If you require always-fresh ratings, implement a periodic refresh task that revalidates cached entries on your schedule.

Rate limits, monthly quota, and retries

All plans enforce monthly quotas and rate limits. The Starter plan begins at $19/month and every plan includes a 7-day free trial. Inspect your dashboard to understand your quota and concurrency, and design your client to:

  • Batch or queue lookups from ingestion pipelines.
  • Retry transient network failures with backoff.
  • Respect coverage boundaries: avoid retrying 422 coverage_us_only errors.

For current plan details and usage guidance, see the Documentation or visit vehicles-api.com.

Design notes for dealers, fleets, insurers, and AI agents

  • UI defaults: Render category ratings even if overall is null. Many older model years lack an overall star but include per-category stars.
  • Filtering: Use rollover or the minimum of front/side subratings to create conservative filters for safety-sensitive listings.
  • Source attribution: Keep source: "nhtsa" stored beside the values for auditability, especially in insurance and compliance workflows.
  • Explainability: Store nhtsa_vehicle_id to let users cross-reference external NHTSA resources if needed.
  • Agents via MCP: If you’re building transportation assistants, connect to the Vehicle API through the MCP server to retrieve the same ratings within your agent runtime.

Testing tips and sandboxing

Use the control VIN 1HGCM82633A004352 while wiring up your client. Confirm that your app:

  • Reads the response envelope (status, source, data).
  • Handles null overall fields without crashing or mislabeling missing values as 0.
  • Displays the vehicle_description verbatim to reduce mapping ambiguity.
  • Surfaces coverage issues clearly when a VIN is outside the US market.

Once integrated, rotate to your production VIN set. VINs are globally valid identifiers, but NCAP coverage is US-only, so your production error monitoring should segment by market and model-year to avoid false alarms.

Security and operational hygiene

  • Store API keys in environment variables or your secrets manager; never commit them to source control.
  • Set conservative timeouts and circuit breakers. The example Python snippet uses a 10-second timeout; tune for your environment.
  • Log status, error.code, and error.message on failures for quick triage. Do not log full responses with PII if your telemetry is shared.

End-to-end flow checklist

  1. Obtain and store your key securely. Test with cURL first.
  2. Decode the VIN (if you need normalized year/make/model) via the Vehicle API, then call safety-ratings.
  3. Query GET /vin/safety-ratings?vin=... with X-API-Key header.
  4. Parse the envelope:
    • status should be "success".
    • source should be "nhtsa".
    • data contains vin, coverage, match, vehicle_description, overall, front, side, rollover, nhtsa_vehicle_id.
  5. Implement null-safe rendering:
    • Show category stars even if overall is null.
    • Label nulls as "N/A".
  6. Cache results by VIN with a TTL aligned to your refresh policy.
  7. Respect coverage and show a meaningful message for non-US VINs.

Production readiness notes

Because NCAP ratings are matched at the model-year level, a single VIN decode determines the data you need for many downstream tasks. Cache the decode alongside the safety ratings to avoid re-calling multiple endpoints per page load. If you serve international users, short-circuit calls for known non-US VINs to avoid avoidable 422 responses.

If your app also consumes other US-market safety datasets (recalls, owner complaints), keep the same envelope-reading utilities and error strategies—Vehicle API uses one consistent response pattern across endpoints. Dutch plate data from RDW is also available, but those records never include a VIN.

Quick start: run the official call and ship

First, run the official cURL example above to validate networking and authentication. Then drop the Python snippet into your service to format the summary. Once you see the expected rating stars and null handling in your logs or UI, wire the call into your listing pages or underwriting rules. For the fastest path to production, start your free trial now.

Register for a 7-day free trial. Read the latest field notes in the Documentation. Explore automation options via MCP. You can always return to the homepage at vehicles-api.com.

FAQ

Are NCAP crash ratings returned per VIN or per model-year?

They are matched by make + model + year, not per individual VIN tests. The match field communicates the mapping; expect "partial" for model-year level coverage.

Why is overall null when front/side/rollover stars exist?

NHTSA does not always publish an overall star rating for every configuration. If overall is null, render the available category stars and label the overall rating as “N/A.”

What happens if I query a non-US VIN?

NCAP coverage is US-market only. You will receive an error with HTTP 422 and error.code coverage_us_only. Do not retry these requests; short-circuit for known non-US VINs.

Does this include recalls, complaints, or vehicle history?

The NCAP endpoint returns crash-test ratings only. Recalls and owner complaints are separate US-market datasets. Vehicle history items like title, accident, or ownership history are not included.

Can I use this in an AI agent?

Yes. Connect your agent to the Vehicle API via REST or through the MCP server for tool-mediated lookups, using the same endpoint and fields.

Keep reading