> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# PubMed (NCBI E-utilities)

> NCBI's Entrez E-utilities over PubMed and the other NCBI databases: search, summaries, full records and links between records.

![](https://mintcdn.com/webrouter/T_A5Quwg50s_JK2y/logo/data-apis/pubmed.webp?fit=max\&auto=format\&n=T_A5Quwg50s_JK2y\&q=85\&s=739bbf86012ea3dfbc463b946bed42d5)

[Web Catalog · Science](https://docs.webrouter.net/data-apis.md?category=science)

Key optional

Endpoints

5

Auth

Key in query

[Vendor docs](https://www.nlm.nih.gov/dataguide/eutilities/utilities.html) · Serves `pubmed.ncbi.nlm.nih.gov`

## Setup

| Variable | | What it is |
| - | - | - |
| `NCBI_API_KEY` | some calls | Optional NCBI API key (NCBI account > Settings > API Key Management); sent as the api\_key query parameter, raising the limit from 3 to 10 requests per second. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Free and keyless. Without a key more than 3 requests per second from one IP gets an error; a key allows 10 per second.
* NCBI asks large jobs to run on weekends or between 9 PM and 5 AM US Eastern on weekdays, and to send tool and email parameters identifying the caller.
* Answers are XML unless retmode=json, which esearch, esummary and einfo support; efetch does not return JSON.
* The usual flow is search (IDs) then summary or fetch with those IDs.

## Endpoints

GET

Search PubMed

PubMed IDs (or another database's UIDs) matching a query, or just the count.

[Open](#pubmed-search)

GET

Get document summaries

Title, authors, journal, dates and other summary fields for a list of UIDs.

[Open](#pubmed-summary)

GET

Fetch full records

Full records (abstracts, MEDLINE or XML) for a list of UIDs.

[Open](#pubmed-fetch)

GET

Find linked records

Related articles, citing articles or records in other NCBI databases for given UIDs.

[Open](#pubmed-link)

GET

Describe databases

The list of Entrez databases, or one database's fields, links and record counts.

[Open](#pubmed-info)

### Search PubMed

GET

`/esearch.fcgi`

`pubmed.search`

PubMed IDs (or another database's UIDs) matching a query, or just the count.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`db`</td><td>string</td><td>query</td><td>Entrez database, e.g. pubmed, pmc, nlmcatalog, clinvar, gene, or gds (GEO datasets); pubmed.info lists them all. Example `pubmed`</td></tr>
    <tr><td>`term` required</td><td>string</td><td>query</td><td>Text query, like a PubMed search string; percent-encode special characters. Example `crispr`</td></tr>

    <tr>
      <td>
        `retstart`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Offset of the first ID returned, default 0.
      </td>
    </tr>

    <tr>
      <td>
        `retmax`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        IDs returned, default 20, max 100,000.
      </td>
    </tr>

    <tr>
      <td>
        `sort`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        PubMed: most recent (default), pub date, relevance, title, author, journal (spaces as +).
      </td>
    </tr>

    <tr>
      <td>
        `field`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Restrict the whole term to one search field.
      </td>
    </tr>

    <tr>
      <td>
        `datetype`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Date field for the date filters; for PubMed crdt, edat, pdat or mhda.
      </td>
    </tr>

    <tr>
      <td>
        `reldate`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Only items dated within the last n days (by datetype).
      </td>
    </tr>

    <tr>
      <td>
        `mindate`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Range start, YYYY/MM/DD, YYYY/MM or YYYY; needs maxdate.
      </td>
    </tr>

    <tr>
      <td>
        `maxdate`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Range end, same formats; needs mindate.
      </td>
    </tr>

    <tr><td>`rettype`</td><td>string</td><td>query</td><td>uilist (default) or count. One of `uilist`, `count`</td></tr>
    <tr><td>`retmode`</td><td>string</td><td>query</td><td>xml (default) or json. One of `xml`, `json` Example `json`</td></tr>
  </tbody>
</table>

[Vendor docs](https://www.nlm.nih.gov/dataguide/eutilities/utilities.html) · Same job: [arXiv](https://docs.webrouter.net/data-apis/arxiv.md#arxiv-query), [Crossref](https://docs.webrouter.net/data-apis/crossref.md#crossref-works-search), [Europe PMC](https://docs.webrouter.net/data-apis/europepmc.md#europepmc-search), [Hugging Face Hub](https://docs.webrouter.net/data-apis/huggingface.md#huggingface-papers-search), [Litescrape](https://docs.webrouter.net/data-apis/litescrape.md#litescrape-google-scholar), [NIH RePORTER](https://docs.webrouter.net/data-apis/nih-reporter.md#nih-reporter-publications-search)

```python Python theme={null}
router.call_data_api("pubmed.search", {'db': 'pubmed', 'term': 'crispr', 'retmode': 'json'})
```

```text MCP theme={null}
call_data_api(endpoint="pubmed.search", params={"db": "pubmed", "term": "crispr", "retmode": "json"})
```

> [!NOTE]
>
> * Returns IDs only; pass them to pubmed.summary or pubmed.fetch.

### Get document summaries

GET

`/esummary.fcgi`

`pubmed.summary`

Title, authors, journal, dates and other summary fields for a list of UIDs.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`db` required</td><td>string</td><td>query</td><td>Entrez database, e.g. pubmed, pmc, nlmcatalog, clinvar, gene, or gds (GEO datasets); pubmed.info lists them all. Example `pubmed`</td></tr>
    <tr><td>`id` required</td><td>string</td><td>query</td><td>One UID or a comma-separated list. Example `39000000`</td></tr>

    <tr>
      <td>
        `retstart`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        First record, default 1.
      </td>
    </tr>

    <tr>
      <td>
        `retmax`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Records returned, max 10,000.
      </td>
    </tr>

    <tr><td>`retmode`</td><td>string</td><td>query</td><td>xml (default) or json. One of `xml`, `json` Example `json`</td></tr>
  </tbody>
</table>

[Vendor docs](https://www.nlm.nih.gov/dataguide/eutilities/utilities.html) · Same job: [Crossref](https://docs.webrouter.net/data-apis/crossref.md#crossref-works-get), [Europe PMC](https://docs.webrouter.net/data-apis/europepmc.md#europepmc-article-get), [OpenAlex](https://docs.webrouter.net/data-apis/openalex.md#openalex-works-get), [Semantic Scholar](https://docs.webrouter.net/data-apis/semanticscholar.md#semanticscholar-paper-match)

```python Python theme={null}
router.call_data_api("pubmed.summary", {'db': 'pubmed', 'id': '39000000', 'retmode': 'json'})
```

```text MCP theme={null}
call_data_api(endpoint="pubmed.summary", params={"db": "pubmed", "id": "39000000", "retmode": "json"})
```

### Fetch full records

GET

`/efetch.fcgi`

`pubmed.fetch`

Full records (abstracts, MEDLINE or XML) for a list of UIDs.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`db` required</td><td>string</td><td>query</td><td>Entrez database, e.g. pubmed, pmc, nlmcatalog, clinvar, gene, or gds (GEO datasets); pubmed.info lists them all. Example `pubmed`</td></tr>

    <tr>
      <td>
        `id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        One UID or a comma-separated list.
      </td>
    </tr>

    <tr>
      <td>
        `rettype`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Record view, e.g. abstract, medline, docsum.
      </td>
    </tr>

    <tr>
      <td>
        `retmode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Output format; default xml.
      </td>
    </tr>

    <tr>
      <td>
        `retstart`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Offset, default 0.
      </td>
    </tr>

    <tr>
      <td>
        `retmax`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Records returned, max 10,000.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.nlm.nih.gov/dataguide/eutilities/utilities.html) · Same job: [Crossref](https://docs.webrouter.net/data-apis/crossref.md#crossref-works-get), [Europe PMC](https://docs.webrouter.net/data-apis/europepmc.md#europepmc-article-get), [OpenAlex](https://docs.webrouter.net/data-apis/openalex.md#openalex-works-get), [Semantic Scholar](https://docs.webrouter.net/data-apis/semanticscholar.md#semanticscholar-paper-match)

### Find linked records

GET

`/elink.fcgi`

`pubmed.link`

Related articles, citing articles or records in other NCBI databases for given UIDs.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`dbfrom` required</td><td>string</td><td>query</td><td>Database the input UIDs are from. Example `pubmed`</td></tr>
    <tr><td>`db`</td><td>string</td><td>query</td><td>Entrez database, e.g. pubmed, pmc, nlmcatalog, clinvar, gene, or gds (GEO datasets); pubmed.info lists them all. Example `pubmed`</td></tr>

    <tr>
      <td>
        `id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        One UID or a comma-separated list.
      </td>
    </tr>

    <tr>
      <td>
        `cmd`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        neighbor (default), neighbor\_score, neighbor\_history, acheck, ncheck, lcheck, llinks, llinkslib or prlinks.
      </td>
    </tr>

    <tr>
      <td>
        `linkname`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        One link type, dbfrom\_db\_subset, e.g. pubmed\_pubmed (similar articles).
      </td>
    </tr>

    <tr>
      <td>
        `term`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Entrez query to filter the linked UIDs.
      </td>
    </tr>

    <tr>
      <td>
        `datetype`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Date field for the date filters; for PubMed crdt, edat, pdat or mhda.
      </td>
    </tr>

    <tr>
      <td>
        `reldate`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Only items dated within the last n days (by datetype).
      </td>
    </tr>

    <tr>
      <td>
        `mindate`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Range start, YYYY/MM/DD, YYYY/MM or YYYY; needs maxdate.
      </td>
    </tr>

    <tr>
      <td>
        `maxdate`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Range end, same formats; needs mindate.
      </td>
    </tr>

    <tr>
      <td>
        `retmode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        xml (default), or ref to redirect to the provider site.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.nlm.nih.gov/dataguide/eutilities/utilities.html) · Same job: [Europe PMC](https://docs.webrouter.net/data-apis/europepmc.md#europepmc-citations), [Semantic Scholar](https://docs.webrouter.net/data-apis/semanticscholar.md#semanticscholar-paper-citations)

### Describe databases

GET

`/einfo.fcgi`

`pubmed.info`

The list of Entrez databases, or one database's fields, links and record counts.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`db`</td><td>string</td><td>query</td><td>Entrez database, e.g. pubmed, pmc, nlmcatalog, clinvar, gene, or gds (GEO datasets); pubmed.info lists them all. Example `pubmed`</td></tr>
    <tr><td>`retmode`</td><td>string</td><td>query</td><td>xml (default) or json. One of `xml`, `json` Example `json`</td></tr>
  </tbody>
</table>

[Vendor docs](https://www.nlm.nih.gov/dataguide/eutilities/utilities.html) · Same job: [UniProt](https://docs.webrouter.net/data-apis/uniprot.md#uniprot-idmapping-fields)

```python Python theme={null}
router.call_data_api("pubmed.info", {'db': 'pubmed', 'retmode': 'json'})
```

```text MCP theme={null}
call_data_api(endpoint="pubmed.info", params={"db": "pubmed", "retmode": "json"})
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.