FDA drug shortages
GET /api/drug-shortagesSearch the FDA drug shortage list (openFDA) by drug name (generic or brand), therapeutic category or status (current, resolved, to be discontinued): each listed product with its status, availability, company, presentation and package NDC, the stated shortage reason and related information, and the posting, update and discontinuation dates. Send GET /api/drug-shortages with no required fields (4 optional) and pay $0.004 per call over x402 or MPP (there is no free tier). It returns a JSON object with query, count, shortages, returned, matched and 4 more.
Newest update first; the answer says how many listings matched. Live FDA data.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | no | Generic or brand drug name, e.g. lidocaine |
category | string | no | Therapeutic category as FDA lists it, e.g. Oncology or Anesthesia |
status | string | no | current, resolved or to be discontinued (default: any) |
limit | number | no | Listings to return, 1-20 (default 5) |
Example request
curl -i "https://agent402.tools/api/drug-shortages?name=lidocaine&status=current&limit=5"
Without payment this returns HTTP 402 Payment Required with the exact price for drug-shortages; any x402 v2 or MPP client pays it and retries.
Watch a call get paid
GET /api/drug-shortages$0.004 USDCPAYMENT-SIGNATUREon 14 chains200 OKAgent402-ReceiptEd25519Example response
{
"query": {
"name": "lidocaine",
"category": null,
"status": "Current"
},
"count": 1,
"shortages": [
{
"genericName": "Lidocaine Hydrochloride Injection",
"brandNames": [
"XYLOCAINE"
],
"status": "Current",
"availability": "Limited Availability",
"company": "Pfizer Inc.",
"presentation": "Lidocaine, Injection, 1% (NDC 0409-4276-01)",
"dosageForm": "Injection",
"packageNdc": "0409-4276-01",
"therapeuticCategories": [
"Anesthesia"
],
"reason": "Demand increase for the drug",
"relatedInfo": "Next delivery expected in December",
"resolvedNote": null,
"updateType": "Reverified",
"updateDate": "2026-11-19",
"initialPostingDate": "2020-04-10",
"discontinuedDate": null,
"applicationNumber": "NDA006488"
}
],
"returned": 1,
"matched": 87,
"complete": false,
"truncated": true,
"disclaimer": "openFDA data is unvalidated and is not medical advice; do not rely on it to make decisions regarding medical care.",
"source": "api.fda.gov (openFDA drug shortages, public domain)"
}| Field | Type | Always present | In the example |
|---|---|---|---|
query | object | yes | 3 fields: name, category, status |
count | number | yes | 1 |
shortages | array of objects | yes | 1 item in the example |
returned | number | yes | 1 |
matched | number | yes | 87 |
complete | boolean | yes | false |
truncated | boolean | yes | true |
disclaimer | string | yes | openFDA data is unvalidated and is not medical advice; do not rely on it to m... |
source | string | yes | api.fda.gov (openFDA drug shortages, public domain) |
From an MCP client
catalog.call {
"slug": "drug-shortages",
"params": {
"name": "lidocaine",
"status": "current",
"limit": 5
}
}The hosted connector at https://agent402.tools/mcp needs a payment for drug-shortages; the stdio package pays it from a wallet or from an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y agent402-mcp@0.14.1.
Errors and behavior
- Every field is optional. An input the tool rejects returns an HTTP 4xx whose body carries
error,tool,expected,requiredandexample. - A paid call that ends in any status of 400 or above is not charged over x402, MPP or a prepaid credits key: settlement runs after the tool and only on a successful response. The exception is a Tempo push credential, a transfer the buyer sent before the call: it settles before the tool runs, so if the tool then fails the payment is recorded as a refund owed to the paying wallet.
- Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key issued earlier (
Authorization: Bearer a402_...) also pays it. - A
POSTwith a JSON body to /api/drug-shortages is served as this GET, with the body as the input. - An
Idempotency-Keyheader makes a retried paid call replay the first 200 instead of charging again (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.004" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/drug-shortages?name=lidocaine&status=current&limit=5");Related tools
FDA NDC directory lookup
Look up the FDA National Drug Code directory (openFDA) by NDC or by brand or generic name: product NDC, labeler, dosage.
FDA drug adverse events
Top reported adverse reactions for a drug from the FDA FAERS database (openFDA), ranked by report count - a fast read.
FDA drug label lookup
FDA drug labeling (openFDA SPL) by brand or generic name, or by NDC: boxed warning, indications and usage, dosage.
FDA drug recalls
Search FDA drug recall / enforcement records (openFDA): recalling firm, classification (Class I/II/III), reason.
FDA Orange Book lookup
Look up the FDA Orange Book (openFDA) by brand name, active ingredient or application number: each approved product.
FDA 510(k) device clearances
Search FDA 510(k) premarket clearances (openFDA) by applicant, three-letter product code, K number or device name.