# FDA Recalls Monitor (openFDA) — Food, Drug & Device (`reverential_haw/openfda-recalls-monitor`) Actor

Pull FDA enforcement recalls from the official openFDA API. Filter by product type, classification, firm, state, and date. Built for compliance, QA, and supply-chain ops.

- **URL**: https://apify.com/reverential_haw/openfda-recalls-monitor.md
- **Developed by:** [Finn McDonough](https://apify.com/reverential_haw) (community)
- **Categories:** Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 recall 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 Recalls Monitor (openFDA) — Food, Drug & Device

**Pull FDA enforcement recalls for any firm, product class, or date range — structured JSON ready for compliance dashboards, supplier risk reviews, and QA alerts.**

Built on the **official openFDA public API**. No login, no HTML scraping, no proxies required for typical volumes.

***

### Who this is for

- **Ecommerce / retail ops** monitoring supplier and brand recalls that hit inventory
- **Food & pharma QA / compliance** teams tracking Class I–III enforcement
- **Insurance & risk** analysts enriching underwriting with recall history
- **Agencies & researchers** building recall datasets without maintaining FDA parsers

### What you get

Each dataset item is one enforcement recall with:

| Field | Example |
| --- | --- |
| `productType` | `food` / `drug` / `device` |
| `classification` | `Class I` |
| `status` | `Ongoing` |
| `recallingFirm` | `Acme Foods Inc` |
| `productDescription` | Soft cheese lot… |
| `reasonForRecall` | Listeria monocytogenes |
| `reportDate` | `20250901` |
| `state` / `city` / `country` | US location fields |
| `eventId` / `recallNumber` | Stable FDA identifiers |
| `detailUrl` | Deep link into openFDA |

#### Sample output

```json
{
  "productType": "food",
  "classification": "Class I",
  "status": "Ongoing",
  "recallingFirm": "Example Dairy LLC",
  "productDescription": "Soft cheese, 8 oz",
  "reasonForRecall": "Potential Listeria contamination",
  "reportDate": "20250901",
  "state": "WI",
  "eventId": "99999",
  "recallNumber": "F-1234-2025",
  "source": "openfda"
}
```

### How to run

1. Choose **product types** (food, drug, device — any combination).
2. Optionally set **classification**, **status**, **state**, **date range**, or a free-text openFDA `search` query.
3. Set **max results**.
4. Run. Schedule daily with `only` your filters for a standing compliance feed.

#### Example inputs

**Recent Class I food recalls**

```json
{
  "productTypes": ["food"],
  "classification": "Class I",
  "maxItems": 200
}
```

**Firm watchlist**

```json
{
  "productTypes": ["food", "drug", "device"],
  "search": "recalling_firm:\"Nestle\"",
  "maxItems": 500
}
```

**Date window (report_date)**

```json
{
  "productTypes": ["device"],
  "dateField": "report_date",
  "dateFrom": "20250101",
  "dateTo": "20251231",
  "maxItems": 1000
}
```

### Pricing (PPE recommendation)

Use **pay-per-event** with the synthetic `apify-default-dataset-item` event (one charge per recall row) plus default `apify-actor-start`.

| Event | Suggested FREE-tier price | Notes |
| --- | --- | --- |
| `apify-actor-start` | $0.00005 (platform default) | Keep default |
| `apify-default-dataset-item` | **$0.002 / recall** ($2 / 1,000) | Primary event |

Why this band: openFDA is HTTP JSON (cheap compute). $1–$3 per 1k is competitive vs. thin Store alternatives while leaving margin after Apify’s 20% cut and platform usage. Offer GOLD/PLATINUM discounts (−20% / −35%) for agency volume.

> Do **not** invent revenue projections. Validate pricing with a 2-week soft launch and adjust after watching paid-plan runs.

### Why openFDA (legal / ToS)

- Data is published by the U.S. FDA via [openFDA](https://open.fda.gov/) for public reuse.
- This Actor calls documented JSON endpoints (`/food|drug|device/enforcement.json`).
- Respect openFDA rate limits; the Actor paginates with short delays.
- Optional openFDA API key (not required for low volume) can be added later as an input secret if you scale.

### Limits & honesty

- openFDA mirrors FDA enforcement data; lag and field completeness follow FDA, not this Actor.
- Very broad queries can return tens of thousands of rows — always set `maxItems`.
- Fixture mode (`useFixture: true`) is for local/CI validation only; disable before Store runs.

### Related Actors (catalog)

- **Federal Register Monitor** — U.S. rules, notices & presidential documents
- **NIH RePORTER Grants** — NIH-funded project awards (orgs, PIs, abstracts)

### Support

Open an issue on the Actor page. Target response: same business day.

# Actor input Schema

## `productTypes` (type: `array`):

Which openFDA enforcement endpoints to query.

## `search` (type: `string`):

Optional Lucene-style query passed to openFDA (e.g. recalling_firm:"Acme" OR status:Ongoing). Leave empty to browse recent recalls.

## `classification` (type: `string`):

Limit to a recall class. Class I = most serious.

## `status` (type: `string`):

Limit to ongoing / terminated / completed recalls when present in openFDA.

## `state` (type: `string`):

Two-letter US state code for recalling_firm location (e.g. CA).

## `dateField` (type: `string`):

Which openFDA date field to filter.

## `dateFrom` (type: `string`):

Inclusive start date for the selected date field.

## `dateTo` (type: `string`):

Inclusive end date for the selected date field.

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

Maximum recall records to return across all selected product types.

## `useFixture` (type: `boolean`):

When true, read fixtures/sample-openfda-response.json instead of calling openFDA. For local validation only.

## `fixturePath` (type: `string`):

Path to a fixture JSON file (relative to the Actor root).

## Actor input object example

```json
{
  "productTypes": [
    "food",
    "drug",
    "device"
  ],
  "search": "",
  "classification": "",
  "status": "",
  "state": "",
  "dateField": "report_date",
  "dateFrom": "",
  "dateTo": "",
  "maxItems": 100,
  "useFixture": false,
  "fixturePath": "fixtures/sample-openfda-response.json"
}
```

# Actor output Schema

## `overview` (type: `string`):

Tabular overview of the most useful dataset fields.

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

All normalized FDA recall records in the default dataset.

## `summary` (type: `string`):

JSON summary of items pushed and run metadata, stored in the default key-value store as OUTPUT_SUMMARY.

# 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 = {
    "search": "",
    "state": "",
    "dateFrom": "",
    "dateTo": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("reverential_haw/openfda-recalls-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 = {
    "search": "",
    "state": "",
    "dateFrom": "",
    "dateTo": "",
}

# Run the Actor and wait for it to finish
run = client.actor("reverential_haw/openfda-recalls-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 '{
  "search": "",
  "state": "",
  "dateFrom": "",
  "dateTo": ""
}' |
apify call reverential_haw/openfda-recalls-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,reverential_haw/openfda-recalls-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/JG4FJ8ecf4nd8QXan/builds/R4cyIy4MFPNZdUef9/openapi.json
