# RxNorm Drug Terminology Scraper - Drug Names, NDC & RXCUI (`ninhothedev/rxnorm-scraper`) Actor

$0.5/1K 🔥 RxNorm scraper! US drug names, ingredients, brands, dose forms & NDC codes. No key. JSON, CSV, Excel or API in seconds. Power healthcare apps & drug mapping ⚡

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

## Pricing

from $0.50 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## 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

## RxNorm Drug Terminology Scraper 💊

**Scrape the official US drug terminology (RxNorm) from the National Library of Medicine — no API key, no login, no proxy.** Turn plain drug names such as `aspirin`, `metformin` or `Lipitor` into every normalized RxNorm concept: ingredients, brand names, clinical drugs, branded drugs, dose forms and packs — each with its **RXCUI**, term type (TTY), UMLS CUI and NDC product codes.

RxNorm is the standard drug vocabulary used by US electronic health records, e-prescribing systems, pharmacy software and clinical decision support. This actor makes it available as clean, flat JSON/CSV/Excel rows you can drop straight into a database.

***

### ✨ What you get

| Feature | Detail |
| --- | --- |
| 🔑 **No API key** | The NIH/NLM RxNav API is free and public. Nothing to sign up for. |
| 🧪 **Two modes** | Drug name lookup, or RXCUI enrichment with related concepts + NDCs |
| 🏷 **Full term-type map** | `SCD`, `SBD`, `IN`, `BN`, `DF`, `PIN`, `MIN`, `BPCK`, `GPCK` — decoded to plain English |
| 🔢 **NDC codes** | National Drug Codes per concept, with a total count |
| ✍️ **Typo tolerant** | Unmatched names are automatically retried via RxNorm spelling suggestions |
| 🌐 **No proxy needed** | Runs fine on datacenter IPs — cheap runs |
| 💾 **Clean schema** | One dataset item per concept, all fields nullable, ready for CSV/Excel export |

***

### 💰 Pricing

Roughly **$0.5 per 1,000 concepts** scraped. There are no per-request API fees on top — RxNav is a free government service, so you only pay Apify compute. A single common ingredient like `aspirin` expands to 150+ concepts, so most runs cost cents.

***

### 🚀 Modes

#### 1. `drugs` — drug names → all concept variants

Input a list of drug names. Each name is resolved through RxNav's `drugs` endpoint and every matching concept is returned as its own item.

```json
{
  "mode": "drugs",
  "drugNames": ["aspirin", "metformin", "Lipitor"],
  "maxItems": 200
}
```

#### 2. `rxcuis` — RXCUIs → properties + related concepts + NDCs

Input RxNorm concept IDs. Each one is enriched with its properties, its related ingredients / brand names / dose forms, and its NDC product codes.

```json
{
  "mode": "rxcuis",
  "rxcuis": ["1191", "1243833"],
  "maxItems": 200
}
```

***

### 📥 Input reference

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | select | `drugs` | `drugs` (name lookup) or `rxcuis` (RXCUI enrichment) |
| `drugNames` | array | `["aspirin","metformin"]` | Drug names to resolve — used in `drugs` mode |
| `rxcuis` | array | – | RxNorm concept IDs — required in `rxcuis` mode |
| `maxItems` | integer | `200` (max `2000`) | Item cap for the run |

***

### 📤 Output example

**`drugs` mode:**

```json
{
  "type": "concept",
  "query": "aspirin",
  "rxcui": "103863",
  "name": "aspirin 150 MG Rectal Suppository",
  "synonym": "ASA 150 MG Rectal Suppository",
  "tty": "SCD",
  "tty_description": "Clinical Drug",
  "language": "ENG",
  "umls_cui": null,
  "suppress": "N",
  "url": "https://mor.nlm.nih.gov/RxNav/search?searchBy=RXCUI&searchTerm=103863",
  "source": "rxnorm",
  "scraped_at": "2026-07-28T12:35:31.330Z"
}
```

**`rxcuis` mode** adds:

```json
{
  "rxcui": "1243833",
  "name": "24 HR metformin hydrochloride 1000 MG / sitagliptin phosphate 100 MG Extended Release Oral Tablet [Janumet]",
  "tty": "SBD",
  "tty_description": "Branded Drug",
  "ingredients": ["metformin", "sitagliptin"],
  "brand_names": ["Janumet"],
  "dose_forms": ["Extended Release Oral Tablet"],
  "ndc_count": 5,
  "ndcs": ["00006008107", "00006008114", "00006008131"]
}
```

#### Term types (TTY) explained

| TTY | Meaning |
| --- | --- |
| `IN` | Ingredient |
| `PIN` | Precise Ingredient |
| `MIN` | Multiple Ingredients |
| `BN` | Brand Name |
| `SCD` | Clinical Drug (generic, with strength + dose form) |
| `SBD` | Branded Drug |
| `DF` | Dose Form |
| `BPCK` / `GPCK` | Branded / Generic Pack |

***

### 🎯 Use cases

- **Healthcare apps** — power drug autocomplete, dosage pickers and medication lists with the same vocabulary EHRs use.
- **Pharmacy data** — map inventory and dispensing records to NDC codes and normalized product names.
- **Drug mapping** — reconcile messy free-text medication strings from claims, labels or intake forms to a stable RXCUI.
- **Clinical research** — build ingredient-level cohorts, normalize concomitant medication data, or link RxNorm to UMLS CUIs.

***

### ❓ FAQ

**Do I need an API key?**
No. RxNav is a free, key-less public service of the U.S. National Library of Medicine.

**Is a proxy required?**
No. The API is datacenter-clean, which keeps runs cheap.

**What happens if I misspell a drug name?**
The actor calls RxNorm's spelling-suggestion endpoint and retries with the best suggestion automatically.

**Why does an ingredient have zero NDCs?**
NDC codes attach to marketed products (`SCD`/`SBD` level), not to abstract ingredient concepts like `aspirin` (`IN`).

**How current is the data?**
RxNorm is updated weekly by the NLM, and this actor always reads it live.

***

### 🔗 Related actors

- [openFDA Scraper](https://apify.com/ninhothedev/openfda-scraper) — FDA drug labels, adverse events and recalls
- [DailyMed Scraper](https://apify.com/ninhothedev/dailymed-scraper) — full structured product labeling (SPL)
- [ChEMBL Scraper](https://apify.com/ninhothedev/chembl-scraper) — bioactivity and compound data
- [Clinical Trials Scraper](https://apify.com/ninhothedev/clinical-trials-scraper) — ClinicalTrials.gov study records

***

### ⚖️ Legal & data source

Data comes from the **RxNav / RxNorm REST API** operated by the U.S. National Library of Medicine (NIH). RxNorm is in the public domain, but some source vocabularies within UMLS carry their own restrictions — review the [NLM terms](https://www.nlm.nih.gov/research/umls/knowledge_sources/metathesaurus/release/license_agreement.html) before redistribution. Only public, non-personal data is scraped. This actor is **not** medical advice and must not be used as the sole basis for clinical decisions.

# Actor input Schema

## `mode` (type: `string`):

Choose what to scrape. 'Drug names' resolves each drug name into every matching RxNorm concept (ingredient, brand name, clinical drug, branded drug, pack). 'RXCUIs' takes RxNorm concept IDs and enriches each one with its properties, related ingredients / brand names / dose forms and its NDC product codes.

## `drugNames` (type: `array`):

Drug names to look up, e.g. 'aspirin', 'metformin', 'Lipitor'. Used only in the 'Drug names' mode. Each name is resolved through the RxNav drugs endpoint; if a name has no exact match, the actor automatically retries with RxNorm's spelling suggestion. Defaults to aspirin and metformin when left empty.

## `rxcuis` (type: `array`):

RxNorm concept unique identifiers (RXCUI) to enrich, e.g. '1191' for aspirin or '1243833' for a metformin clinical drug. Used only in the 'RXCUIs' mode, where it is required. Each RXCUI returns one dataset item with ingredients, brand names, dose forms and NDC codes.

## `maxItems` (type: `integer`):

Maximum number of dataset items (one item per RxNorm concept) to push before the run stops. Keeps runs cheap and predictable - a single common ingredient such as aspirin can expand to hundreds of concepts.

## Actor input object example

```json
{
  "mode": "drugs",
  "drugNames": [
    "aspirin",
    "metformin"
  ],
  "rxcuis": [
    "1191"
  ],
  "maxItems": 200
}
```

# 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 = {
    "drugNames": [
        "aspirin",
        "metformin"
    ],
    "rxcuis": [
        "1191"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/rxnorm-scraper").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 = {
    "drugNames": [
        "aspirin",
        "metformin",
    ],
    "rxcuis": ["1191"],
}

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/rxnorm-scraper").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 '{
  "drugNames": [
    "aspirin",
    "metformin"
  ],
  "rxcuis": [
    "1191"
  ]
}' |
apify call ninhothedev/rxnorm-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/DnuWx91Yi4WMx3CXj/builds/cHfZTdFY9wBBRiPBj/openapi.json
