FDA Drug Shortage Scraper (openFDA Shortages Data)
Pricing
from $1.20 / 1,000 shortage record delivereds
FDA Drug Shortage Scraper (openFDA Shortages Data)
Official FDA drug shortage records from openFDA in JSON: drug, brand, company, status, availability, therapeutic category and ISO dates - the shortage list as data. Filters plus a change monitor for new and revised entries. For pharmacy stock planning and drug supply research. CC0 data, no login.
Pricing
from $1.20 / 1,000 shortage record delivereds
Rating
0.0
(0)
Developer
Steadfetch
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 hours ago
Last modified
Share
Read the official openFDA drug shortage dataset as clean, schema-validated JSON. Every run reads the public, keyless openFDA API and returns one item per shortage record with the drug, brand, company, status, availability, therapeutic category and ISO dates. A built-in monitor mode delivers only new records or records whose status or availability changed since the previous run.
What it does
- Reads
https://api.fda.gov/drug/shortages.json(no API key, no login, no browser, no proxy). - Normalizes the source into a single schema:
genericName,brandName,companyName,status,availability,updateType,updateDate,initialPostingDate,packageNdc,presentation,applicationNumber,therapeuticCategoryandtherapeuticCategories. - Converts the source
MM/DD/YYYYdates to ISO 8601 (YYYY-MM-DD). - Sorts results newest first (by update date) and deduplicates identical records within a run.
- Filters by
statusandtherapeuticCategory. - Monitor mode: stores the last status/availability snapshot per Apify user and returns only records that are new or changed. A quiet run returns zero results and charges no result event.
- Validates every item against
.actor/dataset_schema.jsonbefore it reaches the dataset. Unvalidated data is never published.
The openFDA shortage feed is public but awkward to use directly: callers must build the query, parse MM/DD/YYYY dates, resolve the openfda product block and diff status/availability between runs by hand. This Actor does that and returns one stable, documented schema.
How to use
Run it from the Apify Console, the API or the CLI:
$apify call steadfetch/fda-drug-shortage-monitor --input='{"status":["Current"],"maxResults":50}'
With every field omitted, the Actor returns 10 records (the schema prefill), which keeps the first run fast and cheap.
Input fields
| Field | Type | Default | Description |
|---|---|---|---|
status | array of strings | [] (all) | Keep only records with one of these statuses: Current, Resolved, To Be Discontinued. |
therapeuticCategory | array of strings | [] (all) | Keep only records tagged with at least one of these categories (case-insensitive). |
monitorMode | boolean | false | When true, deliver only new or changed records for this Apify user and bill one monitor-check event per checked record. |
maxResults | integer | 2000 | Maximum records delivered. Lower it for small, cheap runs. |
Example input
Matches the declared exampleRunInput exactly:
{"status": [],"therapeuticCategory": [],"monitorMode": false,"maxResults": 10}
Example output
{"url": "https://api.fda.gov/drug/shortages.json","title": "VYVANSE","scrapedAt": "2026-10-26T04:00:00.000Z","genericName": "Lisdexamfetamine Dimesylate Capsule","brandName": "VYVANSE","companyName": "Takeda Pharmaceuticals USA Inc.","status": "Current","availability": "Available","updateType": "Reverified","updateDate": "2026-10-15","initialPostingDate": "2023-07-14","packageNdc": "59417-102-10","presentation": "Vyvanse, Capsule, 20 mg (NDC 59417-102-10)","applicationNumber": "NDA021977","therapeuticCategory": "Psychiatry","therapeuticCategories": ["Psychiatry"],"sourceUrl": "https://api.fda.gov/drug/shortages.json"}
In monitor mode every item also carries changeType (new or updated) and changedFields (for example ["availability"]).
Output fields
| Field | Type | Description |
|---|---|---|
url | string | Source API URL (common Steadfetch envelope, required). |
title | string or null | Brand name when available, otherwise the generic name. |
scrapedAt | string | ISO 8601 UTC timestamp of the extraction (required). |
genericName | string | Generic drug name and dosage form (required). |
brandName | string or null | Brand name from the openFDA product block. |
companyName | string or null | Company reporting the shortage. |
status | string or null | Current, Resolved or To Be Discontinued. |
availability | string or null | Availability text, kept verbatim from the source. |
updateType | string or null | Latest update type (for example Reverified). |
updateDate | string | Latest update date, ISO 8601 (required). |
initialPostingDate | string | First posting date, ISO 8601 (required). |
packageNdc | string or null | National Drug Code of the affected package. |
presentation | string or null | Presentation as published by the FDA (product, dosage form, strength and NDC). Distinguishes records that share an NDC and posting date. |
applicationNumber | string or null | FDA application number (NDA/ANDA). |
therapeuticCategory | string or null | First therapeutic category. |
therapeuticCategories | array of strings | All therapeutic categories for the record. |
changeType | string or null | Monitor mode only: new or updated. |
changedFields | array of strings | Monitor mode only: fields that changed (status, availability). |
Pricing
Pay per event, so you only pay for what you use:
apify-default-dataset-item: 1.50 USD per 1,000 delivered records (0.0015 USD per record). Only validated records delivered to the dataset are charged.monitor-check: 0.05 USD per 1,000 checks (0.00005 USD per checked record), charged inmonitorModeonly, once per record actually checked. A check that finds no change still bills the check but no result event.apify-actor-start: 0.00005 USD per run (the Apify default; includes the first 5 seconds of compute).
Measured cost: the whole shortage feed is about 1,600 records and two keyless API requests, so the source cost is effectively below 0.01 USD per 1,000 records. The monitor-check price keeps a wide margin over the measured compute cost per 1,000 checks.
On the Apify free plan, the 5 USD monthly credit pays for roughly 3,300 delivered records (5.00 / 0.0015), more than the whole current dataset, before any monitor-check events.
Data source and licence
- Source: openFDA Drug Shortages API, endpoint
https://api.fda.gov/drug/shortages.json. - Licence: public domain (CC0 1.0), per the openFDA terms. Attribution: data courtesy of the U.S. Food and Drug Administration (openFDA).
- Only product-level supply fields are mapped. No patient, prescriber or private contact data is read or emitted.
- Requests use a single identified user agent (
SteadfetchBot/1.0) and at least one second between page requests.
FDA disclaimer: Do not rely on openFDA to make decisions regarding medical care. While the FDA makes every effort to ensure the data is accurate, all results should be assumed unvalidated.
FAQ
Does it need an API key? No. openFDA is keyless; the Actor needs no secrets.
What does monitor mode return on a quiet day? Zero results. Only new records or records whose status/availability changed are delivered, and no result event is charged.
Why is packageNdc not unique? The FDA can list the same NDC twice (for example a current shortage and a separate "To Be Discontinued" notice), and one NDC can carry several presentations. The Actor uses NDC, posting date, drug, company and presentation as its identity, so distinct presentations stay as separate rows and remain stable across runs.
Can I get every record? Yes. Leave both filters empty and keep maxResults at its default (or higher).
What happens if the API rate-limits us? The client retries with backoff and, if the limit persists, stops gracefully and returns the records already collected. Failed requests are never charged.
Is it legal to use this data? The dataset is public-domain openFDA data. Review the openFDA terms for your use case.
Maintenance
Tested daily by Steadfetch against the live source and its output schema, in CI on every push, and in the Store quality test. If the source changes shape, the output-schema validation fails loudly instead of publishing bad data.
Steadfetch builds public-data Actors that keep working. Issues are fixed before new features are added.