# FDA Drug Safety & Clinical Trials Scraper ($3/1K) (`tamnt67/fda-clinical-trials-scraper`) Actor

FDA and ClinicalTrials.gov scraper: trials with sponsor, phase, status, enrollment, eligibility, sites; FDA drug labels, FAERS adverse events, recalls and label interaction checks. Takes drug names, conditions, filters, NCT IDs or a search URL. Use it to track pharma pipelines and drug safety.

- **URL**: https://apify.com/tamnt67/fda-clinical-trials-scraper.md
- **Developed by:** [Tam Ng.](https://apify.com/tamnt67) (community)
- **Categories:** Business, AI, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## FDA Drug Safety, Recalls, Interactions & Clinical Trials Scraper

Get official US **FDA openFDA** data (drug labels, FAERS adverse events, drug / food / device recalls) and **ClinicalTrials.gov v2** study data from the public APIs, with no API key, no login and no browser, for $3 per 1,000 records.

Search clinical trials by condition, drug, sponsor, location, phase, status, study type, age group, sex, funder type, results and date ranges, or paste a clinicaltrials.gov search URL. Each trial comes with sponsor, phase, enrollment, dates, eligibility, countries and, optionally, the full inclusion / exclusion criteria and outcomes. The drug modes give a one-shot safety brief, label sections, side-effect rankings, recalls and a label-based interaction check.

### What you can do with it

- **Track a competitor's pipeline.** All recruiting phase 3 trials of a sponsor, with enrollment and completion dates.
- **Find trial sites and patients' options.** Trials for a condition in a country or state, with eligibility criteria.
- **Monitor changes.** Trials updated in the last 7 days for your therapy area, on a schedule.
- **Check drug safety.** Boxed warning, top FAERS reactions, serious-event rate and recent recalls for a drug in one record.
- **Watch recalls.** Class I food recalls for listeria, or device recalls in one state.

### Modes

| Mode | What you get |
| :--- | :--- |
| `drug_safety_brief` | One record per drug: label summary, FAERS adverse-event stats, 5 recent drug recalls, 5 recruiting trials. |
| `drug_interactions` | One record per drug pair (2-5 drugs): whether one FDA label mentions the other, with excerpts and a severity hint. |
| `drug_label` | One record per drug: boxed warning, indications, dosage, contraindications, warnings, adverse reactions, interactions, pregnancy, pediatric use. |
| `adverse_events` | One record per drug: FAERS top reactions, serious vs non-serious share, sex split. |
| `recalls` | One record per FDA recall (drug, food, device) with class, firm, reason and distribution. |
| `trials_search` | One record per ClinicalTrials.gov study matching your filters. |
| `trials_recent_changes` | Studies updated in the last 1-90 days, newest first. |
| `trials_stats` | One record: status counts, phase breakdown, median enrollment and top sponsors for a search. |
| `trial_detail` | One record per NCT ID with the full protocol summary, eligibility, outcomes and up to 15 sites. |

### Input

| Field | Description |
| :--- | :--- |
| `mode` | One of the modes above. Default `drug_safety_brief`. |
| `drugs` | Drug names, brand or generic. Empty: ozempic. |
| `condition` / `intervention` / `sponsor` | ClinicalTrials.gov search fields. `sponsor` matches lead sponsor or collaborator; turn on `leadSponsorOnly` for the lead sponsor only. |
| `searchUrl` | A clinicaltrials.gov/search URL; its search terms and filters are used (trial status is then taken from the URL, not from `trialStatus`). |
| `otherTerms` / `location` / `titleSearch` / `outcomeSearch` | Free-text, site location, title / acronym and outcome-measure search. |
| `nctIds` | NCT IDs for trial_detail. Empty: NCT04881760. |
| `trialStatus` | RECRUITING (default), NOT_YET_RECRUITING, ACTIVE_NOT_RECRUITING, COMPLETED, TERMINATED, ENROLLING_BY_INVITATION, SUSPENDED, WITHDRAWN, UNKNOWN or ALL. |
| `trialPhase` | EARLY_PHASE1, PHASE1, PHASE2, PHASE3, PHASE4 or empty. |
| `studyType` / `sex` / `ageGroup` / `healthyVolunteersOnly` | Interventional / observational / expanded access; female-only or male-only studies; child, adult or older adult; healthy volunteers. |
| `resultsAvailability` / `funderType` | Studies with or without posted results; lead sponsor class (industry, NIH, other federal, ...). |
| `dateFilterField` / `dateFrom` / `dateTo` | Date range on start, primary completion, completion, first posted, last update or results first posted. |
| `sort` | Relevance (default), last update, first posted, start date or enrollment. |
| `includeDetails` | trials_search / trials_recent_changes: add eligibility criteria, outcomes, description and sites. |
| `recallCategory` / `recallState` / `query` | Recalls: all, drug, food or device; 2-letter US state; keyword. |
| `days` | Lookback for trials_recent_changes (1-90, default 14). |
| `seriousOnly` | adverse_events: rank reactions in serious reports only. |
| `limit` | Max reactions, recalls or trials (1-1000, default 15). |

Example: recruiting phase 3 obesity trials in Texas sponsored by industry, largest first.

```json
{ "mode": "trials_search", "condition": "obesity", "trialPhase": "PHASE3", "location": "Texas", "funderType": "INDUSTRY", "sort": "EnrollmentCount:desc", "limit": 50 }
```

Example: a pasted clinicaltrials.gov search with full details.

```json
{ "mode": "trials_search", "searchUrl": "https://clinicaltrials.gov/search?cond=obesity&intr=semaglutide&aggFilters=phase:3,status:rec", "includeDetails": true, "limit": 100 }
```

### Output fields

Example values come from real runs on 2026-11-24. Every record has `mode`. A drug or NCT ID that is not found is not saved and not charged; it is listed in the key-value store record `FAILED_QUERIES`.

#### trials_search, trials_recent_changes (and each trial inside drug_safety_brief)

| Field | Example |
| :--- | :--- |
| `totalMatchingStudies` | 111 (not in drug_safety_brief) |
| `lookbackDays` | 7 (trials_recent_changes only) |
| `nctId` / `url` | NCT07743983 / https://clinicaltrials.gov/study/NCT07743983 |
| `briefTitle` / `officialTitle` / `acronym` | A Study of BGM0504 in Early T2DM With Obesity / A Randomized, Open-Label, ... / null |
| `overallStatus` / `phases` / `studyType` | RECRUITING / \["PHASE3"] / INTERVENTIONAL |
| `leadSponsor` / `sponsorClass` / `organization` / `collaborators` | BrightGene Bio-Medical Technology Co., Ltd. / INDUSTRY / BrightGene Bio-Medical Technology Co., Ltd. / \[] |
| `enrollmentCount` / `enrollmentType` | 372 / ESTIMATED |
| `conditions` / `interventions` / `interventionTypes` | \["Type 2 Diabetes (T2DM)"] / \["BGM0504","semaglutide"] / \["DRUG"] |
| `startDate` / `primaryCompletionDate` / `completionDate` | 2026-09-17 / 2028-09-30 / 2028-11-30 |
| `studyFirstPostDate` / `lastUpdateDate` / `hasResults` | 2026-08-04 / 2026-10-13 / false |
| `sex` / `minimumAge` / `maximumAge` / `stdAges` / `healthyVolunteers` | ALL / 18 Years / 75 Years / \["ADULT","OLDER_ADULT"] / false |
| `briefSummary` | This trial is conducted in China. The aim is to compare BGM0504 Injection 15 mg with semaglutide ... (max 2,000 characters) |
| `locationsCount` / `countries` / `leadLocationCountry` | 1 / \["China"] / China |

With `includeDetails`, and always in `trial_detail`:

| Field | Example |
| :--- | :--- |
| `eligibility` | {`sex` ALL, `minimumAge` 18 Years, `maximumAge` null, `criteriaExcerpt` "Inclusion Criteria: ..." (2,000 characters)} |
| `inclusionCriteria` / `exclusionCriteria` | "\* Age 18-45 \* Body Mass Index (BMI) < 27.0 ..." / "\* Active medical disease ..." (up to 4,000 characters each) |
| `primaryOutcomes` / `secondaryOutcomes` | \[{`measure` Time to first occurrence of a composite Heart Failure (HF) endpoint ..., `description` Measured in days., `timeFrame` From baseline (week 0) to 165 weeks}] |
| `detailedDescription` | longer study description (up to 4,000 characters) |
| `sampleLocations` | up to 15 sites: \[{`facility` Duke Center for Living, `status` RECRUITING, `city` Durham, `state` North Carolina, `zip` 27705, `country` United States, `geoPoint` {lat, lon}}] |

#### trials_stats

| Field | Example |
| :--- | :--- |
| `filters` | {`condition` obesity, `intervention` null, `sponsor` null} |
| `statusCounts` | {`recruiting` 1496, `notYetRecruiting` 649, `activeNotRecruiting` 655, `completed` 9410} |
| `phaseBreakdown` / `medianEnrollment` | {"NA":40,"PHASE3":4,...} / 200 (from the first 50 recruiting studies) |
| `topSponsors` | \[{`sponsor` VA Office of Research and Development, `recruitingStudies` 2}, ...] |

#### drug_label (and `label` inside drug_safety_brief)

| Field | Example |
| :--- | :--- |
| `drugQuery` / `splId` / `effectiveDate` | warfarin / b8c33971-54b3-4971-bf7f-1bec66999a29 / 2025-06-17 |
| `brandNames` / `genericNames` / `manufacturerNames` | \["Warfarin Sodium"] / \["WARFARIN SODIUM"] / \["Teva Pharmaceuticals USA, Inc."] |
| `routes` / `pharmClasses` / `rxcui` / `hasBoxedWarning` | \["ORAL"] / \[] / \["855288", ...] / true |
| `sections` | `boxedWarning`, `indicationsAndUsage`, `dosageAndAdministration`, `contraindications`, `warningsAndCautions`, `adverseReactions`, `drugInteractions`, `pregnancy`, `pediatricUse` (text, max 2,500 characters each) |

#### adverse_events (and `adverseEvents` inside drug_safety_brief)

| Field | Example |
| :--- | :--- |
| `drugQuery` / `seriousOnly` / `totalAnalyzedEvents` | ozempic / true / 70836 |
| `seriousBreakdown` | {`seriousCount` 35203, `nonSeriousCount` 35633, `seriousPct` 49.7} |
| `sexBreakdown` | {`female` 41038, `male` 22422, `unknown` 17} |
| `topReactions` | \[{`rank` 1, `reaction` NAUSEA, `reportCount` 4735, `shareOfTopEventsPct` 23.5}] |

#### drug_safety_brief

| Field | Example |
| :--- | :--- |
| `drugQuery` | metformin |
| `summaryFlags` | {`hasBoxedWarning` true, `seriousAdverseRatePct` 67.48, `recentRecallCount` 5, `activeRecruitingTrialsCount` 170} |
| `label` / `adverseEvents` | as in drug_label / adverse_events |
| `recentRecalls` / `recruitingTrials` | up to 5 recalls (recalls fields) / up to 5 trials (trials fields) |

#### recalls

| Field | Example |
| :--- | :--- |
| `category` / `recallNumber` / `classification` / `status` | food / H-0192-2027 / Class I / Ongoing |
| `reportDate` / `recallInitiationDate` | 2026-11-11 / 2026-10-06 |
| `recallingFirm` / `city` / `state` / `country` | Krasnyi Oktyabr Inc / Brooklyn / NY / United States |
| `voluntaryMandated` / `productDescription` / `reasonForRecall` / `distributionPattern` | Voluntary: Firm initiated / Starfish Seafood Cold Smoked Norwegian Salmon / Contaminated with Listeria monocytogenes / NY, MA, SC, ... |

#### drug_interactions

| Field | Example |
| :--- | :--- |
| `drugA` / `drugB` / `interactionMentioned` / `severityHint` | warfarin / aspirin / true / moderate_caution (or high_caution, none_detected_in_spl) |
| `evidence` | \[{`sourceLabel` warfarin, `section` drug_interactions, `matchedTerm` aspirin, `excerpt` "...Anticoagulants argatroban, dabigatran, ..."}] |
| `disclaimer` | Informational screening based on official FDA SPL labeling text; not medical advice. |

### Pricing

You pay $3 per 1,000 records saved to the dataset ($0.003 per record) plus a one-time start charge of $0.00005. A `drug_safety_brief` or `trials_stats` result is one record.

### Limitations

- Not medical advice. The interaction check only looks for one drug's name in the other drug's label text; it is a screening hint, not a clinical interaction database.
- openFDA allows about 240 requests per minute and 1,000 per day per IP without an API key; very large drug runs can hit that limit. FAERS counts are voluntary reports, not incidence rates.
- `recalls` with category `all` takes about half of `limit` from each of drug, food and device, then sorts by report date.
- Site contact persons (names, phones, emails) and central contacts are never output, only facility, city, state, country and coordinates.
- `sex` filter "Female only" / "Male only" returns studies limited to that sex, not studies open to all.
- With `searchUrl`, only the search fields and filters ClinicalTrials.gov puts in the URL (`cond`, `term`, `intr`, `titles`, `outc`, `spons`, `lead`, `id`, `locStr`, `aggFilters`) are used; map distance filters are ignored.
- `inclusionCriteria` / `exclusionCriteria` are split at the words "Exclusion Criteria" in the sponsor's free text; unusual layouts keep everything in `inclusionCriteria`.
- `trials_stats` phase breakdown, median enrollment and top sponsors are computed from the first 50 recruiting studies; status counts are full totals.

### Changelog

- 1.0 update (2026-11-24): new ClinicalTrials.gov filters `searchUrl`, `otherTerms`, `location`, `titleSearch`, `outcomeSearch`, `leadSponsorOnly`, `studyType`, `sex`, `ageGroup`, `healthyVolunteersOnly`, `resultsAvailability`, `funderType`, date ranges and `sort`; more trial statuses; `limit` up to 1,000 with paging; new trial fields `acronym`, `organization`, `hasResults`, `studyFirstPostDate`, `completionDate`, `enrollmentType`, `collaborators`, `interventionTypes`, `sex`, `minimumAge`, `maximumAge`, `stdAges`, `healthyVolunteers`, `briefSummary`, `locationsCount`, `countries`, `leadLocationCountry`; `includeDetails` and `trial_detail` add `inclusionCriteria`, `exclusionCriteria`, `secondaryOutcomes`, `detailedDescription`. Site contact persons are no longer included in `sampleLocations` (privacy). Other existing inputs and fields work as before.
- 1.0 fix (2026-11-24): inputs that fail or are not found are no longer saved as charged records; they are listed in `FAILED_QUERIES`.
- 1.0 (2026-11-23): first public release.

# Actor input Schema

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

Select which FDA or ClinicalTrials.gov dataset to extract.

## `drugs` (type: `array`):

One or more drug names, brand or generic (e.g. ozempic, semaglutide, metformin, warfarin). Used in the drug modes; drug_interactions needs 2-5. Empty: ozempic.

## `condition` (type: `string`):

Disease or medical condition for ClinicalTrials.gov modes (e.g. obesity, lung cancer, diabetes).

## `intervention` (type: `string`):

Optional drug or therapy intervention filter for ClinicalTrials.gov modes (e.g. semaglutide).

## `sponsor` (type: `string`):

Optional sponsor or collaborator filter (e.g. Novo Nordisk, Pfizer, Eli Lilly). Turn on "Lead sponsor only" to match only the lead sponsor.

## `searchUrl` (type: `string`):

Optional. Paste a search URL from clinicaltrials.gov/search (e.g. https://clinicaltrials.gov/search?cond=obesity\&aggFilters=phase:3,status:rec) for trials_search, trials_recent_changes and trials_stats. Its condition, terms, intervention, location, sponsor and filters are used; the fields below are added on top.

## `otherTerms` (type: `string`):

Optional free-text search across the whole study record (e.g. GLP-1, CAR-T, wearable).

## `location` (type: `string`):

Optional country, state or city where the study has a site (e.g. United States, Texas, Boston).

## `titleSearch` (type: `string`):

Optional search in study titles and acronyms only (e.g. SURMOUNT).

## `outcomeSearch` (type: `string`):

Optional search in primary and secondary outcome measures (e.g. HbA1c, overall survival).

## `leadSponsorOnly` (type: `boolean`):

On: the Sponsor field matches only the lead sponsor. Off: lead sponsor or collaborator (as before).

## `nctIds` (type: `array`):

One or more ClinicalTrials.gov NCT IDs (e.g. NCT04881760) for trial_detail mode. Empty: NCT04881760.

## `trialStatus` (type: `string`):

Filter clinical trials by overall recruitment status. ALL: no status filter. Ignored when a Search URL is given (the URL's own filters are used).

## `trialPhase` (type: `string`):

Optional clinical trial phase filter. Empty: all phases.

## `studyType` (type: `string`):

Optional study type filter.

## `sex` (type: `string`):

Optional filter by the sex of eligible participants.

## `ageGroup` (type: `string`):

Optional filter by eligible age group.

## `healthyVolunteersOnly` (type: `boolean`):

On: only studies that accept healthy volunteers.

## `resultsAvailability` (type: `string`):

Optional filter by whether results are posted on ClinicalTrials.gov.

## `funderType` (type: `string`):

Optional filter by the lead sponsor class.

## `dateFilterField` (type: `string`):

Which study date "Date from" and "Date to" apply to.

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

Optional start of the date range for the chosen Date filter.

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

Optional end of the date range for the chosen Date filter.

## `sort` (type: `string`):

Order of trials_search results. trials_recent_changes always sorts by last update.

## `includeDetails` (type: `boolean`):

trials_search and trials_recent_changes: add eligibility criteria (inclusion and exclusion), primary and secondary outcomes, detailed description and up to 15 site locations, as in trial_detail. Site contact persons are never included.

## `recallCategory` (type: `string`):

Product category for FDA recalls mode.

## `recallState` (type: `string`):

Optional 2-letter US state filter for recalls (e.g. CA, NY, TX).

## `query` (type: `string`):

Optional keyword filter for FDA recalls (e.g. listeria, insulin, pacemaker).

## `days` (type: `integer`):

Number of days to look back in trials_recent_changes mode (1-90).

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

When true, filter FAERS reactions to FDA-classified serious adverse events only.

## `limit` (type: `integer`):

Maximum number of reactions, recalls or clinical trials to return (1-1000).

## Actor input object example

```json
{
  "mode": "drug_safety_brief",
  "drugs": [
    "ozempic"
  ],
  "leadSponsorOnly": false,
  "nctIds": [
    "NCT04881760"
  ],
  "trialStatus": "RECRUITING",
  "trialPhase": "",
  "studyType": "",
  "sex": "",
  "ageGroup": "",
  "healthyVolunteersOnly": false,
  "resultsAvailability": "",
  "funderType": "",
  "dateFilterField": "",
  "sort": "",
  "includeDetails": false,
  "recallCategory": "all",
  "recallState": "",
  "days": 14,
  "seriousOnly": false,
  "limit": 15
}
```

# Actor output Schema

## `results` (type: `string`):

Default dataset containing all extracted FDA and ClinicalTrials.gov records.

# 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": "drug_safety_brief",
    "drugs": [
        "ozempic"
    ],
    "nctIds": [
        "NCT04881760"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tamnt67/fda-clinical-trials-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": "drug_safety_brief",
    "drugs": ["ozempic"],
    "nctIds": ["NCT04881760"],
}

# Run the Actor and wait for it to finish
run = client.actor("tamnt67/fda-clinical-trials-scraper").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 '{
  "mode": "drug_safety_brief",
  "drugs": [
    "ozempic"
  ],
  "nctIds": [
    "NCT04881760"
  ]
}' |
apify call tamnt67/fda-clinical-trials-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tamnt67/fda-clinical-trials-scraper"
        }
    }
}
```

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/ZBpjC6kdT3Smg2oCy/builds/UgeoS6EY8nXaT0t27/openapi.json
