healthcare.dev docs
API referenceDrugs

Search drug shortages

GET /v1/drugs/shortages

GET https://api.healthcare.dev/v1/drugs/shortages

FDA's drug shortage list (via openFDA), one entry per presentation (package NDC): current and recently resolved shortages, and discontinuations. Search by generic name with q, filter by NDC, status or therapeutic category. With q, ranked by match_score; without it, most recently updated first (match_score: 1). ndc matches at the product level.

Requires an API key: Authorization: Bearer hdev_live_.... See Authentication.

Query parameters

NameTypeRequiredDescriptionExample
qstringnoGeneric name, company, presentation or therapeutic category (fuzzy, at least 3 characters)atropine
ndcstringnoProduct, package (any 10-digit layout) or 11-digit NDC. Matches at the product level: an entry for any package of the product, or linked to the product's label by openFDA.76385-129-01
status"current" | "resolved" | "to_be_discontinued"noOnly entries with this status (default: all)current
therapeutic_categorystringnoFDA therapeutic category (exact, case-insensitive)Anesthesia
limitintegernoPage size (max 100)25
cursorstringnoOpaque cursor from links.next
view"compact" | "full"nocompact returns only the fields an agent usually needs (fewer tokens); full (default) returns every fieldcompact
fieldsstringnoComma-separated record fields to return, e.g. code,display,billablecode,display,billable

Examples

curl

curl "https://api.healthcare.dev/v1/drugs/shortages?q=atropine&limit=25" \
  -H "Authorization: Bearer $HDEV_API_KEY"

TypeScript

const res = await fetch("https://api.healthcare.dev/v1/drugs/shortages?q=atropine&limit=25", {
  headers: { Authorization: `Bearer ${process.env.HDEV_API_KEY}` },
});
const { data, meta } = await res.json();

Python

import os
import requests

res = requests.get("https://api.healthcare.dev/v1/drugs/shortages?q=atropine&limit=25", headers={"Authorization": f"Bearer {os.environ['HDEV_API_KEY']}"})
body = res.json()

Try it

GEThttps://api.healthcare.dev/v1/drugs/shortages?q=atropine&ndc=76385-129-01&status=current&therapeutic_category=Anesthesia&limit=25&view=compact&fields=code%2Cdisplay%2Cbillable
Get a free key
Copy as curl
curl "https://api.healthcare.dev/v1/drugs/shortages?q=atropine&ndc=76385-129-01&status=current&therapeutic_category=Anesthesia&limit=25&view=compact&fields=code%2Cdisplay%2Cbillable" \
  -H "Authorization: Bearer $HDEV_API_KEY"

Response

Matching shortage list entries

{
  "data": [
    {
      "id": "string",
      "package_ndc": "string",
      "ndc11": "string",
      "generic_name": "string",
      "company_name": "string",
      "presentation": "string",
      "dosage_form": "string",
      "therapeutic_categories": [
        "string"
      ],
      "status": "current",
      "availability": "string",
      "shortage_reason": "string",
      "related_info": "string",
      "related_info_url": "string",
      "resolved_note": "string",
      "contact_info": "string",
      "update_type": "string",
      "initial_posting_date": "2026-10-01",
      "update_date": "2026-10-01",
      "discontinued_date": "2026-10-01",
      "change_date": "2026-10-01",
      "openfda": {
        "product_ndcs": [
          null
        ],
        "package_ndcs": [
          null
        ],
        "brand_names": [
          null
        ],
        "generic_names": [
          null
        ],
        "manufacturer_names": [
          null
        ],
        "rxcuis": [
          null
        ],
        "application_numbers": [
          null
        ],
        "spl_set_ids": [
          null
        ]
      },
      "match_score": 0
    }
  ],
  "meta": {
    "source": "cms-icd10",
    "data_version": "2026.1",
    "retrieved_at": "2026-10-24T12:00:00Z",
    "license": "Public domain (CMS). Reference data, not medical advice."
  },
  "links": {
    "self": "/v1/drugs/shortages?q=atropine&limit=25",
    "next": "/v1/drugs/shortages?q=atropine&limit=25&cursor=eyJrIjoiRTExLjkifQ"
  }
}

Fields

FieldTypeAlways presentDescription
idstringyesPackage NDC plus the kind of entry (shortage or discontinuation), e.g. 0409-1630-10:shortage
package_ndcstringyesPackage NDC as FDA lists it
ndc11string | nullyesPackage NDC normalized to NDC-11
generic_namestringyesFDA's shortage name, e.g. Atropine Sulfate Injection
company_namestringyes
presentationstringyesStrength, form and package, as FDA lists it
dosage_formstring | nullyes
therapeutic_categoriesstring[]yes
status"current" | "resolved" | "to_be_discontinued"yescurrent = in shortage now; resolved = shortage over (kept briefly by FDA); to_be_discontinued = the manufacturer is discontinuing it
availabilitystring | nullyesFDA's availability note, e.g. Available, Limited Availability, Unavailable
shortage_reasonstring | nullyes
related_infostring | nullyes
related_info_urlstring | null (uri)yes
resolved_notestring | nullyes
contact_infostring | nullyesManufacturer's customer contact
update_typestring | nullyesNew, Revised or Reverified
initial_posting_datestring | null (date)yes
update_datestring | null (date)yes
discontinued_datestring | null (date)yes
change_datestring | null (date)yes
openfdaOpenFdaLinksyes
match_scorenumberyesHow well this result matches the query: 1 exact code or id, 0.9 code prefix, 0.5 to 0.9 every query word in the text (higher is closer), under 0.5 a fuzzy (typo-tolerant) match. Below 0.5, check the result before relying on it.

Errors

Errors are application/problem+json (RFC 9457). Branch on type, not on title. See Errors.

StatustypeWhen
400invalid-requestA parameter or the body failed validation; errors lists each field.
401unauthorizedMissing, malformed or revoked API key.
404not-foundNo record with that id (retired records are still returned).
429rate-limited / quota-exceededToo many requests per second (retry after Retry-After), or the monthly quota is used up.
503dataset-unavailable / unavailableThe dataset has no published version yet, or the service is degraded.

On this page