Cancer.gov Ndc API

A searchable mirror of National Drug Codes (NDC)

Operations 3

GET /rest/ndc/code/{code} Return a single drug product #
PUT /rest/ndc/code/{code} Update a drug with SEER-specific information #
GET /rest/ndc Return matching drugs #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cancer-gov-ndc-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cancer-gov-ndc-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SEER* Ndc API
  description: 'SEER API is a RESTful Web service that supports various SEER Program data sets and mapping.


    This service is available to developers who wish to incorporate SEER resources into their own systems. These resources

    include databases and tools developed to enhance registry operations and quality improvement. The SEER API is designed

    for integration into registry computer systems and is not designed to be accessed by end-users.'
  termsOfService: /terms
  version: '1.0'
servers:
- url: https://api.seer.cancer.gov
  description: Generated server url
security:
- apiKeyScheme: []
tags:
- name: Ndc
  description: A searchable mirror of National Drug Codes (NDC)
paths:
  /rest/ndc/code/{code}:
    get:
      tags:
      - Ndc
      summary: Return a single drug product
      description: All possible packages are included in each product.
      operationId: getByNdcId
      parameters:
      - name: code
        in: path
        description: NDC code
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NdcProduct'
        '400':
          description: NDC code is not a valid format
        '404':
          description: NDC code does not exist
    put:
      tags:
      - Ndc
      summary: Update a drug with SEER-specific information
      operationId: updateNdc
      parameters:
      - name: code
        in: path
        description: NDC code
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NdcProduct'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NdcProduct'
        '400':
          description: NDC code is not a valid format
        '404':
          description: NDC code does not exist
  /rest/ndc:
    get:
      tags:
      - Ndc
      summary: Return matching drugs
      operationId: getNdcProducts
      parameters:
      - name: q
        in: query
        description: Search query. Should be URL encoded.
        required: false
        schema:
          type: string
      - name: has_seer_info
        in: query
        description: Drugs that include SEER-maintained information
        required: false
        schema:
          type: boolean
      - name: category
        in: query
        description: Limit to category
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - HORMONAL_THERAPY
            - ANCILLARY
            - CHEMOTHERAPY
            - IMMUNOTHERAPY
            - RADIOPHARMACEUTICAL
          uniqueItems: true
      - name: include_removed
        in: query
        description: Drugs that have been removed from the FDA database are flagged with a date_removed. Set this to 'true' to include them.
        required: false
        schema:
          type: boolean
          default: false
      - name: page
        in: query
        description: Page number of results to return.
        required: false
        schema:
          type: integer
          format: int32
          default: 1
      - name: per_page
        in: query
        description: Entries per page to return.
        required: false
        schema:
          type: integer
          format: int32
          default: 25
      - name: order
        in: query
        description: Order of the results
        required: false
        schema:
          type: string
          enum:
          - ndc
          - -ndc
          - date_added
          - -date_added
          - date_modified
          - -date_modified
          - proprietary_name
          - -proprietary_name
      - name: added_since
        in: query
        description: Include all drugs added on or after the supplied date. Dates have the format of YYYY-MM-DD.
        required: false
        schema:
          type: string
      - name: modified_since
        in: query
        description: Include all drugs added or modified on or after the supplied date. Dates have the format of YYYY-MM-DD.
        required: false
        schema:
          type: string
      - name: removed_since
        in: query
        description: Include all drugs marked as removed on or after the supplied date. Dates have the format of YYYY-MM-DD.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NdcProduct'
        '400':
          description: Invalid input
components:
  schemas:
    NdcProduct:
      type: object
      properties:
        ndc:
          type: string
        type_name:
          type: string
        proprietary_name:
          type: string
        proprietary_name_suffix:
          type: string
        non_proprietary_name:
          type: array
          items:
            type: string
        dosage_form_name:
          type: string
        route_name:
          type: array
          items:
            type: string
        start_marketing_date:
          type: string
        end_marketing_date:
          type: string
        marketing_category_name:
          type: string
        application_number:
          type: string
        labeler_name:
          type: string
        substances:
          type: array
          items:
            $ref: '#/components/schemas/Substance'
        pharm_class:
          type: array
          items:
            type: string
        dea_schedule:
          type: string
        packages:
          type: array
          items:
            $ref: '#/components/schemas/NdcPackage'
        seer:
          $ref: '#/components/schemas/NdcSeerInfo'
        date_added:
          type: string
          format: date-time
        date_modified:
          type: string
          format: date-time
        date_removed:
          type: string
          format: date-time
        score:
          type: number
          format: double
    Substance:
      type: object
      properties:
        name:
          type: string
        strength:
          type: string
        unit:
          type: string
    NdcSeerInfo:
      type: object
      properties:
        seer_rx_id:
          type: string
        categories:
          type: array
          items:
            type: string
            enum:
            - HORMONAL_THERAPY
            - ANCILLARY
            - CHEMOTHERAPY
            - IMMUNOTHERAPY
            - RADIOPHARMACEUTICAL
        subcategory:
          type: string
        major_drug_class:
          type: string
        minor_drug_class:
          type: string
        orphan_drug:
          type: boolean
        exclusive_oncologic_agent:
          type: boolean
        date_modified:
          type: string
          format: date-time
    NdcPackage:
      type: object
      properties:
        package:
          type: string
        description:
          type: string
        start_marketing_date:
          type: string
        end_marketing_date:
          type: string
  securitySchemes:
    apiKeyScheme:
      type: apiKey
      name: X-SEERAPI-Key
      in: header