# FDA Warning Letters, Recalls & Enforcement Monitor (`schmarta/fda-warning-letters-recalls-monitor`) Actor

Monitor FDA warning letters and drug/device/food recalls in one normalized feed. Company filters, 21 CFR citation extraction, LLM-ready letter text, delta-only monitoring. Works as an MCP server for AI agents.

- **URL**: https://apify.com/schmarta/fda-warning-letters-recalls-monitor.md
- **Developed by:** [Lucas Marta](https://apify.com/schmarta) (community)
- **Categories:** AI, Automation
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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 Warning Letters, Recalls & Enforcement Monitor

Track **FDA warning letters** and **drug, device, and food recalls** in one normalized feed. Filter by company, subject keywords, issuing office, and date; extract full letter text as clean, **LLM-ready markdown** with **21 CFR citations** pulled out automatically; and run it on a Schedule in delta-only mode to get alerted the moment the FDA takes action against a company you care about.

Regulatory-intelligence services charge thousands per year for this data. This Actor gets it straight from FDA.gov and openFDA — official, public-domain sources — for cents.

### How to monitor FDA warning letters

1. Pick your sources: warning letters, drug recalls, device recalls, food recalls.
2. Filter by company name (e.g. a competitor or supplier), subject keywords (`CGMP`, `sterility`, `listeria`, `510(k)`), or date range.
3. Turn on **Delta only** and create an Apify Schedule — every run returns only enforcement actions that are new since the last run. Wire the dataset into Slack, email, or your own pipeline with any Apify integration.

### What you get

Each record is one dataset item, normalized across warning letters and recalls:

| Field | Description |
|---|---|
| `recordType` | `warning-letter`, `drug-recall`, `device-recall`, `food-recall` |
| `company` | Letter recipient or recalling firm |
| `issuedAt` | Letter issue date / recall report date |
| `subject` | Letter subject (e.g. "CGMP/Adulterated") or product description |
| `classification` | Recall class: Class I, II, or III |
| `cfrCitations` | Extracted 21 CFR citations (e.g. `21 CFR 211.22(d)`) |
| `fullTextMarkdown` | Complete letter as clean markdown (when enabled) |
| `letterUrl` | Link to the original letter on FDA.gov |
| `isNew` | Whether this record is new since the last run |

### Who uses this

- **Pharma / medical device regulatory affairs** — track FDA actions against competitors, suppliers, and CMOs
- **Quality & compliance teams** — feed warning-letter trends (by CFR citation) into audit prep
- **Food safety teams** — real-time recall monitoring by product keyword
- **Investors & analysts** — FDA enforcement as a signal on public companies
- **AI agents** — query FDA enforcement directly via MCP

### Use as an MCP server (AI agents)

The Actor runs in Standby mode as a streamable-HTTP MCP server via [mcp.apify.com](https://mcp.apify.com):

- `search_fda_enforcement` — search letters + recalls with company/keyword/date filters
- `get_warning_letter_markdown` — any warning letter as clean markdown with CFR citations

### Pricing

Pay per event — you only pay for what you extract:

| Event | Price |
|---|---|
| Actor start | $0.005 |
| Enforcement record | $0.002 |
| Letter full text (markdown + CFR citations) | $0.015 |

A daily delta-only monitor typically costs **well under $0.05 per run** — most runs return only a handful of new records.

### FAQ

**Where does the data come from?** Warning letters come from FDA.gov's official listing; recalls come from the openFDA enforcement API. Both are US-government public-domain data.

**How complete is it?** The warning-letter feed covers the full FDA archive (thousands of letters, updated as FDA publishes). Recalls cover drug, device, and food enforcement reports back to 2004.

**Do I need an API key?** No. Optionally add a free openFDA key to raise rate limits for very large pulls.

**Can I get only NEW enforcement actions?** Yes — that's delta-only mode. The Actor remembers what it already delivered for your exact filter combination.

# Actor input Schema

## `sources` (type: `array`):

Which FDA enforcement data to fetch.
## `companyName` (type: `string`):

Filter to letters/recalls for companies whose name contains this text.
## `subjectKeywords` (type: `array`):

Keep only records whose subject/product/reason contains any of these (e.g. `CGMP`, `sterility`, `listeria`).
## `dateFrom` (type: `string`):

YYYY-MM-DD.
## `dateTo` (type: `string`):

YYYY-MM-DD. Empty = today.
## `includeLetterFullText` (type: `boolean`):

Fetch each warning letter and convert it to clean markdown with extracted 21 CFR citations — ready for AI/RAG pipelines. Charged per letter.
## `deltaOnly` (type: `boolean`):

Return only records not seen in previous runs with the same filters. Ideal on a Schedule: get alerted only about NEW letters/recalls.
## `maxResults` (type: `integer`):

Maximum records per run.
## `openFdaApiKey` (type: `string`):

Raises openFDA rate limits from 1,000 to 120,000 requests/day. Free at open.fda.gov/apis/authentication.

## Actor input object example

```json
{
  "sources": [
    "warning-letters"
  ],
  "subjectKeywords": [],
  "dateFrom": "2026-01-01",
  "includeLetterFullText": false,
  "deltaOnly": false,
  "maxResults": 200
}
````

# 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 = {
    "dateFrom": "2026-01-01"
};

// Run the Actor and wait for it to finish
const run = await client.actor("schmarta/fda-warning-letters-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 = { "dateFrom": "2026-01-01" }

# Run the Actor and wait for it to finish
run = client.actor("schmarta/fda-warning-letters-recalls-monitor").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 '{
  "dateFrom": "2026-01-01"
}' |
apify call schmarta/fda-warning-letters-recalls-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=schmarta/fda-warning-letters-recalls-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FDA Warning Letters, Recalls & Enforcement Monitor",
        "description": "Monitor FDA warning letters and drug/device/food recalls in one normalized feed. Company filters, 21 CFR citation extraction, LLM-ready letter text, delta-only monitoring. Works as an MCP server for AI agents.",
        "version": "0.1",
        "x-build-id": "9nescf15Lo9usHKnY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/schmarta~fda-warning-letters-recalls-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-schmarta-fda-warning-letters-recalls-monitor",
                "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/schmarta~fda-warning-letters-recalls-monitor/runs": {
            "post": {
                "operationId": "runs-sync-schmarta-fda-warning-letters-recalls-monitor",
                "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/schmarta~fda-warning-letters-recalls-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-schmarta-fda-warning-letters-recalls-monitor",
                "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": {
                    "sources": {
                        "title": "📋 Sources",
                        "type": "array",
                        "description": "Which FDA enforcement data to fetch.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "warning-letters",
                                "drug-recalls",
                                "device-recalls",
                                "food-recalls"
                            ],
                            "enumTitles": [
                                "Warning letters",
                                "Drug recalls",
                                "Device recalls",
                                "Food recalls"
                            ]
                        },
                        "default": [
                            "warning-letters"
                        ]
                    },
                    "companyName": {
                        "title": "🏢 Company name",
                        "type": "string",
                        "description": "Filter to letters/recalls for companies whose name contains this text."
                    },
                    "subjectKeywords": {
                        "title": "🔎 Subject keywords",
                        "type": "array",
                        "description": "Keep only records whose subject/product/reason contains any of these (e.g. `CGMP`, `sterility`, `listeria`).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "dateFrom": {
                        "title": "📅 Issued after",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "YYYY-MM-DD."
                    },
                    "dateTo": {
                        "title": "📅 Issued before",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "YYYY-MM-DD. Empty = today."
                    },
                    "includeLetterFullText": {
                        "title": "🤖 Extract letter full text as LLM-ready markdown",
                        "type": "boolean",
                        "description": "Fetch each warning letter and convert it to clean markdown with extracted 21 CFR citations — ready for AI/RAG pipelines. Charged per letter.",
                        "default": false
                    },
                    "deltaOnly": {
                        "title": "🔔 Delta only (monitoring mode)",
                        "type": "boolean",
                        "description": "Return only records not seen in previous runs with the same filters. Ideal on a Schedule: get alerted only about NEW letters/recalls.",
                        "default": false
                    },
                    "maxResults": {
                        "title": "Max results",
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Maximum records per run.",
                        "default": 200
                    },
                    "openFdaApiKey": {
                        "title": "openFDA API key (optional)",
                        "type": "string",
                        "description": "Raises openFDA rate limits from 1,000 to 120,000 requests/day. Free at open.fda.gov/apis/authentication."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
