# FDA Food Recalls — Historical Enforcement Data (`indigo_bean/fda-food-recalls`) Actor

Export historical openFDA food-enforcement records with recall numbers, report dates, classifications and source freshness. For research and analytics, not public safety alerts or recall lifecycle tracking.

- **URL**: https://apify.com/indigo_bean/fda-food-recalls.md
- **Developed by:** [Clearline Operations](https://apify.com/indigo_bean) (community)
- **Categories:** Developer tools, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 delivered enforcement records

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/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 Food Recalls — Historical Enforcement Data

By Clearline Operations. Independent software; not endorsed by the source publisher.

### What it does

Historical food-enforcement exports for research, exploratory analysis and internal data pipelines. Not a public-alert service, recall-lifecycle monitor, medical tool or safety decision system.

### Quick start

Paste this JSON into the input form and run. The default dataset supports JSON/CSV export through Apify.

```json
{
  "since": "2026-10-01",
  "classification": "All",
  "maxResults": 10
}
```

The complete form is `.actor/input_schema.json`. Input is also validated at runtime: unknown fields, invalid calendar dates, reversed date ranges and excessive limits are rejected.

### Behavior and limits

- Official anonymous openFDA API; no login, API key, proxies or third-party API charges.
- Filter inclusive FDA **report dates**, classification and recalling-firm state. Firm state is NOT the distribution geography.
- Returns recall number, event ID, ISO dates, classification, status, firm name, product/reason/distribution/code information and source update date/URL.
- Excludes structured recalling-firm street-address/contact fields and all patient/adverse-event data. Source product/distribution/code narrative can still contain business names or business addresses; this is privacy-minimized, not a guarantee that every free-text field is PII-free.
- Preliminary records without an official recall number are skipped, counted in OUTPUT and never billed. Unexpected records missing both identifiers fail rather than silently inventing data.
- Pagination: at most 100 source rows/request, 20 pages/run; output max 1,000. `OUTPUT.sourceLimitReached` identifies unfinished scans. Partition date ranges for bulk exports.
- Default last 90 report days and 100 records. Empty source queries succeed with zero dataset rows.
- FDA publishes weekly, with delays and possible corrections. `sourceLastUpdated` reports the source release, not a promise of real-time coverage.
- FDA expressly says not to use this feed to issue public alerts or track a recall lifecycle. `status` is the published enforcement-report status and is not updated after classification. Do not interpret it as the current recall status.
- openFDA generally permits commercial reuse under CC0, except marked third-party works. Attribute FDA; no official affiliation. Do not rely on openFDA for medical-care or safety decisions.

### Output

Each returned dataset row is one record; `recordId` is its deduplication key within the run. `examples/sample-output.json` illustrates the schema. `OUTPUT` in the default key-value store contains delivered count, source requests, truncation and source diagnostics. Diagnostics are not dataset results.

### Pricing

This Actor is paid per event: **$1.00 per 1,000 delivered records** ($0.001 for each `result` event) plus a $0.00005 Actor start event per GB of memory (minimum one event; the default 256 MB run is one start). You are not charged separately for Apify platform usage. Empty results, diagnostics and failed input are not billed. Set `maxResults` and the run's maximum charge to cap cost. Each run is a separate export; the same record returned on another run is billed again.

### Source rights and responsible use

Data provided by the U.S. Food and Drug Administration (https://open.fda.gov).

- Source/API limitations: https://open.fda.gov/apis/food/enforcement/
- CC0 and third-party exceptions: https://open.fda.gov/terms/

FDA disclaimer: “This data should not be used as a method to collect data to issue alerts to the public, nor should it be used to track the lifecycle of a recall.” This Actor is independent and is not FDA-endorsed.

### Local development

Requires Node.js 22+; local regression runs used Node.js 24.22.1. Container target: Apify Node 22.

```bash
npm ci --no-audit --no-fund
npm test
mkdir -p storage/key_value_stores/default
cp examples/INPUT.json storage/key_value_stores/default/INPUT.json
npm start
```

Use a fresh absolute `CRAWLEE_STORAGE_DIR` for isolated runs. Reusing persistent local storage may append prior rows. No login, source API key, proxy or paid external API is required. Source provenance is retained; respect rate limits and do not circumvent controls.

### Validation status

Live-source collector and SDK checks were completed November 10, 2026 (CT). Unit tests and official Apify CLI input-schema validation passed again November 11, 2026 (CT). Docker is not installed here, so container build and Apify cloud deployment remain untested. A failed upstream request is surfaced, not replaced with invented results. No availability, completeness or earnings guarantee.

# Actor input Schema

## `since` (type: `string`):

Defaults to 90 days ago. FDA report date, not initiation date.

## `until` (type: `string`):

Inclusive end date in YYYY-MM-DD format. Omit for no upper date bound.

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

Restrict records to one FDA published recall classification, or select All.

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

Firm location, NOT distribution coverage.

## `maxResults` (type: `integer`):

Maximum delivered and billable records per run; output may stop earlier at the platform spending ceiling.

## Actor input object example

```json
{
  "classification": "All",
  "maxResults": 100
}
```

# Actor output Schema

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

Requested records written to the default dataset. Each delivered row is one result event.

## `diagnostics` (type: `string`):

Counts, truncation and source diagnostics; not billable dataset records.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("indigo_bean/fda-food-recalls").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("indigo_bean/fda-food-recalls").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 '{}' |
apify call indigo_bean/fda-food-recalls --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,indigo_bean/fda-food-recalls"
        }
    }
}
```

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/wi2hZAR8FeAToZdJR/builds/UVvJUWuOyZRFvdq4e/openapi.json
