# FDA Recall Intelligence Scraper (`johnatan029/fda-recall-intelligence-scraper`) Actor

Search, normalize, prioritize, and export FDA food, drug, and medical-device recalls with filters, watchlists, and structured intelligence.

- **URL**: https://apify.com/johnatan029/fda-recall-intelligence-scraper.md
- **Developed by:** [Johnn Mottin](https://apify.com/johnatan029) (community)
- **Categories:** Developer tools, Automation, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 fda recall results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## FDA Recall Intelligence Scraper

Search, normalize, prioritize, and export FDA food, drug, and medical-device recalls from one Actor.
Unofficial community Actor. Not affiliated with or endorsed by the U.S. Food and Drug Administration (FDA).

### What this Actor does

The Actor queries the official openFDA enforcement endpoints, converts their partly different records into one stable contract, removes duplicates, computes transparent operational signals, and writes exactly one dataset item for each valid recall. A separate `STATS` record contains run and quality metrics.

### Who it is for

Compliance teams, manufacturers, distributors, retailers, pharmacies, hospitals, insurers, regulatory consultancies, procurement teams, and data teams that need structured public recall metadata.

### Supported recall types

- Food: `https://api.fda.gov/food/enforcement.json`
- Drugs: `https://api.fda.gov/drug/enforcement.json`
- Medical devices: `https://api.fda.gov/device/enforcement.json`

### Input example

```json
{
  "productTypes": ["food", "drug", "device"],
  "query": "undeclared allergen",
  "classifications": ["Class I", "Class II"],
  "states": ["NY", "NJ"],
  "dateFrom": "2025-01-01",
  "watchlistTerms": ["Example Brand", "peanut"],
  "onlyWatchlistMatches": false,
  "activeOnly": true,
  "sortBy": "reportDateDesc",
  "maxResults": 100,
  "includeRawOpenFda": false
}
````

`OPENFDA_API_KEY` is supported as an optional environment variable. Never put an API key in public input. The Actor never logs the key or a URL containing it.

### Output example

```json
{
  "recordType": "fda-recall",
  "sourceCategory": "food",
  "recallNumber": "F-0000-2026",
  "eventId": "99999",
  "classification": "Class I",
  "classificationRank": 3,
  "status": "Ongoing",
  "isOngoing": true,
  "recallingFirm": "Example Foods LLC",
  "productDescription": "Example packaged food",
  "reasonForRecall": "Label may omit an allergen declaration.",
  "reportDate": "2026-01-15",
  "isNationwide": true,
  "watchlistMatched": true,
  "watchlistMatches": ["Example Brand"],
  "priorityScore": 100,
  "priorityLevel": "critical",
  "qualityScore": 100
}
```

The example is synthetic and illustrates the output contract; it is not an actual FDA recall.

### Priority score explanation

The deterministic 0–100 score adds: Class I +45, Class II +25, Class III +10, Not Yet Classified +15, Ongoing/Open +20, nationwide distribution +15, reports from the last 30 days +15, 31–90 days +10, 91–365 days +5, and a watchlist match +20. Scores are capped at 100. Levels are critical (80–100), high (60–79), medium (35–59), and low (0–34).

Priority scores are operational triage signals based on public recall metadata, not medical advice or an FDA risk classification.

### Watchlist example

```json
{
  "watchlistTerms": ["Example Brand", "lot abc"],
  "onlyWatchlistMatches": true
}
```

Matching is case-insensitive, Unicode-normalized, punctuation-insensitive, and performed only against the recalling firm, product description, recall reason, brand names, and code information. Terms are treated as text, never as regular expressions.

The published enforcement status is source metadata and must not be treated as a real-time recall lifecycle tracker. Do not use this Actor as a public safety alert service. Verify critical decisions with authoritative FDA recall and safety-alert sources.

### Scheduling example

In Apify Console, create a daily or weekly schedule for the Actor with a saved input. Each run writes a fresh dataset and its summary to the default key-value store as `STATS`. openFDA enforcement endpoints are updated periodically, usually weekly; this Actor does not claim real-time updates.

### API example

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~fda-recall-intelligence-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"productTypes":["food"],"maxResults":100}'
```

### Limits

Each openFDA request uses at most 1,000 records, `skip` never exceeds 25,000, request timeout is 15 seconds, retries are limited to two selective attempts, and at most two categories are queried concurrently. `maxResults` is the global final output cap. To preserve correct filtering, deduplication, and global sorting, each selected category may retrieve up to that limit before the combined result is filtered, deduplicated, sorted, and sliced. A fixed API quota may apply with or without an openFDA key.

Exact company and closed-list filters use openFDA exact fields. Watchlist queries use category-compatible harmonized fields.

### Pricing explanation placeholder

Billing is disabled in this version. The intended future model is US$6 per 1,000 commercial results, where one valid, unique dataset record corresponds to one `recall-result` event. Failed requests, invalid input, duplicates, empty responses, and rejected records are not billable. Pricing will only be configured after economic testing.

### Data source

Uses public openFDA data from the official food, drug, and device enforcement APIs. The FDA may revise previously published records.

### Medical disclaimer

Does not provide medical advice. Recall classifications and the Actor's operational score must be interpreted using authoritative FDA information and appropriate professional judgment.

### Privacy statement

No browser, proxy, login, cookies, or scraping of private data. The Actor processes public recall metadata and optional user-supplied filter terms. Do not include secrets or personal patient information in input.

# Actor input Schema

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

FDA recall datasets to search.

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

Optional text searched safely across relevant recall fields.

## `recallingFirms` (type: `array`):

Optional exact company names.

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

FDA recall classifications to match exactly.

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

Public status values to match; values are not restricted to a fixed enum.

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

Two-letter US state codes.

## `country` (type: `string`):

Country value to match exactly in the published source metadata.

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

YYYY-MM-DD

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

YYYY-MM-DD

## `watchlistTerms` (type: `array`):

Terms checked against category-compatible recall and product fields.

## `onlyWatchlistMatches` (type: `boolean`):

When enabled, returns only records that pass both the openFDA query and local watchlist validation.

## `activeOnly` (type: `boolean`):

Excludes records whose published source status is clearly Terminated, Completed, or Closed. FDA enforcement status should not be treated as a real-time lifecycle tracker.

## `sortBy` (type: `string`):

Sort order applied by openFDA and again to the combined final result.

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

Global final output cap after filtering, deduplication, and sorting.

## `includeRawOpenFda` (type: `boolean`):

Includes the public raw openfda object in each output record when available.

## `includeSummary` (type: `boolean`):

Writes run statistics to the STATS key on success; fatal failures always force diagnostic statistics.

## `debug` (type: `boolean`):

Enables additional operational logs without exposing API keys or keyed URLs.

## Actor input object example

```json
{
  "productTypes": [
    "food",
    "drug",
    "device"
  ],
  "onlyWatchlistMatches": false,
  "activeOnly": false,
  "sortBy": "reportDateDesc",
  "maxResults": 50,
  "includeRawOpenFda": false,
  "includeSummary": true,
  "debug": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `stats` (type: `string`):

No description

# 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 = {
    "productTypes": [
        "food",
        "drug",
        "device"
    ],
    "sortBy": "reportDateDesc",
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("johnatan029/fda-recall-intelligence-scraper").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 = {
    "productTypes": [
        "food",
        "drug",
        "device",
    ],
    "sortBy": "reportDateDesc",
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("johnatan029/fda-recall-intelligence-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "productTypes": [
    "food",
    "drug",
    "device"
  ],
  "sortBy": "reportDateDesc",
  "maxResults": 50
}' |
apify call johnatan029/fda-recall-intelligence-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=johnatan029/fda-recall-intelligence-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FDA Recall Intelligence Scraper",
        "description": "Search, normalize, prioritize, and export FDA food, drug, and medical-device recalls with filters, watchlists, and structured intelligence.",
        "version": "1.0",
        "x-build-id": "S7GOnlx5wGm50GEFn"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/johnatan029~fda-recall-intelligence-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-johnatan029-fda-recall-intelligence-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/johnatan029~fda-recall-intelligence-scraper/runs": {
            "post": {
                "operationId": "runs-sync-johnatan029-fda-recall-intelligence-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/johnatan029~fda-recall-intelligence-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-johnatan029-fda-recall-intelligence-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "productTypes": {
                        "title": "Product types",
                        "minItems": 1,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "FDA recall datasets to search.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "food",
                                "drug",
                                "device"
                            ],
                            "enumTitles": [
                                "Food",
                                "Drugs",
                                "Medical devices"
                            ]
                        },
                        "default": [
                            "food",
                            "drug",
                            "device"
                        ]
                    },
                    "query": {
                        "title": "Search text",
                        "type": "string",
                        "description": "Optional text searched safely across relevant recall fields."
                    },
                    "recallingFirms": {
                        "title": "Recalling firms",
                        "type": "array",
                        "description": "Optional exact company names.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "classifications": {
                        "title": "Classifications",
                        "type": "array",
                        "description": "FDA recall classifications to match exactly.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "Class I",
                                "Class II",
                                "Class III",
                                "Not Yet Classified"
                            ],
                            "enumTitles": [
                                "Class I",
                                "Class II",
                                "Class III",
                                "Not Yet Classified"
                            ]
                        }
                    },
                    "statuses": {
                        "title": "Statuses",
                        "type": "array",
                        "description": "Public status values to match; values are not restricted to a fixed enum.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "states": {
                        "title": "US states",
                        "type": "array",
                        "description": "Two-letter US state codes.",
                        "items": {
                            "type": "string",
                            "pattern": "^[A-Za-z]{2}$"
                        }
                    },
                    "country": {
                        "title": "Country",
                        "type": "string",
                        "description": "Country value to match exactly in the published source metadata."
                    },
                    "dateFrom": {
                        "title": "Report date from",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "YYYY-MM-DD"
                    },
                    "dateTo": {
                        "title": "Report date to",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "YYYY-MM-DD"
                    },
                    "watchlistTerms": {
                        "title": "Watchlist terms",
                        "type": "array",
                        "description": "Terms checked against category-compatible recall and product fields.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "onlyWatchlistMatches": {
                        "title": "Only watchlist matches",
                        "type": "boolean",
                        "description": "When enabled, returns only records that pass both the openFDA query and local watchlist validation.",
                        "default": false
                    },
                    "activeOnly": {
                        "title": "Exclude clearly terminated source records",
                        "type": "boolean",
                        "description": "Excludes records whose published source status is clearly Terminated, Completed, or Closed. FDA enforcement status should not be treated as a real-time lifecycle tracker.",
                        "default": false
                    },
                    "sortBy": {
                        "title": "Sort by",
                        "enum": [
                            "reportDateDesc",
                            "reportDateAsc",
                            "recallInitiationDateDesc",
                            "recallInitiationDateAsc"
                        ],
                        "type": "string",
                        "description": "Sort order applied by openFDA and again to the combined final result.",
                        "default": "reportDateDesc"
                    },
                    "maxResults": {
                        "title": "Maximum results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Global final output cap after filtering, deduplication, and sorting.",
                        "default": 100
                    },
                    "includeRawOpenFda": {
                        "title": "Include raw openFDA object",
                        "type": "boolean",
                        "description": "Includes the public raw openfda object in each output record when available.",
                        "default": false
                    },
                    "includeSummary": {
                        "title": "Write summary to STATS",
                        "type": "boolean",
                        "description": "Writes run statistics to the STATS key on success; fatal failures always force diagnostic statistics.",
                        "default": true
                    },
                    "debug": {
                        "title": "Debug logs",
                        "type": "boolean",
                        "description": "Enables additional operational logs without exposing API keys or keyed URLs.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
