# FDA Food Adverse Events Scraper (`crawlerbros/fda-food-adverse-events-scraper`) Actor

Scrape the FDA CFSAN Adverse Event Reporting System (CAERS) - search 140,000+ food, dietary supplement, and cosmetic adverse event reports by product, reaction type, or date range. No API key required.

- **URL**: https://apify.com/crawlerbros/fda-food-adverse-events-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, Developer tools, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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.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 Food Adverse Events Scraper

Extract adverse event reports from the **FDA CFSAN Adverse Event Reporting System (CAERS)** — a public database of reports submitted to the FDA regarding food, dietary supplements, and cosmetic products. No API key or authentication required.

### What it does

This actor queries the [openFDA food adverse events API](https://open.fda.gov/apis/food/event/) and returns structured records for each adverse event report. You can search by product/brand name, reaction type, date range, or retrieve the most recent reports.

The CAERS database contains **140,000+ reports** covering:
- Foods and beverages
- Dietary supplements (vitamins, minerals, protein powders)
- Cosmetics and personal care products

### Data source

**API:** `https://api.fda.gov/food/event.json`  
**Provider:** U.S. Food & Drug Administration (FDA) / CFSAN  
**Access:** 100% public, no authentication required  
**Coverage:** Reports from 2004 onwards

### Input

| Field | Type | Description |
|-------|------|-------------|
| `mode` | select | Query mode: `recent`, `search`, `byProduct`, `byReaction`, `byDate` |
| `searchQuery` | string | Free-text query (search mode), brand/product name (byProduct), or reaction term (byReaction) |
| `dateFrom` | string | Start date in YYYYMMDD format (byDate mode only) |
| `dateTo` | string | End date in YYYYMMDD format (byDate mode only) |
| `maxItems` | integer | Maximum records to return (1–1000, default: 50) |

#### Modes

- **`recent`** — Returns the most recent adverse event reports with no filter. Best for daily monitoring.
- **`search`** — Free-text search across all report fields.
- **`byProduct`** — Search by brand or product name (e.g. `"Red Bull"`, `"5-Hour Energy"`, `"whey protein"`).
- **`byReaction`** — Search by adverse reaction type (e.g. `"nausea"`, `"vomiting"`, `"diarrhea"`, `"headache"`).
- **`byDate`** — Filter reports where the event occurred within a date range. Provide `dateFrom` and `dateTo` in `YYYYMMDD` format.

#### Example inputs

**Get 10 recent reports:**
```json
{"mode": "recent", "maxItems": 10}
````

**Search by product name:**

```json
{"mode": "byProduct", "searchQuery": "5-Hour Energy", "maxItems": 100}
```

**Search by reaction:**

```json
{"mode": "byReaction", "searchQuery": "nausea", "maxItems": 200}
```

**Date range:**

```json
{"mode": "byDate", "dateFrom": "20240101", "dateTo": "20240630", "maxItems": 500}
```

**Free-text search:**

```json
{"mode": "search", "searchQuery": "energy drink cardiac", "maxItems": 50}
```

### Output

Each record in the dataset contains:

| Field | Type | Description |
|-------|------|-------------|
| `reportNumber` | string | Unique FDA report identifier |
| `dateStarted` | string | Date the adverse event occurred (YYYY-MM-DD) |
| `products` | array | List of implicated products (see below) |
| `reactions` | array | List of reported adverse reactions |
| `outcomes` | array | List of health outcomes reported |
| `consumerGender` | string | Consumer gender (Male / Female) |
| `consumerAge` | number | Consumer age at time of event |
| `consumerAgeUnit` | string | Age unit (e.g. "year(s)") |
| `recordType` | string | Always `"foodAdverseEvent"` |
| `scrapedAt` | string | ISO 8601 UTC timestamp when scraped |
| `sourceUrl` | string | FDA API endpoint URL |

#### Product fields

Each item in `products` contains:

| Field | Type | Description |
|-------|------|-------------|
| `brandName` | string | Product or brand name |
| `industryCode` | string | FDA industry classification code |
| `industryName` | string | FDA industry name (e.g. "Snack Food Item", "Vit/Min/Prot/Unconv Diet") |

#### Example output record

```json
{
  "reportNumber": "2024-CFS-002280",
  "dateStarted": "2024-01-26",
  "reactions": ["Abdominal discomfort", "Dizziness", "Loss of consciousness"],
  "outcomes": ["Life Threatening"],
  "products": [
    {
      "brandName": "LAY BAR-B-QUE LOW SODIUM POTATO CHIPS",
      "industryCode": "07",
      "industryName": "Snack Food Item"
    }
  ],
  "consumerGender": "Female",
  "consumerAge": 63.0,
  "consumerAgeUnit": "year(s)",
  "recordType": "foodAdverseEvent",
  "scrapedAt": "2026-06-10T14:00:00.000000+00:00",
  "sourceUrl": "https://api.fda.gov/food/event.json"
}
```

### Use cases

- **Food safety research** — Identify patterns in adverse events linked to specific products or ingredients
- **Regulatory compliance monitoring** — Track reports for specific brands or product categories
- **Consumer health analytics** — Analyze reaction frequency and severity by product type
- **Journalism & public interest** — Investigate trends in dietary supplement safety
- **Competitive intelligence** — Monitor adverse event reports for competitor products

### FAQs

**Is this data free to use?**\
Yes. The FDA CAERS data is public domain, provided by the U.S. government at no cost.

**Why are some fields missing from certain records?**\
The actor uses omit-empty output — fields not present in the original FDA report (e.g. age, date\_started) are not included in the output record. This ensures clean, consistent data with no null values.

**What is the maximum number of records I can retrieve?**\
The `maxItems` parameter accepts values from 1 to 1,000. The FDA API itself contains 140,000+ records, so you can run the actor multiple times with date range filters to retrieve larger datasets.

**How current is the data?**\
The FDA updates the CAERS database regularly. Reports from 2004 onwards are available.

**Does this require proxy or cookies?**\
No. The FDA openFDA API is a public REST API with no bot protection or authentication requirements.

**What report types are included?**\
The database includes voluntary reports from consumers, healthcare professionals, and manufacturers about adverse events related to foods, dietary supplements, and cosmetics.

# Actor input Schema

## `mode` (type: `string`):

How to query the FDA CAERS database.

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

For mode=search: free-text query. For mode=byProduct: brand/product name (e.g. 'Red Bull'). For mode=byReaction: reaction term (e.g. 'nausea', 'vomiting', 'diarrhea').

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

Start of date range for mode=byDate. Format: YYYYMMDD (e.g. 20230101).

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

End of date range for mode=byDate. Format: YYYYMMDD (e.g. 20231231).

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

Maximum number of adverse event records to return.

## Actor input object example

```json
{
  "mode": "recent",
  "maxItems": 50
}
```

# Actor output Schema

## `adverseEvents` (type: `string`):

Dataset containing all scraped FDA food adverse event reports.

# 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 = {
    "mode": "recent",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/fda-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 = {
    "mode": "recent",
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/fda-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 '{
  "mode": "recent",
  "maxItems": 50
}' |
apify call crawlerbros/fda-food-adverse-events-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FDA Food Adverse Events Scraper",
        "description": "Scrape the FDA CFSAN Adverse Event Reporting System (CAERS) - search 140,000+ food, dietary supplement, and cosmetic adverse event reports by product, reaction type, or date range. No API key required.",
        "version": "1.0",
        "x-build-id": "jXTkLXOCdZoerEgMh"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~fda-food-adverse-events-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-fda-food-adverse-events-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/crawlerbros~fda-food-adverse-events-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-fda-food-adverse-events-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/crawlerbros~fda-food-adverse-events-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-fda-food-adverse-events-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",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "recent",
                            "search",
                            "byProduct",
                            "byReaction",
                            "byDate"
                        ],
                        "type": "string",
                        "description": "How to query the FDA CAERS database.",
                        "default": "recent"
                    },
                    "searchQuery": {
                        "title": "Search query / term",
                        "type": "string",
                        "description": "For mode=search: free-text query. For mode=byProduct: brand/product name (e.g. 'Red Bull'). For mode=byReaction: reaction term (e.g. 'nausea', 'vomiting', 'diarrhea')."
                    },
                    "dateFrom": {
                        "title": "Date from (YYYYMMDD)",
                        "type": "string",
                        "description": "Start of date range for mode=byDate. Format: YYYYMMDD (e.g. 20230101)."
                    },
                    "dateTo": {
                        "title": "Date to (YYYYMMDD)",
                        "type": "string",
                        "description": "End of date range for mode=byDate. Format: YYYYMMDD (e.g. 20231231)."
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of adverse event records to return.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
