
A recall lookup can tell your application which campaigns NHTSA associates with a US-market make, model and year, but it cannot establish whether a particular vehicle still needs a repair. By the end of this guide, you can call the Vehicle API recalls endpoint from a server, read the campaign summaries, and handle empty results and API errors safely.
Look up recalls by make, model and year
The GET /recalls endpoint accepts make, model and year. Use the US-market model name as NHTSA lists it. A VIN is not required for this request.
The following documentation example looks up a 2002 BMW 320i. It is a reference request, not a statement about the reader’s vehicle:
curl "https://vehicles-api.com/api/v1/recalls?make=BMW&model=320i&year=2002" -H "X-API-Key: YOUR_API_KEY"
Replace YOUR_API_KEY with your server-side key when running the request. The API also accepts Authorization Bearer authentication, but the examples in this guide use X-API-Key. Do not embed a key in browser code; have your application server make the request instead.
The endpoint returns campaigns for the model and year, not only campaigns involving Takata inflators. Inspect each campaign’s summary and related details to understand its subject. An empty campaign list returns HTTP 200; it is not an API error.
Read the response
The official documentation example returns this envelope:
{
"status": "success",
"source": "nhtsa",
"data": {
"year": 2002,
"make": "BMW",
"model": "320i",
"coverage": "us",
"count": 1,
"recalls": [
{
"campaign": "20V018000",
"component": "AIR BAGS:FRONTAL:PASSENGER SIDE:INFLATOR MODULE",
"received": "2020-01-15",
"summary": "BMW is recalling certain 2000-2006 3 Series vehicles equipped with Takata PSAN passenger frontal air bag inflators.",
"consequence": "An inflator explosion may result in sharp metal fragments striking the driver or other occupants.",
"remedy": "Dealers will replace the passenger front air bag, free of charge."
}
]
}
}
The fields most useful to an application are:
status,sourceanddata: the success envelope, its source and the returned lookup data. In this example the source isnhtsa.data.make,data.modelanddata.year: the model-year context for the result. Keep that context with any displayed campaign.data.coverage,data.countanddata.recalls: the coverage label, campaign count and campaign list. Iterate the list rather than assuming that a result contains a Takata campaign.recalls[].campaignandrecalls[].component: the campaign identifier and affected component. These help a user distinguish campaigns returned for the same model year.recalls[].summary,recalls[].consequenceandrecalls[].remedy: the description, potential consequence and stated remedy. Preserve the wording and context when presenting these to a user.recalls[].received: a date in the example, not a timestamp with a stated timezone. Display it as a date rather than inferring a time of day.
The example describes certain vehicles equipped with the specified inflators. A model-year match alone does not confirm that a particular vehicle is affected, has an open recall or has had the remedy performed. Live counts and campaigns can change as NHTSA publishes updated data, so treat the response above as an example rather than a fixed result.
Call the endpoint from Python
Install the requests package in your server environment and set VEHICLE_API_KEY there. This example uses params= for the GET query, sets a timeout, checks the error envelope and reads the campaign summary:
import os
import sys
import requests
key = os.environ.get("VEHICLE_API_KEY")
if not key:
sys.exit("Set VEHICLE_API_KEY in the server environment.")
try:
response = requests.get(
"https://vehicles-api.com/api/v1/recalls",
headers={"X-API-Key": key},
params={"make": "BMW", "model": "320i", "year": 2002},
timeout=7,
)
except requests.RequestException as exc:
sys.exit(f"Recall request failed: {exc}")
try:
payload = response.json()
except requests.exceptions.JSONDecodeError:
sys.exit(f"Non-JSON response; HTTP status: {response.status_code}")
if not isinstance(payload, dict):
sys.exit("Unexpected response format.")
if payload.get("status") == "error":
error = payload.get("error") or {}
sys.exit(
f"API error {error.get('code')}: {error.get('message')}"
)
if not response.ok:
sys.exit(f"Recall request failed; HTTP status: {response.status_code}")
if payload.get("status") != "success":
sys.exit("Unexpected API status.")
data = payload.get("data") or {}
recalls = data.get("recalls") or []
if not recalls:
print("No campaigns returned for this lookup.")
else:
for recall in recalls:
print("Campaign:", recall.get("campaign") or "Not available")
print("Summary:", recall.get("summary") or "Not available")
print("Remedy:", recall.get("remedy") or "Not available")
The timeout is a client setting, not a guarantee about API response time. Choose a timeout appropriate to your application and handle a timeout as a failed lookup, not as an empty recall list.
The sample checks status before using data. An error response contains error.code and error.message; record the code for diagnosis without exposing your API key. Consult the Documentation for current error and limit details rather than assuming specific codes or thresholds.
Call the endpoint from PHP
The same lookup can run in PHP with cURL. Store the key in the server environment, and send only the result your application needs to the browser.
<?php
$key = getenv("VEHICLE_API_KEY");
if ($key === false || $key === "") {
exit("Set VEHICLE_API_KEY in the server environment.\n");
}
$params = [
"make" => "BMW",
"model" => "320i",
"year" => 2002,
];
$url = "https://vehicles-api.com/api/v1/recalls?" . http_build_query($params);
$handle = curl_init($url);
curl_setopt_array($handle, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-API-Key: " . $key],
CURLOPT_TIMEOUT => 7,
]);
$body = curl_exec($handle);
if ($body === false) {
$message = curl_error($handle);
curl_close($handle);
exit("Recall request failed: " . $message . "\n");
}
$httpStatus = curl_getinfo($handle, CURLINFO_HTTP_CODE);
curl_close($handle);
$payload = json_decode($body, true);
if (!is_array($payload)) {
exit("Non-JSON or unexpected response; HTTP status: " . $httpStatus . "\n");
}
if (($payload["status"] ?? null) === "error") {
$error = $payload["error"] ?? [];
$code = $error["code"] ?? "Not available";
$message = $error["message"] ?? "Not available";
exit("API error " . $code . ": " . $message . "\n");
}
if ($httpStatus < 200 || $httpStatus >= 300) {
exit("Recall request failed; HTTP status: " . $httpStatus . "\n");
}
if (($payload["status"] ?? null) !== "success") {
exit("Unexpected API status.\n");
}
$recalls = $payload["data"]["recalls"] ?? [];
if (!$recalls) {
echo "No campaigns returned for this lookup.\n";
} else {
foreach ($recalls as $recall) {
echo "Campaign: " . ($recall["campaign"] ?? "Not available") . "\n";
echo "Summary: " . ($recall["summary"] ?? "Not available") . "\n";
echo "Remedy: " . ($recall["remedy"] ?? "Not available") . "\n";
}
}
Both examples use the documentation’s model-year inputs. For a production request, supply the make, model and year for the vehicle being checked, using NHTSA’s US-market naming. If you display a returned summary in a web page, escape it for the output context instead of inserting it as trusted HTML.
Build a reliable recall workflow
Keep three outcomes separate in your application: a successful response with campaigns, a successful response with an empty list, and a failed lookup. Only the second means that the lookup returned no campaigns. A network failure, rate-limit response or exhausted monthly quota must not be displayed as “no recalls.”
Plan for both rate limits and a monthly quota. Check your plan and the current documentation for the applicable limits; track usage on your server and give users a clear message when a lookup cannot be completed. Avoid uncontrolled retries, which can consume additional requests without resolving the underlying problem.
Cache decoded VIN information to avoid decoding the same VIN repeatedly, but handle recall data as a separate, refreshable result. A recall cache can be keyed by the make, model and year used in the request; retain the lookup context and retrieval time so users and support staff can see what was checked and when. Choose a refresh policy appropriate to the consequences of stale safety information.
VIN decoding works worldwide and is fullest for US-market vehicles. If a workflow starts with a VIN, use the decoded make, model and year carefully: the recall lookup is still matched by those model-year values, not by the individual VIN. The control VIN 1HGCM82633A004352 decodes to a 2003 Honda Accord; it is not the reader’s car and should not be substituted for their vehicle.
Recalls, owner complaints and NCAP ratings cover US-market vehicles only, matched by make, model and year. Dutch plate data comes from RDW and never includes a VIN. Vehicle API data is not a vehicle history report: it does not provide title, accident or ownership history.
Some returned fields can be null. Render missing descriptions as unavailable rather than inventing a value, and do not treat a missing remedy or summary as proof that no remedy or campaign exists. The examples handle missing text fields without changing the meaning of an empty campaign list.
For an agent-based integration, Vehicle API also offers an MCP server. Apply the same coverage and model-year limitations when an agent explains recall results to a user.
FAQ
Do I need a VIN to check for Takata campaigns?
No. This endpoint takes make, model and year. A VIN can help establish those details through decoding, but the recall result remains a model-year match rather than an individual vehicle repair-status check.
Does an empty list mean the vehicle has no open recall?
It means the lookup returned no campaigns for the submitted make, model and year. Check that those inputs match NHTSA’s US-market naming, and do not interpret a failed request as an empty result.
Can I use this endpoint for a vehicle outside the US market?
Recall coverage is US-market only. Worldwide VIN decoding does not extend recall coverage to vehicles outside that market.
How should I identify a Takata result?
Read recalls[].summary alongside the component, consequence and remedy. A returned list can contain other campaigns, and a campaign description may apply only to certain vehicles within the model-year range.
Ready to integrate? Register to start a 7-day free trial. Starter is $19 per month, and every plan includes the trial.