NCBI E-utilities API

The Entrez Programming Utilities (E-utilities) are a public API to the NCBI Entrez system, providing access to all Entrez databases including PubMed, PMC, Gene, Nuccore, and Protein. The E-utilities are a suite of nine server-side programs that accept a fixed URL syntax for search, link, and retrieval operations. Maintained by the National Center for Biotechnology Information (NCBI), part of the U.S. National Library of Medicine.

Run with Naftiko NationalLibraryOfMedicineAPI

What You Can Do

GET
Esearch — Search a database
/esearch.fcgi
GET
Efetch — Fetch full records by UID
/efetch.fcgi
GET
Esummary — Retrieve document summaries
/esummary.fcgi
GET
Einfo — Database statistics and field metadata
/einfo.fcgi
GET
Elink — Find related records across Entrez databases
/elink.fcgi
POST
Epost — Post UIDs to the Entrez History server
/epost.fcgi
GET
Espell — Spelling suggestions for a query term
/espell.fcgi
GET
Ecitmatch — Match citations to PubMed UIDs
/ecitmatch.cgi
GET
Egquery — Global cross-database query
/egquery.fcgi

MCP Tools

esearch

Search a database

read-only idempotent
efetch

Fetch full records by UID

read-only idempotent
esummary

Retrieve document summaries

read-only idempotent
einfo

Database statistics and field metadata

read-only idempotent
elink

Find related records across Entrez databases

read-only idempotent
epost

Post UIDs to the Entrez History server

espell

Spelling suggestions for a query term

read-only idempotent
ecitmatch

Match citations to PubMed UIDs

read-only idempotent
egquery

Global cross-database query

read-only idempotent

Capability Spec

national-library-of-medicine-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: NCBI E-utilities API
  description: The Entrez Programming Utilities (E-utilities) are a public API to the NCBI Entrez system, providing access
    to all Entrez databases including PubMed, PMC, Gene, Nuccore, and Protein. The E-utilities are a suite of nine server-side
    programs that accept a fixed URL syntax for search, link, and retrieval operations. Maintained by the National Center
    for Biotechnology Information (NCBI), part of the U.S. National Library of Medicine.
  tags:
  - National
  - Library
  - Of
  - Medicine
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: national-library-of-medicine
    baseUri: https://eutils.ncbi.nlm.nih.gov/entrez/eutils
    description: NCBI E-utilities API HTTP API.
    resources:
    - name: esearch-fcgi
      path: /esearch.fcgi
      operations:
      - name: esearch
        method: GET
        description: Search a database
        inputParameters:
        - name: db
          in: query
          type: string
          required: true
          description: Database to search (e.g. pubmed, pmc, gene, protein, nuccore).
        - name: term
          in: query
          type: string
          required: true
          description: Entrez text query, URL-encoded.
        - name: usehistory
          in: query
          type: string
          description: Set to 'y' to post UIDs to the History server.
        - name: retmax
          in: query
          type: integer
          description: Maximum number of UIDs to return (default 20, max 10000).
        - name: retstart
          in: query
          type: integer
          description: Sequential index of the first UID to return (zero-based).
        - name: retmode
          in: query
          type: string
          description: Output format.
        - name: api_key
          in: query
          type: string
          description: NCBI API key for higher rate limits.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: efetch-fcgi
      path: /efetch.fcgi
      operations:
      - name: efetch
        method: GET
        description: Fetch full records by UID
        inputParameters:
        - name: db
          in: query
          type: string
          required: true
        - name: id
          in: query
          type: string
          required: true
          description: Comma-separated list of UIDs or a WebEnv/query_key reference.
        - name: rettype
          in: query
          type: string
          description: Retrieval type (e.g. abstract, fasta, gb, medline).
        - name: retmode
          in: query
          type: string
          description: Retrieval mode (e.g. xml, text, json, asn.1).
        - name: api_key
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: esummary-fcgi
      path: /esummary.fcgi
      operations:
      - name: esummary
        method: GET
        description: Retrieve document summaries
        inputParameters:
        - name: db
          in: query
          type: string
          required: true
        - name: id
          in: query
          type: string
          required: true
        - name: version
          in: query
          type: string
          description: Set to '2.0' for the newer DocSum schema.
        - name: retmode
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: einfo-fcgi
      path: /einfo.fcgi
      operations:
      - name: einfo
        method: GET
        description: Database statistics and field metadata
        inputParameters:
        - name: db
          in: query
          type: string
        - name: retmode
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: elink-fcgi
      path: /elink.fcgi
      operations:
      - name: elink
        method: GET
        description: Find related records across Entrez databases
        inputParameters:
        - name: dbfrom
          in: query
          type: string
          required: true
        - name: db
          in: query
          type: string
        - name: id
          in: query
          type: string
          required: true
        - name: linkname
          in: query
          type: string
        - name: cmd
          in: query
          type: string
          description: Command mode (neighbor, neighbor_history, llinks, prlinks, etc.).
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: epost-fcgi
      path: /epost.fcgi
      operations:
      - name: epost
        method: POST
        description: Post UIDs to the Entrez History server
        inputParameters:
        - name: db
          in: query
          type: string
          required: true
        - name: id
          in: query
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: espell-fcgi
      path: /espell.fcgi
      operations:
      - name: espell
        method: GET
        description: Spelling suggestions for a query term
        inputParameters:
        - name: db
          in: query
          type: string
          required: true
        - name: term
          in: query
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: ecitmatch-cgi
      path: /ecitmatch.cgi
      operations:
      - name: ecitmatch
        method: GET
        description: Match citations to PubMed UIDs
        inputParameters:
        - name: db
          in: query
          type: string
          required: true
        - name: rettype
          in: query
          type: string
        - name: bdata
          in: query
          type: string
          required: true
          description: Pipe-delimited citation strings.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: egquery-fcgi
      path: /egquery.fcgi
      operations:
      - name: egquery
        method: GET
        description: Global cross-database query
        inputParameters:
        - name: term
          in: query
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: national-library-of-medicine-rest
    description: REST adapter for NCBI E-utilities API.
    resources:
    - path: /esearch.fcgi
      name: esearch
      operations:
      - method: GET
        name: esearch
        description: Search a database
        call: national-library-of-medicine.esearch
        outputParameters:
        - type: object
          mapping: $.
    - path: /efetch.fcgi
      name: efetch
      operations:
      - method: GET
        name: efetch
        description: Fetch full records by UID
        call: national-library-of-medicine.efetch
        outputParameters:
        - type: object
          mapping: $.
    - path: /esummary.fcgi
      name: esummary
      operations:
      - method: GET
        name: esummary
        description: Retrieve document summaries
        call: national-library-of-medicine.esummary
        outputParameters:
        - type: object
          mapping: $.
    - path: /einfo.fcgi
      name: einfo
      operations:
      - method: GET
        name: einfo
        description: Database statistics and field metadata
        call: national-library-of-medicine.einfo
        outputParameters:
        - type: object
          mapping: $.
    - path: /elink.fcgi
      name: elink
      operations:
      - method: GET
        name: elink
        description: Find related records across Entrez databases
        call: national-library-of-medicine.elink
        outputParameters:
        - type: object
          mapping: $.
    - path: /epost.fcgi
      name: epost
      operations:
      - method: POST
        name: epost
        description: Post UIDs to the Entrez History server
        call: national-library-of-medicine.epost
        outputParameters:
        - type: object
          mapping: $.
    - path: /espell.fcgi
      name: espell
      operations:
      - method: GET
        name: espell
        description: Spelling suggestions for a query term
        call: national-library-of-medicine.espell
        outputParameters:
        - type: object
          mapping: $.
    - path: /ecitmatch.cgi
      name: ecitmatch
      operations:
      - method: GET
        name: ecitmatch
        description: Match citations to PubMed UIDs
        call: national-library-of-medicine.ecitmatch
        outputParameters:
        - type: object
          mapping: $.
    - path: /egquery.fcgi
      name: egquery
      operations:
      - method: GET
        name: egquery
        description: Global cross-database query
        call: national-library-of-medicine.egquery
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: national-library-of-medicine-mcp
    transport: http
    description: MCP adapter for NCBI E-utilities API for AI agent use.
    tools:
    - name: esearch
      description: Search a database
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-library-of-medicine.esearch
      with:
        db: tools.db
        term: tools.term
        usehistory: tools.usehistory
        retmax: tools.retmax
        retstart: tools.retstart
        retmode: tools.retmode
        api_key: tools.api_key
      inputParameters:
      - name: db
        type: string
        description: Database to search (e.g. pubmed, pmc, gene, protein, nuccore).
        required: true
      - name: term
        type: string
        description: Entrez text query, URL-encoded.
        required: true
      - name: usehistory
        type: string
        description: Set to 'y' to post UIDs to the History server.
      - name: retmax
        type: integer
        description: Maximum number of UIDs to return (default 20, max 10000).
      - name: retstart
        type: integer
        description: Sequential index of the first UID to return (zero-based).
      - name: retmode
        type: string
        description: Output format.
      - name: api_key
        type: string
        description: NCBI API key for higher rate limits.
      outputParameters:
      - type: object
        mapping: $.
    - name: efetch
      description: Fetch full records by UID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-library-of-medicine.efetch
      with:
        db: tools.db
        id: tools.id
        rettype: tools.rettype
        retmode: tools.retmode
        api_key: tools.api_key
      inputParameters:
      - name: db
        type: string
        description: db
        required: true
      - name: id
        type: string
        description: Comma-separated list of UIDs or a WebEnv/query_key reference.
        required: true
      - name: rettype
        type: string
        description: Retrieval type (e.g. abstract, fasta, gb, medline).
      - name: retmode
        type: string
        description: Retrieval mode (e.g. xml, text, json, asn.1).
      - name: api_key
        type: string
        description: api_key
      outputParameters:
      - type: object
        mapping: $.
    - name: esummary
      description: Retrieve document summaries
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-library-of-medicine.esummary
      with:
        db: tools.db
        id: tools.id
        version: tools.version
        retmode: tools.retmode
      inputParameters:
      - name: db
        type: string
        description: db
        required: true
      - name: id
        type: string
        description: id
        required: true
      - name: version
        type: string
        description: Set to '2.0' for the newer DocSum schema.
      - name: retmode
        type: string
        description: retmode
      outputParameters:
      - type: object
        mapping: $.
    - name: einfo
      description: Database statistics and field metadata
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-library-of-medicine.einfo
      with:
        db: tools.db
        retmode: tools.retmode
      inputParameters:
      - name: db
        type: string
        description: db
      - name: retmode
        type: string
        description: retmode
      outputParameters:
      - type: object
        mapping: $.
    - name: elink
      description: Find related records across Entrez databases
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-library-of-medicine.elink
      with:
        dbfrom: tools.dbfrom
        db: tools.db
        id: tools.id
        linkname: tools.linkname
        cmd: tools.cmd
      inputParameters:
      - name: dbfrom
        type: string
        description: dbfrom
        required: true
      - name: db
        type: string
        description: db
      - name: id
        type: string
        description: id
        required: true
      - name: linkname
        type: string
        description: linkname
      - name: cmd
        type: string
        description: Command mode (neighbor, neighbor_history, llinks, prlinks, etc.).
      outputParameters:
      - type: object
        mapping: $.
    - name: epost
      description: Post UIDs to the Entrez History server
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: national-library-of-medicine.epost
      with:
        db: tools.db
        id: tools.id
      inputParameters:
      - name: db
        type: string
        description: db
        required: true
      - name: id
        type: string
        description: id
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: espell
      description: Spelling suggestions for a query term
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-library-of-medicine.espell
      with:
        db: tools.db
        term: tools.term
      inputParameters:
      - name: db
        type: string
        description: db
        required: true
      - name: term
        type: string
        description: term
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: ecitmatch
      description: Match citations to PubMed UIDs
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-library-of-medicine.ecitmatch
      with:
        db: tools.db
        rettype: tools.rettype
        bdata: tools.bdata
      inputParameters:
      - name: db
        type: string
        description: db
        required: true
      - name: rettype
        type: string
        description: rettype
      - name: bdata
        type: string
        description: Pipe-delimited citation strings.
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: egquery
      description: Global cross-database query
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: national-library-of-medicine.egquery
      with:
        term: tools.term
      inputParameters:
      - name: term
        type: string
        description: term
        required: true
      outputParameters:
      - type: object
        mapping: $.