FDA Drug Shortages Scraper - Status, NDC & Manufacturer Feed
Pricing
from $2.10 / 1,000 shortage records
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Security
Limited permissionsShare
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/YYYYshortage dates (initial_posting_dateandupdate_date) into strict ISOYYYY-MM-DDdates. - Extracts harmonized
openfdaproduct metadata (brandName,route, andrxOtcclassification) 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(orgenericName + companyName + presentationwhen package NDC is absent), and sorts newest first byupdateDatedescending.
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
| Field | Type | Default / Prefill | Description |
|---|---|---|---|
statuses | array of strings | ["Current"] | Filter by FDA drug shortage status: Current, Resolved, To Be Discontinued. Leave empty for all statuses. |
genericNameQuery | string | "" | Optional case-insensitive substring or keyword to match against genericName, brandName, or presentation. |
therapeuticCategories | array of strings | [] | Optional therapeutic category filter values (e.g. ["Cardiovascular", "Anesthesia", "Oncology"]). |
updatedSince | string | "" | Optional earliest updateDate in YYYY-MM-DD format (e.g. "2026-01-01"). |
openFdaApiKey | string (secret) | "" | Optional user-supplied openFDA API key for higher rate limits. Leave blank for keyless public access. |
maxItems | integer | 200 | Maximum 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
| Field | Type | Description |
|---|---|---|
packageNdc | string | null | FDA National Drug Code (NDC) package identifier. |
genericName | string | Generic drug name and strength/form description. |
brandName | string | null | Brand name from openFDA product harmonization, if available. |
companyName | string | null | Manufacturer or labeler company name. |
status | string | Shortage status (Current, Resolved, To Be Discontinued). |
availability | string | null | Current 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. |
therapeuticCategory | array of strings | null | FDA therapeutic categories associated with the drug. |
dosageForm | string | null | Dosage form (e.g. Injection, Tablet, Capsule, Solution). |
presentation | string | null | Specific package presentation description including NDC. |
initialPostingDate | string | null | Date the shortage was initially posted by FDA in YYYY-MM-DD format. |
updateDate | string | null | Most recent FDA shortage update date in YYYY-MM-DD format. |
updateType | string | null | Type of latest FDA update (e.g. New, Revised, Reverified, Resolved). |
route | array of strings | null | Administration route(s) from openFDA product data. |
rxOtc | string | null | Prescription (RX) or over-the-counter (OTC) classification derived from openFDA product_type. |
fdaShortageUrl | string | URL 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_updatedstamp: if it is more than 14 days old, the run endsPARTIAL: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/andhttps://open.fda.gov/license/). Manufacturer phone numbers and individual strings from the upstreamcontact_infofield 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." APARTIAL: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 togenericName + companyName + presentationifpackageNdcis 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
skipparameter at 25,000 records (beyond that,search_afterpaging would be needed). This endpoint holds roughly 1,600 records in total, and the Actor pages at most 10,000 records (largestskipused: 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
availabilityas a core field (openFDA publishes it only forCurrentrecords;ResolvedandTo Be Discontinuedruns previously failed with a false schema-drift claim and now complete withavailabilitynull, 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 (ameta.last_updatedolder than 14 days ends the runPARTIAL: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: 0instead of failing; the Issues line now appears only on source-causedPARTIAL:messages and the charge-cap message now starts withPARTIAL:; status messages state rows pushed, total matches, and records scanned; the verbatim openFDA disclaimer is now quoted in full;updatedSincecompares againstupdateDateonly; addeddefaultRunOptions(max charge $50) and a matching example run input. - v0.1 (2026-10-31): Initial release querying
https://api.fda.gov/drug/shortages.jsonwith ISO date normalization, schema validation, and pay-per-event spending limit protection.