APIs

RxNorm API

getAllConceptsByTTY

Information returned
Concepts having a specified term type
Service domain
https://rxnav.nlm.nih.gov
HTTP request
GET  /REST/allconcepts.xml?tty=yourTTYs

Description

Returns concepts of the term types specified by the tty parameter.

Scope

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

Parameters

ParameterLocationUseDescriptionDefault
formatPathOptional

Notation for results

One of:
.xml
Get results in XML
.json
Get results in JSON
.xml
ttyQueryRequiredTerm type(s), or ALL

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

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:

rxnormdata
Root element in XML, or anonymous object in JSON
minConceptGroup
minConcept (array)
RxNorm concept
rxcui
RxNorm identifier
name
Concept name from SAB=RXNORM
tty
Term type

Example: Brand names and branded packs (tty=BN and tty=BPCK)

XML: https://rxnav.nlm.nih.gov/REST/allconcepts?tty=BN+BPCK

JSON: https://rxnav.nlm.nih.gov/REST/allconcepts.json?tty=BN+BPCK

This result includes brand names (tty=BN) and branded packs (tty=BPCK).

An XML result is shown below.

<rxnormdata>
    <minConceptGroup>
        <minConcept>
            <rxcui>1536545</rxcui>
            <name>4XLA Activator</name>
            <tty>BN</tty>
        </minConcept>
        <minConcept>
            <rxcui>1117240</rxcui>
            <name>A+D Diaper Rash</name>
            <tty>BN</tty>
        </minConcept>
        ...
        <minConcept>
            <rxcui>2272622</rxcui>
            <name>{1 (0.1 ML) (diazepam 100 MG/ML Nasal Spray [Valtoco]) } Pack [Valtoco 10 MG Dose Kit]</name>
            <tty>BPCK</tty>
        </minConcept>
        <minConcept>
            <rxcui>2272630</rxcui>
            <name>{1 (0.1 ML) (diazepam 50 MG/ML Nasal Spray [Valtoco]) } Pack [Valtoco 5 MG Dose Kit]</name>
            <tty>BPCK</tty>
        </minConcept>
        ...
    </minConceptGroup>
</rxnormdata>