# NHTSA Vehicle Safety: VIN, Recalls, Complaints, Ratings (`tec5uport/nhtsa-vehicle-safety`) Actor

Public U.S. NHTSA vehicle safety data from a VIN or year/make/model: decoded specs, model-level recalls (not VIN-specific), owner complaints, and NCAP crash ratings as compact JSON plus markdown. No API key. Not affiliated with NHTSA. Built for AI agents.

- **URL**: https://apify.com/tec5uport/nhtsa-vehicle-safety.md
- **Developed by:** [Tec5uport Data Tools](https://apify.com/tec5uport) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 vehicle safety reports

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 Vehicle Safety — VIN decoder, recalls, complaints & crash ratings

Look up public U.S. vehicle safety data from NHTSA by VIN or year/make/model. Returns decoded specs, recall campaigns for that model year/make/model, recent owner complaints, and NCAP crash ratings as compact JSON plus a markdown summary. Recall results are not VIN-specific; check https://www.nhtsa.gov/recalls to see whether a recall is still open on a particular vehicle. No API key, no login. Not affiliated with NHTSA.

**Store / MCP search keywords:** NHTSA, VIN decoder, VIN lookup, vehicle recall, car recall, safety rating, crash test, NCAP, owner complaints, ODI, vPIC, make model year, Honda Accord recall, vehicle safety API, official government data.

### What it does

This Actor wraps public NHTSA APIs:

- VIN decode: `https://vpic.nhtsa.dot.gov/api`
- Recalls, complaints, crash ratings: `https://api.nhtsa.gov`

NHTSA publishes these datasets for public use ([NHTSA Datasets and APIs](https://www.nhtsa.gov/nhtsa-datasets-and-apis)). The Actor does not scrape websites, does not log in, and does not collect extra personal data beyond what NHTSA already publishes in the Office of Defects Investigation complaint feed.

### Agent / MCP notes

Apify's hosted MCP server at `https://mcp.apify.com` lets agents `search-actors`, `fetch-actor-details` (input schema, README, pricing), `call-actor`, then `get-dataset-items` ([docs](https://docs.apify.com/platform/integrations/mcp)). This Actor is shaped for that path:

- Limited permissions only (required for MCP execution and agentic payments).
- Fast official JSON APIs, so a single VIN lookup finishes inside the MCP `call-actor` wait window (default 30s).
- Tight input schema with defaults: one example VIN, `maxItems=15`, `compact=true`, `outputFormat=both`.
- Each dataset item includes a `markdown` briefing plus structured fields.
- A combined briefing is also stored as `OUTPUT.md` in the default key-value store.
- Pay-per-event charge is **one `vehicle-report` per vehicle**, not per complaint row, so a typical agent call has a predictable cost.

Suggested PPE when publishing (set in Apify Console, do not enable “pay per event + usage”):

| Event | Suggested price | When it fires |
| --- | --- | --- |
| `vehicle-report` | **$0.01** | Once per vehicle report with `status: "ok"` |

That price fits agent lookups (~1¢ per call) and still covers compute. Direct x402 / Skyfire agentic payments only work for pay-per-event Actors that use limited permissions, no Standby mode, and no platform-usage add-on; the developer also needs KYC ([Monetize Actors](https://docs.apify.com/actors/monetize), [Agentic payments](https://docs.apify.com/agents/payments)).

### Input

| Field | Default | Notes |
| --- | --- | --- |
| `mode` | `vinLookup` | Or `vehicleSearch` |
| `vins` | example VIN | 17-character VINs; max 10 per run |
| `modelYear`, `make`, `model` | — | Required for `vehicleSearch` |
| `includeRecalls` / `includeComplaints` / `includeRatings` | `true` | Turn off to shrink the payload. Recalls are campaigns for the model year/make/model, not VIN-specific. |
| `maxItems` | `15` | Caps recalls and complaints per vehicle (newest first) |
| `compact` | `true` | When on, truncates recall/complaint text to ~280 characters and omits crash-test image URLs; when off, text is capped at ~2000 characters and image URLs are kept |
| `outputFormat` | `both` | `json`, `markdown`, or `both` |

Example (VIN lookup):

```json
{
  "mode": "vinLookup",
  "vins": ["1HGCM82633A004352"],
  "maxItems": 15,
  "compact": true,
  "outputFormat": "both"
}
```

### Output

One dataset item per vehicle, including `vehicle`, `recallCount`, `complaintCount`, `recalls`, `complaints`, `ratings`, `markdown`, and `fetchedAt`.

Each item has `status` (`ok`, `not_found`, `invalid_input`, `error`). You are charged one `vehicle-report` only for items with `status: "ok"`. Dates are ISO `YYYY-MM-DD`; recalls and complaints are newest first. Max 10 VINs per run.

### Local run (no publish)

```bash
cd nhtsa-vehicle-safety
npm install
APIFY_LOCAL_STORAGE_DIR=./storage node src/main.js
```

Default local input is `storage/key_value_stores/default/INPUT.json`.

### Legal

Public U.S. government safety data. Do not present NHTSA results as a paid title-history product; this Actor does not provide title, accident, or ownership history. Complaint narratives are published by NHTSA as public ODI records; this Actor only relays a capped, truncated subset.

# Actor input Schema

## `mode` (type: `string`):

vinLookup decodes each VIN first. vehicleSearch skips decoding and uses modelYear, make, and model directly.

## `vins` (type: `array`):

17-character VINs (letters I, O, Q are never used in VINs). Max 10. Used when mode=vinLookup.

## `modelYear` (type: `integer`):

Used when mode=vehicleSearch, e.g. 2019.

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

Used when mode=vehicleSearch, e.g. Honda.

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

Used when mode=vehicleSearch, e.g. Accord. Must match NHTSA's model name.

## `includeRecalls` (type: `boolean`):

Recall campaigns for the model year + make + model (not VIN-specific).

## `includeComplaints` (type: `boolean`):

Newest NHTSA ODI owner complaints, capped by maxItems.

## `includeRatings` (type: `boolean`):

Star ratings for up to 5 body-style variants.

## `maxItems` (type: `integer`):

Caps each list, newest first. The full totals are still reported.

## `compact` (type: `boolean`):

Truncate long recall and complaint text to ~280 characters and omit crash-test image URLs.

## `outputFormat` (type: `string`):

json writes dataset items only. markdown/both also write OUTPUT.md to the key-value store.

## Actor input object example

```json
{
  "mode": "vinLookup",
  "vins": [
    "1HGCM82633A004352"
  ],
  "includeRecalls": true,
  "includeComplaints": true,
  "includeRatings": true,
  "maxItems": 15,
  "compact": true,
  "outputFormat": "both"
}
```

# Actor output Schema

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

Dataset items (JSON) for each vehicle.

## `briefing` (type: `string`):

OUTPUT.md summary (when markdown output is enabled).

# 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 = {
    "mode": "vinLookup",
    "vins": [
        "1HGCM82633A004352"
    ],
    "maxItems": 15,
    "outputFormat": "both"
};

// Run the Actor and wait for it to finish
const run = await client.actor("tec5uport/nhtsa-vehicle-safety").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 = {
    "mode": "vinLookup",
    "vins": ["1HGCM82633A004352"],
    "maxItems": 15,
    "outputFormat": "both",
}

# Run the Actor and wait for it to finish
run = client.actor("tec5uport/nhtsa-vehicle-safety").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 '{
  "mode": "vinLookup",
  "vins": [
    "1HGCM82633A004352"
  ],
  "maxItems": 15,
  "outputFormat": "both"
}' |
apify call tec5uport/nhtsa-vehicle-safety --silent --output-dataset

```

## MCP server setup

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

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/eaxwJY4VahdzayAFP/builds/YlAfINN5hD8HlWwKF/openapi.json
