FDA Drug Shortages Scraper - Status, NDC & Manufacturer Feed avatar

FDA Drug Shortages Scraper - Status, NDC & Manufacturer Feed

Pricing

from $2.10 / 1,000 shortage records

Go to Apify Store
FDA Drug Shortages Scraper - Status, NDC & Manufacturer Feed

FDA Drug Shortages Scraper - Status, NDC & Manufacturer Feed

Scrape current, resolved, and discontinued FDA drug shortage records from the official openFDA Drug Shortages API with package NDC, manufacturer, therapeutic category, availability, and ISO update dates.

Pricing

from $2.10 / 1,000 shortage records

Rating

0.0

(0)

Developer

Groundplane Labs

Groundplane Labs

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Categories

Security

Limited permissions

Share

Retrieve current, resolved, and discontinued U.S. Food and Drug Administration (FDA) drug shortage records from the official openFDA Drug Shortages API (drug/shortages.json). Filter by shortage status, generic drug name, therapeutic category, and update date to monitor pharmaceutical supply availability, package NDCs, manufacturers, dosage forms, and ISO-formatted dates.

Disclaimer: This Actor is an independent open-data integration tool and is not affiliated with, endorsed by, or sponsored by the U.S. Food and Drug Administration (FDA) or the U.S. Department of Health and Human Services.

openFDA disclaimer (verbatim, from the openFDA API): 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.


What it does

  • Queries the official openFDA Drug Shortages endpoint (https://api.fda.gov/drug/shortages.json).
  • Normalizes FDA MM/DD/YYYY shortage dates (initial_posting_date and update_date) into strict ISO YYYY-MM-DD dates.
  • Extracts harmonized openfda product metadata (brandName, route, and rxOtc classification) alongside shortage-level fields (packageNdc, genericName, companyName, status, availability, therapeuticCategory, dosageForm, presentation, updateType).
  • Validates every output row against the schema before pushing, deduplicates on packageNdc + updateDate (or genericName + companyName + presentation when package NDC is absent), and sorts newest first by updateDate descending.

Who it's for

  • Hospital & health-system pharmacy procurement teams monitoring active injectable and oral drug shortages by NDC and therapeutic category.
  • Pharmaceutical supply chain & market intelligence analysts tracking manufacturer availability updates and shortage resolution timelines.
  • Healthcare data engineering & analytics teams feeding normalized FDA shortage records into inventory risk dashboards and alerts.

Input

FieldTypeDefault / PrefillDescription
statusesarray of strings["Current"]Filter by FDA drug shortage status: Current, Resolved, To Be Discontinued. Leave empty for all statuses.
genericNameQuerystring""Optional case-insensitive substring or keyword to match against genericName, brandName, or presentation.
therapeuticCategoriesarray of strings[]Optional therapeutic category filter values (e.g. ["Cardiovascular", "Anesthesia", "Oncology"]).
updatedSincestring""Optional earliest updateDate in YYYY-MM-DD format (e.g. "2026-01-01").
openFdaApiKeystring (secret)""Optional user-supplied openFDA API key for higher rate limits. Leave blank for keyless public access.
maxItemsinteger200Maximum number of records to return, sorted newest first by updateDate.

Example input JSON

{
"statuses": ["Current"],
"genericNameQuery": "",
"therapeuticCategories": [],
"updatedSince": "",
"openFdaApiKey": "",
"maxItems": 200
}

Example run options (default max charge $50)

When starting a run via the Apify API or Console, set a default maximum charge limit of $50 ("maxTotalChargeUsd": 50):

{
"maxTotalChargeUsd": 50
}

The Actor checks your remaining spending limit before every dataset push and stops cleanly if the limit is reached.


Output

Output fields

FieldTypeDescription
packageNdcstring | nullFDA National Drug Code (NDC) package identifier.
genericNamestringGeneric drug name and strength/form description.
brandNamestring | nullBrand name from openFDA product harmonization, if available.
companyNamestring | nullManufacturer or labeler company name.
statusstringShortage status (Current, Resolved, To Be Discontinued).
availabilitystring | nullCurrent supply availability status reported to FDA (e.g. Available, Limited Availability, Unavailable). Published by openFDA only for Current records: always null on Resolved and To Be Discontinued rows, because the source does not publish it for those segments.
therapeuticCategoryarray of strings | nullFDA therapeutic categories associated with the drug.
dosageFormstring | nullDosage form (e.g. Injection, Tablet, Capsule, Solution).
presentationstring | nullSpecific package presentation description including NDC.
initialPostingDatestring | nullDate the shortage was initially posted by FDA in YYYY-MM-DD format.
updateDatestring | nullMost recent FDA shortage update date in YYYY-MM-DD format.
updateTypestring | nullType of latest FDA update (e.g. New, Revised, Reverified, Resolved).
routearray of strings | nullAdministration route(s) from openFDA product data.
rxOtcstring | nullPrescription (RX) or over-the-counter (OTC) classification derived from openFDA product_type.
fdaShortageUrlstringURL of the official FDA Drug Shortages database page.

Sample output row (synthetic example)

{
"packageNdc": "99999-101-10",
"genericName": "Examplemine Hydrochloride Injection",
"brandName": "EXAMPLEMINE",
"companyName": "Example Pharma Labs Inc.",
"status": "Current",
"availability": "Limited Availability",
"therapeuticCategory": [
"Anesthesia",
"Critical Care"
],
"dosageForm": "Injection",
"presentation": "Examplemine Hydrochloride, Injection, 10 mg/mL, 10 mL Vial (NDC 99999-101-10)",
"initialPostingDate": "2025-04-14",
"updateDate": "2026-10-28",
"updateType": "Reverified",
"route": [
"INTRAVENOUS"
],
"rxOtc": "RX",
"fdaShortageUrl": "https://www.accessdata.fda.gov/scripts/drugshortages/default.cfm"
}

How pricing works

Pay per result. You only pay for rows returned.


Data source and terms

  • Official Source: U.S. Food and Drug Administration openFDA Drug Shortages API (https://api.fda.gov/drug/shortages.json).
  • Update Frequency: Updated daily by FDA. Each run checks the API's last_updated stamp: if it is more than 14 days old, the run ends PARTIAL: and says the source data is stale.
  • Terms of Use: openFDA data is U.S. government open data licensed under Creative Commons CC0 (https://open.fda.gov/terms/ and https://open.fda.gov/license/). Manufacturer phone numbers and individual strings from the upstream contact_info field are excluded from the output.

Troubleshooting (PARTIAL: status messages)

  • If a run finishes with a status message starting with PARTIAL:, the Actor preserved and pushed all validated records collected before a paging cap, scan-time budget (240s), upstream HTTP retry exhaustion, or schema drift check was triggered.
  • A PARTIAL: caused by a source problem (schema drift, source errors, stale or interrupted source) ends with: "If this keeps happening, please open an issue on this actor's Issues tab and we'll fix it fast." A PARTIAL: caused only by your own limits (maxItems, the charge cap, or the scan budget) does not carry that line.
  • A run whose filters match nothing finishes successfully as Complete: 0 rows matched your filters, with the number of records scanned and a note on which filters to widen.
  • Found a problem or need a field? Open an issue on the Issues tab; we respond quickly.

Limits and FAQ

  • Do I need an openFDA API key? No. The default keyless mode supports up to 240 requests per minute and 1,000 requests per day, and a full run of all FDA drug shortage records requires only 2 API requests. You can optionally supply your own key in openFdaApiKey (isSecret: true).
  • How are records deduplicated? Records are deduplicated by packageNdc + updateDate (falling back to genericName + companyName + presentation if packageNdc is null).
  • Canary input: the input below returns up to 5 rows in a few seconds and is the quickest way to confirm the Actor and the source are healthy.
{
"statuses": ["Current"],
"genericNameQuery": "",
"therapeuticCategories": [],
"updatedSince": "",
"openFdaApiKey": "",
"maxItems": 5
}
  • Paging limit: openFDA caps the skip parameter at 25,000 records (beyond that, search_after paging would be needed). This endpoint holds roughly 1,600 records in total, and the Actor pages at most 10,000 records (largest skip used: 9,000), so a run never approaches the cap.

Changelog

  • v0.1.2 (2026-10-31): Red Team fix round: the core-column sentinel no longer treats availability as a core field (openFDA publishes it only for Current records; Resolved and To Be Discontinued runs previously failed with a false schema-drift claim and now complete with availability null, as disclosed in the output table); per-row validation now checks the raw source values, so an unparseable date or an out-of-enum status counts as a bad row instead of being normalized into a silent null; source freshness is measured on every run (a meta.last_updated older than 14 days ends the run PARTIAL: with a staleness reason); Retry-After is honored in HTTP-date form as well as seconds; the optional API key input no longer carries a schema default.
  • v0.1.1 (2026-10-31): Fix round: added a core-column sentinel that fails loudly on renamed source fields; zero matches now finish as Complete: 0 instead of failing; the Issues line now appears only on source-caused PARTIAL: messages and the charge-cap message now starts with PARTIAL:; status messages state rows pushed, total matches, and records scanned; the verbatim openFDA disclaimer is now quoted in full; updatedSince compares against updateDate only; added defaultRunOptions (max charge $50) and a matching example run input.
  • v0.1 (2026-10-31): Initial release querying https://api.fda.gov/drug/shortages.json with ISO date normalization, schema validation, and pay-per-event spending limit protection.