Application Development Support: Web Services: RESTful Resources

"/ndcs"

Returns a list of all NDC codes.
API Version: 2

Query Parameters

Output Controls

  • pagesize - The number of records returned per page. This parameter is optional (Default 100, Maximum 100).
  • page - The page returned. This parameter is optional (Default 1).

Return Formats

RETURN FORMATS EXAMPLES

  • XML: https://dailymed.nlm.nih.gov/dailymed/services/v2/ndcs.xml?pagesize=5&page=2

    Returns

    <?xml version="1.0" encoding="UTF-8"?>
    <ndcs>
    	<metadata>
    		<total_elements>165098</total_elements>
    		<elements_per_page>5</elements_per_page>
    		<total_pages>33020</total_pages>
    		<current_page>2</current_page>
    		<current_url>https://dailymed.nlm.nih.gov/dailymed/services/v2/ndcs.xml?pagesize=5&page=2</current_url>
    		<previous_page>1</previous_page>
    		<previous_page_url>https://dailymed.nlm.nih.gov/dailymed/services/v2/ndcs.xml?pagesize=5&page=1</previous_page_url>
    		<next_page>3</next_page>
    		<next_page_url>https://dailymed.nlm.nih.gov/dailymed/services/v2/ndcs.xml?pagesize=5&page=3</next_page_url>
    	</metadata>
    	<ndc>65293-416-25</ndc>
    	<ndc>65293-411-25</ndc>
    	<ndc>0186-0260-02</ndc>
    	<ndc>57315-012-01</ndc>
    	<ndc>55567-109-25</ndc>
    </ndcs>
    													
    Close
  • JSON: https://dailymed.nlm.nih.gov/dailymed/services/v2/ndcs.json?pagesize=5&page=2

    Returns

    {
    	"metadata": {
    		"elements_per_page": "5",
    		"next_page_url": "https:\/\/dailymed.nlm.nih.gov\/dailymed\/services\/v2\/ndcs.json?pagesize=5&page=3",
    		"total_pages": "33020",
    		"total_elements": "165098",
    		"current_url": "https:\/\/dailymed.nlm.nih.gov\/dailymed\/services\/v2\/ndcs.json?pagesize=5&page=2",
    		"next_page": "3",
    		"previous_page": "1",
    		"previous_page_url": "https:\/\/dailymed.nlm.nih.gov\/dailymed\/services\/v2\/ndcs.json?pagesize=5&page=1",
    		"current_page": "2"
    	},
    	"data": [{
    		"ndc": "65293-416-25"
    	}, {
    		"ndc": "65293-411-25"
    	}, {
    		"ndc": "0186-0260-02"
    	}, {
    		"ndc": "57315-012-01"
    	}, {
    		"ndc": "55567-109-25"
    	}]
    }
    													
    Close

RETURN TO WEB SERVICES