getAllNDCsByStatus

Information returned
NDCs having a specified NDC status
Service domain
https://rxnav.nlm.nih.gov
HTTP request
GET  /REST/allNDCstatus.xml?status=S

Description

The resource is a list of National Drug Codes (NDCs) that have appeared in RxNav's data sources. The list is optionally filtered by the status parameter.

Scope

Current and Historical: concepts in current and previous RxNorm data sets

Parameters

ParameterLocationUseDescriptionDefault
formatPathOptional

Notation for results

One of:
.xml
Get results in XML
.json
Get results in JSON
.xml
statusQueryOptionalNDC status(es)
One or more of:
Active
Associated by RXNORM with an active concept
Obsolete
Formerly, associated by RXNORM with an active concept
Alien
Not ever associated by RXNORM with an active concept
ALL
Any status

(Space-separated list.)

ALL

All query parameters are case-insensitive.

Note that parameters must be "URL encoded", so a "space-separated list" in a URL 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
ndcList
ndc (array)
National Drug Code (NDC) in CMS 11-digit format

Example: Active NDCs

XML: https://rxnav.nlm.nih.gov/REST/allNDCstatus?status=active

JSON: https://rxnav.nlm.nih.gov/REST/allNDCstatus.json?status=active

An XML result is shown below.

<rxnormdata>
    <ndcList>
        <ndc>00002140701</ndc>
        <ndc>00002143301</ndc>
        <ndc>00002143361</ndc>
        <ndc>00002143380</ndc>
        <ndc>00002143401</ndc>
        <ndc>00002143461</ndc>
        <ndc>00002143480</ndc>
        ...
    </ndcList>
</rxnormdata>