# PubMed API — biomedical literature search (no key) (`synthetic.ia/pubmed-api`) Actor

Search 37M+ PubMed biomedical citations by keywords, author and year, and fetch a full article by PMID (title, authors, journal, DOI, abstract). Official NCBI E-utilities data. Clean HTTP API + MCP, no key. Pay per query.

- **URL**: https://apify.com/synthetic.ia/pubmed-api.md
- **Developed by:** [Synthetic](https://apify.com/synthetic.ia) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 pubmed queries

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## PubMed API — biomedical literature search (no key)

Search **PubMed** — the U.S. National Library of Medicine's **37M+ biomedical citations** — behind a clean HTTP API (and MCP tool). **Search** by keywords, author and year, sort by relevance or recency, and fetch a **full article** by PMID with its **abstract**, authors, journal and DOI. Built for medical & life-sciences research, evidence synthesis, pharma, and AI agents. **No API key.** Pay per query.

- 🔎 **Search** — keywords + author + year range; PubMed field tags (e.g. `[MeSH]`, `[Author]`) are supported in the term.
- 📄 **Article** — PMID → title, authors, journal, volume/issue/pages, DOI, PMCID, publication types and the **abstract**.
- 📅 **Recency or relevance** — sort newest-first or by PubMed relevance.
- 🧬 **Official & keyless** — straight from NCBI E-utilities.
- 💵 Pay per query.

### The use case it was built for

"Find recent CRISPR off-target papers by Doudna", or resolve a PMID to a clean citation with abstract for a literature review or an agent's evidence step. Two calls, clean JSON, no key.

### Sample output (`search`, term "crispr gene editing")

```json
{
  "ok": true, "term": "crispr gene editing", "totalResults": 25401, "count": 1,
  "articles": [
    { "pmid": "31295471", "title": "…", "authors": ["Doudna JA"],
      "journal": "Nature", "pubDate": "2019 Jul", "doi": "10.1038/…",
      "publicationTypes": ["Review"], "url": "https://pubmed.ncbi.nlm.nih.gov/31295471/" }
  ]
}
```

### How to use

- **HTTP API (Standby):** POST or GET `/search`, `/article`. `GET /` returns help. Example: `GET /search?term=alzheimer%20biomarkers&sort=recent`.
- **Normal run:** pass `{ operation, term | pmid, ... }`; results land in the dataset + key-value store.
- **MCP tool:** expose it to your agent via Apify's MCP server.

### Input

- **operation** — `search` · `article`.
- **term** — keywords (field tags allowed). **author** — surname + initials. **sort** — relevance / recent. **fromYear / toYear** — publication-year range. **limit** — cap articles.
- **pmid** — for `article`.

### Pricing

**Per query** from **$0.005** (down to $0.0015 on higher tiers). One call = one query (search returns many articles at once).

### Related Actors

- **[Crossref API](https://apify.com/synthetic.ia/crossref-scholar-api)** — scholarly works and DOI metadata across all publishers.
- **[ClinicalTrials.gov API](https://apify.com/synthetic.ia/clinicaltrials-api)** — clinical studies search.

### FAQ

**Do I need a key?** No — this uses NCBI's public E-utilities with a polite tool/email identifier.

**Can I use PubMed syntax?** Yes — put field tags in `term` (e.g. `asthma[MeSH] AND 2023[pdat]`).

**Are abstracts included?** Yes, in the `article` operation (when the publisher deposited one). Full text is at the article link/DOI.

### Notes & limits

Data from NCBI PubMed (E-utilities). Up to 50 articles per search call. NCBI rate-limits to 3 requests/second without a key; this actor stays within that.

# Changelog

This Actor's version history is a separate document: https://apify.com/synthetic.ia/pubmed-api/changelog.md

# Actor input Schema

## `operation` (type: `string`):

What to do.

## `term` (type: `string`):

Keywords, e.g. crispr gene editing. PubMed field tags are supported.

## `author` (type: `string`):

Author surname + initials, e.g. Doudna JA.

## `sort` (type: `string`):

Result ordering.

## `fromYear` (type: `integer`):

Earliest publication year.

## `toYear` (type: `integer`):

Latest publication year.

## `pmid` (type: `string`):

A PubMed ID, e.g. 31295471.

## `limit` (type: `integer`):

Max articles (≤50).

## Actor input object example

```json
{
  "operation": "search",
  "term": "crispr gene editing",
  "sort": "relevance",
  "limit": 15
}
```

# Actor output Schema

## `result` (type: `string`):

No description

## `runs` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "term": "crispr gene editing"
};

// Run the Actor and wait for it to finish
const run = await client.actor("synthetic.ia/pubmed-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "term": "crispr gene editing" }

# Run the Actor and wait for it to finish
run = client.actor("synthetic.ia/pubmed-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "term": "crispr gene editing"
}' |
apify call synthetic.ia/pubmed-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,synthetic.ia/pubmed-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/GE1oa8gdeLtjlOTES/builds/Iej9CtYHfQBEB1eXC/openapi.json
