# FDA Warning Letters Scraper (`automation-lab/fda-warning-letters-scraper`) Actor

⚖️ Export FDA warning letters with companies, recipients, inspections, violations, citations, full narratives, and response or closeout links.

- **URL**: https://apify.com/automation-lab/fda-warning-letters-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 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/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 Warning Letters Scraper

Export the FDA Warning Letters database into structured JSON, CSV, Excel, XML, or RSS-ready data.

Collect the latest letters or target a specific public FDA letter URL.
Get company names, issue and posted dates, FDA offices, recipients, violations, cited regulations, response links, closeout links, and full letter text.

Use the actor for recurring regulatory intelligence without manually opening every letter.

### What does FDA Warning Letters Scraper do?

FDA Warning Letters Scraper visits the official U.S. Food and Drug Administration Warning Letters index and its public detail pages.

It can:

- 🏢 extract recipient companies and organizations
- 📅 normalize posted and issue dates
- 🏛️ capture the FDA issuing office or center
- 🧾 collect MARCS-CMS and reference identifiers
- 👤 extract recipient name, title, and postal address
- 🔬 summarize the inspection context from the letter
- ⚖️ identify cited CFR and U.S.C. references
- 📄 save the complete normalized warning-letter narrative
- 🔗 preserve response, closeout, and canonical FDA links
- 🔍 filter index records by keyword, office, and date range

Each dataset row represents one FDA warning letter.

### Why use this FDA warning letters scraper?

The FDA site is designed for reading individual records, not for repeatable bulk exports and downstream monitoring.

This actor turns public enforcement content into stable records that can be searched, joined, compared, and routed automatically.

Typical benefits include:

- less manual copying from FDA pages
- repeatable supplier and manufacturer screening
- consistent fields across many letters
- complete source attribution for audit trails
- machine-readable narratives for text analysis
- scheduled collection of newly posted letters

### Who is it for?

#### Pharmaceutical and biotech compliance teams

Track CDER letters, manufacturing observations, CGMP themes, remediation requests, and repeat findings.

#### Food and dietary-supplement quality teams

Monitor firms, products, labeling issues, sanitation findings, and supplier-related enforcement signals.

#### Medical-device regulatory teams

Collect device warning letters for quality-system reviews, competitive intelligence, and post-market risk work.

#### Supplier-risk and KYB analysts

Check whether a supplier or manufacturer appears in FDA warning-letter records and retain evidence with canonical sources.

#### Regulatory consultants and legal teams

Build matter research, remediation timelines, citation libraries, and client alerts from complete letter text.

#### Data and market-intelligence teams

Feed structured FDA enforcement data into warehouses, dashboards, search indexes, or language-model workflows.

### What data can you extract?

| Field | Description |
|---|---|
| `postedDate` | Date FDA posted the letter |
| `issueDate` | Date shown on the warning letter |
| `company` | Recipient company or organization |
| `marcsCms` | FDA MARCS-CMS identifier |
| `referenceNumber` | FDA letter reference number |
| `deliveryMethod` | Delivery method stated by FDA |
| `product` | Product category, such as Drugs |
| `issuingOffice` | FDA office or center |
| `subject` | Subject from the FDA index |
| `recipientName` | Named letter recipient |
| `recipientTitle` | Recipient's title |
| `recipientAddress` | Postal address shown in the letter |
| `inspectionContext` | Inspection dates, facility, and related context |
| `violationNarrative` | Complete normalized warning-letter narrative |
| `citedRegulations` | CFR and U.S.C. citations detected in the text |
| `responseLetterUrls` | Public response-letter links |
| `closeoutLetterUrls` | Public closeout-letter links |
| `excerpt` | Excerpt available in the FDA index |
| `letterText` | Complete normalized text for analysis |
| `sourceUrl` | Canonical FDA detail URL |
| `scrapedAt` | UTC extraction timestamp |

Optional fields are omitted when FDA does not publish them or when index-only mode is selected.

### How to scrape FDA warning letters

1. Open the actor in Apify Console.
2. Leave **FDA warning letter URLs** empty to collect from the main index, or paste one or more FDA detail URLs.
3. Add a keyword, office, or issue-date range if needed.
4. Choose the maximum number of warning letters.
5. Keep **Extract full letter details** enabled for narratives, recipients, and citations.
6. Click **Start**.
7. Export the dataset as JSON, CSV, Excel, XML, or another supported format.

Start with 10 records to review the shape before scheduling a larger run.

### Input

The actor accepts these fields:

| Input | Type | Default | Purpose |
|---|---|---:|---|
| `startUrls` | array | empty | FDA index or detail URLs |
| `searchTerm` | string | empty | Match company, office, subject, or excerpt |
| `issuingOffice` | string | empty | Partial FDA office name, such as CDER |
| `fromDate` | string | empty | Earliest issue date in `YYYY-MM-DD` format |
| `toDate` | string | empty | Latest issue date in `YYYY-MM-DD` format |
| `maxItems` | integer | 10 | Maximum dataset rows |
| `includeDetails` | boolean | `true` | Open details and collect full content |
| `proxyConfiguration` | object | residential US | Connection settings |

Date filters apply to the FDA letter issue date.
Keyword and office filters are case-insensitive.

### Example input: latest warning letters

```json
{
  "maxItems": 25,
  "includeDetails": true
}
````

This discovers the newest FDA index records and opens each detail page.

### Example input: one company or subject

```json
{
  "searchTerm": "medical device",
  "fromDate": "2025-01-01",
  "maxItems": 50,
  "includeDetails": true
}
```

The search term is matched against index fields before detail extraction.

### Example input: a specific warning letter

```json
{
  "startUrls": [
    {
      "url": "https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/medline-inc-724347-05282026"
    }
  ],
  "maxItems": 1,
  "includeDetails": true
}
```

Direct detail URLs are useful for enrichment or evidence collection.

### Example output

```json
{
  "issueDate": "2026-05-28",
  "company": "Medline Inc",
  "marcsCms": "724347",
  "referenceNumber": "320-26-82",
  "deliveryMethod": "Via Electronic Mail - Return Receipt Requested",
  "product": "Drugs",
  "issuingOffice": "Center for Drug Evaluation and Research (CDER)",
  "recipientName": "Mr. James Boyle",
  "recipientTitle": "Chief Executive Officer",
  "recipientAddress": "Medline Inc\n3 Lakes Drive\nNorthfield, IL 60093\nUnited States",
  "citedRegulations": ["21 CFR 211.192"],
  "responseLetterUrls": [],
  "closeoutLetterUrls": [],
  "sourceUrl": "https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/medline-inc-724347-05282026",
  "scrapedAt": "2026-07-13T00:00:00.000Z"
}
```

The complete `letterText` and `violationNarrative` fields are intentionally omitted from this short example.

### Index-only mode

Set `includeDetails` to `false` when company, date, office, subject, and links are enough.

Index-only mode:

- is faster
- transfers less data
- avoids opening every letter
- does not include recipient, narrative, inspection context, or citation details

It still emits one normal warning-letter row per FDA index record.

### Filtering by FDA issuing office

Use recognizable office or center fragments:

- `CDER` for the Center for Drug Evaluation and Research
- `CDRH` for the Center for Devices and Radiological Health
- `CVM` for the Center for Veterinary Medicine
- `Human Foods` for food-program records

Office names can change over time, so partial matching is usually safer than a full exact name.

### Monitoring new warning letters

Create an Apify Schedule for daily or weekly collection.

A practical monitoring flow is:

1. run with an issue-date window
2. export or integrate the dataset
3. deduplicate downstream using `sourceUrl` or `marcsCms`
4. notify the relevant compliance owner
5. retain the source URL and extraction time with the alert

The actor does not maintain a hidden cross-run database, so your destination remains the system of record.

### How much does it cost to scrape FDA warning letters?

The actor uses pay-per-event pricing:

- a small Actor-start event covers run initialization
- one item event is charged only for each warning letter saved
- subscription tiers receive decreasing per-letter rates

The current BRONZE reference rate is approximately **$0.02 per saved warning letter**, plus the small start event.
Always review the live pricing panel in Apify Console because the platform price is authoritative.

Index-only runs may finish faster, but both modes produce the same billable entity: one saved warning-letter record.

### Data freshness and coverage

The actor reads the public FDA website at run time.
Output freshness therefore follows FDA publication and page availability.

The main index covers recently posted letters and historical pagination made available by FDA.
A date filter does not create records FDA has not published.

Some older or revised pages may have different markup or fewer metadata fields.
The full source URL is always included when a record is saved.

### Tips for reliable runs

- start with a low `maxItems`
- use a date range for recurring monitoring
- use direct URLs when enriching known records
- keep the default residential US proxy unless you have validated another route
- use `includeDetails: false` for fast bulk index exports before selecting letters for full-text extraction
- use index-only mode for fast triage
- retain `sourceUrl` in every downstream export

FDA may temporarily block requests even through a proxy.
The actor retries individual detail pages and skips a page only after the retry also fails.

### Integrations

#### Google Sheets and Excel

Export rows for compliance review, supplier screening, or remediation tracking.
Use `sourceUrl` as the stable link back to FDA.

#### Slack and Microsoft Teams

Run on a schedule and send newly detected companies, subjects, and issuing offices to an enforcement-alert channel.

#### Webhooks and automation platforms

Use Apify webhooks with Make, Zapier, n8n, or your own endpoint after a run succeeds.

#### Data warehouses

Load the dataset into BigQuery, Snowflake, PostgreSQL, or another analytical store.
Index `marcsCms`, `company`, `issueDate`, and `sourceUrl`.

#### Search and AI analysis

Index `letterText` for semantic search, citation clustering, remediation-theme analysis, or retrieval-augmented generation.
Always preserve the source and avoid treating automated summaries as legal advice.

### API usage with JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/fda-warning-letters-scraper').call({
  issuingOffice: 'CDER',
  fromDate: '2026-01-01',
  maxItems: 50,
  includeDetails: true
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### API usage with Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/fda-warning-letters-scraper').call(run_input={
    'searchTerm': 'CGMP',
    'maxItems': 25,
    'includeDetails': True,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### API usage with cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~fda-warning-letters-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"maxItems":10,"includeDetails":true}'
```

Fetch dataset items after the run finishes with the run's `defaultDatasetId`.

### Use with Apify MCP

Connect the actor to AI clients through Apify MCP:

```text
https://mcp.apify.com/?tools=automation-lab/fda-warning-letters-scraper
```

Example prompts:

- “Run the FDA Warning Letters Scraper for the latest 20 letters and group them by issuing office.”
- “Extract this FDA warning-letter URL and list every cited regulation with source evidence.”
- “Find CDER warning letters issued since January 2026 that mention contamination.”

#### Claude Code

Register the actor-scoped Streamable HTTP endpoint from your terminal:

```bash
claude mcp add --transport http apify-fda-warning-letters \
  "https://mcp.apify.com/?tools=automation-lab/fda-warning-letters-scraper" \
  --header "Authorization: Bearer $APIFY_TOKEN"
```

Keep `APIFY_TOKEN` in your environment rather than committing it to a project file. Restart Claude Code, then use one of the prompts above.

#### Claude Desktop, Cursor, or VS Code

Add this server entry to your client's MCP JSON configuration (`claude_desktop_config.json`, `.cursor/mcp.json`, or VS Code's user `mcp.json`):

```json
{
  "mcpServers": {
    "apify-fda-warning-letters": {
      "url": "https://mcp.apify.com/?tools=automation-lab/fda-warning-letters-scraper",
      "headers": {
        "Authorization": "Bearer <APIFY_TOKEN>"
      }
    }
  }
}
```

Replace `<APIFY_TOKEN>` with your Apify API token, save the file, and restart the client. Claude Desktop users can alternatively add the same URL as a custom connector and authenticate with OAuth.

### Legality and responsible use

FDA warning letters are public U.S. government regulatory records.
You are responsible for how you store, analyze, share, and act on the data.

Keep in mind:

- a warning letter is not necessarily the recipient's current regulatory status
- later correspondence may change or clarify the matter
- FDA advises users to contact the agency for additional available information
- personal details should be handled according to applicable privacy and data-retention rules
- automated output is not legal, medical, or regulatory advice

Always review the current letter and any response or closeout material before making consequential decisions.

### Limitations

- FDA uses anti-bot protections and direct requests commonly return HTTP 403.
- Residential proxy access can still be temporarily blocked.
- Some historical letters use different page structures.
- Citation extraction uses pattern matching and may not capture every informal reference.
- A keyword filter checks FDA index fields, not the complete narrative before selection.
- Response and closeout links exist only when FDA publishes them.
- Full-letter mode is slower than index-only mode.
- The actor does not infer whether violations remain unresolved.

### Troubleshooting

#### Why did the run return no records?

Broaden the date range or keyword, and confirm the requested URL is an FDA warning-letter page.
If logs show access denial, keep the default residential US proxy and retry later.

#### Why is a detail field missing?

FDA may not publish that field, especially on older pages.
Check `letterText` and `sourceUrl` for the authoritative content.

#### Why does a narrow keyword search take longer?

Filters are applied to FDA's downloadable warning-letter index before detail pages are opened.
A rare term can return fewer records than `maxItems` when the export contains only a few matches.
Use `fromDate`, `toDate`, and `maxItems` to keep recurring exports bounded.

#### Can I use a datacenter proxy?

You can customize `proxyConfiguration`, but FDA frequently blocks direct and datacenter traffic.
The residential US default is the tested path.

### FAQ

#### Does the actor download PDFs?

It saves public response and closeout links when present.
The main warning letters are usually HTML pages, and their normalized text is saved directly.

#### Can I scrape one known letter?

Yes. Put the canonical FDA detail URL in `startUrls` and set `maxItems` to `1`.

#### Can I collect only index metadata?

Yes. Set `includeDetails` to `false`.

#### How do I avoid duplicates?

Deduplicate downstream by `sourceUrl` or `marcsCms`.
For scheduled runs, store previously seen values in your own database or automation workflow.

#### Is this an official FDA product?

No. This is an independent scraper for public FDA pages.
FDA remains the authoritative source.

#### Does it provide legal conclusions?

No. It extracts published records and does not determine liability, compliance status, or remediation sufficiency.

### Related FDA scrapers

Combine warning-letter intelligence with other public FDA datasets:

- [FDA Drug Shortages Scraper](https://apify.com/automation-lab/fda-drug-shortages-scraper)
- [FDA Drug Labels Scraper](https://apify.com/automation-lab/fda-drug-labels-scraper)
- [FDA Food Recalls Scraper](https://apify.com/automation-lab/fda-food-recalls-scraper)
- [FDA Medical Device Recalls Scraper](https://apify.com/automation-lab/fda-medical-device-recalls-scraper)
- [FDA Orange Book Scraper](https://apify.com/automation-lab/fda-orange-book-scraper)
- [FDA MAUDE Adverse Event Reports Scraper](https://apify.com/automation-lab/fda-maude-adverse-event-reports-scraper)

Use warning letters for enforcement context, recalls for market actions, and structured FDA product datasets for enrichment.

### Support

If a run fails, share the run URL and a non-sensitive example input through the actor's Issues tab.
Include whether you used index-only or full-detail mode and which FDA page was involved.

The output is designed to keep the original `sourceUrl`, making extraction problems easier to reproduce and verify.

# Actor input Schema

## `startUrls` (type: `array`):

Optional FDA warning-letter detail or index URLs. Leave empty to crawl the main Warning Letters index.

## `searchTerm` (type: `string`):

Keep only index records whose company, office, subject, or excerpt contains this text.

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

Optional partial office name, such as CDER, CDRH, or Human Foods Program.

## `fromDate` (type: `string`):

Include letters issued on or after this date (YYYY-MM-DD).

## `toDate` (type: `string`):

Include letters issued on or before this date (YYYY-MM-DD).

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

Maximum number of dataset records to save.

## `includeDetails` (type: `boolean`):

Open each letter to collect recipient, reference, inspection context, regulations, and full narrative. Disable for a faster index-only export.

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

FDA commonly blocks direct/datacenter traffic. The default uses an Apify residential US proxy.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/medline-inc-724347-05282026"
    }
  ],
  "maxItems": 10,
  "includeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        {
            "url": "https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/medline-inc-724347-05282026"
        }
    ],
    "searchTerm": "",
    "issuingOffice": "",
    "fromDate": "",
    "toDate": "",
    "maxItems": 10,
    "includeDetails": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/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 = {
    "startUrls": [{ "url": "https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/medline-inc-724347-05282026" }],
    "searchTerm": "",
    "issuingOffice": "",
    "fromDate": "",
    "toDate": "",
    "maxItems": 10,
    "includeDetails": True,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/fda-warning-letters-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 '{
  "startUrls": [
    {
      "url": "https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/medline-inc-724347-05282026"
    }
  ],
  "searchTerm": "",
  "issuingOffice": "",
  "fromDate": "",
  "toDate": "",
  "maxItems": 10,
  "includeDetails": true
}' |
apify call automation-lab/fda-warning-letters-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FDA Warning Letters Scraper",
        "description": "⚖️ Export FDA warning letters with companies, recipients, inspections, violations, citations, full narratives, and response or closeout links.",
        "version": "0.1",
        "x-build-id": "aq5J9JuuHcW5Ec8eh"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~fda-warning-letters-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-fda-warning-letters-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/automation-lab~fda-warning-letters-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-fda-warning-letters-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/automation-lab~fda-warning-letters-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-fda-warning-letters-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": {
                    "startUrls": {
                        "title": "🔗 FDA warning letter URLs",
                        "type": "array",
                        "description": "Optional FDA warning-letter detail or index URLs. Leave empty to crawl the main Warning Letters index.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "searchTerm": {
                        "title": "Search term",
                        "type": "string",
                        "description": "Keep only index records whose company, office, subject, or excerpt contains this text."
                    },
                    "issuingOffice": {
                        "title": "Issuing office",
                        "type": "string",
                        "description": "Optional partial office name, such as CDER, CDRH, or Human Foods Program."
                    },
                    "fromDate": {
                        "title": "Issue date from",
                        "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Include letters issued on or after this date (YYYY-MM-DD)."
                    },
                    "toDate": {
                        "title": "Issue date to",
                        "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Include letters issued on or before this date (YYYY-MM-DD)."
                    },
                    "maxItems": {
                        "title": "Maximum warning letters",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of dataset records to save.",
                        "default": 10
                    },
                    "includeDetails": {
                        "title": "Extract full letter details",
                        "type": "boolean",
                        "description": "Open each letter to collect recipient, reference, inspection context, regulations, and full narrative. Disable for a faster index-only export.",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "FDA commonly blocks direct/datacenter traffic. The default uses an Apify residential US proxy.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
