BYTETOOLS

NCBI E-utilities (PubMed) API

Free NCBI E-utilities API with no key: search 35M+ biomedical citations in PubMed, plus GenBank, protein and other NCBI databases. Tested curl example.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-20

What is the NCBI E-utilities (PubMed) API?

The NCBI E-utilities API is a free, key-free interface to PubMed and the other NCBI databases, providing search and retrieval across more than 35 million biomedical citations, gene sequences and protein records.

E-utilities is the standard programmatic route into PubMed, the definitive index of biomedical literature. The same interface also covers GenBank, protein sequences, and dozens of other NCBI databases through a single `db` parameter.

It follows a deliberate two-step pattern: `esearch` returns matching record IDs, then `efetch` or `esummary` retrieves the actual records. That separation lets you count results cheaply before deciding whether to fetch them.

Quick facts

Base URL
https://eutils.ncbi.nlm.nih.gov/entrez/eutils
Authentication
Works with no key at 3 requests/second. A free API key raises that to 10/second.
Rate limit
3 requests per second without a key; 10 per second with a free API key.
Pricing
Free public domain US government data.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the NCBI E-utilities (PubMed) API

Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.

1. Search PubMed for articles

GET https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=diabetes&retmode=json&retmax=1

curl
curl 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=diabetes&retmode=json&retmax=1'
JavaScript (fetch)
const res = await fetch("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=diabetes&retmode=json&retmax=1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=diabetes&retmode=json&retmax=1", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "header": {
    "type": "esearch",
    "version": "0.3"
  },
  "esearchresult": {
    "count": "1137624",
    "retmax": "1",
    "retstart": "0",
    "idlist": [
      "42616007"
    ],
    "translationset": [
      {
        "from": "diabetes",
        "to": "\"diabete\"[All Fields] OR \"diabetes mellitus\"[MeSH Terms] OR (\"diabetes\"[All Fields] AND \"mellitus\"[All Fields]) OR \"diabetes mellitus\"[All Fields] OR \"diabetes\"[All Fields] OR \"diabetes insipidus\"[MeSH Terms] OR (\"diabetes\"[All Fields] AND \"insipidus\"[All Fields]) OR \"diabetes insipidus\"[All Fields] OR \"diabetic\"[All Fields] OR \"diabetics\"[All Fields] OR \"diabets\"[All Fields]"
      }
    ],
    "querytranslation": "\"diabete\"[All Fields] OR \"diabetes mellitus\"[MeSH Terms] OR (\"diabetes\"[All Fields] AND \"mellitus\"[All Fields]) OR \"diabetes mellitus\"[All Fields] OR \"diabetes\"[All Fields] OR \"diabetes insipidus\"[MeSH Terms] OR (\"diabetes\"[All Fields] AND \"insipidus\"[All Fields]) OR \"diabetes insipidus\"[All Fields] OR \"diabetic\"[All Fields] OR \"diabetics\"[All Fields] OR \"diabets\"[All Fields]"
  }
}

Parameters

ParameterTypeRequiredDescription
esearch.fcgipathOptionalSearch a database, returning IDs. esearch.fcgi
dbstringRequiredDatabase: pubmed, protein, nuccore, gene and others. pubmed
termstringRequiredSearch query, supporting PubMed field tags. diabetes[Title]
retmodestringOptionaljson or xml. Default is XML. json
retmaxintegerOptionalMaximum IDs to return. 20
esummary.fcgipathOptionalFetch summaries for IDs from esearch. esummary.fcgi

Response fields

esearchresult.countstring
Total matching records, as a string.
esearchresult.idlistarray
PubMed IDs of the matches — feed these to esummary or efetch.
esearchresult.translationsetarray
How PubMed expanded your query using MeSH terms.
esearchresult.querytranslationstring
The actual query executed after expansion.

What you can build with the NCBI E-utilities (PubMed) API

  • Build a biomedical literature search tool
  • Monitor new publications on a clinical topic
  • Enrich a research database with PubMed citations
  • Analyse publication trends in medicine

Common errors and how to fix them

XML instead of JSON

The default retmode is XML.

Fix: Always pass retmode=json — many older examples omit it.

429

Exceeded 3 requests per second.

Fix: Register a free NCBI API key for 10 per second, and pass it as the api_key parameter.

Only IDs returned

esearch returns IDs by design.

Fix: Follow with esummary.fcgi or efetch.fcgi passing those IDs to get the actual records.

NCBI E-utilities (PubMed) API — frequently asked questions

Is the PubMed API free?

Yes, free with no API key at 3 requests per second. A free NCBI API key raises that to 10 per second.

Why does my search only return numbers?

esearch returns matching record IDs by design. Pass them to esummary.fcgi or efetch.fcgi to get the actual citations — the two-step pattern is deliberate.

How do I get JSON instead of XML?

Pass retmode=json. XML is the default, which surprises people working from older examples.

Can I search databases other than PubMed?

Yes, the `db` parameter covers dozens of NCBI databases including protein, nuccore for nucleotide sequences, and gene.

Tools that pair with this API

NCBI E-utilities (PubMed) is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.