Data source: NHTSA (US Department of Transportation)
Overview
NHTSA Vehicle Safety wraps NHTSA (US Department of Transportation), handling authentication, pagination, and rate limits for you. This tutorial covers all 6 tools with working code examples you can copy and run.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-nhtsa": {
"url": "https://context.gnist.ai/mcp/nhtsa/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (6)
decode_vin
Decode a VIN to get vehicle specifications — make, model, year, engine, drivetrain, and more. Returns decoded vehicle details from the NHTSA Vehicle Product Information Catalog (vPIC). Supports all standard 17-character VINs for vehicles sold in the US and Canada.
| Parameter | Type | Required | Description |
|---|---|---|---|
vin | string | required | 17-character Vehicle Identification Number (e.g. "1HGCM82633A004352"). |
curl -X POST "https://context.gnist.ai/mcp/nhtsa/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "decode_vin", "arguments": {"vin": "1HGCM82633A004352"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nhtsa/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'vin': '1HGCM82633A004352'}, 'name': 'decode_vin'}},
)
print(resp.json())
get_recalls
Get safety recalls for a specific vehicle make, model, and year. Returns recall campaigns with component affected, summary, consequence, remedy, and NHTSA campaign numbers. Covers all federally mandated recalls.
| Parameter | Type | Required | Description |
|---|---|---|---|
make | string | required | Vehicle manufacturer (e.g. "Honda", "Toyota", "Ford"). |
model | string | required | Vehicle model name (e.g. "Accord", "Camry", "F-150"). |
model_year | string | required | 4-digit model year (e.g. "2020"). |
curl -X POST "https://context.gnist.ai/mcp/nhtsa/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_recalls", "arguments": {"make": "Honda", "model": "Accord", "model_year": "2020"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nhtsa/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'make': 'Honda',
'model': 'Accord',
'model_year': '2020'},
'name': 'get_recalls'}},
)
print(resp.json())
get_complaints
Get consumer complaints filed with NHTSA for a specific vehicle. Returns complaints with crash/fire indicators, injury/death counts, affected components, incident summaries, and dates. Useful for identifying common issues with a vehicle.
| Parameter | Type | Required | Description |
|---|---|---|---|
make | string | required | Vehicle manufacturer (e.g. "Honda", "Toyota", "Ford"). |
model | string | required | Vehicle model name (e.g. "Accord", "Camry", "F-150"). |
model_year | string | required | 4-digit model year (e.g. "2020"). |
limit | integer | optional | Max complaints to return (1-100). Default 20. (default: 20) |
curl -X POST "https://context.gnist.ai/mcp/nhtsa/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_complaints", "arguments": {"make": "Honda", "model": "Accord", "model_year": "2020"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nhtsa/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'make': 'Honda',
'model': 'Accord',
'model_year': '2020'},
'name': 'get_complaints'}},
)
print(resp.json())
get_safety_ratings
Get NHTSA crash test safety ratings (NCAP 5-star system). Returns overall, frontal crash, side crash, and rollover ratings. Also includes complaint, recall, and investigation counts per vehicle variant.
| Parameter | Type | Required | Description |
|---|---|---|---|
make | string | required | Vehicle manufacturer (e.g. "Honda", "Toyota", "Ford"). |
model | string | required | Vehicle model name (e.g. "Accord", "Camry", "F-150"). |
model_year | string | required | 4-digit model year (e.g. "2020"). |
curl -X POST "https://context.gnist.ai/mcp/nhtsa/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_safety_ratings", "arguments": {"make": "Honda", "model": "Accord", "model_year": "2020"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nhtsa/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'make': 'Honda',
'model': 'Accord',
'model_year': '2020'},
'name': 'get_safety_ratings'}},
)
print(resp.json())
search_makes
List all vehicle makes with safety rating data for a given model year. Useful to discover which manufacturers and brands are available before querying specific models. Returns make names and IDs.
| Parameter | Type | Required | Description |
|---|---|---|---|
model_year | string | required | 4-digit model year to list makes for (e.g. "2024"). |
curl -X POST "https://context.gnist.ai/mcp/nhtsa/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_makes", "arguments": {"model_year": "2024"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nhtsa/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'model_year': '2024'}, 'name': 'search_makes'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/nhtsa/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/nhtsa/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
Common Patterns
Use
search_makes to find items, then get_recalls to get full details. This two-step pattern is common for exploring data before drilling down.Several tools support
limit, offset, or page parameters. Start with small limits during development, then increase for production queries.FAQ
What data does NHTSA Vehicle Safety provide?
NHTSA vehicle safety data — VIN decoding, safety recalls, consumer complaints, and NCAP crash test ratings. It exposes 6 tools: decode_vin, get_recalls, get_complaints, get_safety_ratings, search_makes, report_feedback.
What do I need to get started?
A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.
What format does the NHTSA Vehicle Safety API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.