Side Crash Rating Data API

By Vehicle API
Side Crash Rating Data API

You need reliable side crash test ratings you can drop directly into pricing, listing, and underwriting workflows. By the end of this guide you’ll query the Vehicle API Side Crash Rating endpoint, parse the NHTSA NCAP fields, handle nulls and coverage limits, and ship a robust integration that fails safely when data is unavailable.

What this endpoint returns and when to use it

The Side Crash Rating Data API surfaces US NHTSA NCAP crash-test stars matched by make, model, and year for a VIN. A single request can give you the frontal, side, and rollover ratings; you’ll focus on side ratings in your UI while still receiving the other categories for context and completeness.

Illustration: Side Crash Rating Data API

Key traits:

  • Endpoint: GET https://vehicles-api.com/api/v1/vin/safety-ratings
  • Auth: X-API-Key: YOUR_API_KEY (Authorization: Bearer YOUR_API_KEY also works)
  • Coverage: US-market safety ratings only. A valid non-US VIN returns 422 with code coverage_us_only for this endpoint.
  • Matching: Ratings are matched by make + model + year derived from the VIN; the match field will indicate partial when an exact trim match is not available.
  • Nulls: overall may be null if NHTSA did not publish an overall score. This applies to top-level overall and category-level overall fields.

Outside of safety, Vehicle API can decode VINs worldwide, and supports Dutch plates via RDW open data. Dutch plate lookups never include a VIN, and safety ratings, recalls, and complaints are US-only. This is not a vehicle history report (no title, accident, or ownership history). Learn more at vehicles-api.com.

Quick start: call the Side Crash Rating endpoint

Base URL: https://vehicles-api.com/api/v1. Use the official example VIN (a 2003 Honda Accord) below to verify your integration. Replace YOUR_API_KEY with your key.

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

If you prefer to explore in a browser or IDE later, the full API reference is in the Documentation.

Official JSON response and the fields you’ll actually use

Every response is wrapped in an envelope with status, source, and data. On error, the envelope contains status: "error" with error.code and error.message. Below is the official sample:

{
    "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 guide for building your side crash rating UI:

  • status: "success" indicates a successful query. On failure, expect "error".
  • source: "nhtsa" confirms the US NCAP source.
  • data.vin: Echo of the VIN you queried.
  • data.coverage: "us" when the vehicle is in US coverage. If a non-US VIN is supplied, you’ll receive a coverage_us_only error instead of a success envelope.
  • data.match: "partial" means the rating is matched at the make + model + year level, not a trim-specific result.
  • data.vehicle_description: Free-text descriptor from NHTSA to display alongside ratings when helpful.
  • data.side: The side-impact rating object you’ll most likely render. Its keys:
    • side.overall: May be null if NHTSA has not published an overall side score.
    • side.driver: Star rating (integer) for the driver’s side-impact test.
    • side.passenger: Star rating (integer) for the front passenger’s side-impact test.
  • data.front, data.rollover: Included for completeness; you can show or ignore them depending on your product.
  • data.overall: A single combined overall star rating when NHTSA publishes it; null otherwise.
  • data.nhtsa_vehicle_id: NHTSA’s internal identifier if you need to reconcile with other NHTSA datasets.

Rendering tip: show side.driver and side.passenger even when side.overall is null. Clearly label missing values as “Not available” rather than hiding the section.

JavaScript example: fetch and normalize the side ratings

The snippet below calls the same endpoint, checks the envelope, and extracts the side ratings. It also demonstrates null-safe rendering logic developers commonly need.

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

// Parse the response envelope
const body = await resp.json();

if (!resp.ok) {
// Envelope on error: { status: "error", error: { code, message } }
const code = body && body.error ? body.error.code : `http_${resp.status}`;
const message = body && body.error ? body.error.message : "Request failed";
throw new Error(`${code}: ${message}`);
}

if (body.status !== "success" || !body.data) {
throw new Error("Unexpected response envelope");
}

const d = body.data;

// Side ratings with null-safe values
return {
vin: d.vin,
coverage: d.coverage,
match: d.match,
vehicleDescription: d.vehicle_description,
side: {
overall: d.side && d.side.overall != null ? d.side.overall : null,
driver: d.side && d.side.driver != null ? d.side.driver : null,
passenger: d.side && d.side.passenger != null ? d.side.passenger : null
},
// Useful metadata for UI or downstream rules
source: body.source,
nhtsaVehicleId: d.nhtsa_vehicle_id
};
}

// Example usage:
getSideCrashRatings("1HGCM82633A004352")
.then(r => {
console.log("Side crash ratings:", r.side);
// Render stars or badges as needed; treat null as "Not available".
})
.catch(err => {
console.error("Failed to fetch safety ratings:", err.message);
});

Authentication and request shape

All requests are made to https://vehicles-api.com/api/v1 with your key in the X-API-Key header. The same key can be used with Authorization: Bearer YOUR_API_KEY if you prefer. A request to /vin/safety-ratings requires a vin query parameter containing the 17-character VIN.

If you’re building an agent or orchestrating tools via MCP, the same capability is exposed via the Vehicle API MCP server at MCP. For traditional REST clients, keep using the HTTPS endpoint documented here.

Matching logic, partial results, and null handling

NCAP ratings are provided by NHTSA for US-market configurations and are matched at the make + model + year level. When an exact trim is not available, match will be partial. Do not block rendering on partial; present it with a footnote such as “Matched at model-year level.”

Nulls are expected and not an error condition. For example, overall can be null when NHTSA has not published a combined rating. Category-level overall values (e.g., side.overall) may also be null. Keep per-occupant ratings (side.driver and side.passenger) visible even when the overall rating is not available.

Error handling, rate limits, and quota

Vehicle API returns a structured envelope on error with status: "error", error.code, and error.message. Common conditions you should anticipate:

  • 422 coverage_us_only when a valid non-US VIN is supplied to this US-market endpoint. Your fallback might be to omit safety ratings while still showing decoded VIN details elsewhere in your app.
  • 400-level validation errors for malformed VINs.
  • 429 rate limiting if you exceed your plan’s per-minute/per-day budget.
  • 5xx upstream or transient network issues; implement standard retries with jitter.

Rate limits and monthly quota vary by plan. The Starter plan is $19/month, and every plan includes a 7-day free trial. For current limits and usage introspection, refer to the Documentation or your dashboard at vehicles-api.com.

Caching and data freshness

NCAP ratings for a given make + model + year are relatively stable, but they can be updated by NHTSA. Practical approaches:

  • Cache by VIN for fast retrieval, since you’ll call this endpoint after you decode or obtain a VIN.
  • Optionally cache by a normalized safety key (make-model-year) to fan out a single result across many identical VINs in your fleet or marketplace inventory.
  • Honor null fields and refresh on a cadence appropriate to your SLA. A 30–90 day TTL is a common starting point; tune to your product’s tolerance for staleness.

When you also use VIN decoding, cache decoded VIN fundamentals from the decode endpoint, then reuse the normalized year/make/model when reasoning about safety coverage and partial matches.

UI and business rules that save time

  • Display side.driver and side.passenger as primary fields, with clear labels such as “Side impact (driver)” and “Side impact (passenger).”
  • If side.overall is null, omit any combined star graphic for side and instead show occupant-specific stars.
  • When match is partial, add a small note. Do not downgrade the rating numerically; the stars are still authoritative for the model-year.
  • If coverage is not "us" or you receive coverage_us_only, hide the safety section and show a short message: “US safety ratings not available for this VIN.”

Integration checklist

  • Send the vin parameter and include X-API-Key.
  • Expect the envelope with status, source, and data. Fail gracefully on status: "error".
  • Handle nulls for overall fields; never coerce null to 0.
  • Log and surface error.code to improve support workflows (e.g., coverage_us_only vs. validation errors).
  • Cache successful responses and implement idempotent retries on 5xx.

Where this fits alongside other Vehicle API data

The Side Crash Rating endpoint is part of Vehicle API’s safety data for US-market vehicles. It complements:

  • VIN decoding (year, make, model, trim, engine, transmission, assembly plant) for worldwide VINs.
  • US safety data: recall campaigns, owner complaints, and NCAP crash ratings.
  • Dutch plate data via RDW (no VIN returned for Dutch plates).

If you’re building an agent that needs to reason across these capabilities inside a tool-calling runtime, the MCP server is available at MCP.

FAQ

Does this endpoint return ratings for every VIN globally?
No. NCAP crash-test ratings are US-market only. A valid non-US VIN yields a 422 coverage_us_only error for this endpoint. VIN decoding itself works for worldwide VINs, but safety data is limited to the US market.

What should I do when overall is null?
Render the per-occupant side.driver and side.passenger stars. Do not attempt to synthesize an overall score.

Why is match equal to partial?
NHTSA data is matched by make + model + year. If a trim-level exact match is not available, the API returns partial to signal that the rating is at the model-year level. You should still display the ratings with an explanatory note.

How do I handle rate limits and my monthly quota?
Implement retries with backoff for 429 and 5xx, and cache successful responses by VIN or model-year. Specific limits depend on your plan; check your dashboard or the Documentation.

Is this a vehicle history report?
No. Vehicle API provides decoding, US safety data (recalls, complaints, crash ratings), and Dutch plate data. It does not include title, accident, or ownership history.

Start integrating Side Crash Ratings with a 7-day free trial. The Starter plan is $19/month, and you can be live in minutes: Register. For more product details, visit vehicles-api.com and the full Documentation.

Keep reading