RxNorm
 
RxNorm RESTful Web API

Overview

The RxNorm RESTful web API is a web service developed at the National Library of Medicine for accessing the RxNorm data. Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. REST-style architectures consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses. Requests and responses are built around the transfer of "representations" of "resources". A resource can be essentially any coherent and meaningful concept that may be addressed. A representation of a resource is typically a document that captures the current or intended state of a resource.

The RxNorm RESTful web API is a simple web service implemented using HTTP and can be thought of as a collection of resources, specified as URIs. Some characteristics of the RxNorm RESTful web API:
Clients of the RxNorm RESTful web API can be browsers, such as Internet Explorer or Firefox, or programs such as the Unix/Linux curl command, or user developed clients. For example, the Unix/Linux curl command could be used to get the RxNorm version:
curl https://rxnav.nlm.nih.gov/REST/version
(returns)
<?xml  version="1.0" encoding="UTF-8" standalone="yes"?><rxnormdata><version>04-Jan-2016</version></rxnormdata>
The curl command takes a URL as part of its command sequence. The string https://rxnav.nlm.nih.gov/REST/version is a RxNorm RESTful web API resource. The Resources section details the RxNorm RESTful web API resources available to clients.

Currently, the RxNorm API RESTful web services return the data in XML form as the default. The API can also return the data in JSON. Here is the curl command, modified from above, to return the RxNorm version in JSON format:

 curl -H "Accept:application/json" https://rxnav.nlm.nih.gov/REST/version
(returns)
{"version":"04-Jan-2016"}

The following table lists the RxNorm API resources. The query string fields are described in the detailed sections for each resource.

Resources

REST resource Description
/ Resource base
/approximateTerm Return closest terms from an approximate match search
/allconcepts Return the RxNorm concepts for the specified term types
/brands Return the brands containing the specified ingredients
/classes TO BE DEPRECATED. Use the RxClass API functions to return the drug class concepts for the specified drug vocabulary
/displaynames Return the auto suggestion names
/drugs Return the related drugs
/idtypes Return the available identifier types
/members TO BE DEPRECATED. Use the RxClass API functions to return members of drug class
/ndcproperties Return National Drug Code (NDC) properties.
/ndcstatus Return the National Drug Code (NDC) status.
/propCategories Return the property categories.
/propnames Return the property names.
/relatypes Return the available relationship types
/rxcui?idtype Search by identifier to find RxNorm concepts
/rxcui?name Search by name to find RxNorm concepts
/allhistoricalndcs newReturn all National Drug Code (NDC) for a concept
/rxcui/{rxcui}/allndcs TO BE DEPRECATED.Use /allhistoricalndcs instead
/rxcui/{rxcui}/allrelated Return all related concept information
/rxcui/{rxcui}/filter Filter by property
/rxcui/{rxcui}/hierarchy TO BE DEPRECATED. Use the RxClass API functions to return drug class information
/rxcui/{rxcui}/ndcs Return all National Drug Codes (NDC) for a concept
/rxcui/{rxcui}/allProperties Return all properties for a concept
/rxcui/{rxcui}/properties Return the concept properties
/rxcui/{rxcui}/property Return the value of a concept property
/rxcui/{rxcui}/proprietary Return the proprietary information for a concept
/rxcui/{rxcui}/related?rela Return the related concepts of specified relationship types
/rxcui/{rxcui}/related?tty Return the related concepts of specified term types
/rxcui/{rxcui}/status Return the status of the concept
/sourcetypes Return the available vocabulary abbreviated source types
/spellingsuggestions Return spelling suggestions for a name
/termtypes Return the available term types
/version Return the RxNorm data set version


Deprecated Resources

REST resource Description
/approx DEPRECATED. Use /approximateTerm
/remap/{rxcui} DEPRECATED. Use /rxcui/{rxcui}/status
/rxcui/{rxcui}/quantity DEPRECATED. Use /rxcui/{rxcui}/property?propName=QUANTITY
/rxcui/{rxcui}/splsetid DEPRECATED. Use /rxcui/{rxcui}/property?propName=SPL_SET_ID
/rxcui/{rxcui}/strength DEPRECATED. Use /rxcui/{rxcui}/property?propName=STRENGTH
/rxcui/{rxcui}/unii DEPRECATED. Use /rxcui/{rxcui}/property?propName=UNII_CODE
 
RxNorm