VIN Recall Check API for Developers

By Vehicle API
VIN Recall Check API for Developers

You need to programmatically check open safety recalls for a vehicle by VIN and ship a reliable server-side workflow that won’t leak keys, mishandle errors, or cache stale data. By the end of this guide, you’ll call the Vehicle API VIN Recall Check endpoint from your backend, parse the response envelope, handle coverage and error conditions, and return only the fields your app needs.

What the VIN Recall Check returns and when to use it

The VIN Recall Check endpoint provides official NHTSA safety recall campaigns for US-market vehicles. It is matched by make, model, and year derived from the VIN. It reports the campaigns applicable to that vehicle configuration, not whether a specific unit has already been repaired.

Illustration: VIN Recall Check API for Developers

Scope and coverage details you should account for:

  • US-market only for recalls. A valid non-US VIN returns HTTP 422 with error.code coverage_us_only.
  • Matching is by make + model + year; NHTSA does not require a per-VIN repair status flag.
  • VIN decoding (year, make, model, trim, etc.) is available separately and works worldwide, with fullest data for US-market vehicles.
  • Dutch plate lookups are from RDW open data and never include a VIN.
  • This is not a vehicle history report; there is no title, accident, or ownership history.

Base URL: https://vehicles-api.com/api/v1. Authentication is via the X-API-Key: YOUR_API_KEY header (Authorization: Bearer YOUR_API_KEY also works). Use this endpoint server-side only; never expose your API key in browser code.

Endpoint and official examples

Endpoint: GET https://vehicles-api.com/api/v1/vin/recalls

Query parameter: vin (string)

cURL example

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

Official JSON example

{
    "status": "success",
    "source": "nhtsa",
    "data": {
        "vin": "1HGCM82633A004352",
        "year": 2003,
        "make": "HONDA",
        "model": "Accord",
        "coverage": "us",
        "count": 24,
        "recalls": [
            {
                "campaign": "19V182000",
                "component": "AIR BAGS:FRONTAL:DRIVER SIDE:INFLATOR MODULE",
                "received": "2019-03-06",
                "summary": "Replacement driver air bag inflator may explode.",
                "consequence": "Sharp metal fragments may strike occupants.",
                "remedy": "Dealers will replace the inflator, free of charge."
            }
        ]
    }
}

These values come from the documentation fixture for the control VIN 1HGCM82633A004352 (a 2003 HONDA Accord). In production, counts and campaigns change as NHTSA publishes new data.

Response envelope and the fields you’ll use

Every response is wrapped in an envelope:

  • status: "success" or "error".
  • source: "nhtsa" for this endpoint.
  • data: present when status is "success".
  • error: present when status is "error", with error.code and error.message.

Important fields inside data for this endpoint:

  • vin: The VIN you requested. Use it to correlate with your internal record.
  • year, make, model: Matched from VIN decoding for recall coverage. Useful for UI display and logging.
  • coverage: "us" when US-market coverage applies.
  • count: Integer number of campaigns Vehicle API returns for the matched vehicle configuration.
  • recalls: Array of recall objects. For each recall:
    • campaign: NHTSA campaign ID (string). Use as the stable key for de-duplication and linking.
    • component: Affected system or component.
    • received: NHTSA receipt date in YYYY-MM-DD.
    • summary, consequence, remedy: Human-readable fields to show in dealer, fleet, or consumer UIs.

Null and optional fields: Campaign objects are populated from official NHTSA records. Some recalls may omit certain narrative fields; code defensively for null or empty strings in any of summary, consequence, or remedy.

Server-side integration: Python and PHP

Call the endpoint from your backend with a short timeout and explicit error handling. Do not ship the key in browser code.

Python (requests)

import requests

BASE_URL = "https://vehicles-api.com/api/v1/vin/recalls"
API_KEY = "YOUR_API_KEY" # Do not hardcode in source; load from env or secret manager.

def fetch_recalls(vin: str, timeout_s: float = 6.0) -> dict:
headers = {
"X-API-Key": API_KEY,
# "Authorization": f"Bearer {API_KEY}", # Alternative auth if preferred.
}
params = {"vin": vin}

resp = requests.get(BASE_URL, headers=headers, params=params, timeout=timeout_s)
# Handle non-2xx transport-level issues early.
try:
payload = resp.json()
except ValueError:
resp.raise_for_status()
raise

# The API always responds with an envelope: status, source, and data or error.
if payload.get("status") != "success":
err = payload.get("error", {})
code = err.get("code", "unknown_error")
message = err.get("message", "Unknown error")
# Example: 422 with error.code == "coverage_us_only" for non-US VINs on this endpoint.
raise RuntimeError(f"VIN recall check failed ({code}): {message}")

data = payload.get("data", {})
# Extract fields your app actually uses.
return {
"vin": data.get("vin"),
"year": data.get("year"),
"make": data.get("make"),
"model": data.get("model"),
"coverage": data.get("coverage"),
"count": data.get("count"),
"recalls": data.get("recalls", []),
}

if __name__ == "__main__":
result = fetch_recalls("1HGCM82633A004352")
print(f"{result['year']} {result['make']} {result['model']} - recalls: {result['count']}")
for r in result["recalls"]:
print(f"- {r.get('campaign')}: {r.get('component')} (received {r.get('received')})")

PHP (cURL)

<?php
function fetch_recalls(string $vin, float $timeoutSeconds = 6.0): array {
$url = "https://vehicles-api.com/api/v1/vin/recalls?vin=" . urlencode($vin);

$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => [
"X-API-Key: YOUR_API_KEY",
// "Authorization: Bearer YOUR_API_KEY", // Alternative auth if preferred.
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CONNECTTIMEOUT => (int)ceil($timeoutSeconds / 2),
CURLOPT_TIMEOUT => (int)$timeoutSeconds,
]);

$raw = curl_exec($ch);
if ($raw === false) {
$err = curl_error($ch);
curl_close($ch);
throw new RuntimeException("Transport error calling Vehicle API: $err");
}
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

$payload = json_decode($raw, true);
if (!is_array($payload)) {
throw new RuntimeException("Invalid JSON (HTTP $httpCode): $raw");
}

if (($payload["status"] ?? null) !== "success") {
$code = $payload["error"]["code"] ?? "unknown_error";
$msg = $payload["error"]["message"] ?? "Unknown error";
// For example, code === "coverage_us_only" on HTTP 422 for a valid non-US VIN.
throw new RuntimeException("VIN recall check failed ($code): $msg");
}

$data = $payload["data"] ?? [];
return [
"vin" => $data["vin"] ?? null,
"year" => $data["year"] ?? null,
"make" => $data["make"] ?? null,
"model" => $data["model"] ?? null,
"coverage" => $data["coverage"] ?? null,
"count" => $data["count"] ?? 0,
"recalls" => $data["recalls"] ?? [],
];
}

// Example usage
try {
$res = fetch_recalls("1HGCM82633A004352");
echo $res["year"] . " " . $res["make"] . " " . $res["model"] . " - recalls: " . $res["count"] . PHP_EOL;
foreach ($res["recalls"] as $recall) {
echo "- " . ($recall["campaign"] ?? "") . ": " . ($recall["component"] ?? "") . PHP_EOL;
}
} catch (Throwable $e) {
error_log($e->getMessage());
}

Error handling, coverage checks, and status codes

Transport and application errors are separate concerns:

  • HTTP status codes indicate transport-level success or failure. Always set a timeout and catch non-2xx codes.
  • The JSON envelope reports status "success" or "error". When "error", read error.code and error.message.

For this endpoint, plan for:

  • 422 Unprocessable Entity with error.code coverage_us_only if the VIN decodes outside US coverage for recalls.
  • Validation issues (e.g., malformed VIN) may also lead to "error" status; surface error.message to logs or operators.

Do not assume presence of all narrative fields in each recall. Test both count == 0 and an empty recalls array as valid outcomes for specific vehicles.

Caching, data freshness, and idempotency

Practical caching recommendations:

  • Cache by VIN for a short TTL if your UI needs quick reloads. Recalls can be updated by NHTSA; do not cache indefinitely.
  • Store and index by campaign to avoid duplicates when counts change. The campaign field is your stable key.
  • For mixed workflows that also decode VIN metadata, cache decoded VIN attributes separately, since year/make/model will not change for a given VIN.
  • When coverage_us_only occurs, cache the error condition briefly to reduce retries for non-US VINs on this US-only endpoint.

Idempotency: This GET endpoint is read-only. Repeating a request for the same VIN returns the same structure, with campaign data reflecting the latest NHTSA updates at the time of the call.

Security, quotas, and rate limiting

Security and key management:

  • Run calls server-side only. Never embed X-API-Key in frontend code or mobile apps.
  • Rotate keys and store them in environment variables or a secret manager.
  • Both X-API-Key and Authorization: Bearer are supported headers; do not send keys in query parameters.

Rate limits and monthly quota: All plans include a 7-day free trial, and the Starter plan begins at $19/month. Specific rate limits and quotas depend on your plan; consult the Documentation or your dashboard for exact values. Design your integration to handle 429 responses gracefully, back off, and retry later.

Production tips for dealer, marketplace, fleet, and insurance apps

  • Normalize make and model casing in your UI; the API returns canonical strings suitable for display.
  • Prefer displaying campaign ID, component, and received together. Narrative fields are helpful but optional.
  • If you also decode VINs for richer specs, keep that as a separate step and cache results; decoding coverage is worldwide, but recall coverage is US-market only.
  • For fleets, persist a join table keyed by VIN and campaign, with columns for first_seen_at and last_checked_at to track changes across audits.
  • If you support Dutch plate flows via RDW, do not expect a VIN. Treat recall checks as VIN-only and follow your own linkage rules when VIN is not available.

MCP server option for AI agents

If you’re building AI agents or tools that prefer MCP over HTTP, Vehicle API is also available as an MCP server at MCP. This exposes the same underlying data—VIN decoding, US safety recalls/complaints/NCAP, and RDW plate data—in a protocol that works well with agent frameworks that speak MCP.

Testing checklist and rollout steps

  • Happy path: Verify a known US-market VIN returns status success, source nhtsa, correct year/make/model, count ≥ 0, and an array of recall objects.
  • Coverage boundary: Test a valid non-US VIN and confirm HTTP 422 with error.code coverage_us_only.
  • Timeout behavior: Set a realistic client timeout (e.g., 6 seconds) and ensure your app fails fast with a helpful message and safe fallback.
  • Null checks: Tolerate missing narrative fields in recall objects; render only present fields.
  • Caching: Cache per-VIN results with a short TTL and invalidate on demand when you need the latest campaigns.
  • Logging: Log campaign IDs and your VIN key for auditability.

FAQ

Does the recall response tell me if this specific VIN has already been repaired?
No. NHTSA data is matched by make, model, and year. It shows applicable campaigns but not a per-unit repair status.

What happens if I query a non-US VIN?
For this endpoint, non-US coverage returns HTTP 422 with error.code coverage_us_only. You can still use VIN decoding globally on other endpoints.

Can I call this from the browser?
No. Use server-side code only. Authenticate with X-API-Key (or Authorization: Bearer). Never expose keys in client code.

How often should I refresh recall data?
Recalls can change as NHTSA publishes updates. For consumer-facing apps, refresh on each view or with a short cache TTL. For fleets, schedule periodic audits and diff by campaign ID.

Do Dutch plate lookups include a VIN?
No. RDW plate data does not include the VIN. If your workflow requires recalls, you must have a VIN.

Start building with the VIN Recall Check today. Every plan includes a 7-day free trial, and the Starter plan is $19/month. Create your account here: Register. For full endpoint details, visit the Documentation and explore the MCP server at MCP.