FDA Drug Shortage Scraper (openFDA Shortages Data) avatar

FDA Drug Shortage Scraper (openFDA Shortages Data)

Pricing

from $1.20 / 1,000 shortage record delivereds

Go to Apify Store
FDA Drug Shortage Scraper (openFDA Shortages Data)

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

Steadfetch

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 hours ago

Last modified

Categories

Share

Steadfetch

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, therapeuticCategory and therapeuticCategories.
  • Converts the source MM/DD/YYYY dates to ISO 8601 (YYYY-MM-DD).
  • Sorts results newest first (by update date) and deduplicates identical records within a run.
  • Filters by status and therapeuticCategory.
  • 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.json before 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

FieldTypeDefaultDescription
statusarray of strings[] (all)Keep only records with one of these statuses: Current, Resolved, To Be Discontinued.
therapeuticCategoryarray of strings[] (all)Keep only records tagged with at least one of these categories (case-insensitive).
monitorModebooleanfalseWhen true, deliver only new or changed records for this Apify user and bill one monitor-check event per checked record.
maxResultsinteger2000Maximum 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

FieldTypeDescription
urlstringSource API URL (common Steadfetch envelope, required).
titlestring or nullBrand name when available, otherwise the generic name.
scrapedAtstringISO 8601 UTC timestamp of the extraction (required).
genericNamestringGeneric drug name and dosage form (required).
brandNamestring or nullBrand name from the openFDA product block.
companyNamestring or nullCompany reporting the shortage.
statusstring or nullCurrent, Resolved or To Be Discontinued.
availabilitystring or nullAvailability text, kept verbatim from the source.
updateTypestring or nullLatest update type (for example Reverified).
updateDatestringLatest update date, ISO 8601 (required).
initialPostingDatestringFirst posting date, ISO 8601 (required).
packageNdcstring or nullNational Drug Code of the affected package.
presentationstring or nullPresentation as published by the FDA (product, dosage form, strength and NDC). Distinguishes records that share an NDC and posting date.
applicationNumberstring or nullFDA application number (NDA/ANDA).
therapeuticCategorystring or nullFirst therapeutic category.
therapeuticCategoriesarray of stringsAll therapeutic categories for the record.
changeTypestring or nullMonitor mode only: new or updated.
changedFieldsarray of stringsMonitor 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 in monitorMode only, 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.