United States National Library of Medicine Gene API

Gene records and sequence data

Operations 2

GET /gene/id/{gene_ids} Get Gene Records By IDs #
GET /gene/symbol/{symbols}/taxon/{taxon} Get Gene by Symbol and Taxon #

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/united-states-national-library-of-medicine-gene-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

united-states-national-library-of-medicine-gene-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: NCBI Datasets REST Gene API
  description: The NCBI Datasets REST API v2 provides programmatic access to biological data across NCBI databases including genome assemblies, gene records, and protein sequences. Returns data packages or metadata for genomes by taxon, assembly accession, or biosample; genes by gene ID or symbol; and viruses by taxon. The full OpenAPI specification is available at https://www.ncbi.nlm.nih.gov/datasets/docs/v2/openapi3/openapi3.docs.yaml and on GitHub at github.com/ncbi/datasets.
  version: 2.0.0
  contact:
    name: NCBI Datasets
    url: https://www.ncbi.nlm.nih.gov/datasets/docs/v2/
  license:
    name: Public Domain
    url: https://www.usa.gov/government-works
  externalDocs:
    url: https://www.ncbi.nlm.nih.gov/datasets/docs/v2/openapi3/openapi3.docs.yaml
    description: Full OpenAPI 3.0 Specification
servers:
- url: https://api.ncbi.nlm.nih.gov/datasets/v2
  description: NCBI Datasets API v2
tags:
- name: Gene
  description: Gene records and sequence data
paths:
  /gene/id/{gene_ids}:
    get:
      operationId: getGeneByIds
      summary: Get Gene Records By IDs
      description: Retrieve gene records for one or more NCBI gene IDs, including gene symbol, name, description, location, and associated sequence accessions.
      tags:
      - Gene
      parameters:
      - name: gene_ids
        in: path
        description: Comma-separated NCBI gene IDs
        required: true
        schema:
          type: string
        example: 672,675
      - name: api_key
        in: query
        required: false
        schema:
          type: string
      - name: page_size
        in: query
        required: false
        schema:
          type: integer
          default: 20
      responses:
        '200':
          description: Gene records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneDatasetReport'
  /gene/symbol/{symbols}/taxon/{taxon}:
    get:
      operationId: getGeneBySymbol
      summary: Get Gene by Symbol and Taxon
      description: Retrieve gene records by gene symbol for a specific organism. Returns gene details including ID, name, description, location, and chromosome.
      tags:
      - Gene
      parameters:
      - name: symbols
        in: path
        description: Gene symbol(s) (e.g. BRCA1, TP53)
        required: true
        schema:
          type: string
        example: BRCA1
      - name: taxon
        in: path
        description: Organism name or NCBI taxonomy ID
        required: true
        schema:
          type: string
        example: human
      - name: api_key
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Gene records matching symbol and taxon
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneDatasetReport'
components:
  schemas:
    GeneRecord:
      type: object
      description: An NCBI gene record
      properties:
        geneId:
          type: integer
          description: NCBI gene ID
        symbol:
          type: string
          description: Official gene symbol
        description:
          type: string
          description: Gene description
        taxId:
          type: integer
          description: NCBI taxonomy ID
        organism:
          type: object
          properties:
            sciName:
              type: string
            commonName:
              type: string
        chromosomes:
          type: array
          items:
            type: string
          description: Chromosomes where gene is located
        type:
          type: string
          description: Gene type (protein-coding, ncRNA, pseudogene, etc.)
    GeneDatasetReport:
      type: object
      description: Gene dataset report
      properties:
        reports:
          type: array
          items:
            $ref: '#/components/schemas/GeneRecord'
        totalCount:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: api_key