# US NHTSA Safety Ratings — Vehicle Crash Test & Rollover Data (`devone-studio/nhtsa-safety-ratings-api`) Actor

NHTSA NCAP 5-star safety ratings: frontal crash, side crash, rollover risk, ESC/FCW/LDW features, complaint/recall counts. Insurance underwriting, used-car due diligence, auto safety. Public domain (17 U.S.C. § 105).

- **URL**: https://apify.com/devone-studio/nhtsa-safety-ratings-api.md
- **Developed by:** [Ti Gg](https://apify.com/devone-studio) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## NHTSA Safety Ratings API — Vehicle Crash Test and Rollover Data

NHTSA NCAP 5-star vehicle safety ratings: frontal crash, side crash,
rollover risk, ESC, FCW, LDW features, plus complaint/recall counts.
Built for **insurance underwriting**, **used-car due diligence**, and
**auto safety researchers**.

### Free trial

A free Apify account gives you about **5 USD of monthly credits**, more
than enough to inspect every model-year for a popular make before
paying.

### Use cases

1. **Insurance underwriting** — for a VIN (or make/model/year), return
   `overall_rating`, `front_crash_stars`, `side_crash_stars`, and
   `recalls_count` for risk tiering.
2. **Used-car due diligence** — given a make/model, fetch every model
   year's ratings and surface trends (improving vs. declining).
3. **Fleet procurement** — evaluate `has_esc_standard`,
   `has_fcw_optional_or_standard`, `has_ldw_optional_or_standard` for a
   list of vehicles being considered for purchase.

### Input

```json
{
  "model_year": 2020,
  "make": "TOYOTA",
  "model": "CAMRY",
  "max_results": 50
}
```

| Field | Type | Default | Description |
|---|---|---|---|
| `model_year` | integer | `0` | Restrict to one model year. `0` = all years. |
| `make` | string | `""` | Exact make (uppercase). Empty = all. |
| `model` | string | `""` | Partial model name match. |
| `min_overall_stars` | integer | `0` | Filter to ratings at or above this. |
| `is_top_safety_pick` | boolean | `false` | Only IIHS Top Safety Pick+. |
| `max_results` | integer | `50` | Cap on returned vehicles. |

### Output (real run)

```json
[
  {
    "vehicle_id": 14855,
    "model_year": 2020,
    "make": "TOYOTA",
    "model": "CAMRY",
    "vehicle_description": "2020 Toyota CAMRY 4 DR AWD",
    "overall_rating": "5",
    "overall_front_crash_rating": "5",
    "overall_side_crash_rating": "5",
    "front_crash_driverside_rating": "5",
    "front_crash_passengerside_rating": "5",
    "front_crash_stars": "5",
    "side_crash_stars": "5",
    "side_pole_stars": "5",
    "rollover_stars": "5",
    "rollover_rating": "5",
    "rollover_possibility": 0.087,
    "has_5_star_overall": true,
    "is_top_safety_pick": true,
    "has_esc_standard": true,
    "has_fcw_optional_or_standard": true,
    "has_ldw_optional_or_standard": true,
    "n_safety_features_standard": 3,
    "complaints_count": 213,
    "recalls_count": 7,
    "investigation_count": 0,
    "total_safety_investigations_count": 0,
    "nhtsa_url": "https://www.nhtsa.gov/vehicle/2020/TOYOTA/CAMRY/4%20DR%20AWD"
  }
]
```

| Field | Type | Description |
|---|---|---|
| `vehicle_id` | integer | NHTSA internal record id. |
| `model_year` / `make` / `model` | integer / string | Vehicle identity. |
| `vehicle_description` | string | Human-readable trim. |
| `overall_rating` | string | NCAP overall 1–5 star rating. |
| `front_crash_*` / `side_crash_*` / `rollover_*` | string / number | Per-test ratings and probabilities. |
| `front_crash_stars` / `side_crash_stars` / `side_pole_stars` / `rollover_stars` | string | Sub-rating stars. |
| `rollover_possibility` | number | Single-vehicle rollover probability. |
| `has_5_star_overall` | boolean | Convenience flag. |
| `is_top_safety_pick` | boolean | IIHS TSP+ flag. |
| `has_esc_standard` / `has_fcw_*` / `has_ldw_*` | boolean | Active safety feature flags. |
| `n_safety_features_standard` | integer | Count of standard active safety features. |
| `complaints_count` / `recalls_count` / `investigation_count` | integer | NHTSA complaint and recall counters. |
| `total_safety_investigations_count` | integer | Open investigations. |
| `nhtsa_url` | string | Canonical URL on nhtsa.gov. |

### Pricing (pay-per-event)

- **No subscription.** Free monthly credits apply first.
- **1 result = $0.001 USD** (about $1 per 1 000 results).
- Charged per item returned in the dataset; failed runs are not charged.

### Source, licence, limits

- Source: NHTSA NCAP ratings API at <https://www.nhtsa.gov/nhtsa-datasets>.
- Licence: US Government work, public domain (17 U.S.C. § 105).
- Update frequency: NHTSA adds new model-year ratings quarterly; this
  Actor reflects the upstream API at the moment of the run.
- Limits: NHTSA returns one row per (year, make, model, trim). Make
  spelling is exact — "TOYOTA" not "Toyota". Older model years (<2000)
  may have missing fields.

### FAQ

**Why is `overall_rating` a string, not a number?**
NHTSA stores `F` (not rated) alongside `1..5`. The Actor preserves the
upstream convention so `null`/missing stays distinguishable.

**What's the difference between TSP and TSP+?**
Both are IIHS Top Safety Pick designations; TSP+ requires
`has_5_star_overall` plus specific active safety features. NHTSA's API
mirrors this as `is_top_safety_pick`.

**Can I get the rollover band?**
Yes, `rollover_band` is returned when NHTSA has published it (most
2005+ model years).

**Why are some vehicles missing active-safety fields?**
Pre-2010 vehicles predate NHTSA's active-safety taxonomy and won't have
ESC/FCW/LDW fields.

**Why does `complaints_count` vary between runs?**
Complaints are added continuously; treat as a snapshot at run time.

**How do I find only 5-star overall?**
Set `is_top_safety_pick=true` or filter on `overall_rating == "5"`
client-side.

### Other Actors from DevOne-Studio

- **[ted-tenders-api](https://apify.com/devone-studio/ted-tenders-api)** — TED (Tenders Electronic Daily) EU public procurement search.
- **[pdf-to-text-api](https://apify.com/devone-studio/pdf-to-text-api)** — PDF to text + tables extraction via pdfplumber, no external calls.
- **[pubmed-articles-api](https://apify.com/devone-studio/pubmed-articles-api)** — NCBI PubMed biomedical literature with MeSH/DOI/year filters.
- **[federal-register-api](https://apify.com/devone-studio/federal-register-api)** — US federal agency rules, proposed rules, notices, presidential docs.
- **[sec-company-tickers](https://apify.com/devone-studio/sec-company-tickers)** — Resolve SEC CIK from ticker or company name (10,400+ issuers).
- **[sec-edgar-fulltext-search-api](https://apify.com/devone-studio/sec-edgar-fulltext-search-api)** — Full-text search across 35M+ SEC EDGAR filings and exhibits.
- **[sec-edgar-xbrl-frames-api](https://apify.com/devone-studio/sec-edgar-xbrl-frames-api)** — XBRL frames (Revenues, Assets, NetIncomeLoss) for ~6000 US issuers.
- **[cfpb-consumer-complaints-api](https://apify.com/devone-studio/cfpb-consumer-complaints-api)** — 18M+ US CFPB consumer complaints since 2011.
- **[openfda-udi-api](https://apify.com/devone-studio/openfda-udi-api)** — FDA Unique Device Identifier database by device/manufacturer.
- **[eia-state-electricity-api](https://apify.com/devone-studio/eia-state-electricity-api)** — US state-level electricity generation and consumption, 1990-2025.

### Changelog

- **2026-10-12** — SEO metadata (seoTitle, seoDescription); README rewritten with real output sample, FAQ, cross-links.
- **2026-10-07** — Pricing switched to Apify pay-per-event (`$0.001` per dataset item).
- **2026-09-30** — Initial public release on the Apify Store.

# Actor input Schema

## `resource` (type: `string`):

Which NHTSA endpoint to query.

## `model_year` (type: `integer`):

Vehicle model year.

## `make` (type: `string`):

Vehicle make (e.g. Toyota, Mazda, Honda).

## `model` (type: `string`):

Vehicle model (e.g. Camry, CX-3, Accord).

## `vehicle_id` (type: `integer`):

NHTSA VehicleId (required for safety_ratings_by_vehicle resource).

## `min_overall_stars` (type: `integer`):

Filter to vehicles with overall rating ≥ this. 0 to disable.

## `max_rollover_possibility` (type: `number`):

Filter to vehicles with rollover possibility ≤ this. 0 to disable.

## `five_star_only` (type: `boolean`):

Filter to vehicles with 5-star overall rating.

## `top_safety_pick_only` (type: `boolean`):

Filter to Top Safety Pick candidates (5-star + good crash scores + good rollover).

## `esc_standard_only` (type: `boolean`):

Filter to vehicles with Electronic Stability Control as Standard.

## `sort_by` (type: `string`):

Sort field and direction.

## `max_results` (type: `integer`):

Maximum records to return (1-200).

## `include_derived` (type: `boolean`):

Include derived/computed fields.

## `include_metadata` (type: `boolean`):

Write run summary to METADATA key-value store.

## Actor input object example

```json
{
  "resource": "safety_ratings_make_model_year",
  "model_year": 2020,
  "make": "Toyota",
  "model": "Camry",
  "vehicle_id": 0,
  "min_overall_stars": 0,
  "max_rollover_possibility": 0,
  "five_star_only": false,
  "top_safety_pick_only": false,
  "esc_standard_only": false,
  "sort_by": "default",
  "max_results": 25,
  "include_derived": true,
  "include_metadata": false
}
```

# Actor output Schema

## `results` (type: `string`):

All results of the run, as JSON from the default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("devone-studio/nhtsa-safety-ratings-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("devone-studio/nhtsa-safety-ratings-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call devone-studio/nhtsa-safety-ratings-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devone-studio/nhtsa-safety-ratings-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/FGQOYGDpb036ok9u4/builds/0Ip82wLeCtjCI67gV/openapi.json
