FDA Drug Shortages Scraper avatar

FDA Drug Shortages Scraper

Pricing

from $0.01 / 1,000 fda shortage records

Go to Apify Store
FDA Drug Shortages Scraper

FDA Drug Shortages Scraper

Export official FDA drug shortage records with status, company, availability, NDCs, dates, and product metadata for monitoring workflows.

Pricing

from $0.01 / 1,000 fda shortage records

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Share

Export official FDA/openFDA drug shortage records into a clean Apify dataset for pharmacy procurement, hospital supply-chain monitoring, pharma intelligence, and healthcare risk dashboards.

This actor calls the public openFDA Drug Shortages API, normalizes the records, and gives you searchable fields such as shortage status, generic name, company, availability, dosage form, NDC identifiers, posting dates, update dates, therapeutic category, and source metadata.

What does FDA Drug Shortages Scraper do?

FDA Drug Shortages Scraper turns the FDA drug shortage feed into analysis-ready rows.

  • ✅ Monitor current drug shortages.
  • ✅ Export resolved or discontinued shortages for historical review.
  • ✅ Search by generic ingredient, company, therapeutic category, brand, or NDC.
  • ✅ Capture FDA update dates for alerting workflows.
  • ✅ Normalize nested openFDA fields into spreadsheet-friendly arrays.

Who is it for?

This scraper is designed for teams that need repeatable shortage data instead of manual FDA page checks.

  • 🏥 Hospital supply-chain analysts tracking medication risk.
  • 💊 Pharmacy procurement teams watching current availability.
  • 📊 Healthcare data teams feeding BI dashboards.
  • 🧪 Pharma and regulatory analysts monitoring product disruptions.
  • 🔔 Risk and operations teams creating recurring shortage alerts.

Why use this FDA drug shortages extractor?

The FDA feed is public, but production workflows need consistent filters, exports, metadata, and repeatable runs.

This actor adds:

  • Structured output fields.
  • Apify datasets, exports, API access, and scheduling.
  • Provenance fields for auditability.
  • PPE billing with a small start fee and per-record pricing.
  • Low-cost HTTP execution with no browser or proxy requirement.

Data source

The actor uses the official openFDA Drug Shortages endpoint:

https://api.fda.gov/drug/shortages.json

openFDA data may contain sparse or changing fields depending on the record. The actor keeps source values when present and leaves unavailable fields empty.

What data can you extract?

FieldDescription
statusFDA shortage status, such as Current or Resolved
genericNameGeneric drug or active ingredient name from the shortage record
companyNameCompany listed by FDA
availabilityFDA availability text
dosageFormDosage form, when supplied
presentationPackage/presentation text
therapeuticCategoriesFDA therapeutic categories
packageNdcPackage NDC from the shortage record
productNdcsProduct NDC values from openFDA metadata
brandNamesBrand names from openFDA metadata
manufacturersManufacturer names from openFDA metadata
applicationNumbersFDA application numbers
rxcuisRxNorm concept identifiers
initialPostingDateIsoISO-normalized initial posting date
updateDateIsoISO-normalized update date
sourceUrlAPI URL used for the source page
scrapedAtActor run timestamp

How much does it cost to scrape FDA drug shortages?

The actor uses pay-per-event pricing.

  • A small start event is charged once per run.
  • An item event is charged for each shortage record saved.
  • The default input is intentionally small so first runs stay cheap.
  • Larger scheduled monitoring runs scale with the number of records exported.

Exact live pricing is shown on the Apify actor page.

Input options

Use these inputs to focus the feed:

  • maxItems — maximum shortage records to save.
  • status — Current, Resolved, To Be Discontinued, Discontinued, or All.
  • search — free-text phrase for openFDA search.
  • genericName — filter by generic or active ingredient.
  • companyName — filter by company or manufacturer.
  • therapeuticCategory — filter by category when present.
  • updatedSince — keep records updated on or after a date.
  • postedSince — keep records initially posted on or after a date.

Example input: current shortages

{
"status": "Current",
"maxItems": 100
}

Example input: company monitoring

{
"companyName": "Takeda",
"status": "All",
"maxItems": 100
}
{
"genericName": "lisdexamfetamine",
"status": "All",
"maxItems": 100
}

Output example

{
"status": "Current",
"genericName": "Lisdexamfetamine Dimesylate Tablet, Chewable",
"companyName": "Takeda Pharmaceuticals America, Inc.",
"availability": "Available",
"packageNdc": "59417-116-01",
"updateDateIso": "2026-06-23",
"sourceUrl": "https://api.fda.gov/drug/shortages.json?...",
"scrapedAt": "2026-07-01T00:00:00.000Z"
}

How to run it

  1. Open the actor on Apify.
  2. Choose a shortage status.
  3. Add optional filters such as company, generic name, or updated date.
  4. Set maxItems.
  5. Run the actor.
  6. Export the dataset as JSON, CSV, Excel, or through the Apify API.

Scheduling and monitoring

You can schedule this scraper in Apify to run daily, weekly, or hourly depending on your monitoring needs.

Common patterns:

  • Daily current-shortage export.
  • Weekly resolved-shortage archive.
  • Company-specific monitoring for a vendor list.
  • Ingredient-specific monitoring for a pharmacy formulary.

Integrations

Connect the output to:

  • Google Sheets for pharmacy procurement tracking.
  • BigQuery or Snowflake for healthcare analytics.
  • Slack or email alerts through Apify integrations.
  • BI dashboards for shortage trend reporting.
  • Internal inventory and risk systems.

API usage with Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/fda-drug-shortages-scraper').call({
status: 'Current',
maxItems: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

API usage with Python

from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("automation-lab/fda-drug-shortages-scraper").call(run_input={
"status": "Current",
"maxItems": 100,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)

API usage with cURL

curl -X POST "https://api.apify.com/v2/acts/automation-lab~fda-drug-shortages-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status":"Current","maxItems":100}'

MCP integration

Use this actor from Claude Desktop or Claude Code through Apify MCP:

https://mcp.apify.com/?tools=automation-lab/fda-drug-shortages-scraper

Add it in Claude Code:

$claude mcp add apify-fda-shortages https://mcp.apify.com/?tools=automation-lab/fda-drug-shortages-scraper

Claude Desktop JSON configuration:

{
"mcpServers": {
"apify-fda-shortages": {
"url": "https://mcp.apify.com/?tools=automation-lab/fda-drug-shortages-scraper"
}
}
}

Example prompts:

  • "Run the FDA Drug Shortages Scraper for current shortages and summarize high-risk categories."
  • "Export FDA shortage records updated this month and group them by company."
  • "Check whether a specific generic ingredient appears in current FDA shortages."

Tips for best results

  • Use status: Current for routine monitoring.
  • Use status: All for historical analysis.
  • Keep maxItems modest for alerting workflows.
  • Use updatedSince to focus on recent FDA changes.
  • Combine company and generic filters for targeted vendor risk monitoring.

Troubleshooting

If you get zero results, broaden your filters first.

Examples:

  • Change status to All.
  • Remove the company filter.
  • Remove date filters.
  • Try a shorter generic name.

Why are some fields empty?

FDA/openFDA records are not perfectly uniform. Some older or sparse records do not include brand names, RxCUIs, route, or manufacturer metadata. The actor preserves available source fields and leaves unavailable fields empty.

Legality

The actor uses a public U.S. government/openFDA JSON endpoint. You are responsible for using the data according to your local rules, organizational policies, and openFDA terms.

Other automation-lab healthcare and FDA actors may complement this workflow:

FAQ

Can I monitor only one manufacturer?

Yes. Use companyName with the manufacturer or company name and set status to Current or All.

Can I search by NDC?

Yes. Put an NDC value in the search field. Results depend on how openFDA indexes the value.

Can I export to CSV?

Yes. Apify datasets support CSV, JSON, Excel, XML, RSS, and API export formats.

Does this actor require proxies?

No. It uses the official openFDA API over HTTP and does not need browser automation or proxies.

Can I schedule shortage alerts?

Yes. Schedule the actor on Apify and connect the dataset or webhook output to your alerting workflow.

Changelog

  • Initial version: official openFDA drug shortage extraction with status, company, ingredient, availability, NDC, date, and source metadata fields.