NLM RxNorm Drug Concepts Scraper avatar

NLM RxNorm Drug Concepts Scraper

Pricing

from $0.02 / 1,000 item extracteds

Go to Apify Store
NLM RxNorm Drug Concepts Scraper

NLM RxNorm Drug Concepts Scraper

Normalize drug names, RxCUIs, and NDCs into RxNorm concepts with the public NLM RxNav API for healthcare data enrichment.

Pricing

from $0.02 / 1,000 item extracteds

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Normalize drug names, RxCUIs, and NDCs with the public NLM RxNav / RxNorm API.

This Apify Actor turns messy medication names, known RxNorm identifiers, and National Drug Codes into structured RxNorm concept rows for healthcare data workflows.

What does NLM RxNorm Drug Concepts Scraper do?

It queries the official NLM RxNav REST API and returns normalized records.

  • ๐Ÿ’Š Search drug names such as aspirin, Lipitor, or metformin 500 mg.
  • ๐Ÿงฌ Enrich known RxCUIs with related RxNorm concepts.
  • ๐Ÿท๏ธ Normalize NDCs to active RxNorm concepts.
  • ๐Ÿ”— Include source API URLs for auditability.
  • ๐Ÿ“Š Export clean rows to JSON, CSV, Excel, or API clients.

Who is it for?

Healthcare data teams use this actor when medication records need a stable terminology key.

  • EHR data engineers matching internal medication strings.
  • Pharma catalog teams enriching products with RxCUIs.
  • Formulary and benefits teams mapping branded and generic drugs.
  • Compliance teams checking reference-data lineage.
  • Analytics teams joining prescription, claims, NDC, and catalog data.

Why use this actor?

RxNorm is a reference terminology, but operational teams still need repeatable extraction jobs.

  • Run lookups on a schedule.
  • Store repeatable datasets in Apify.
  • Call from ETL tools, notebooks, or backend jobs.
  • Keep source input and output rows together.
  • Avoid writing one-off RxNav glue code.

Data sources

The actor uses public NLM RxNav endpoints.

  • https://rxnav.nlm.nih.gov/REST/drugs.json
  • https://rxnav.nlm.nih.gov/REST/rxcui/{rxcui}/allrelated.json
  • https://rxnav.nlm.nih.gov/REST/rxcui/{rxcui}/ndcs.json
  • https://rxnav.nlm.nih.gov/REST/ndcstatus.json

Data table

FieldDescription
sourceInputTypeInput kind: drug name, RxCUI, or NDC.
sourceInputOriginal value submitted by the user.
relationshipRow type such as search result or related concept.
rxcuiRxNorm concept unique identifier.
ttyRxNorm term type.
nameConcept name returned by RxNav.
synonymConcept synonym when available.
ndcNational Drug Code when available.
ndcStatusNDC status from RxNav.
activeActive flag for NDC rows.
rxnormNdcWhether the NDC is listed as RxNorm NDC.
conceptStatusActive status of the concept.
suppressRxNorm suppress flag.
languageConcept language.
umlscuiUMLS CUI when supplied.
apiUrlExact RxNav URL used.
scrapedAtTimestamp of extraction.

How much does it cost to normalize RxNorm drug concepts?

This actor uses pay-per-event pricing.

  • A small start event is charged once per run.
  • A result event is charged for each dataset row.
  • Use maxItems to control cost during exploration.
  • The default input is intentionally small enough for a first test.

How to use it

  1. Open the actor on Apify.
  2. Enter drug names, RxCUIs, NDCs, or any combination.
  3. Keep includeRelatedConcepts enabled for broader terminology context.
  4. Keep includeNdcs enabled when NDC links matter.
  5. Set maxItems to the number of rows you want.
  6. Run the actor.
  7. Export the dataset or call it from the API.

Input options

Drug names

Use free-text medication names.

Examples:

  • aspirin
  • atorvastatin
  • metformin 500 mg
  • Lipitor

RxCUIs

Use known RxNorm concept IDs when you already have terminology keys.

Examples:

  • 1191
  • 617314

NDCs

Use NDCs when your source data is package-code oriented.

Examples:

  • 00071015523

Output examples

{
"sourceInputType": "drugName",
"sourceInput": "aspirin",
"relationship": "searchResult",
"rxcui": "1191",
"tty": "IN",
"name": "aspirin",
"synonym": null,
"ndc": null,
"apiUrl": "https://rxnav.nlm.nih.gov/REST/drugs.json?name=aspirin"
}
{
"sourceInputType": "ndc",
"sourceInput": "00071015523",
"relationship": "ndcStatus",
"rxcui": "617314",
"name": "atorvastatin 10 MG Oral Tablet [Lipitor]",
"ndc": "00071015523",
"ndcStatus": "ACTIVE"
}

Common workflows

Normalize medication strings

Load a list of drug names and export RxCUIs for downstream matching.

Enrich catalog records

Submit known RxCUIs and collect related concepts, brands, ingredients, packs, and dose forms.

Validate NDC inventory

Submit NDCs and check active RxNorm mapping status.

Build reference-data snapshots

Schedule recurring runs and store daily or weekly RxNav normalization outputs.

Tips for best results

  • Start with a small maxItems while validating your input.
  • Use generic names and branded names when matching messy data.
  • Use RxCUIs for precise enrichment.
  • Use NDC input when the source system stores package identifiers.
  • Keep the apiUrl field for audit trails.

Integrations

Use this actor in healthcare ETL and analytics pipelines.

  • Push output to a warehouse through Apify integrations.
  • Trigger runs from Airflow, Dagster, or cron.
  • Download CSV files into catalog QA workflows.
  • Call from backend services that need RxNorm normalization.
  • Combine with internal de-duplication and terminology governance jobs.

API usage: Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/nlm-rxnorm-drug-concepts-scraper').call({
drugNames: ['aspirin', 'atorvastatin'],
maxItems: 100
});
console.log(run.defaultDatasetId);

API usage: Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('automation-lab/nlm-rxnorm-drug-concepts-scraper').call(run_input={
'drugNames': ['aspirin', 'atorvastatin'],
'maxItems': 100,
})
print(run['defaultDatasetId'])

API usage: cURL

curl -X POST 'https://api.apify.com/v2/acts/automation-lab~nlm-rxnorm-drug-concepts-scraper/runs?token=YOUR_APIFY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"drugNames":["aspirin"],"maxItems":100}'

MCP usage with Claude, Cursor, and VS Code

Use Apify MCP tools to run the actor from Claude Code, Claude Desktop, Cursor, or VS Code.

MCP URL:

https://mcp.apify.com/?tools=automation-lab/nlm-rxnorm-drug-concepts-scraper

Claude Code setup:

$claude mcp add apify-rxnorm --transport http https://mcp.apify.com/?tools=automation-lab/nlm-rxnorm-drug-concepts-scraper

Claude Desktop setup:

Add this server to your Claude Desktop MCP configuration file and restart Claude Desktop.

{
"mcpServers": {
"apify-rxnorm": {
"url": "https://mcp.apify.com/?tools=automation-lab/nlm-rxnorm-drug-concepts-scraper"
}
}
}

Cursor setup:

Open Cursor settings, go to MCP servers, add a new HTTP server named apify-rxnorm, and use the MCP URL above.

VS Code setup:

Install an MCP-capable extension, add a new HTTP MCP server named apify-rxnorm, and paste the MCP URL above into the server URL field.

Example prompts:

  • "Normalize these medication names with RxNorm and return RxCUIs."
  • "Check whether these NDCs are active in RxNav."
  • "Create a CSV of related RxNorm concepts for these RxCUIs."

Scheduling

You can schedule the actor for recurring reference-data refreshes.

  • Daily for active operations feeds.
  • Weekly for catalog enrichment.
  • Monthly for lower-change compliance snapshots.

Error handling

The actor fails on upstream RxNav HTTP errors and logs the exact URL.

Rows are de-duplicated within a run.

The maxItems limit stops extraction once enough rows have been saved.

Performance

This is an HTTP-only actor.

It does not use a browser.

It does not use proxies.

Most small runs finish quickly because RxNav returns compact JSON.

Legality and compliance

RxNav is a public NLM service. Users are responsible for ensuring their use of the data and any downstream healthcare workflows comply with applicable laws, licenses, policies, and organizational controls.

This actor does not process PHI by itself unless you submit PHI in input values. Avoid submitting patient-specific data.

FAQ

Does this actor replace clinical terminology governance?

No. It automates extraction and normalization lookups. Your organization should still validate mappings for clinical use.

Why do some rows not have NDCs?

Not every RxNorm concept has NDC links in the RxNav endpoint used by the actor.

RxNorm includes ingredients, brands, packs, dose forms, and related normalized concepts. Use maxItems to control volume.

Can I submit only NDCs?

Yes. Leave drug names and RxCUIs empty and provide NDCs.

Can I submit only RxCUIs?

Yes. The actor can enrich known RxCUIs without drug-name search.

Troubleshooting

My output is too broad

Lower maxItems, disable related concepts, or submit more specific drug names.

I got zero rows

Check spelling, try a generic drug name, or confirm the NDC is a valid code known to RxNav.

Explore related Automation Lab actors on Apify:

Changelog

0.1

Initial version with drug-name search, RxCUI enrichment, NDC status lookup, related concepts, and NDC links.