RxNorm API


Information returned
Concepts with a specified name
Service domain
HTTP request
GET  /REST/rxcui.xml?name=yourName&allsrc=0or1&srclist=yourSources&search=0or1or2


Searches for a name (from any vocabulary in RxNorm) and returns the RxCUIs associated with the name.

The scope of the search is either Active concepts (allsrc=0) or Current concepts (allsrc=1). When the scope is Current concepts, only concepts that have at least one atom from a source in the srclist parameter are returned.

The precision of the search is adjustable with the search parameter. An exact search ignores only upper/lowercase. A normalized search is less strict. A combination search tries an exact search, then a normalized search if nothing was found.

Normalized matching broadens the recall of the exact match by eliminating sources of discrepancies that are usually not meaningful in drug names:

  • Word order

  • Case sensitivity

  • Punctuation

  • Suffixes that might be English inflections

  • Abbreviations, e.g., "hctz" is expanded to "hydrochlorothiazide"

  • Salts forms, e.g. "morphine sulfate" becomes "morphine"


Selectable (see parameters):

  • Active: concepts in the current RxNorm data set that have an atom with SAB=RXNORM and SUPPRESS=N

  • Current: concepts in the current RxNorm data set that have an atom with SUPPRESS=N



Notation for results

One of:
Get results in XML
Get results in JSON
nameQueryRequiredName of concept to find
allsrcQueryOptionalScope of search
One of:
Active concepts
Current concepts
srclistQueryOptionalSource vocabularies to search (if allsrc=1)

(Space-separated list. See getSourceTypes for the menu.)

One of:
Exact match only
Normalized match
Best match (exact or normalized)

All query parameters are case-insensitive.

Note that HTTP requires that query parameters be "URL encoded". For instance, a "space-separated list" will, in practice, usually appear to use either a plus sign (+) or %20 as the separator. For full information on URL encoding, please refer to IETF RFC 3986, "Uniform Resource Identifier".

Output structure

Results are available as either XML or JSON.

  • The XML result has the root element rxnormdata. It is described in the XML Schema for the RxNorm API; the relevant element structure is summarized below. Elements that would be empty might be left out.

  • The JSON result is an object {...}, analogous to the content of the XML rxnormdata. Fields that might occur multiple times in the XML are expressed as an array. Fields that would be empty might be null or left out. Numbers are expressed as strings.

Both XML and JSON results follow the same outline:

Root element in XML, or anonymous object in JSON
rxnormId (array)
A concept associated with the requested ID

Example: Exact search does not find any concept with precisely this string

XML: https://rxnav.nlm.nih.gov/REST/rxcui?name=Lipitor+10+mg+Tab&search=0

JSON: https://rxnav.nlm.nih.gov/REST/rxcui.json?name=Lipitor+10+mg+Tab&search=0

An XML result is shown below.


Example: Normalized search finds a concept with a string similar to the specified one

XML: https://rxnav.nlm.nih.gov/REST/rxcui?name=Lipitor+10+mg+Tab&search=1

JSON: https://rxnav.nlm.nih.gov/REST/rxcui.json?name=Lipitor+10+mg+Tab&search=1

An XML result is shown below.


Example: Current-scope search finds a concept with a string from MTHSPL

XML: https://rxnav.nlm.nih.gov/REST/rxcui?name=Hydroquinone+40+mg+in+1+g+TOPICAL+CREAM+%5BHydroquinone+4%25%5D&allsrc=1

JSON: https://rxnav.nlm.nih.gov/REST/rxcui.json?name=Hydroquinone+40+mg+in+1+g+TOPICAL+CREAM+%5BHydroquinone+4%25%5D&allsrc=1

All sources are searched, the string from MTHSPL is found, and the corresponding rxnormId is returned.

An XML result is shown below.


Example: srclist limits Current-scope search

XML: https://rxnav.nlm.nih.gov/REST/rxcui?name=Hydroquinone+40+mg+in+1+g+TOPICAL+CREAM+%5BHydroquinone+4%25%5D&allsrc=1&srclist=ATC

JSON: https://rxnav.nlm.nih.gov/REST/rxcui.json?name=Hydroquinone+40+mg+in+1+g+TOPICAL+CREAM+%5BHydroquinone+4%25%5D&allsrc=1&srclist=ATC

Only ATC is searched, and the string is not found; no rxnormId is returned.

An XML result is shown below.