# FDA Recall Enforcement Reports Monitor (openFDA) (`brightish_ascent/openfda-recall-monitor`) Actor

Unofficial; not affiliated with FDA or HHS. Search and monitor FDA recall enforcement reports for food, drugs and medical devices via the official openFDA API. Filter by keyword, firm, class, status, state and date. Only-new and changed reports.

- **URL**: https://apify.com/brightish_ascent/openfda-recall-monitor.md
- **Developed by:** [Michael Rice](https://apify.com/brightish_ascent) (community)
- **Categories:** Business, Developer tools, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 recall report rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## FDA Recall Enforcement Reports Monitor (openFDA)

**Unofficial.** Not affiliated with or endorsed by the U.S. Food and Drug Administration (FDA) or the U.S. Department of Health and Human Services (HHS). Data comes from the official [openFDA API](https://open.fda.gov/apis/) enforcement report endpoints, which FDA publishes as public domain under [CC0](https://open.fda.gov/license/).

Search FDA recall enforcement reports for **food** (including dietary supplements and cosmetics), **drugs** and **medical devices** in one run. Set it on a schedule with **Only new since last run** to get just the reports you haven't seen yet.

### What you get

One row per enforcement report (`recallNumber`), newest report date first:
recall number, category, recall class (I/II/III), status, report / initiation / classification / termination dates, recalling firm and its address, voluntary or mandated, product description, reason for recall, quantity, distribution pattern, lot/code info, and openFDA brand/generic names where FDA provides them.

Rows also carry `updateType` (`new` / `changed` in monitor mode, otherwise `null`) and `changeHash`.

`compact` output keeps only the key fields with text cut to 300 characters.

### Input

| Field | Notes |
|---|---|
| categories | food, drug, device (default: all three) |
| query | phrase matched in product description, reason for recall or code info |
| recallingFirm | firm name phrase |
| classifications | Class I, II, III |
| statuses | Ongoing, Completed, Terminated, Pending |
| states | 2-letter state of the recalling firm |
| fromReportDate / toReportDate | YYYY-MM-DD. With no keyword, firm or dates, the last 30 days are used |
| maxItems | max rows per run (default 25, max 5000) |
| onlyNewSinceLastRun | monitor mode, see below |
| lookbackDays | monitor-mode re-check window (default 30) |
| apiKey | optional free openFDA key; raises rate limits |

Example:

```json
{ "categories": ["food"], "query": "listeria", "classifications": ["Class I"], "maxItems": 20, "onlyNewSinceLastRun": true }
```

### Only new since last run

The first run with a given set of filters is a baseline: it returns normal results and saves a watermark in a named key-value store in **your** Apify account (`openfda-recall-monitor-state`). Later runs with the same filters return only reports whose recall number was not delivered before and whose report date is within `lookbackDays` of the newest one seen. Different filters keep separate watermarks.

**Changed reports:** the Actor remembers each delivered report's status, recall class and termination date. If FDA later changes one of these (for example Ongoing to Terminated, or a reclassification) and the report's date is still within `lookbackDays` of the newest seen report, it is sent again with `updateType: "changed"` (and counts as a row). Changes to older reports, or to other fields, are not re-sent. If a baseline is cut off by `maxItems`, older matches are not delivered later; run once without monitor mode to get them.

### Run summary

The `OUTPUT` record has `count`, `chargedCount`, the openFDA `search` used, request URLs (API key removed), `apiTotal`, truncation flags and monitor-mode details.

### Limits and notes

- openFDA updates enforcement data weekly; report dates follow FDA's weekly Enforcement Report.
- Without an API key openFDA allows 240 requests/minute and **1,000 requests/day per IP address**, and on Apify that IP is shared with other users. The Actor waits at least 250 ms between requests and, without a key, stops after 100 requests per run (results are then partial and `truncationNote` says so). If openFDA still returns a rate-limit error the run fails with a clear message. A free key from open.fda.gov raises the limits.
- openFDA disclaimer (verbatim, from every API response): "Do not rely on openFDA to make decisions regarding medical care. While we make every effort to ensure that data is accurate, you should assume all results are unvalidated. We may limit or otherwise restrict your access to the API in line with our Terms of Service." This Actor passes data through as published (except that FDA's "N/A" address placeholders are dropped).
- Some text fields may contain material supplied to FDA by firms.

### FAQ

**Is this the full FDA recall list?** It covers what FDA publishes in openFDA's food, drug and device enforcement endpoints. Vehicle, consumer product and other agencies' recalls are not included.

**Do I need an account with FDA?** No. An API key is optional.

### Support

Questions or problems: digitalpromohub.support@gmail.com

# Actor input Schema

## `categories` (type: `array`):

Which openFDA enforcement datasets to search. Empty = all three.

## `query` (type: `string`):

Phrase matched in product description, reason for recall or code info (e.g. listeria, insulin pump).

## `recallingFirm` (type: `string`):

Company name phrase as listed by FDA.

## `classifications` (type: `array`):

Class I is the most serious. Empty = all.

## `statuses` (type: `array`):

Empty = all.

## `states` (type: `array`):

U.S. state codes of the recalling firm, e.g. CA, TX.

## `fromReportDate` (type: `string`):

YYYY-MM-DD. If no keyword, firm or dates are set, the last 30 days are used.

## `toReportDate` (type: `string`):

YYYY-MM-DD.

## `maxItems` (type: `integer`):

Maximum rows per run (you pay per row). Default 25.

## `onlyNewSinceLastRun` (type: `boolean`):

For schedules: return only reports not delivered by a previous run with the same filters, plus already-delivered reports whose status, class or termination date changed (updateType "changed") while their report date is within lookbackDays. The first run is a baseline.

## `lookbackDays` (type: `integer`):

How far before the last seen report date to re-check for late-posted reports.

## `outputFormat` (type: `string`):

compact = key fields only, text truncated to 300 chars.

## `apiKey` (type: `string`):

Free key from open.fda.gov raises rate limits. Without it, openFDA allows 1,000 requests/day per IP (shared by all users on that Apify IP) and this Actor stops at 100 requests per run.

## Actor input object example

```json
{
  "categories": [
    "food",
    "drug",
    "device"
  ],
  "query": "listeria",
  "maxItems": 20,
  "onlyNewSinceLastRun": false,
  "lookbackDays": 30,
  "outputFormat": "full"
}
```

# Actor output Schema

## `results` (type: `string`):

Default dataset. full rows: recallNumber, category, productType, classification, status, reportDate, recallInitiationDate, centerClassificationDate, terminationDate, recallingFirm, city, state, country, postalCode, address, voluntaryMandated, initialFirmNotification, productDescription, reasonForRecall, productQuantity, distributionPattern, codeInfo, moreCodeInfo, eventId, openfda, updateType (monitor mode: new | changed; otherwise null), changeHash, source. compact rows: a subset with short texts.

## `runSummary` (type: `string`):

count, chargedCount, search, requestUrls (no key), apiTotal, truncated, incomplete, truncationNote, autoWindow, monitor-mode watermark info, changedCount, openFDA request stats (incl. keyless soft cap).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "categories": [
        "food",
        "drug",
        "device"
    ],
    "query": "listeria",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("brightish_ascent/openfda-recall-monitor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "categories": [
        "food",
        "drug",
        "device",
    ],
    "query": "listeria",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("brightish_ascent/openfda-recall-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "categories": [
    "food",
    "drug",
    "device"
  ],
  "query": "listeria",
  "maxItems": 20
}' |
apify call brightish_ascent/openfda-recall-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,brightish_ascent/openfda-recall-monitor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9VVb2NTxONfmEkMTT/builds/Q2WN1ITAdVzC47sTW/openapi.json
