# RxNorm Drug Normalizer (`wakey7dev/rxnorm-drug-normalizer`) Actor

Normalize drug names using the NIH RxNorm API. Brand↔generic mapping, NDC cross-reference, ingredient lists, dose forms, and DailyMed labels. Free API, no key needed.

- **URL**: https://apify.com/wakey7dev/rxnorm-drug-normalizer.md
- **Developed by:** [Chris Wakefield](https://apify.com/wakey7dev) (community)
- **Categories:** Business
- **Stats:** 1 total users, 0 monthly users, 0.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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

![Chris The Dev](https://raw.githubusercontent.com/chriswakefield87/appstore-screenshot-translator/main/assets/actor-banner.png)

## 💊 RxNorm Drug Normalizer

Normalize drug names using the NIH RxNorm API — the official US National Library of Medicine drug terminology standard. Search any brand or generic drug name and get back RxCUI codes, brand↔generic mappings, active ingredients, dose forms, NDC cross-references, and optional DailyMed drug label data.

**No API key required** — the NIH RxNorm API is free and open to all.

### Features

- 🔍 **Fuzzy drug search** — handles misspellings via approximate matching
- 🔄 **Brand ↔ Generic mapping** — 200+ built-in brand-to-generic translations
- 📋 **RxCUI concept resolution** — get all related concepts (brands, ingredients, dose forms, synonyms)
- 📦 **NDC code lookup** — cross-reference NDC codes to RxCUI concepts
- 🏷️ **DailyMed integration** — optionally fetch drug label summaries from the FDA/NLM DailyMed
- 📊 **Normalized output** — cleaned drug names, extracted strengths and dose forms
- 📝 **Human-readable summary** — beautiful ASCII table output in the run log

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `drugName` | string | Yes\* | — | Brand or generic drug name (e.g. "Tylenol", "acetaminophen", "Lipitor") |
| `searchMode` | select | No | `drug` | Search mode: `drug` (name search), `ndc` (NDC lookup), `rxcui` (RxCUI lookup) |
| `maxResults` | integer | No | 10 | Maximum results (1–50) |
| `includeDailyMed` | boolean | No | false | Also fetch DailyMed drug label summaries |
| `ndcCode` | string | Only in NDC mode | — | 11-digit NDC code (e.g. "00002415013") |
| `rxcuiCode` | string | Only in RxCUI mode | — | RxCUI concept ID (e.g. "198440") |

\* Required only when `searchMode` is `drug`.

### Example Input

```json
{
  "drugName": "Tylenol",
  "maxResults": 5,
  "includeDailyMed": true
}
```

### Example Output (Dataset)

```json
[
  {
    "rxcui": "198440",
    "name": "Tylenol",
    "synonym": "",
    "tty": "BN",
    "ttyLabel": "Brand Name",
    "nameNormalized": "Acetaminophen",
    "brandNames": ["Tylenol", "Panadol", "Mapap", "Cetafen", "Pharbetol", "CounterAct Pain", "Anacin AF"],
    "ingredients": ["acetaminophen"],
    "doseForms": ["Oral Tablet"],
    "relatedConcepts": [...]
  }
]
```

#### Output Keys (KVS)

- **OUTPUT** — Human-readable formatted summary table
- **STATS** — Machine-readable statistics (JSON)
- **RESULTS** / Dataset — Full normalized drug data array

### Use Cases

- **Pharmacy & EHR software** — NDC→RxCUI mapping for medication reconciliation
- **Clinical research** — Normalize drug names across studies and databases
- **Healthcare apps** — Brand-to-generic drug lookup for patients
- **Drug interaction checkers** — Get RxCUI codes needed for interaction APIs
- **Supply chain analytics** — Cross-reference NDC codes to standard drug concepts
- **AI/ML pipelines** — Clean drug name features for NLP models

### Data Sources

- **RxNorm** — NIH National Library of Medicine ([rxnav.nlm.nih.gov](https://rxnav.nlm.nih.gov/))
- **DailyMed** — FDA/NLM drug label repository ([dailymed.nlm.nih.gov](https://dailymed.nlm.nih.gov/))

Both APIs are free, public, and require no authentication.

### Pricing

Pay-per-result: $2.00 per 1,000 results. You only pay for the drug concepts you retrieve.

# Actor input Schema

## `drugName` (type: `string`):

Brand or generic drug name to search (e.g. 'Tylenol', 'acetaminophen', 'Lipitor'). Fuzzy matching handles misspellings.

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

Maximum number of drug concepts to return (1-50). Default: 10.

## `includeDailyMed` (type: `boolean`):

Also fetch drug label summaries from DailyMed (NLM). Adds SPL set IDs and published dates. Default: false.

## `searchMode` (type: `string`):

How to search: by drug name, NDC code, or RxCUI concept ID.

## `ndcCode` (type: `string`):

11-digit NDC code to look up (e.g. '00002415013'). Only used when Search Mode is 'ndc'.

## `rxcuiCode` (type: `string`):

RxCUI concept ID to retrieve all related concepts for (e.g. '198440'). Only used when Search Mode is 'rxcui'.

## Actor input object example

```json
{
  "maxResults": 10,
  "includeDailyMed": false,
  "searchMode": "drug"
}
```

# Actor output Schema

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

Complete dataset items with all normalized drug fields.

## `summary` (type: `string`):

Human-readable formatted summary table.

## `stats` (type: `string`):

Machine-readable run statistics and counts.

# 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("wakey7dev/rxnorm-drug-normalizer").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("wakey7dev/rxnorm-drug-normalizer").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 wakey7dev/rxnorm-drug-normalizer --silent --output-dataset

```

## MCP server setup

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

```

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/SQIvNZbSy1SaBfYF7/builds/KDdPi8fnWA2gkVdvC/openapi.json
