ParseForge Scrapers

openFDA Food Adverse Events Scraper

parseforge/openfda-food-events-scraper

News & mediaOther

Scrapes food adverse event reports from the openFDA CAERS database using Lucene search queries. Returns each report as a flat row with product details, reactions, and outcomes.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
94
Bookmarked
0
Rating
Not rated yet
Last modified
12 days ago

Overview

ParseForge

openFDA Food Adverse Events Scraper

Scrape food adverse event reports from the openFDA CAERS database, filtered by product name, brand, or reaction. Every report includes the food product, patient symptoms, outcomes, and submission dates. No API key required. Export to CSV, JSON, Excel, or XML.

The FDA's CFSAN Adverse Event Reporting System (CAERS) holds millions of reports about suspected food-related illnesses and allergic reactions, but the openFDA portal only lets you browse a few pages at a time. This Actor reads the public openFDA API directly, runs your Lucene search query across the entire CAERS database, and returns every matching report in one flat dataset.\n\nYou can search by brand name, product category, specific symptoms like NAUSEA or HEADACHE, or any indexed field. Set a cap from 1 to 1,000,000 events per run.

Who uses it What they scrape openFDA for
Food safety researchers Monitor emerging signals in supplement and functional food categories across multi-year windows.
Consumer advocacy groups Identify which branded products appear most often in serious adverse event reports.
Regulatory consultants Pull the full CAERS history for a specific ingredient before a GRAS or NDI submission.
Data journalists Build a timeline of reported reactions linked to a recalled product or outbreak.

What it does

This Actor collects food adverse event reports from the openFDA CAERS endpoint and returns each report as a flat row with product details, reactions, outcomes, and report metadata.

  • ๐Ÿ” Lucene search queries: use openFDA's full query syntax on fields like products.name_brand, reactions, or date_started.
  • ๐Ÿ“Š Flat row output: every report is one row, ready for pivot tables, time-series charts, or a database import.
  • โš™๏ธ Configurable volume: pull as few as 1 event for a quick check or up to 1,000,000 for a complete archive.
  • ๐Ÿ”‘ No registration needed: the openFDA API is public and keyless, so you start scraping immediately.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with openFDA data

๐Ÿฅœ Monitor a supplement brand.

A food safety consultant runs a search for products.name_brand:"Brand X" every month to flag any new serious outcomes before a client's annual safety review.

๐Ÿคข Track specific symptoms.

A researcher queries reactions:"ANAPHYLACTIC REACTION" across all products for the last five years to study underreporting patterns in food allergy data.

๐Ÿ“… Build a regulatory timeline.

A law firm pulls every CAERS report mentioning a recalled ingredient and sorts by date_started to establish when the FDA first received signals.

๐Ÿ“ˆ Compare product categories.

An analyst runs separate searches for energy drinks, protein powders, and herbal teas, then compares the most frequent reactions in each category.

Why choose this scraper

What you get
No API key or OAuth openFDA is a public service; paste a query and run.
Full CAERS schema Every field the API returns lands in your dataset with no column dropped.
Large-volume friendly Set maxItems up to 1,000,000 and let the paginator handle the rest.
Export anywhere CSV, JSON, Excel, and XML are built into the Apify platform.

How it compares

This Actor focuses exclusively on the openFDA CAERS food adverse events endpoint with a simple two-field input, while the competitors below cover broader FDA datasets or add AI scoring.

Feature ParseForge ๐Ÿ’Š OpenFDA Drug Intelligence ๐Ÿ’Š FDA Intelligence openFDA Food Adverse Events Scraper
CAERS food adverse events Yes Not listed Not listed Yes
Lucene search query input Yes Not listed Not listed Not listed
No API key required Yes Yes Not listed Yes
Configurable max items per run Yes Not listed Not listed Not listed
AI severity scoring Not listed Yes Not listed Not listed
Drug adverse events (FAERS) Not listed Yes Yes Not listed
Device recalls and approvals Not listed Not listed Yes Not listed

Configure the run

Drive the Actor with an openFDA Lucene search query and a maximum event count; the search runs server-side so only matching reports count toward your limit. The Input tab lists every parameter.

A first run with the defaults:

{
  "maxItems": 10
}

A larger pull:

{
  "maxItems": 200
}

Pricing

Pay-per-result: $0.021 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $2.10
1,000 results $21.00
10,000 results $210.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the openFDA Food Adverse Events Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to openFDA through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/openfda-food-events-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting zero results?

Check your Lucene query syntax. Field names are case-sensitive and use a colon, not an equals sign. Try a simpler query first, like reactions:"NAUSEA", to confirm the connection works.

The run stopped before reaching my maxItems limit.

The openFDA API returns a total match count in its metadata. If your query matches fewer reports than your maxItems value, the Actor stops when it has fetched every available match.

Some fields are empty in my dataset.

CAERS reports are submitted voluntarily and many fields are optional. A blank cell means the reporter did not provide that information, not that the Actor failed to extract it.

My search query returns an error.

Escape special Lucene characters like colons inside values. For example, a brand name with a colon needs a backslash before it. Test your query on the openFDA website first if you are unsure.

The run is taking a long time.

Large queries pulling hundreds of thousands of reports will take time because the Actor paginates respectfully. Reduce maxItems or narrow your search query with additional filters to speed it up.

FAQ

Question Answer
What is the openFDA CAERS database? CAERS is the CFSAN Adverse Event Reporting System, where the FDA collects voluntary and mandatory reports of suspected food-related illnesses, allergic reactions, and other adverse events. openFDA makes this data available through a public, keyless API.
Do I need an API key or FDA account? No. The openFDA API is completely public and does not require registration, an API key, or OAuth. You can start scraping immediately.
How do I write a search query? Use openFDA Lucene syntax in the 'search' input field. For example, products.name_brand:"peanut butter" searches by brand name, and reactions:"NAUSEA" filters by reported symptom. Leave the field blank to fetch the newest reports.
What fields does each report contain? Each row includes the product name, brand, industry code, patient reactions, outcomes (e.g., hospitalization), report submission date, and the unique report number. The exact schema is visible in the sample output on the Actor's page.
Can I search by date range? Yes. Use the date_started field in your Lucene query, for example date_started:[20230101 TO 20231231], to limit results to a specific year or window.
How many reports can I pull in one run? You can set maxItems anywhere from 1 to 1,000,000. The Actor paginates through the openFDA API automatically until it hits your limit or exhausts the result set.
Is this the same as the FDA FAERS drug database? No. FAERS covers drug adverse events. This Actor scrapes CAERS, which covers food, dietary supplements, and cosmetic products. For drug data, use a FAERS-specific scraper.
What export formats are supported? You can export your dataset in CSV, JSON, Excel, or XML directly from the Apify platform after the run completes.
Can I schedule this to run automatically? Yes. Apify supports scheduled runs. Set this Actor to run daily or weekly with a fixed query to monitor new adverse event reports as they appear.
Does this Actor handle the openFDA rate limit? The Actor respects the openFDA API's response headers and pauses between requests automatically. For very large pulls, the run may take longer but will complete without being blocked.

Related actors

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. Food and Drug Administration. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
maxItems integer How many food adverse events to collect per run. 10
search string openFDA Lucene search query. Examples: products.name_brand:"peanut butter", reactions:"NAUSEA". Leave blank for newest. not set

Pricing

from $19.00 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.019 to $0.021

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~openfda-food-events-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run openFDA Food Adverse Events Scraper on Apify All scrapers