openfda_enforcement
Search FDA recall records for drugs, devices, or food by firm, product, reason, classification, status, or state. Returns recall details with classification and geography.
Instructions
Search openFDA recall/enforcement records — drug/device/food product recalls with the recalling firm, product, reason, FDA classification (Class I/II/III), status, and geography (api.fda.gov/{category}/enforcement.json). KEYLESS — an OPTIONAL free OPENFDA_API_KEY only raises the rate limit; keyless works at ~1000 requests/day and NEVER throws for a missing key. Input: category (drug|device|food, default drug), structured filters — firm (→recalling_firm), product (→product_description), reason (→reason_for_recall), classification (Class I|II|III), status (e.g. Ongoing/Terminated), state (2-letter) — safely assembled + escaped into openFDA search= Lucene string (NO raw passthrough), plus limit (1..100, def 25) and skip. Returns { recalls:[{ recallingFirm, productDescription, reasonForRecall, classification, status, state, city, recallInitiationDate, recallNumber, voluntaryMandated, distributionPattern }] } + honest _meta. HONESTY: totalAvailable is openFDA's EXACT meta.results.total (skip/limit pagination via hasMore/nextOffset — never results.length). Every scalar (recall_initiation_date is a YYYYMMDD string) is null-never-empty-string. ★A no-match query returns openFDA HTTP 404 NOT_FOUND → HONEST EMPTY (returned:0, totalAvailable:0), NOT an error; 400 → invalid_input surfacing openFDA's message; 5xx → THROWS; 200 non-JSON → schema_drift. Optional key rides ONLY the &api_key= query param.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| firm | No | Recalling firm name filter (→ recalling_firm), e.g. 'pfizer'. Matched as an escaped Lucene phrase. | |
| skip | No | Row offset for pagination (default 0). Page with _meta.pagination.nextOffset. | |
| limit | No | Max recall records to return (default 25, max 100). Offset-paginated via skip. | |
| state | No | 2-letter US state/territory postal code filter (→ state), e.g. 'CA'. Validated ^[A-Za-z]{2}$. | |
| reason | No | Reason-for-recall filter (→ reason_for_recall), e.g. 'contamination'. Matched as an escaped Lucene phrase. | |
| status | No | Recall status filter (→ status), e.g. 'Ongoing', 'Terminated', 'Completed'. | |
| product | No | Product description filter (→ product_description), e.g. 'insulin'. Matched as an escaped Lucene phrase. | |
| category | No | The recall category (default 'drug'): 'drug', 'device', or 'food'. Selects the openFDA /{category}/enforcement endpoint. | |
| classification | No | FDA recall classification filter: 'Class I' (most serious), 'Class II', or 'Class III'. |