Find an API

Search public APIs with auth details & Postman guides

← All APIs

PubMed E-utilities (NCBI)

eutils.ncbi.nlm.nih.gov · Health

Health API Key Free & Open Academic Medical Biomedical

Search and fetch biomedical literature from PubMed, PubMed Central, and other NCBI databases. Over 35 million citations. Free, API key optional (higher rate limits with key).

Authentication

API Key authentication API key optional — get one free at ncbi.nlm.nih.gov/account/. Without a key: 3 req/sec. With a key: 10 req/sec. Pass as &api_key= query param.

Sample Requests

GET Search PubMed

Search PubMed for articles by keyword. Returns article IDs.

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=covid-19 vaccine&retmax=5&retmode=json

Hover any highlighted part to learn what it does

curl -X GET "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=covid-19%20vaccine&retmax=5&retmode=json"
import requests
params = {
    "db": "pubmed",
    "term": "covid-19 vaccine",
    "retmax": "5",
    "retmode": "json"
}
response = requests.get(
    "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi",
    params=params,
)
print(response.json())
const url = new URL('https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi');
url.searchParams.set('db', 'pubmed');
url.searchParams.set('term', 'covid-19 vaccine');
url.searchParams.set('retmax', '5');
url.searchParams.set('retmode', 'json');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi")
	q := baseURL.Query()
	q.Set("db", "pubmed")
	q.Set("term", "covid-19 vaccine")
	q.Set("retmax", "5")
	q.Set("retmode", "json")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi")
uri.query = URI.encode_www_form({
  "db" => "pubmed",
  "term" => "covid-19 vaccine",
  "retmax" => "5",
  "retmode" => "json"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?" . http_build_query([
    "db" => "pubmed",
    "term" => "covid-19 vaccine",
    "retmax" => "5",
    "retmode" => "json"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Fetch article summary

Fetch title, authors, and journal for a PubMed article ID.

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=34567890&retmode=json

Hover any highlighted part to learn what it does

curl -X GET "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=34567890&retmode=json"
import requests
params = {
    "db": "pubmed",
    "id": "34567890",
    "retmode": "json"
}
response = requests.get(
    "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi",
    params=params,
)
print(response.json())
const url = new URL('https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi');
url.searchParams.set('db', 'pubmed');
url.searchParams.set('id', '34567890');
url.searchParams.set('retmode', 'json');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi")
	q := baseURL.Query()
	q.Set("db", "pubmed")
	q.Set("id", "34567890")
	q.Set("retmode", "json")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi")
uri.query = URI.encode_www_form({
  "db" => "pubmed",
  "id" => "34567890",
  "retmode" => "json"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?" . http_build_query([
    "db" => "pubmed",
    "id" => "34567890",
    "retmode" => "json"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed to start
  2. Step 1: Search — GET /esearch.fcgi?db=pubmed&term=your+query&retmax=5&retmode=json
  3. Step 2: Get details — take IDs from step 1 and call /esummary.fcgi?db=pubmed&id=ID&retmode=json
  4. Get a free API key at ncbi.nlm.nih.gov/account/ for 10 req/sec

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

PubMed E-utilities (NCBI) is a Health API. Developers commonly use health APIs for:

  • accessing medical reference data and drug information
  • building patient-facing health tracking apps
  • integrating with EHR and telemedicine platforms
  • looking up ICD codes and clinical terminology
  • powering wellness and fitness applications

API Key authentication. You'll receive a key after signing up. Send it with every request — in a header or query parameter. Keep it out of client-side code and never commit it to version control. PubMed E-utilities (NCBI) is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide

Open documentation ↗