Drug Shortage Monitor — openFDA Availability & Duration avatar

Drug Shortage Monitor — openFDA Availability & Duration

Pricing

from $0.50 / 1,000 results

Go to Apify Store
Drug Shortage Monitor — openFDA Availability & Duration

Drug Shortage Monitor — openFDA Availability & Duration

Monitor US drug shortages from openFDA: product, firm, status, availability, dosage form and how long it has been in shortage. Keyless, one row per shortage episode.

Pricing

from $0.50 / 1,000 results

Rating

0.0

(0)

Developer

alaudin burki

alaudin burki

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

12 hours ago

Last modified

Categories

Features

Limited permissions

Share

This Actor reads the US FDA's public drug shortage list from openFDA and writes one flat row per shortage episode: drug, firm, status, availability, dosage form, NDC and how many days the shortage has run. openFDA needs no key and no account. The output is designed for a scheduled run that lands in a spreadsheet or a database, with the parse traps handled and the gaps left visible.

How to use

  1. Optionally type a generic drug name in query, or leave it blank to read every shortage on record.
  2. Choose a status, and decide whether resolved (historical) shortages should be included.
  3. Run it. Filter the rows on isCurrent, isUnavailable or isLimited, or sort by daysInShortage; read SUMMARY.byStatus and SUMMARY.byAvailability for the shape of the run.

Inputs

FieldPurposeDefault
queryA drug name, applied to openFDA as the quoted phrase generic_name:"…". It is a match on the generic name, not a search across every field. Blank fetches everything.lidocaine (prefill only)
statusopenFDA status filter: any, Current, To Be Discontinued or Resolved. Sent in the API query unless any.any
includeResolvedWhen off, rows whose status is Resolved are dropped after parsing. Resolved shortages are historical entries that stay on the list.true
maxItemsRow cap. Hard ceiling is 20,000.2000
timeoutSecsPer-page request timeout, 5–120 seconds.30

Example input

{
"query": "",
"status": "Current",
"includeResolved": false,
"maxItems": 1000
}

Output dataset

One row per shortage episode. id is built from the generic name, package NDC, firm and the date the shortage was first posted, so a shortage that resolved and later recurred is two rows, not one.

FieldMeaning
idStable row identity: product, package, firm and posting date.
genericNameGeneric name of the product in shortage.
companyNameThe firm that reported or holds the product.
statusCurrent, To Be Discontinued or Resolved, as openFDA states it.
availabilityThe published availability — Available, Limited Availability, Unavailable — or Not stated when the record publishes no value.
dosageFormInjection, Tablet, Capsule and so on.
presentationFull product description including strength and NDC.
therapeuticCategoryOne or more categories, comma-separated.
packageNdcNational Drug Code for the package.
initialPostedAtWhen this shortage episode was first posted, as ISO 8601 (converted from openFDA's MM/DD/YYYY).
updatedAtLast update date on the record, ISO 8601.
updateTypeNew, Revised or Reverified, as published.
daysInShortageWhole days from the posting date to this run. null, not 0, when no usable posting date was published.
isCurrentStatus is Current.
isDiscontinuedStatus is To Be Discontinued.
isResolvedStatus is Resolved.
isUnavailableAvailability is explicitly Unavailable.
isLimitedAvailability is explicitly Limited Availability.
sourceUrlThe openFDA endpoint the row came from.

The run summary carries matchingRecords, byStatus, byAvailability, the filters used, openFDA's own last_updated value, a truncation flag and openFDA's disclaimer.

Limitations

  • US only. This is the FDA's shortage list. Other regulators publish their own lists, and they are not in this dataset.
  • The data is unvalidated. openFDA says so itself, and the Actor repeats that disclaimer in every run summary. It is not a basis for decisions about medical care.
  • Not stated is not Available. A blank availability is carried as its own value rather than filled in; live records do carry these blanks.
  • Duration is measured from the posting date, which is when the shortage was recorded, not necessarily when supply first tightened.
  • No change tracking. Each run reads the current record set; the Actor keeps no baseline, so it cannot tell you which rows are new since yesterday. Compare two datasets for that.
  • The two filters interact. Choosing status: "Resolved" with includeResolved: false drops every row and returns an empty dataset, because the status filter and the resolved filter contradict.
  • Paging is by skip offset, 1,000 records per request — openFDA's maximum page size — so a very broad query is several requests.
  • A record with a malformed date (for example 02/30/2024) gets null dates and a null daysInShortage rather than a rolled-over guess.

Why this is different

  • Standalone and keyless. One public endpoint, no API key, no registration, no second vendor.
  • The episode is the unit. The row id includes the posting date, so a product that was short, recovered and went short again produces two rows instead of silently collapsing into one.
  • Gaps are values, not defaults. Missing availability is Not stated; a missing date is null; a missing midpoint of information is never filled with a plausible number.
  • Dates are parsed explicitly. openFDA publishes MM/DD/YYYY; a locale-dependent parse reads a leap day as invalid on most machines, so the conversion is explicit and a rollover date is rejected.

FAQ

Does it need an API key? No. openFDA's drug shortage endpoint is public and the Actor sends no key.

Why is daysInShortage null on some rows? The record published no usable posting date. The Actor returns null rather than 0, because "started today" and "date unknown" are different facts.

Does an empty availability mean the drug is available? No. It means the record does not say, and the row says Not stated.

Can I get only live shortages? Yes — set status to Current and leave includeResolved off.

Why did my run stop at 2,000 rows? That is the default maxItems. Raise it (up to 20,000) and check SUMMARY.truncated.

Pricing and limits

This Actor is billed per event; the current rate is on the Actor's Apify pricing panel. A run reads up to 1,000 records per request and writes at most maxItems rows. The run summary states the number of matching records at the source, the row count, the status and availability breakdown, and whether the row cap truncated the result.