# FDA Warning Letters Scraper: Company, Office & Full Text (`scrapers_lat/fda-warning-letters-scraper`) Actor

Scrape FDA Warning Letters (pharma, food, devices, tobacco). Get company, issuing office/center, subject, posted & issue dates, closeout status, letter URL, plus full letter text, recipient, product area and cited violations. Filter by keyword, office, date. Export JSON, CSV, Excel.

- **URL**: https://apify.com/scrapers\_lat/fda-warning-letters-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Scraper

Turn the FDA's public **Warning Letters** database into clean, structured, exportable data. Track enforcement actions the FDA issues to companies across **drugs & pharma, medical devices, food & beverage, tobacco/vaping, cosmetics, veterinary medicine, biologics and clinical investigators** — a high-signal, early indicator of regulatory risk that recall data alone won't show you.

Built for **legal, regulatory affairs, compliance, pharma/med-device, consulting, due-diligence and investment** teams who need to monitor enforcement, benchmark competitors, or build a warning-letter dataset.

### What you get

Every warning letter is returned as a structured record:

**Core (every letter)**

- Company / recipient name
- Issuing office & FDA center (CDER, CDRH, CFSAN, Center for Tobacco Products, CVM, district offices, and more)
- Subject / topic of the letter
- Posted date and letter issue date
- Response-letter and close-out status
- Direct link to the letter

**Full detail (when enabled)**

- **Full letter text** — the complete letter, verbatim
- **Cited violations** — regulatory references extracted from the letter (21 CFR, U.S.C. sections, act sections)
- Recipient name, title and full postal address
- Contact email (when the letter shows one)
- Delivery method, FDA reference number and product area

### Filters

- **Keyword search** across company names and letter content (drug, brand, violation term)
- **Issuing office / center** (e.g. CDER, Center for Tobacco Products, CFSAN)
- **Company name contains**
- **Subject / topic contains**
- **Posted / issued within** last 7 / 30 / 60 / 90 days
- **Exact posted-date range** (from / to) and **calendar year**
- Toggle full-letter detail on or off

### Example use cases

- Monitor new enforcement actions against competitors or your own suppliers
- Build a searchable warning-letter dataset with full text and cited violations
- Feed compliance dashboards, KYB/diligence workflows and risk models
- Track tobacco/vape or CGMP enforcement trends over time

### Output

Results stream to your dataset and export to **JSON, CSV, Excel or API**. Each record is flat and ready for spreadsheets, BI tools or a database.

### Pricing

Pay-per-result: a small charge per warning letter, plus an optional add-on only when a letter is enriched with its full text and detail fields. You only pay for data you actually receive — failed fetches are never charged. Free-plan Apify accounts are capped at 10 letters per run.

### Notes

Data comes from the FDA's public Warning Letters database and reflects what the FDA has published. Redactions in the original letters (shown as "(b)(4)") are preserved as-is.

# Actor input Schema

## `searchQuery` (type: `string`):

Full-text search across company names and letter content, for example a company name, drug, brand, or violation term ('CGMP', 'data integrity', 'unapproved new drug'). Leave empty to list all warning letters newest-first.

## `issuingOffice` (type: `string`):

Restrict to a specific FDA issuing office or center, for example 'CDER', 'Center for Tobacco Products', 'CFSAN', 'CDRH', or a district office name.

## `companyKeyword` (type: `string`):

Only return letters whose company name contains this text (case-insensitive). Applied in addition to the keyword search.

## `subjectKeyword` (type: `string`):

Only return letters whose subject/topic contains this text, for example 'tobacco', 'adulterated', 'misbranded', 'CGMP'.

## `postedWithin` (type: `string`):

Restrict by how recently the letter was posted.

## `issuedWithin` (type: `string`):

Restrict by how recently the letter was issued to the company.

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

Only include letters posted on or after this date. Efficient: the scraper stops paging once it passes below this date.

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

Only include letters posted on or before this date.

## `year` (type: `string`):

Only include letters posted in this calendar year, for example 2025.

## `fetchDetails` (type: `boolean`):

When enabled, each letter is enriched from its detail page with the full letter text, recipient name/title/address, delivery method, reference number, product area and cited violations. Disable for a faster, index-only run.

## `maxLetters` (type: `integer`):

Maximum number of warning letters to collect.

## `proxyConfiguration` (type: `object`):

Proxy settings. Defaults to Apify Residential (US), required to reach fda.gov reliably.

## `withAiSummary` (type: `boolean`):

Add an AI-generated plain-English summary of each warning letter (paid add-on).

## `withAiExtract` (type: `boolean`):

Extract violations, products, required actions and response deadline from each letter (paid add-on).

## `withAiSeverity` (type: `boolean`):

Rate each letter's enforcement severity low/medium/high/critical with a 0-100 score (paid add-on).

## Actor input object example

```json
{
  "postedWithin": "Any",
  "issuedWithin": "Any",
  "fetchDetails": true,
  "maxLetters": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  },
  "withAiSummary": false,
  "withAiExtract": false,
  "withAiSeverity": false
}
```

# 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 = {
    "maxLetters": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/fda-warning-letters-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 = {
    "maxLetters": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/fda-warning-letters-scraper").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 '{
  "maxLetters": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call scrapers_lat/fda-warning-letters-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/fda-warning-letters-scraper"
        }
    }
}

```

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/lHNYb8Yn7GhukFW71/builds/d3Msw1dCnF1yU5gEt/openapi.json
