# openFDA Drug and Device Adverse Event Feed (`thoob/openfda-adverse-event-feed`) Actor

Returns drug and medical device adverse event reports from the public openFDA API for the products you list: dates, seriousness, reactions, drugs, devices, problems and narratives. No key needed. Only delivered adverse event rows are billed.

- **URL**: https://apify.com/thoob/openfda-adverse-event-feed.md
- **Developed by:** [Pono Data](https://apify.com/thoob) (community)
- **Categories:** Business, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 adverse event reports

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## openFDA Drug and Device Adverse Event Feed

This actor returns adverse event reports from the public openFDA API for the drug or device names you list. It is for pharmacovigilance teams, device quality and regulatory staff, and analysts.

A report does not show that a product caused the event. openFDA states: "Do not rely on openFDA to make decisions regarding medical care. While we make every effort to ensure that data is accurate, you should assume all results are unvalidated. We may limit or otherwise restrict your access to the API in line with our Terms of Service."

### Input

```json
{"kind": "drug", "products": ["semaglutide"], "seriousOnly": false, "since": "2026-01-01", "onlyNew": false, "maxRecords": 20}
```

- `kind`: `drug` or `device`.
- `products`: matched against brand and generic name. Case-insensitive duplicates are dropped.
- `seriousOnly`: serious drug reports only.
- `since`: earliest received date, `YYYY-MM-DD`. openFDA runs weeks behind, so there is no default.
- `onlyNew`: skip reports delivered by earlier runs with this option on.
- `maxRecords`: cap on billed rows, split evenly across products. 0 means no cap.

### Output

One row per report, newest first. Drug rows carry `reportId`, `receivedDate`, `serious`, `seriousness`, `reactions`, `drugs` and patient fields. Device rows carry `reportNumber`, `mdrReportKey`, `dateReceived`, `dateOfEvent`, `eventType`, `devices`, `productProblems` and `narratives`. Codes are kept as given. Missing values are null.

Illustration only, values may differ:

```json
{
  "kind": "drug",
  "matchedProduct": "semaglutide",
  "reportId": "24901234",
  "receivedDate": "2026-09-30",
  "serious": true,
  "seriousness": ["seriousnesshospitalization"],
  "occurCountry": "US",
  "reporterQualification": "5",
  "patientAge": "54",
  "patientAgeUnit": "801",
  "reactions": ["Nausea", "Vomiting"],
  "drugs": [{"medicinalProduct": "OZEMPIC", "characterization": "1", "indication": null, "activeSubstance": "SEMAGLUTIDE", "brandNames": ["OZEMPIC"], "genericNames": ["SEMAGLUTIDE"], "manufacturers": ["Novo Nordisk A/S"]}],
  "companyNumber": null,
  "sourceUrl": "https://api.fda.gov/drug/event.json?search=...&limit=20&skip=0",
  "retrievedAt": "2026-11-21T08:00:00Z"
}
```

### Who uses it

- Pharmacovigilance teams who monitor `reactions` and `seriousness` for their own drugs.
- Device quality engineers who review `productProblems`, `devices` and `eventType` for products they make or buy.
- Market analysts who compare report counts by `matchedProduct` and `receivedDate` across competing products.
- Law firms who read `narratives` and `occurCountry` while researching product cases.

### Pricing

Pay per event: `event-report` costs USD 1.00 per 1,000 rows, charged only for delivered adverse event rows. Every other row is free; this actor writes no other rows.

### Limits

- At most 25,000 reports per product (openFDA skip limit).
- At most 900 requests per run, under the documented 1,000 per day per IP.
- A report matched by two products is delivered once.
- Narratives are cut to 2,000 characters.
- A failing product logs a warning; the run continues.

### FAQ

#### What input does it need?

`products` is required: list the product names to search. `kind` selects drug or device reports, and `seriousOnly` and `since` narrow the results.

#### What does an empty result mean?

No openFDA reports matched your products and filters. Searches with no match are not billed.

#### Which product does a row belong to?

`matchedProduct` shows the entry from your `products` list that the report matched.

#### Can I run it on a schedule or through the API?

Yes. You can use Apify schedules or the Apify API. For repeat runs, `onlyNew` is meant to return only new reports, and `maxRecords` caps billed rows.

### Compliance

- Public sources only: the documented openFDA endpoints drug/event.json and device/event.json.
- No API key, no login, no proxy.
- Honest User-Agent: `PonoDataActors/1.0 (+https://ponodata.com)`.
- Requests are at least 500 ms apart.

# Actor input Schema

## `kind` (type: `string`):

drug searches drug adverse event reports, device searches medical device reports.

## `products` (type: `array`):

Product names matched against brand and generic name. Entries are trimmed. Empty entries and entries containing a double quote are dropped. Case-insensitive duplicates are dropped.

## `seriousOnly` (type: `boolean`):

Drug only: return only reports marked serious. Ignored with a warning for devices.

## `since` (type: `string`):

Optional earliest received date, YYYY-MM-DD, a real date not after today UTC. No default window because openFDA runs weeks behind.

## `onlyNew` (type: `boolean`):

Deliver only reports not delivered by an earlier run that had this option on. State is kept in the key-value store openfda-adverse-event-feed-seen.

## `maxRecords` (type: `integer`):

Cap on delivered, billed rows, split evenly across products. Bounds fetching too. 0 means no cap.

## Actor input object example

```json
{
  "kind": "drug",
  "products": [
    "semaglutide"
  ],
  "seriousOnly": false,
  "onlyNew": false,
  "maxRecords": 20
}
```

# Actor output Schema

## `reports` (type: `string`):

One row per delivered report.

# 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 = {
    "kind": "drug",
    "products": [
        "semaglutide"
    ],
    "onlyNew": false,
    "maxRecords": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("thoob/openfda-adverse-event-feed").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 = {
    "kind": "drug",
    "products": ["semaglutide"],
    "onlyNew": False,
    "maxRecords": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("thoob/openfda-adverse-event-feed").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "kind": "drug",
  "products": [
    "semaglutide"
  ],
  "onlyNew": false,
  "maxRecords": 20
}' |
apify call thoob/openfda-adverse-event-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thoob/openfda-adverse-event-feed"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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