Fda APIopen.fda.gov ↗
Query FDA food recall enforcement reports and CAERS adverse event data. Filter by status, classification, product, or firm. Aggregate recall counts by field.
What is the Fda API?
This API exposes 6 endpoints covering FDA food recall enforcement records and CAERS adverse event reports. Use search_food_enforcement to query the FDA Recall Enterprise System with Lucene-style filters across fields like classification, recalling_firm, and reason_for_recall, or use search_food_adverse_events to retrieve consumer-reported reactions, outcomes, and product details from the CFSAN Adverse Event Reporting System.
curl -X GET 'https://api.parse.bot/scraper/8f43c093-11b3-4d20-a1da-b314591fb5f9/search_food_enforcement?skip=0&sort=recall_initiation_date%3Adesc&limit=10&search=status%3A%22Ongoing%22' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace open-fda-gov-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: openFDA Food API — recalls, adverse events, and aggregations."""
from parse_apis.openfda_food_api import OpenFDA, RecallStatus, RecallNotFound
client = OpenFDA()
# Search ongoing Class I recalls (most serious) — bounded iteration.
for recall in client.recalls.search(search='classification:"Class I"', sort="recall_initiation_date:desc", limit=3):
print(recall.recalling_firm, recall.classification, recall.reason_for_recall[:60])
# Filter by status using the typed enum.
for recall in client.recalls.by_status(status=RecallStatus.ONGOING, limit=3):
print(recall.recall_number, recall.status, recall.city, recall.state)
# Point-lookup a single recall by number.
try:
detail = client.recalls.get(recall_number="F-0276-2017")
print(detail.recall_number, detail.recalling_firm, detail.product_description[:80])
except RecallNotFound as exc:
print(f"Recall not found: {exc.recall_number}")
# Aggregate recalls by classification to see distribution.
for fc in client.fieldcounts.by_field(field="classification.exact", limit=5):
print(fc.term, fc.count)
# Search adverse events and inspect consumer/product details.
event = client.adverseevents.search(search='reactions:"NAUSEA"', limit=1).first()
if event:
print(event.report_number, event.reactions, event.consumer.gender)
for product in event.products:
print(product.name_brand, product.industry_name)
print("exercised: recalls.search / recalls.by_status / recalls.get / fieldcounts.by_field / adverseevents.search")
Search food recall enforcement reports from the FDA Recall Enterprise System (RES). Supports Lucene-style search queries, sorting, and pagination. Returns recall records including recall_number, product_description, status, classification, recalling_firm, reason_for_recall, and distribution details. Paginates via skip/limit (max skip 25000, max limit 1000).
| Param | Type | Description |
|---|---|---|
| skip | integer | Number of results to skip for pagination (0-25000) |
| sort | string | Field and direction to sort by, formatted as 'field_name:direction' where direction is 'asc' or 'desc' (e.g. 'recall_initiation_date:desc') |
| limit | integer | Maximum number of results to return (1-1000) |
| search | string | Lucene-style search query filtering results by any field (e.g. 'status:"Ongoing"', 'classification:"Class I"', 'recalling_firm:"Kraft"') |
{
"type": "object",
"fields": {
"meta": "object containing disclaimer, terms, license, last_updated, and results pagination info (skip, limit, total)",
"results": "array of food recall enforcement record objects with fields: status, city, state, country, classification, product_type, event_id, recalling_firm, recall_number, product_description, product_quantity, reason_for_recall, recall_initiation_date, report_date, code_info, distribution_pattern, voluntary_mandated"
},
"sample": {
"data": {
"meta": {
"terms": "https://open.fda.gov/terms/",
"license": "https://open.fda.gov/license/",
"results": {
"skip": 0,
"limit": 5,
"total": 1025
},
"disclaimer": "Do not rely on openFDA to make decisions regarding medical care.",
"last_updated": "2026-06-03"
},
"results": [
{
"city": "San Luis",
"state": "AZ",
"status": "Ongoing",
"country": "United States",
"event_id": "93920",
"report_date": "20240424",
"product_type": "Food",
"recall_number": "F-1170-2024",
"classification": "Class I",
"recalling_firm": "HandNatural",
"reason_for_recall": "Product recalled due to the presence of yellow oleander.",
"voluntary_mandated": "Voluntary: Firm initiated",
"product_description": "H&NATURAL 2 PACK! BRAZIL SEED 60 PIECES",
"distribution_pattern": "Firm is 100% internet sales.",
"recall_initiation_date": "20240209"
}
]
},
"status": "success"
}
}About the Fda API
Food Recall Enforcement Endpoints
The search_food_enforcement endpoint queries the FDA Recall Enterprise System (RES) and returns paginated recall records. Each record includes recall_number, status, classification (Class I, II, or III), recalling_firm, product_description, reason_for_recall, city, state, country, product_type, and event_id. The search parameter accepts Lucene-style syntax — for example, status:"Ongoing" or classification:"Class I". Results can be sorted with the sort parameter using field_name:asc or field_name:desc format, and paginated via skip (0–25000) and limit (1–1000).
get_food_enforcement_by_recall_number fetches a single recall record by its unique identifier such as F-0276-2017. get_food_enforcement_by_status filters records to a specific status value (e.g., Ongoing, Completed, Terminated) and supports the same skip/limit pagination. count_food_enforcement_by_field returns term-count aggregations for any categorical field — pass a field name with the .exact suffix (e.g., status.exact, classification.exact, state.exact) to get a frequency distribution across all records in the dataset.
Food Adverse Event Endpoints
search_food_adverse_events queries CAERS data and returns report_number, date_created, date_started, reactions, outcomes, consumer (an object with age, gender, and age unit), and product details including name_brand and industry code. The search parameter accepts Lucene queries like reactions:"NAUSEA" or outcomes:"Death". get_food_adverse_events_by_product searches specifically on the products.name_brand field, returning all adverse event reports matching a brand name such as CENTRUM SILVER or Nature Valley.
Response Structure
All endpoints return the same top-level envelope: a meta object with disclaimer, terms, license, last_updated, and a results sub-object containing skip, limit, and total for pagination; and a results array with the matching records. The total value in meta.results reflects the full count of matching records regardless of the current page, which is useful for building paginated clients.
The Fda API is a managed, monitored endpoint for open.fda.gov — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when open.fda.gov changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official open.fda.gov API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor ongoing Class I food recalls by filtering search_food_enforcement with classification and status fields
- Look up the full history of a specific recall using get_food_enforcement_by_recall_number with a known recall number
- Aggregate recalls by U.S. state using count_food_enforcement_by_field on state.exact to identify geographic hotspots
- Track adverse event reports linked to a specific supplement brand using get_food_adverse_events_by_product
- Analyze consumer reaction frequency across CAERS reports by searching search_food_adverse_events with reaction filters
- Build a recall alerting tool that polls get_food_enforcement_by_status for Ongoing records and diffs against a stored snapshot
- Compare recall volume by classification class using count_food_enforcement_by_field on classification.exact
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does openFDA have an official developer API?+
What does count_food_enforcement_by_field return, and which fields work with it?+
term (the field value) and a count (how many recall records carry that value). Categorical fields like status.exact, classification.exact, state.exact, and country.exact work reliably. Append .exact to the field name to get precise term matching rather than full-text tokenization.How far back does the recall enforcement data go, and how fresh is it?+
meta.last_updated field in every response shows the date the dataset was last refreshed by FDA. openFDA does not guarantee real-time updates; there can be a lag of several days between an enforcement action being filed in RES and its appearance in the API. For time-sensitive monitoring, check last_updated on each call.Does the API cover drug or device recall enforcement records, or only food?+
Can I retrieve the full distribution list or press release text for a recall?+
distribution_pattern field describing geographic scope, but full press release text and consumer-facing recall announcements are not included in the response fields. You can fork this API on Parse and revise it to fetch supplementary recall detail pages if that content is needed.