Rollover Rating Data API

By Vehicle API
Rollover Rating Data API

Developers building dealer tools, marketplaces, fleet dashboards, insurance pricing engines, and driving-safety AI agents often need a reliable way to fetch the NHTSA rollover star rating for a specific vehicle. By the end of this guide, you will be able to query the Vehicle API’s safety ratings endpoint, read the rollover field, handle coverage limits and nulls, and ship a production-ready integration with proper caching and error handling.

What the Rollover Rating Field Represents

Rollover is one of the NHTSA NCAP crash-test star ratings, alongside frontal and side. It reflects the agency’s evaluation of rollover risk for US-market vehicles. Vehicle API exposes this rating in a single JSON envelope, alongside match metadata and a normalized vehicle description. The rating is matched by year, make, and model derived from your VIN; it is not a per-VIN crash test but a model-level rating aligned with NHTSA’s dataset.

Illustration: Rollover Rating Data API

Important scope notes for planning:

  • VIN decoding works worldwide, but safety ratings are US-market only.
  • For non-US vehicles, this endpoint returns a 422 coverage_us_only error.
  • NCAP ratings (including rollover) are matched by make + model + year from the VIN, not a vehicle history report and not tied to individual title or ownership records.
  • Dutch plates from RDW are available elsewhere in Vehicle API, but RDW data never includes a VIN; this safety ratings endpoint expects a VIN.

Endpoint Overview

Base URL: https://vehicles-api.com/api/v1

Rollover rating endpoint:

  • GET /vin/safety-ratings
  • Query parameter: vin
  • Headers: X-API-Key: YOUR_API_KEY (Authorization: Bearer YOUR_API_KEY also works)

Every response uses a consistent envelope:

  • status: “success” or “error”
  • source: “nhtsa” for this endpoint
  • data: the ratings payload when status=success
  • error: present when status=error, including error.code and error.message

Coverage constraints:

  • US-market only. A valid non-US VIN will return 422 with code coverage_us_only.
  • Ratings are matched by decoded year, make, and model; trim-level specificity and overall scores can be null when not published by NHTSA.

Copy-and-Paste cURL Request

Use the official example below to exercise the endpoint. The control VIN 1HGCM82633A004352 decodes to a 2003 Honda Accord (for demonstration). Do not use it for your user’s car.

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

Official JSON Example

Below is the exact JSON envelope returned in the documentation fixture. Note the rollover field.

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

Field-by-Field: What You Will Use

For integrating the rollover rating, prioritize these keys from data:

  • vin: Echoes the VIN you queried.
  • coverage: “us” indicates US-market data.
  • match: “partial” or “exact” informs your UI whether the API found a direct or an approximated model-year mapping in NHTSA’s data. Use it to show a subtle “rating matched at model-year level” hint.
  • vehicle_description: Human-readable NHTSA vehicle label you can display in tooltips or rating details.
  • rollover: The rollover star rating. Use this in badges, tables, filters, pricing models, and underwriting logic. Treat it as an integer with occasional null when unavailable.
  • front / side: Other NCAP star ratings you may want to display alongside rollover in a safety widget.
  • overall: Can be null if NHTSA did not publish an overall rating for this configuration.
  • nhtsa_vehicle_id: Useful as a stable internal reference if you need to link back or de-duplicate results across calls.

Nulls to expect:

  • overall can be null. Do not assume an overall rating exists even when sub-ratings are present.
  • front.overall and side.overall can also be null, while sub-ratings are present.
  • rollover can be null for some vehicles/years when not published.

JavaScript Example: Fetch and Read the Rollover Field

The following minimal example demonstrates calling the endpoint, checking the response envelope, and reading data.rollover. Adapt error handling to your framework (Node, Deno, or browser with CORS proxy).

async function getRolloverRating(vin) {
const url = `https://vehicles-api.com/api/v1/vin/safety-ratings?vin=${encodeURIComponent(vin)}`;
const res = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
// Alternatively: Authorization: Bearer YOUR_API_KEY
}
});

// Non-2xx HTTP handling
if (!res.ok) {
// For non-US VINs, expect 422 with coverage_us_only
const err = await res.json().catch(() => ({}));
throw new Error(`HTTP ${res.status}: ${err?.error?.code || "request_failed"} - ${err?.error?.message || res.statusText}`);
}

const body = await res.json();

// Envelope validation: status should be "success"
if (body.status !== "success" || !body.data) {
const code = body?.error?.code || "unexpected_response";
const msg = body?.error?.message || "No data in response";
throw new Error(`${code}: ${msg}`);
}

const {
vin: echoedVin,
vehicle_description,
match,
rollover,
front,
side,
overall,
nhtsa_vehicle_id
} = body.data;

return {
echoedVin,
description: vehicle_description,
match,
rollover, // may be null; treat carefully in UI
front,
side,
overall, // may be null
nhtsa_vehicle_id
};
}

// Example usage with the control VIN from docs
getRolloverRating("1HGCM82633A004352")
.then((info) => {
// Display the rollover rating, falling back when null
const label = info.rollover != null ? `${info.rollover}★` : "Not published";
console.log(`Vehicle: ${info.description} | Rollover: ${label} | Match: ${info.match}`);
})
.catch((e) => {
console.error("Safety ratings error:", e.message);
});

Error Handling and Coverage Rules

Expect and handle the following scenarios:

  • 422 coverage_us_only: Returned for valid non-US VINs. Communicate clearly in your UI or logs that NCAP ratings are US-only.
  • Null fields: Treat overall, front.overall, side.overall, and rollover as optional. Prefer displaying what exists rather than gating your UI on overall.
  • Match quality: Use data.match to annotate results (“exact” vs “partial”) and to inform downstream logic (e.g., conservative underwriting when match is partial).
  • Envelope errors: On status=error, read error.code and error.message. Do not parse textual HTTP messages directly; use the structured error fields.

Rate Limits, Quotas, and Retries

Vehicle API enforces reasonable per-plan rate limits and a monthly quota. Limits can vary by plan and are documented; if your app may burst, implement client-side throttling and exponential backoff. For current limits, check the Documentation.

Practical recommendations:

  • Cache successful safety rating responses by VIN for a long TTL (ratings change infrequently). Store the entire data object, not just rollover.
  • Short-term retry on transient network errors or 5xx. Do not retry 4xx like 422 coverage_us_only.
  • Log error.code and error.message for supportability.

Caching Strategy for Production

Even though NCAP data is matched at the make-model-year level, use the VIN you queried as the cache key for the safety-ratings endpoint. Consider this mapping:

  • Key: safety-ratings:vin:{VIN}
  • Value: Entire data object (vin, coverage, match, vehicle_description, front, side, rollover, overall, nhtsa_vehicle_id)
  • TTL: Weeks to months, depending on your staleness tolerance

If you already maintain a decoded VIN cache, you can also store the derived YMM tuple and link that to ratings, but caching by VIN is most straightforward and avoids cross-model inference errors.

UI and Policy Integration Tips

  • Display rollover next to front and side ratings in a compact badge. If any is null, show “Not published” while preserving layout.
  • Explain match: “partial” means the rating comes from the closest applicable NHTSA record for that model-year; add a subtle info tooltip using vehicle_description.
  • Filtering and scoring: When building search tools or pricing tiers, treat missing ratings conservatively. Do not synthesize an overall score when overall is null.
  • International VINs: For global apps, detect and branch early. When coverage_us_only is returned, show a clear message that US NCAP data is not available.

MCP Server Access

If you are building an AI agent or need tool-execution via the Model Context Protocol, the same datasets are available through the MCP server at MCP. Use it to wire rollover lookups into agent workflows without hand-writing REST glue code. For standard microservices and batch jobs, the REST endpoint covered here remains the simplest option.

Security and Authentication

Authenticate with one of:

  • X-API-Key: YOUR_API_KEY
  • Authorization: Bearer YOUR_API_KEY

Prefer server-side calls where possible. If you must call from a browser, proxy requests through your backend to keep your key confidential and to centralize rate limiting, retries, and caching. For account setup, start the 7-day free trial and obtain your key via Register.

Testing with the Control VIN

The control VIN 1HGCM82633A004352 is provided for testing and returns a US-market result with rollover present in the example. Do not use it for production workflows. Build your tests around the response envelope and the possibility of null subfields. Include test cases for:

  • Valid US VIN with full ratings.
  • Valid US VIN with some nulls (e.g., overall=null).
  • Valid non-US VIN returning 422 coverage_us_only.
  • Transient 5xx network issues (retry policy).

How This Differs from Other Vehicle Data

Vehicle API covers several datasets behind one interface, but treat each endpoint by its scope:

  • VIN decoding: Global coverage, best for US vehicles, returns normalized YMMT/E/T and plant data. Use it to derive YMM for model-level ratings.
  • Safety ratings (this endpoint): US NCAP only, matched by year, make, and model; includes rollover, frontal, and side star ratings, and sometimes an overall star score.
  • Recalls and complaints: US-market datasets; not part of this endpoint, but complementary for safety dashboards.
  • RDW Dutch plates: Never include a VIN and are not relevant to this VIN-based safety endpoint.

This is not a vehicle history report; it does not include title, ownership, or accident history.

Operational Notes That Save Time

  • Idempotency: GET is naturally idempotent; cache and re-use results for the same VIN.
  • Timestamps: Not included in the sample. If you must track freshness, store your own fetched_at timestamp when caching.
  • Localization: Star ratings are numeric—localize labels and tooltips, not the underlying values.
  • Sorting/Filtering: Treat null as lowest or “unknown” when building ranking features; never coerce null to zero stars.
  • Auditability: Persist nhtsa_vehicle_id with your decision record if you use ratings in underwriting or pricing rules.

Building a Minimal Rollover Widget

A compact component can be implemented with three states:

  • Loading: show a spinner and the echoed VIN.
  • Success: show vehicle_description, rollover stars (or “Not published”), and match status.
  • Error: if 422 coverage_us_only, display “US safety rating not available for this VIN.” For other errors, provide a generic retry prompt.

Bundle front and side ratings when you have room; otherwise, a single rollover badge is fast to grasp and easy to compare across vehicles.

End-to-End Flow Summary

  1. Accept a VIN from your user or upstream system.
  2. Check cache (keyed by VIN) for safety ratings. If present and fresh, return immediately.
  3. Call GET https://vehicles-api.com/api/v1/vin/safety-ratings with the X-API-Key header.
  4. On success, parse the envelope and read data.rollover. Store the full data object in your cache with a long TTL.
  5. On error, branch on error.code. If coverage_us_only, inform the user; otherwise, apply your retry or fallback logic.
  6. Render UI and annotate with data.match and vehicle_description.

Where to Go Next

Explore more details in the Documentation, or connect an agent via MCP. To begin integrating, start your 7-day free trial on the Register page. You can always learn more about the platform on vehicles-api.com and check updates on the homepage.

FAQ

Does the rollover rating apply to non-US vehicles?
No. NCAP crash-test ratings (frontal, side, rollover) are US-market only. A valid non-US VIN will return a 422 coverage_us_only error.

Is the rating VIN-specific or model-level?
It is matched by year, make, and model derived from the VIN. Use data.match and vehicle_description to communicate the exactness of the mapping.

Can overall be null even if rollover exists?
Yes. NHTSA may not publish an overall star rating for some configurations. Handle nulls gracefully and display available sub-ratings (front, side, rollover).

How should I cache results?
Cache by VIN for a long TTL, storing the full data object (including rollover). Ratings change infrequently.

What auth header should I use?
Use X-API-Key: YOUR_API_KEY. Authorization: Bearer YOUR_API_KEY also works if that fits your client libraries better.

Keep reading