# FDA Product Intelligence — Approvals & Recalls (`ryanclinton/fda-product-intelligence`) Actor

Get a comprehensive FDA regulatory intelligence report for any drug, device, or food product — combining approvals, adverse events, and recalls from **9 openFDA endpoints** in a single run.

- **URL**: https://apify.com/ryanclinton/fda-product-intelligence.md
- **Developed by:** [ryan clinton](https://apify.com/ryanclinton) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN 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 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 Product Intelligence

Get a comprehensive FDA regulatory intelligence report for any drug, device, or food product — combining approvals, adverse events, and recalls from **9 openFDA endpoints** in a single run. Search by product name, company name, or both, and receive a unified risk-assessed profile with cross-domain timeline, key findings, and aggregate safety statistics.

### Why Use This Actor?

- **One query, full picture** — queries 9 separate FDA endpoints in parallel and returns a single intelligence report instead of requiring 9 separate API integrations
- **Risk assessment** — automatically computes a risk level (CRITICAL / HIGH / MODERATE / LOW / MINIMAL) based on Class I recalls, death reports, adverse event seriousness rates, and ongoing recalls
- **Key findings** — generates human-readable insights like "34,791 death-associated drug adverse event reports" and "2 Class I recall(s) — most serious category"
- **Cross-domain timeline** — builds a chronological timeline of approvals, clearances, and recalls across drugs, devices, and food
- **Smart aggregation** — uses openFDA count endpoints for adverse event statistics (top reactions, outcomes, seriousness) instead of fetching millions of individual records
- **No API key needed** — uses the free public openFDA API

### Key Features

- Searches across **3 FDA domains**: drugs, medical devices, and food/supplements
- Queries **9 openFDA endpoints** in parallel: drug approvals, drug adverse events, drug recalls, device 510(k) clearances, device PMA approvals, device adverse events (MAUDE), device recalls, food adverse events (CAERS), and food recalls
- Computes **risk level** from Class I recall counts, death-associated reports, seriousness ratios, and ongoing recalls
- Generates **key findings** — a bullet list of the most important regulatory signals
- Builds a **cross-domain timeline** — approval dates, clearance dates, and recall dates sorted chronologically
- Returns **aggregate adverse event statistics** — total reports, serious count, death count, and top 15 reaction/outcome terms
- Configurable **search scope** — search all domains or narrow to drugs, devices, or food only
- **Parallel execution** — all endpoint queries run concurrently for fast results (typically 2-5 seconds)
- Automatic **retry with backoff** on rate limits and transient errors

### How to Use

1. Go to the actor's input page on Apify Console
2. Enter a **Product Name** (e.g. "metformin", "pacemaker") and/or **Company Name** (e.g. "Pfizer", "Medtronic")
3. Optionally select a **Search Scope** to narrow results to a specific domain
4. Optionally set a **date range** to filter results
5. Click **Start** and wait for the intelligence report
6. Download the report from the Dataset tab

### Input Parameters

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `productName` | string | No* | Drug, device, or food product name |
| `companyName` | string | No* | Manufacturer, sponsor, or recalling firm |
| `searchScope` | enum | No | `all`, `drugs`, `devices`, or `food` (default: `all`) |
| `dateFrom` | string | No | Start date filter (YYYY-MM-DD) |
| `dateTo` | string | No | End date filter (YYYY-MM-DD) |
| `maxResultsPerCategory` | integer | No | Max detailed records per category (default: 25, max: 100) |

*At least one of `productName` or `companyName` is required.

### Input Examples

#### Drug safety profile
```json
{
    "productName": "metformin",
    "searchScope": "drugs"
}
````

#### Company-wide regulatory intelligence

```json
{
    "companyName": "Medtronic",
    "searchScope": "all"
}
```

#### NDMA contamination investigation

```json
{
    "productName": "valsartan",
    "searchScope": "drugs",
    "dateFrom": "2018-01-01",
    "dateTo": "2023-12-31"
}
```

#### Medical device due diligence

```json
{
    "productName": "pacemaker",
    "companyName": "Medtronic",
    "searchScope": "devices",
    "maxResultsPerCategory": 50
}
```

### Input Tips

- Use **brand names** (Lipitor) or **generic names** (atorvastatin) for drug searches — both are searched
- **Company names** for drug approvals are automatically uppercased (FDA stores sponsor names in ALL CAPS)
- Set `searchScope` to a specific domain if you know the product type — this reduces API calls and speeds up the response
- The `maxResultsPerCategory` only limits detailed records (approvals, recalls). Adverse event **aggregates** (totals, top reactions) always include all matching records
- Date filters apply differently per endpoint — typically filtering on report date, approval date, or event date as appropriate

### Output

The actor produces a single intelligence report record:

```json
{
    "query": {
        "productName": "metformin",
        "companyName": "",
        "searchScope": "drugs",
        "searchedAt": "2026-02-25T10:30:00.000Z"
    },
    "summary": {
        "riskLevel": "CRITICAL",
        "totalFindings": 11,
        "domainsWithData": ["drugs"],
        "keyFindings": [
            "Earliest drug approval: NDA NDA021842 (2009-10-21)",
            "5 drug application(s) found",
            "428,781 total adverse event reports across all domains",
            "34,791 death-associated drug adverse event reports",
            "Top drug adverse reaction: NAUSEA (29,312 reports)",
            "5 recall(s) found",
            "⚠ 1 Class I recall(s) — most serious category",
            "1 ongoing/active recall(s)"
        ],
        "classIRecalls": 1,
        "deathReports": 34791,
        "totalAdverseEvents": 428781,
        "totalRecalls": 5,
        "totalApprovals": 5
    },
    "drugs": {
        "approvals": [
            {
                "applicationNumber": "NDA021842",
                "applicationType": "NDA",
                "sponsorName": "TAKEDA PHARMS USA",
                "brandNames": ["ACTOPLUS MET"],
                "genericNames": ["PIOGLITAZONE HYDROCHLORIDE AND METFORMIN HYDROCHLORIDE"],
                "activeIngredients": ["PIOGLITAZONE HYDROCHLORIDE", "METFORMIN HYDROCHLORIDE"],
                "dosageForms": ["TABLET"],
                "routes": ["ORAL"],
                "productCount": 4,
                "submissionCount": 22,
                "originalApprovalDate": "2009-10-21"
            }
        ],
        "adverseEvents": {
            "totalReports": 428781,
            "seriousCount": 285471,
            "deathCount": 34791,
            "topReactions": [
                { "term": "NAUSEA", "count": 29312 },
                { "term": "BLOOD GLUCOSE INCREASED", "count": 27459 },
                { "term": "DIARRHOEA", "count": 27320 },
                { "term": "DRUG INEFFECTIVE", "count": 22196 },
                { "term": "LACTIC ACIDOSIS", "count": 18415 }
            ]
        },
        "recalls": [
            {
                "recallNumber": "D-0435-2021",
                "classification": "Class II",
                "status": "Terminated",
                "recallingFirm": "Cardinal Health Inc.",
                "productDescription": "xigduo XR (dapgliflozin/metformin HCl extended-release) tablets ...",
                "reasonForRecall": "CGMP Deviations: Intermittent exposure to temperature excursion",
                "recallInitiationDate": "2021-03-15",
                "distributionPattern": "FL, GA, SC",
                "brandNames": ["XIGDUO"]
            }
        ]
    },
    "devices": null,
    "food": null,
    "timeline": [
        {
            "date": "2025-11-10",
            "domain": "drug",
            "type": "approval",
            "description": "ANDA ANDA090564 approved — METFORMIN HYDROCHLORIDE"
        },
        {
            "date": "2025-02-25",
            "domain": "drug",
            "type": "recall",
            "description": "Class II drug recall by A-S Medication Solutions LLC — Presence of Foreign Tablet"
        }
    ]
}
```

### Output Fields

#### Query Metadata

| Field | Type | Description |
|-------|------|-------------|
| `query.productName` | string | Product name searched |
| `query.companyName` | string | Company name searched |
| `query.searchScope` | string | Domain scope used |
| `query.searchedAt` | string | ISO timestamp of the search |

#### Summary

| Field | Type | Description |
|-------|------|-------------|
| `summary.riskLevel` | string | Computed risk: CRITICAL, HIGH, MODERATE, LOW, or MINIMAL |
| `summary.totalFindings` | number | Total approvals + recalls + adverse event signals |
| `summary.domainsWithData` | string\[] | FDA domains that returned results |
| `summary.keyFindings` | string\[] | Human-readable key insights |
| `summary.classIRecalls` | number | Count of most-serious Class I recalls |
| `summary.deathReports` | number | Death-associated adverse event reports |
| `summary.totalAdverseEvents` | number | Total adverse event reports across all domains |
| `summary.totalRecalls` | number | Total recall enforcement actions |
| `summary.totalApprovals` | number | Total approvals and clearances |

#### Drug Intelligence (`drugs`)

| Field | Type | Description |
|-------|------|-------------|
| `drugs.approvals[]` | array | NDA/ANDA/BLA drug approvals with brand names, ingredients, dates |
| `drugs.adverseEvents.totalReports` | number | Total FAERS adverse event reports |
| `drugs.adverseEvents.seriousCount` | number | Reports flagged as serious |
| `drugs.adverseEvents.deathCount` | number | Reports with death outcome |
| `drugs.adverseEvents.topReactions[]` | array | Top 15 adverse reactions by frequency |
| `drugs.recalls[]` | array | Drug recall enforcement reports |

#### Device Intelligence (`devices`)

| Field | Type | Description |
|-------|------|-------------|
| `devices.clearances510k[]` | array | FDA 510(k) premarket clearances |
| `devices.approvalsPma[]` | array | FDA PMA (Class III) device approvals |
| `devices.adverseEvents.totalReports` | number | Total MAUDE adverse event reports |
| `devices.adverseEvents.topDeviceProblems[]` | array | Top device generic names by frequency |
| `devices.adverseEvents.topPatientProblems[]` | array | Top report types |
| `devices.recalls[]` | array | Device recall enforcement reports |

#### Food Intelligence (`food`)

| Field | Type | Description |
|-------|------|-------------|
| `food.adverseEvents.totalReports` | number | Total CAERS adverse event reports |
| `food.adverseEvents.topReactions[]` | array | Top adverse reactions |
| `food.adverseEvents.topOutcomes[]` | array | Top outcomes (hospitalization, death, etc.) |
| `food.recalls[]` | array | Food recall enforcement reports |

#### Timeline

| Field | Type | Description |
|-------|------|-------------|
| `timeline[].date` | string | Event date (YYYY-MM-DD) |
| `timeline[].domain` | string | `drug`, `device`, or `food` |
| `timeline[].type` | string | `approval`, `clearance`, `recall`, or `adverse_event_spike` |
| `timeline[].description` | string | Human-readable event description |

### Risk Level Methodology

| Level | Criteria |
|-------|----------|
| **CRITICAL** | Multiple Class I recalls AND >100 death reports, OR Class I recalls AND >50 death reports |
| **HIGH** | Any Class I recall, OR >50 death reports, OR >80% serious adverse event rate |
| **MODERATE** | Recalls present AND >1,000 adverse events, OR ongoing recalls, OR >100 adverse events |
| **LOW** | Some recalls or adverse events present but not reaching higher thresholds |
| **MINIMAL** | Few or no concerning findings across all domains |

### Use Cases

- **Pharma due diligence** — Before acquiring a drug portfolio, get the full regulatory profile: approvals, recall history, adverse event trends, and risk level in one report
- **Medical device evaluation** — Research a device's 510(k) clearances, PMA approvals, MAUDE reports, and recall history before procurement
- **Drug safety research** — Investigate a drug's adverse event profile including top reactions, death counts, and seriousness rates
- **NDMA/contamination investigation** — Track recalls and adverse events for drugs affected by impurity contaminations (valsartan, ranitidine, metformin)
- **Competitor intelligence** — Search by company name to see a competitor's full FDA regulatory footprint across all product domains
- **Regulatory compliance monitoring** — Schedule weekly runs to track evolving risk profiles for products in your portfolio
- **Supply chain risk assessment** — Evaluate manufacturer recall history and adverse event patterns before sourcing decisions
- **Legal research** — Build a complete regulatory timeline for litigation involving drug or device safety claims

### API Examples

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("ryanclinton/fda-product-intelligence").call(run_input={
    "productName": "metformin",
    "searchScope": "drugs",
})

report = list(client.dataset(run["defaultDatasetId"]).iterate_items())[0]
print(f"Risk Level: {report['summary']['riskLevel']}")
print(f"Key Findings:")
for finding in report['summary']['keyFindings']:
    print(f"  - {finding}")
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('ryanclinton/fda-product-intelligence').call({
    productName: 'pacemaker',
    companyName: 'Medtronic',
    searchScope: 'devices',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
const report = items[0];
console.log(`Risk: ${report.summary.riskLevel}`);
console.log(`Device AE: ${report.devices?.adverseEvents.totalReports.toLocaleString()}`);
```

#### cURL

```bash
curl "https://api.apify.com/v2/acts/ryanclinton~fda-product-intelligence/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"productName": "valsartan", "searchScope": "drugs"}'
```

### How It Works

```
                    ┌─────────────────────┐
                    │   Product / Company  │
                    │      Query Input     │
                    └──────────┬──────────┘
                               │
                    ┌──────────▼──────────┐
                    │    Scope Router     │
                    │  drugs/devices/food │
                    └──────────┬──────────┘
                               │
          ┌────────────────────┼────────────────────┐
          │                    │                     │
    ┌─────▼─────┐       ┌─────▼─────┐        ┌─────▼─────┐
    │   DRUGS   │       │  DEVICES  │        │   FOOD    │
    │           │       │           │        │           │
    │ drugsfda  │       │  510k     │        │ food/event│
    │ drug/event│       │  pma      │        │ food/enf  │
    │ drug/enf  │       │ device/evt│        │           │
    │           │       │ device/enf│        │           │
    │ 3 results │       │ 4 results │        │ 2 results │
    │ 2 counts  │       │ 2 counts  │        │ 2 counts  │
    └─────┬─────┘       └─────┬─────┘        └─────┬─────┘
          │                    │                     │
          └────────────────────┼────────────────────┘
                               │
                    ┌──────────▼──────────┐
                    │   Intelligence      │
                    │   Engine            │
                    │                     │
                    │ • Risk Assessment   │
                    │ • Key Findings      │
                    │ • Timeline Builder  │
                    │ • Domain Merging    │
                    └──────────┬──────────┘
                               │
                    ┌──────────▼──────────┐
                    │  Unified Report     │
                    │  to Apify Dataset   │
                    └─────────────────────┘
```

### Endpoints Queried

| Domain | Endpoint | Data Retrieved |
|--------|----------|---------------|
| Drugs | `drug/drugsfda` | NDA/ANDA/BLA approvals |
| Drugs | `drug/event` | FAERS adverse event totals + top reactions + seriousness |
| Drugs | `drug/enforcement` | Drug recall enforcement reports |
| Devices | `device/510k` | 510(k) premarket clearances |
| Devices | `device/pma` | PMA Class III device approvals |
| Devices | `device/event` | MAUDE adverse event totals + top device problems |
| Devices | `device/enforcement` | Device recall enforcement reports |
| Food | `food/event` | CAERS food/supplement adverse event totals + top reactions |
| Food | `food/enforcement` | Food recall enforcement reports |

### Data Source

All data comes from the **openFDA API** (api.fda.gov), the U.S. Food and Drug Administration's public data platform. Data is updated regularly (typically weekly) and covers:

- **Drug approvals**: ~29K applications (NDA, ANDA, BLA)
- **Drug adverse events**: ~27M FAERS reports
- **Drug recalls**: ~17K enforcement reports
- **Device clearances**: ~230K 510(k) records
- **Device approvals**: ~56K PMA records
- **Device adverse events**: ~19M MAUDE reports
- **Device recalls**: ~38K enforcement reports
- **Food adverse events**: ~148K CAERS reports
- **Food recalls**: ~25K enforcement reports

### Cost Estimate

| Scenario | Records | Estimated Cost |
|----------|---------|---------------|
| Single drug profile (drugs only) | ~5 API calls | ~$0.005 |
| Company intelligence (all domains) | ~15 API calls | ~$0.01 |
| Cross-domain product search | ~15 API calls | ~$0.01 |
| Scheduled weekly monitoring | ~15 API calls × 4 | ~$0.04/month |

### Tips

- **Start broad, then narrow**: Run with `searchScope: "all"` first to see which domains have data, then follow up with domain-specific searches and higher `maxResultsPerCategory` for the relevant domain
- **Schedule for monitoring**: Set up a weekly schedule to track evolving risk profiles — new recalls, increasing adverse event counts, or new approvals
- **Company vs. product**: Company searches work best for devices (applicant field). Product name searches work best for drugs (brand\_name, generic\_name fields)
- **Risk level context**: A CRITICAL or HIGH risk level doesn't necessarily mean the product is unsafe — metformin has 34K death reports because it's prescribed to millions of diabetic patients. Context matters

### Limitations

- openFDA caps results at **1,000 per endpoint** — for products with more records, the actor returns a representative sample plus aggregate statistics
- **Adverse event reports are not proof of causation** — a drug listed in an adverse event report may not have caused the reaction
- Not all records have **openFDA enrichment** — some enforcement reports lack brand\_name/generic\_name cross-references
- **Food/event endpoint** doesn't support company-name-only searches — productName is needed for food adverse event queries
- The `serious` count on drug/event uses the FDA's seriousness flag (1=serious, 2=not serious) which is reporter-dependent
- Date range filters apply to **different date fields** per endpoint (report\_date, decision\_date, receivedate, etc.)

### Responsible Use

- All data comes from public FDA records — no proprietary or restricted data is accessed
- Adverse event reports are **not validated** by FDA and should not be used for clinical decision-making
- This actor is designed for **research and intelligence purposes** — not as a substitute for professional regulatory advice
- Recall data may include terminated recalls that have been fully resolved
- Risk levels are computed algorithmically and should be interpreted with appropriate context

### FAQ

**Q: Do I need an API key?**
A: No. The openFDA API is free and public. No API key is required.

**Q: How current is the data?**
A: openFDA data is typically updated weekly. The `searchedAt` timestamp in the report shows when the query was run.

**Q: Why does metformin show CRITICAL risk?**
A: Metformin has 428K+ adverse event reports and 34K death-associated reports because it's one of the most widely prescribed drugs worldwide. High adverse event counts reflect high usage, not necessarily high danger. Always interpret in context.

**Q: What's the difference between the domain-specific actors and this intelligence actor?**
A: The domain-specific actors (e.g., FDA Drug Recall Search) return detailed individual records with full field access and pagination. This actor returns a **unified intelligence report** combining aggregate statistics, risk assessment, and cross-domain timeline — optimized for decision-making rather than raw data extraction.

**Q: Can I search for a specific recall number?**
A: This actor is designed for product/company intelligence. For specific recall lookup, use the individual FDA Drug Recall Search or FDA Medical Device Recall Search actors.

**Q: How many API calls does one run make?**
A: Depends on scope. Drug-only: ~5 calls. Device-only: ~6 calls. All domains: ~15 calls. All calls run in parallel so wall-clock time is typically 2-5 seconds.

### Related Actors

This actor aggregates data from the same sources as these individual actors in the FDA regulatory intelligence suite:

| Actor | What It Does |
|-------|-------------|
| [FDA Drug Approval Search](https://apify.com/ryanclinton/fda-drug-approvals) | Detailed drug approval records (NDA/ANDA/BLA) |
| [openFDA Drug Event Monitor](https://apify.com/ryanclinton/openfda-drug-events) | Individual drug adverse event reports with full detail |
| [FDA Drug Recall Search](https://apify.com/ryanclinton/fda-drug-recalls) | Drug recall enforcement reports with full filtering |
| [FDA 510(k) Device Clearances](https://apify.com/ryanclinton/fda-510k-clearances) | Medical device 510(k) clearance records |
| [FDA PMA Device Approvals](https://apify.com/ryanclinton/fda-pma-approvals) | Class III PMA device approval records |
| [FDA Device Adverse Events (MAUDE)](https://apify.com/ryanclinton/fda-device-events) | Medical device adverse event reports |
| [FDA Medical Device Recall Search](https://apify.com/ryanclinton/fda-device-recalls) | Device recall enforcement reports |
| [FDA Food & Supplement Adverse Events](https://apify.com/ryanclinton/fda-food-adverse-events) | CAERS food/supplement adverse event reports |
| [FDA Food Recall Monitor](https://apify.com/ryanclinton/fda-food-recall-monitor) | Food recall enforcement reports |

Use the individual actors when you need **detailed records with full field access**. Use this intelligence actor when you need a **unified risk assessment and cross-domain overview**.

# Actor input Schema

## `productName` (type: `string`):

Drug, device, or food product name to research (e.g. 'metformin', 'pacemaker', 'energy drink')

## `companyName` (type: `string`):

Manufacturer, sponsor, or recalling firm name (e.g. 'Pfizer', 'Medtronic', 'Nestle')

## `searchScope` (type: `string`):

Which FDA domains to search. 'all' queries drugs, devices, and food in parallel.

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

Start of date range filter (YYYY-MM-DD format)

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

End of date range filter (YYYY-MM-DD format)

## `maxResultsPerCategory` (type: `integer`):

Maximum number of detailed records per category (approvals, recalls, etc.). Adverse events always return aggregate stats regardless of this setting.

## Actor input object example

```json
{
  "productName": "metformin",
  "searchScope": "all",
  "maxResultsPerCategory": 25
}
```

# 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 = {
    "productName": "metformin"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ryanclinton/fda-product-intelligence").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 = { "productName": "metformin" }

# Run the Actor and wait for it to finish
run = client.actor("ryanclinton/fda-product-intelligence").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 '{
  "productName": "metformin"
}' |
apify call ryanclinton/fda-product-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ryanclinton/fda-product-intelligence",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FDA Product Intelligence — Approvals & Recalls",
        "description": "Get a comprehensive FDA regulatory intelligence report for any drug, device, or food product — combining approvals, adverse events, and recalls from **9 openFDA endpoints** in a single run.",
        "version": "1.0",
        "x-build-id": "NYlH69R1MzhQ9GV5z"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ryanclinton~fda-product-intelligence/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ryanclinton-fda-product-intelligence",
                "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/ryanclinton~fda-product-intelligence/runs": {
            "post": {
                "operationId": "runs-sync-ryanclinton-fda-product-intelligence",
                "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/ryanclinton~fda-product-intelligence/run-sync": {
            "post": {
                "operationId": "run-sync-ryanclinton-fda-product-intelligence",
                "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": {
                    "productName": {
                        "title": "Product Name",
                        "type": "string",
                        "description": "Drug, device, or food product name to research (e.g. 'metformin', 'pacemaker', 'energy drink')",
                        "default": "metformin"
                    },
                    "companyName": {
                        "title": "Company Name",
                        "type": "string",
                        "description": "Manufacturer, sponsor, or recalling firm name (e.g. 'Pfizer', 'Medtronic', 'Nestle')"
                    },
                    "searchScope": {
                        "title": "Search Scope",
                        "enum": [
                            "all",
                            "drugs",
                            "devices",
                            "food"
                        ],
                        "type": "string",
                        "description": "Which FDA domains to search. 'all' queries drugs, devices, and food in parallel.",
                        "default": "all"
                    },
                    "dateFrom": {
                        "title": "Date From",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Start of date range filter (YYYY-MM-DD format)"
                    },
                    "dateTo": {
                        "title": "Date To",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "End of date range filter (YYYY-MM-DD format)"
                    },
                    "maxResultsPerCategory": {
                        "title": "Max Results Per Category",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of detailed records per category (approvals, recalls, etc.). Adverse events always return aggregate stats regardless of this setting.",
                        "default": 25
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
