# Drug Safety Lookup (RxNorm + FDA Label, Recalls, Shortages) (`pj_pai/drug-safety-lookup`) Actor

Give a drug name, get one agent-ready profile: RxCUI, boxed warning, indications, recent FDA recalls and current shortage status.

- **URL**: https://apify.com/pj_pai/drug-safety-lookup.md
- **Developed by:** [Rakesh Pai](https://apify.com/pj_pai) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 drug profiles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## 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 Safety Lookup (RxNorm + FDA Label, Recalls, Shortages)

Give a drug name, get one agent-ready profile: RxCUI, boxed warning, indications, recent FDA recalls and current shortage status.

**Data source:** RxNorm (NLM RxNav) and openFDA drug label, enforcement and shortage APIs. Official public data, no API key, no login and no scraping of protected pages. Results are returned as clean, flat JSON that is ready for spreadsheets, databases, BI tools and AI agents.

### What can you use it for?

- Pharmacy and clinical decision-support prototypes
- AI agent tool for drug safety questions
- Formulary and recall monitoring
- Pharmacovigilance research
- Use it as a tool from AI agents through the Apify MCP server, or schedule it and send new results to Slack, Google Sheets or a webhook

### Input

| Field | Name | Description |
|---|---|---|
| `drugs` | Drug names | Generic or brand names |

#### Example input

```json
{
  "drugs": [
    "metformin",
    "amoxicillin"
  ]
}
```

### Output

Each result is one dataset item with these fields: `query`, `rxcui`, `labelSetId`, `isCombinationProduct`, `brandNames`, `genericNames`, `manufacturer`, `boxedWarning`, `indications`, `contraindications`, `recallCountTotal`, `recentRecalls`, `shortages`, `sources`, `checkedAt`.

#### Example output (real result, long fields shortened)

```json
{
  "query": "metformin",
  "rxcui": "6809",
  "labelSetId": "05999192-ebc6-4198-bd1e-f46abbfb4f8a",
  "isCombinationProduct": false,
  "brandNames": [
    "Metformin"
  ],
  "genericNames": [
    "METFORMIN ER 500 MG"
  ],
  "manufacturer": "REMEDYREPACK INC.",
  "boxedWarning": "WARNING: LACTIC ACIDOSIS Postmarketing cases of metformin-associated lactic acidosis have resulted in death, hypothermia, hypotension, and resistant bradyarrhythmias. The onset of metformin­-associated lactic acidosis is…",
  "indications": "1 INDICATIONS AND USAGE Metformin hydrochloride extended-release tablets are indicated as an adjunct to diet and exercise to improve glycemic control in adults and pediatric patients 10 years of age and older with type 2…",
  "contraindications": "4 CONTRAINDICATIONS Metformin hydrochloride extended-release tablets are contraindicated in patients with: • Severe renal impairment (eGFR below 30 mL/min/1.73 m 2 ) [see Warnings and Precautions (5.1) ]. • Hypersensitiv…",
  "recallCountTotal": 91,
  "recentRecalls": [
    {
      "recallNumber": "D-0657-2026",
      "classification": "Class II",
      "reportDate": "20260708",
      "firm": "Boehringer Ingelheim Pharmaceuticals, Inc.",
      "reason": "CGMP Deviations: An incorrect detergent was used and the required swab sampling was not performed on a production hopper that had previously been used for a different product."
    },
    {
      "recallNumber": "D-0328-2025",
      "classification": "Class II",
      "reportDate": "20250416",
      "firm": "Glenmark Pharmaceuticals Inc., USA",
      "reason": "CGMP Deviations"
    },
    {
      "recallNumber": "D-0292-2025",
      "classification": "Class II",
      "reportDate": "20250402",
      "firm": "A-S Medication Solutions LLC",
      "reason": "Presence of Foreign Tablets/Capsules."
    },
    {
      "recallNumber": "D-0192-2025",
      "classification": "Class II",
      "reportDate": "20250115",
      "firm": "Granules Pharmaceuticals Inc.",
      "reason": "Presence of Foreign Tablets/Capsules: A Paracetamol 500 mg tablet was found in a 1000-count bottle of Metformin HCL ER Tablets USP, 500 mg."
    }
  ],
  "shortages": [
    {
      "status": "To Be Discontinued",
      "company": "Mylan Pharmaceuticals Inc., a Viatris Company",
      "presentation": "Metformin Hydrochloride, Tablet, Extended Release, 1000 mg (NDC 0378-6001-91)",
      "updated": "10/22/2026"
    },
    {
      "status": "To Be Discontinued",
      "company": "Mylan Pharmaceuticals Inc., a Viatris Company",
      "presentation": "Metformin Hydrochloride, Tablet, Extended Release, 500 mg (NDC 0378-6002-91)",
      "updated": "10/22/2026"
    }
  ],
  "sources": [
    "RxNav (NLM)",
    "openFDA drug label/enforcement/shortages"
  ],
  "checkedAt": "2026-10-28T05:28:26.085Z"
}
```

Download the results as JSON, CSV, Excel or XML, or read them through the Apify API.

### Pricing

This Actor uses **pay-per-event** pricing. You pay **$0.02 per drug profile** returned, plus standard Apify platform usage, which is small because the Actor only calls lightweight APIs. You are never charged for results that are not returned. To cap spending, set a maximum cost per run in the run options.

### Tips

- Start with a small max-results value to check your filters, then scale up.
- Schedule the Actor (for example daily) with a "since" date filter where available to get change alerts.
- The data comes straight from the official source, so its freshness and completeness depend on that publisher.

### Disclaimer

This Actor is not affiliated with or endorsed by the data publisher. Verify critical decisions against the official source.

# Actor input Schema

## `drugs` (type: `array`):

Generic or brand names

## Actor input object example

```json
{
  "drugs": [
    "metformin",
    "amoxicillin"
  ]
}
```

# 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 = {
    "drugs": [
        "metformin",
        "amoxicillin"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pj_pai/drug-safety-lookup").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 = { "drugs": [
        "metformin",
        "amoxicillin",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("pj_pai/drug-safety-lookup").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 '{
  "drugs": [
    "metformin",
    "amoxicillin"
  ]
}' |
apify call pj_pai/drug-safety-lookup --silent --output-dataset

```

## MCP server setup

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

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/bzx1Xbu4mDXdw5Xvu/builds/B7eQGgG2aFb8IHCmF/openapi.json
