# Drug Shortage Tracker: Live FDA Shortage List (`m_ctim/drug-shortage-tracker`) Actor

Search current and recent US drug shortages by generic name or status, straight from the FDA's official openFDA shortage database. For hospital and retail pharmacy supply chain teams, and healthcare procurement checking which drugs are affected before they run out.

- **URL**: https://apify.com/m\_ctim/drug-shortage-tracker.md
- **Developed by:** [Timothy Kelvin](https://apify.com/m_ctim) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Drug Shortage Tracker: Live openFDA Shortage Data

Search current and recent US drug shortages by generic drug name and/or status, straight from the FDA's official openFDA shortage database, most recently posted first. Find out which drugs are affected, why, who manufactures them, and when the shortage was posted, without checking the FDA site by hand.

Here's a real record it returns:

```json
{
  "genericName": "Sodium Chloride",
  "brandNames": ["SODIUM CHLORIDE"],
  "manufacturer": "Hospira, Inc., a Pfizer Company",
  "status": "To Be Discontinued",
  "dosageForm": "Injection",
  "presentation": "Sodium Chloride 0.9%, Injection, 50 mL ADD-Vantage Flexible Container (NDC 0409-7101-66)",
  "therapeuticCategory": ["Gastroenterology", "Other", "Renal"],
  "reason": "Discontinuation of the manufacture of the drug",
  "contactInfo": "844-646-4398",
  "initialPostingDate": "12/03/2025",
  "updateDate": "12/03/2025",
  "discontinuedDate": "12/03/2025",
  "route": ["INTRAVENOUS"],
  "ndc": "0409-7101-66"
}
```

### Who this is for

- **Hospital and retail pharmacy supply chain teams** checking weekly which drugs on their formulary are affected before they run out.
- **Healthcare procurement and purchasing teams** screening a drug before committing to a supplier or contract.
- **Clinical and regulatory affairs teams** monitoring a therapeutic category for emerging shortages.

### Input

| Field | Type | Description |
|---|---|---|
| `genericName` | string | Filter to shortages matching this generic drug name (partial match, case-insensitive). Leave blank for all current shortages. |
| `status` | string | One of `Current`, `To Be Discontinued`, `Resolved`. Leave blank for all statuses. |
| `maxResults` | integer (default `25`) | Cap on records returned, most recently posted first. |

```json
{
  "genericName": "amoxicillin",
  "status": "Current",
  "maxResults": 25
}
```

### Output

One record per shortage entry, fields as shown above: generic name, brand names, manufacturer, status, dosage form, full presentation text, therapeutic category, the FDA-stated reason, a manufacturer contact number, the relevant dates, route of administration, and package NDC code.

### How it works

Direct calls to the FDA's official openFDA drug shortages endpoint (`api.fda.gov/drug/shortages`), no scraping, no key, no proxy. Results are sorted by most recent posting date and status-filtered server-side; the generic name filter is applied client-side against a larger recency-sorted batch, since openFDA's own search syntax on this endpoint only reliably supports exact-phrase matching, not partial or wildcard terms (verified directly against the live API, not assumed from docs).

Retries with exponential backoff on transient failures (rate limits, 5xx errors), the same defensive fetch pattern used across every actor in this portfolio, so a single upstream hiccup doesn't fail your run.

### Pricing note

Billed per **search**, not per shortage record returned, one charge whether the search returns 1 record or several hundred.

### Related products

- [Medical Device Adverse Event Tracker](https://github.com/timmKal01/medical-device-adverse-event-tracker): a different openFDA dataset (device adverse events, not shortages)
- [Product Recall Alert](https://github.com/timmKal01/product-recall-alert): FDA drug, food, and device recalls, a related but distinct signal from shortages

# Actor input Schema

## `genericName` (type: `string`):

Filter to shortages matching this generic drug name (partial match, case-insensitive). Leave blank to return all current shortages.

## `status` (type: `string`):

Filter by shortage status. Leave blank for all statuses.

## `maxResults` (type: `integer`):

Maximum number of shortage records to return, most recently posted first.

## Actor input object example

```json
{
  "status": "",
  "maxResults": 25
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("m_ctim/drug-shortage-tracker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("m_ctim/drug-shortage-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call m_ctim/drug-shortage-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,m_ctim/drug-shortage-tracker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/CHPa9Er4JOdfQrh7T/builds/0KexLfLqFAf3y2diQ/openapi.json
