# openFDA Drug Recalls API: US Drug Recall Enforcement Reports (`jayraj0975/openfda-drug-recalls`) Actor

Get US drug recall enforcement reports from the official openFDA public API: product, reason, classification, firm, dates. Pay per result.

- **URL**: https://apify.com/jayraj0975/openfda-drug-recalls.md
- **Developed by:** [Jay Gaikwad](https://apify.com/jayraj0975) (community)
- **Categories:** Other, Agents
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 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/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 Drug Recalls and Enforcement Reports (openFDA)

Fetch recent **FDA drug enforcement / recall records** from the public [openFDA](https://open.fda.gov/apis/drug/enforcement/) API and get them as clean, structured JSON — one item per recall record.

This Actor is **unofficial** and is **not affiliated with, endorsed by, or operated by the U.S. Food and Drug Administration**.

### What it does

- Calls `https://api.fda.gov/drug/enforcement.json` with `skip`/`limit` pagination (up to 100 records per page).
- Filters by optional **free-text search** (matched by openFDA against `product_description`), **classification** (Class I / II / III), and **report date within the last N days** (`report_date` range).
- Converts openFDA `YYYYMMDD` date strings into ISO 8601 UTC (`YYYY-MM-DDTHH:MM:SSZ`).
- Sends at most **1 request per second** to the openFDA API and stops at the configured `maxItems` cap.
- Throws a clear `LayoutChangedError` if the openFDA response shape changes, instead of pushing malformed items.
- Deduplicates by `recallNumber` across pages.

Only public FDA data is used. No login, no captchas, no personal data is collected.

### Input

| Field            | Type    | Default | Description                                                                 |
| ---------------- | ------- | ------- | --------------------------------------------------------------------------- |
| `search`         | string  | –       | Optional free text; on the openFDA side this matches **only** `product_description`. |
| `classification` | string  | `""`    | Optional filter: `Class I`, `Class II`, `Class III`, or `""` for any.       |
| `sinceDays`      | integer | –       | Optional filter; keeps only records with `report_date` in the last N days. |
| `maxItems`       | integer | `100`   | Maximum number of recall records returned (1–5000).                         |

Note on `search`: the free-text `search` field matches only `product_description` on the openFDA side; it is not a full-text search of every field. Confirm against the current openFDA API docs before relying on it for a specific field.

### Output sample

Example record (illustrative; values vary). Illustrative output — actual values depend on the live openFDA record.

```json
{
  "recallNumber": "D-321-2016",
  "classification": "Class II",
  "status": "Terminated",
  "productDescription": "Progesterone 100 mg/mL in Corn Oil Injection, 2 mL vials, Rx only, Essential Wellness PHARMACY, 4625 N. University, Peoria, IL 61614.",
  "reason": "Lack of Assurance of Sterility: A recall of all compounded sterile preparations within expiry is being initiated due to observations associated with poor sterile production practices...",
  "recallingFirm": "Kalman Health & Wellness, Inc. dba Essential Wellness Pharma",
  "city": "Peoria",
  "state": "IL",
  "country": "United States",
  "distributionPattern": "Nationwide",
  "recallInitiationDate": "2015-09-03T00:00:00Z",
  "reportDate": "2015-11-25T00:00:00Z",
  "voluntaryMandated": "Voluntary: Firm initiated",
  "scrapedAt": "2026-11-12T10:00:00Z"
}
```

### Pricing

**$3 per 1,000 results.**

Every row pushed to the dataset is one billed result — including rows that represent a not-found record or invalid input. Empty or invalid runs are not billed because nothing is pushed.

### Limits

- Relies on the public openFDA API; no API key is required for low volume, but openFDA's rate limiting is respected (1 request/sec from this Actor).
- `maxItems` is capped at 5000 per run.
- `sinceDays` is capped at 3650.
- The `search` field matches only `product_description` on the openFDA side; it is not a full-text search across every field.
- If the API layout or record schema changes, the Actor fails with a clear error rather than pushing invalid items.
- openFDA data is public; confirm openFDA's terms of use before commercial redistribution. Redistribution of openFDA public data is generally permitted, but bulk commercial mirroring is **uncertain** — check openFDA's terms of use first.

### Disclaimer

This Actor is **unofficial** and is **not affiliated with, endorsed by, or operated by the U.S. Food and Drug Administration**. It returns **public data only**, provided **as-is** and **without any guarantee of accuracy, completeness, or availability**. **This is not medical advice.** Do not rely on openFDA data for decisions regarding medical care.

This Actor is **not a clinical, diagnostic, or pharmacovigilance decision-support tool**, and is **not a substitute for the FDA's own enforcement reports or the recalling firm's notice**. It is not legal, regulatory, or compliance advice. For all medical, safety, or regulatory decisions, verify against the primary FDA source and qualified professionals.

# Actor input Schema

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

Optional free-text search applied to the product description (e.g. 'metformin', 'hand sanitizer').

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

Optional filter by FDA recall classification.

## `sinceDays` (type: `integer`):

Optional filter to include only records whose report_date is within the last N days.

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

Maximum number of recall records to return (uses skip/limit).

## Actor input object example

```json
{
  "classification": "",
  "maxItems": 100
}
```

# Actor output Schema

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

// Run the Actor and wait for it to finish
const run = await client.actor("jayraj0975/openfda-drug-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("jayraj0975/openfda-drug-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 jayraj0975/openfda-drug-recalls --silent --output-dataset

```

## MCP server setup

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