Build drug recall and shortage alerts from FDA data
- Data
- NDC
- Endpoints
- /v1/drugs/recalls/v1/drugs/shortages
- MCP tools
- check_drug_recalls, check_drug_shortages
- Plan
- Runs on the Free plan
How it works
- Keep the NDCs you stock (product level, like 0002-1433).
- Once a day, look up recalls for each NDC reported since your last run.
- Look up current shortages for the same NDCs.
- Alert on anything new, Class I recalls first.
The code
TypeScript with @healthcare.dev/sdk. Set HDEV_API_KEY to a free key and run it. Every response carries its source, release and license in meta.
import { HealthcareDev } from "@healthcare.dev/sdk"; const hdev = new HealthcareDev(); export async function checkWatchlist(ndcs: string[], since: string) { const alerts = []; for (const ndc of ndcs) { const recalls = await hdev.drugs.recalls({ ndc, from: since }); for (const r of recalls.data) alerts.push({ ndc, kind: `Class ${r.classification ?? "?"} recall`, firm: r.recalling_firm, reason: r.reason_for_recall, lots: r.code_info, }); const shortages = await hdev.drugs.shortages({ ndc, status: "current" }); for (const s of shortages.data) alerts.push({ ndc, kind: "shortage", detail: s.availability, reason: s.shortage_reason }); } return alerts.sort((a, b) => a.kind.localeCompare(b.kind)); // Class I first } await checkWatchlist(["0002-1433", "0006-0277"], "2026-10-01");
Or ask your agent
Connect the MCP server and ask in plain language. It calls check_drug_recalls, check_drug_shortages and cites what it found.
Are there any FDA recalls or current shortages for NDC 0002-1433? Give the class, firm and reason.
Take it further
- Use
classification: "I"to page someone only for the most serious recalls. - Join recalls to your inventory by NDC-11 with the
ndc11sfield. - Search shortages by
therapeutic_categoryto spot trouble across a drug class.
Reference data only, not medical advice or a coverage determination. Send codes, NDCs and NPIs, never patient information.
More examples
Claim code checker
Catch non-billable, retired and mistyped ICD-10-CM and HCPCS codes before a claim goes out. One batch call checks up to 100 codes, with the release each answer came from.
NPI verification
Verify a provider's NPI at sign-up: check digit, whether CMS issued it, active or deactivated, and the name, specialty and license state on record.
Drug price lookup
Show what pharmacies pay for a drug: CMS's NADAC acquisition cost per unit, by NDC or name, with price history and the brand or generic classification.