United States National Library of Medicine Search API

Search Entrez databases

Operations 2

GET /esearch.fcgi Search Entrez Database #
GET /espell.fcgi Check Query Spelling #

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-search-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-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: NCBI E-Utilities Search API
  description: The NCBI E-Utilities (Entrez Programming Utilities) are the public API to the NCBI Entrez system providing access to all 41 Entrez databases including PubMed (biomedical literature), PMC (full-text articles), Gene, Nuccore (nucleotide sequences), Protein, SNP, and more. Supports search, retrieval, linking, posting, and spelling operations. API keys from https://www.ncbi.nlm.nih.gov/account/ increase the rate limit from 3 to 10 requests per second.
  version: 1.0.0
  contact:
    name: NCBI
    url: https://www.ncbi.nlm.nih.gov/home/develop/api/
    email: info@ncbi.nlm.nih.gov
  license:
    name: Public Domain
    url: https://www.usa.gov/government-works
servers:
- url: https://eutils.ncbi.nlm.nih.gov/entrez/eutils
  description: NCBI E-Utilities API
tags:
- name: Search
  description: Search Entrez databases
paths:
  /esearch.fcgi:
    get:
      operationId: searchDatabase
      summary: Search Entrez Database
      description: Search any Entrez database and retrieve document identifiers (UIDs) matching a query. Supports full Entrez query syntax including Boolean operators, field tags, and date ranges.
      tags:
      - Search
      parameters:
      - name: db
        in: query
        description: Target Entrez database (e.g. pubmed, nuccore, protein, gene, snp, mesh, pmc)
        required: true
        schema:
          type: string
        example: pubmed
      - name: term
        in: query
        description: Entrez text query with optional field tags and Boolean operators
        required: true
        schema:
          type: string
        example: cancer[Title] AND 2023[PDAT]
      - name: api_key
        in: query
        description: NCBI API key for increased rate limits
        required: false
        schema:
          type: string
      - name: retmax
        in: query
        description: Maximum number of UIDs to return (default 20, max 10000)
        required: false
        schema:
          type: integer
          default: 20
          maximum: 10000
      - name: retstart
        in: query
        description: Index of first UID in results (for pagination)
        required: false
        schema:
          type: integer
          default: 0
      - name: retmode
        in: query
        description: Output format
        required: false
        schema:
          type: string
          enum:
          - json
          - xml
          default: json
      - name: sort
        in: query
        description: Sort order for results
        required: false
        schema:
          type: string
          enum:
          - relevance
          - pub+date
          - Author
          - JournalName
      - name: datetype
        in: query
        description: Date type for date range filtering
        required: false
        schema:
          type: string
          enum:
          - PDAT
          - MDAT
          - EDAT
      - name: mindate
        in: query
        description: Minimum date for range filter (YYYY/MM/DD)
        required: false
        schema:
          type: string
        example: 2023/01/01
      - name: maxdate
        in: query
        description: Maximum date for range filter (YYYY/MM/DD)
        required: false
        schema:
          type: string
        example: 2023/12/31
      - name: usehistory
        in: query
        description: Store results on NCBI server (y/n)
        required: false
        schema:
          type: string
          enum:
          - y
          - n
      responses:
        '200':
          description: Search results with UIDs and counts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ESearchResult'
  /espell.fcgi:
    get:
      operationId: checkSpelling
      summary: Check Query Spelling
      description: Retrieve spelling suggestions for a search term in a given Entrez database. Helpful for correcting misspelled gene names, species names, or medical terms.
      tags:
      - Search
      parameters:
      - name: db
        in: query
        description: Target Entrez database
        required: true
        schema:
          type: string
        example: pubmed
      - name: term
        in: query
        description: Query term to check spelling for
        required: true
        schema:
          type: string
        example: asthmaa
      - name: api_key
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Spelling suggestions
          content:
            text/xml:
              schema:
                type: string
components:
  schemas:
    ESearchResult:
      type: object
      description: Results from an Entrez search query
      properties:
        esearchresult:
          type: object
          properties:
            count:
              type: string
              description: Total number of matching records
            retmax:
              type: string
              description: Number of UIDs returned
            retstart:
              type: string
              description: Index of first UID returned
            querykey:
              type: string
              description: Server-side query key (if usehistory=y)
            webenv:
              type: string
              description: Web environment token (if usehistory=y)
            idlist:
              type: array
              description: List of returned UIDs
              items:
                type: string
            translationset:
              type: array
              description: Query translations applied
              items:
                type: object
            querytranslation:
              type: string
              description: Translated query as used by Entrez
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: api_key
      description: NCBI API key from https://www.ncbi.nlm.nih.gov/account/