# openFDA Food Adverse Events Scraper (`neuton/openfda-food-adverse-events-scraper`) Actor

Extract FDA CAERS food adverse event reports from openFDA for product safety monitoring, supplement research, and consumer-health risk analysis.

- **URL**: https://apify.com/neuton/openfda-food-adverse-events-scraper.md
- **Developed by:** [Ashwin Prasad](https://apify.com/neuton) (community)
- **Categories:** Business, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## openFDA Food Adverse Events Scraper

Extract FDA CAERS food adverse event reports from openFDA for food and supplement safety monitoring, consumer-health research, retail compliance, ecommerce product-risk analysis, supplier due diligence, and brand-safety workflows. This actor is useful for retailers, food brands, supplement companies, compliance teams, health researchers, and AI agents that need structured official food adverse-event rows.

### What You Can Extract

- Report number, created date, event start date, outcomes, and reactions
- Consumer age and gender fields when available
- Suspect products, all products, industry names, source URL, and raw FDA payload
- Query metadata for product keywords, reaction terms, and industry filters
- One row per FDA CAERS adverse-event report returned by openFDA

### Common Use Cases

- Monitor adverse event signals for foods, beverages, dietary supplements, and ingredients
- Research product safety issues by brand, product keyword, reaction keyword, or industry name
- Support retail, ecommerce, marketplace, supplier, and private-label compliance workflows
- Build safety dashboards and risk-review queues for product teams
- Feed AI agents that summarize recent CAERS reports and flag patterns for human review

### SEO Keywords

openFDA food adverse events scraper, FDA CAERS API, food safety data scraper, supplement adverse event reports, consumer health risk data, retail compliance scraper, product safety monitoring, FDA adverse event dataset.

### Example Input

```json
{
  "productKeyword": "protein",
  "reactionKeyword": "nausea",
  "industryName": "Dietary Supplements",
  "maxResults": 100
}
```

### Output

Rows include report number, created date, event start date, outcome fields, reactions, consumer age and gender fields, suspect products, industry names, source URL, raw FDA payload, and query metadata. Export as JSON, CSV, Excel, or connect to monitoring workflows through the Apify API.

### Pricing Recommendation

Launch at $2-$3 per 1,000 adverse-event rows, then increase toward $4-$5 per 1,000 after food-safety, retail-compliance, or supplement-monitoring usage appears. The official openFDA endpoint keeps compute cost low.

### Responsible Use

This actor extracts public FDA CAERS reports. Use the data for research, monitoring, and compliance support. Reports do not prove causation; verify important medical, legal, safety, or product decisions with primary FDA records and qualified professionals.

# Actor input Schema

## `productSearch` (type: `string`):

Optional product or brand keyword.

## `reactionSearch` (type: `string`):

Optional reaction keyword.

## `industryName` (type: `string`):

Optional openFDA industry name keyword.

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

Maximum adverse event rows to return.

## Actor input object example

```json
{
  "productSearch": "",
  "reactionSearch": "",
  "industryName": "",
  "maxResults": 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("neuton/openfda-food-adverse-events-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("neuton/openfda-food-adverse-events-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 '{}' |
apify call neuton/openfda-food-adverse-events-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=neuton/openfda-food-adverse-events-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pwi0vBunfNRjcScst/builds/sjLEhsxReXvQoecRh/openapi.json
