Cancer.gov Drugs API

The Drugs API from Cancer.gov — 6 operation(s) for drugs.

Operations 6

GET /Drugs/expand/{character} List all drug dictionary entries starting with the same first character #
GET /Drugs Get a list of all terms (no search string) #
GET /Drugs/{id} Get the drug definition by its ID #
GET /Drugs/{prettyUrlName} Get the dictionary entry based on Pretty URL Name #
GET /Drugs/status Provides a simple report of system status, suitable for monitoring. #

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-drugs-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-drugs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Drug Dictionary Drugs API
  description: API for Drug Dictionary
  version: 1.0.0
servers:
- url: /drugdictionary/v1
tags:
- name: Drugs
paths:
  /Drugs/expand/{character}:
    get:
      tags:
      - Drugs
      summary: List all drug dictionary entries starting with the same first character
      operationId: Drugs_Expand
      parameters:
      - name: character
        in: path
        required: true
        description: 'The character to expand. Use # for non-alphabetic.'
        schema:
          type: string
        x-position: 1
      - name: size
        in: query
        description: The number of records to retrieve.
        schema:
          type: integer
          format: int32
          default: 100
        x-position: 2
      - name: from
        in: query
        description: The offset into the overall set to use for the first record.
        schema:
          type: integer
          format: int32
          default: 0
        x-position: 3
      - name: includeResourceTypes
        in: query
        style: form
        explode: true
        description: 'The DrugResourceTypes to include. Default: All'
        schema:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/DrugResourceType'
        x-position: 4
      - name: includeNameTypes
        in: query
        style: form
        explode: true
        description: 'The name types to include. Default: All'
        schema:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/TermNameType'
        x-position: 5
      - name: excludeNameTypes
        in: query
        style: form
        explode: true
        description: 'The name types to exclude. Default: All'
        schema:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/TermNameType'
        x-position: 6
      responses:
        '200':
          description: A DrugTermResults object containing the desired records.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DrugTermResults'
  /Drugs:
    get:
      tags:
      - Drugs
      summary: Get a list of all terms (no search string)
      operationId: Drugs_GetAll
      parameters:
      - name: size
        in: query
        description: The number of records to retrieve.
        schema:
          type: integer
          format: int32
          default: 100
        x-position: 1
      - name: from
        in: query
        description: The offset into the overall set to use for the first record.
        schema:
          type: integer
          format: int32
          default: 0
        x-position: 2
      - name: includeResourceTypes
        in: query
        style: form
        explode: true
        description: 'The DrugResourceTypes to include. Default: All'
        schema:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/DrugResourceType'
        x-position: 3
      - name: includeNameTypes
        in: query
        style: form
        explode: true
        description: 'The name types to include. Default: All'
        schema:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/TermNameType'
        x-position: 4
      - name: excludeNameTypes
        in: query
        style: form
        explode: true
        description: 'The name types to exclude. Default: All'
        schema:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/TermNameType'
        x-position: 5
      responses:
        '200':
          description: A DrugTermResults object containing the desired records.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DrugTermResults'
  /Drugs/{id}:
    get:
      tags:
      - Drugs
      summary: Get the drug definition by its ID
      operationId: Drugs_GetById
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
        x-position: 1
      responses:
        '200':
          description: DrugTerm object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DrugTerm'
  /Drugs/{prettyUrlName}:
    get:
      tags:
      - Drugs
      summary: Get the dictionary entry based on Pretty URL Name
      operationId: Drugs_GetByName
      parameters:
      - name: prettyUrlName
        in: path
        required: true
        description: The PrettyUrlName of the term to fetch. Required.
        schema:
          type: string
        x-position: 1
      responses:
        '200':
          description: The requested dictionary entry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DrugTerm'
  /Drugs/search:
    get:
      tags:
      - Drugs
      summary: Retrieves a portion of the overall set of drug definitions that match a…
      operationId: Drugs_Search
      parameters:
      - name: query
        in: query
        description: The search text. Required.
        schema:
          type:
          - string
          - 'null'
        x-position: 1
      - name: matchType
        in: query
        description: 'Should the search match items beginning with the search text, or containing it? Default: Begin.'
        schema:
          default: Begins
          oneOf:
          - $ref: '#/components/schemas/MatchType'
        x-position: 2
      - name: size
        in: query
        description: 'The number of records to retrieve. Default: 100.'
        schema:
          type: integer
          format: int32
          default: 100
        x-position: 3
      - name: from
        in: query
        description: The offset into the overall set to use for the first record.
        schema:
          type: integer
          format: int32
          default: 0
        x-position: 4
      responses:
        '200':
          description: A DrugTermResults object containing the desired records.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DrugTermResults'
  /Drugs/status:
    get:
      tags:
      - Drugs
      summary: Provides a simple report of system status, suitable for monitoring.
      operationId: Drugs_GetStatus
      responses:
        '200':
          description: "If the system is healthy, returns an HTTP status 200 with the string \"alive!\".\n            Otherwise, an HTTP status 500 with the message \"Service not healthy.\""
          content:
            application/json:
              schema:
                type: string
components:
  schemas:
    DrugTermResults:
      type: object
      description: Represents the results of a search operation.
      additionalProperties: false
      properties:
        meta:
          description: Metadata about the results.
          oneOf:
          - $ref: '#/components/schemas/ResultsMetadata'
        results:
          type:
          - array
          - 'null'
          description: Array of Drug dictionary entries matching the search. May be empty.
          items:
            $ref: '#/components/schemas/IDrugResource'
        links:
          description: Link to ????
          oneOf:
          - $ref: '#/components/schemas/Metalink'
    TermNameType:
      type: string
      description: Identifiers for the various types of names a term might have.
      x-enumNames:
      - CodeName
      - ObsoleteName
      - Abbreviation
      - INDCode
      - NSCNumber
      - ForeignBrandName
      - Synonym
      - CASRegistryName
      - Subtype
      - Spanish
      - LexicalVariant
      - ChemicalStructureName
      - CommonUsage
      - Acronym
      - USBrandName
      - Broader
      - RelatedString
      - PreferredName
      enum:
      - CodeName
      - ObsoleteName
      - Abbreviation
      - INDCode
      - NSCNumber
      - ForeignBrandName
      - Synonym
      - CASRegistryName
      - Subtype
      - Spanish
      - LexicalVariant
      - ChemicalStructureName
      - CommonUsage
      - Acronym
      - USBrandName
      - Broader
      - RelatedString
      - PreferredName
    Definition:
      type: object
      description: Contains the definition of a drug dictionary entry.
      additionalProperties: false
      properties:
        html:
          type:
          - string
          - 'null'
          description: The definition, rendered as HTML.
        text:
          type:
          - string
          - 'null'
          description: The definition, rendered as plain text.
    DrugResourceType:
      type: string
      description: Identifies the type of an IDrugResource descendant.
      x-enumNames:
      - DrugTerm
      - DrugAlias
      enum:
      - DrugTerm
      - DrugAlias
    Metalink:
      type: object
      description: Metalink
      additionalProperties: false
      properties:
        self:
          type:
          - string
          - 'null'
          description: url
          format: uri
    DrugResource:
      type: object
      description: 'This class implements the properties defined in IDrugResource, however it

        expressly does *NOT* "implement" IDrugResource. The intent is to enforce the

        use of classes implementing IDrugResource for serializiation, while providing

        a single class for maintaining the NEST attribute mapping data.'
      additionalProperties: false
      properties:
        termId:
          type: integer
          description: The CDR ID of the full term for a DrugTerm, or the full term this alias represents.
          format: int64
        name:
          type:
          - string
          - 'null'
          description: The name of this resource as it should be displayed on the listing pages
        firstLetter:
          type: string
          description: The first letter of the term as would be used by the expand endpoint
        type:
          description: The type of this resource.
          oneOf:
          - $ref: '#/components/schemas/DrugResourceType'
        termNameType:
          description: The type of name for this resource.
          oneOf:
          - $ref: '#/components/schemas/TermNameType'
        prettyUrlName:
          type:
          - string
          - 'null'
          description: The url fragment used in the full defintion URL of /def/<PrettyUrlName>.
    TermAlias:
      type: object
      description: Data structure representing one alias for a drug term.
      additionalProperties: false
      properties:
        type:
          description: The type of alias.
          oneOf:
          - $ref: '#/components/schemas/TermNameType'
        name:
          type:
          - string
          - 'null'
          description: The actual alias name.
    ResultsMetadata:
      type: object
      description: Metadata about a DrugResults object.
      additionalProperties: false
      properties:
        totalResults:
          type: integer
          description: The total number of results available.
          format: int32
        from:
          type: integer
          description: Offset into the overall list where the current set begins.
          format: int32
    DrugTerm:
      allOf:
      - $ref: '#/components/schemas/DrugResource'
      - type: object
        description: Data structure representing a single drug dictionary entry.
        additionalProperties: false
        properties:
          aliases:
            type:
            - array
            - 'null'
            description: Array of aliases for the drug.
            items:
              $ref: '#/components/schemas/TermAlias'
          definition:
            description: The drug's definition.
            oneOf:
            - $ref: '#/components/schemas/Definition'
          drugInfoSummaryLink:
            description: Link to a matching Drug Information Summary.
            oneOf:
            - $ref: '#/components/schemas/DrugInfoSummaryLink'
          nciConceptId:
            type:
            - string
            - 'null'
            description: The NCI Concept ID.
          nciConceptName:
            type:
            - string
            - 'null'
            description: The NCI Concept Name.
    IDrugResource:
      type: object
      description: Interface defining the fields common to all dictionary entries.
      x-abstract: true
      additionalProperties: false
      properties:
        termId:
          type: integer
          description: The CDR ID of the full term for a DrugTerm, or the full term this alias represents.
          format: int64
        name:
          type:
          - string
          - 'null'
          description: The name of this resource as it should be displayed on the listing pages
        firstLetter:
          type: string
          description: The first letter of the term as would be used by the expand endpoint
        type:
          description: The type of this resource.
          oneOf:
          - $ref: '#/components/schemas/DrugResourceType'
        termNameType:
          description: The type of name for this resource.
          oneOf:
          - $ref: '#/components/schemas/TermNameType'
        prettyUrlName:
          type:
          - string
          - 'null'
          description: The url fragment used in the full defintion URL of /def/<PrettyUrlName>.
    MatchType:
      type: string
      description: Friendly names for the ways to perform a match.
      x-enumNames:
      - Begins
      - Contains
      enum:
      - Begins
      - Contains
    DrugInfoSummaryLink:
      type: object
      description: Contains information for creating a link to a drug information summary.
      additionalProperties: false
      properties:
        uri:
          type:
          - string
          - 'null'
          description: The URL of the drug information summary.
          format: uri
        text:
          type:
          - string
          - 'null'
          description: Link text.
x-generator: NSwag v13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))