# PubMed Paper Search: Abstracts, Authors, DOI, MeSH (`klyve1/pubmed-paper-search`) Actor

Search PubMed with the official NCBI E-utilities API: keywords, authors, journals, dates. Get title, abstract, authors, affiliations, journal, DOI, PMID, PMC id and MeSH terms for every article. For literature reviews and RAG.

- **URL**: https://apify.com/klyve1/pubmed-paper-search.md
- **Developed by:** [Nico Klyve](https://apify.com/klyve1) (community)
- **Categories:** AI, Education
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 articles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Paper Search: Abstracts, Authors, DOI, MeSH

Search the 37+ million biomedical articles of PubMed with the official NCBI E-utilities API and get clean JSON: title, full abstract, authors, affiliations, journal, publication date, DOI, PMID, PubMed Central id, publication types, MeSH terms and keywords. Export to JSON, CSV or Excel, or feed the results straight into an LLM or RAG pipeline.

### What people use it for

- **Literature reviews and systematic reviews**: pull every article matching a query, filtered by date, journal or publication type (Review, Meta-Analysis, Randomized Controlled Trial...).
- **RAG and AI assistants**: give your medical or life-science chatbot fresh abstracts with their DOI and PubMed links as sources.
- **Competitive and scientific watch**: schedule a daily run on a drug, a disease or a research group and get the newest papers.
- **Author and KOL research**: list the publications of given authors with their affiliations and journals.
- **Data enrichment**: turn a list of PMIDs or PubMed URLs into full metadata.

### Example output

```json
{
  "pmid": "34626851",
  "title": "GLP-1 physiology informs the pharmacotherapy of obesity.",
  "abstract": "BACKGROUND: Glucagon-like peptide-1 receptor agonists (GLP1RA) augment glucose-dependent insulin release...",
  "authors": ["Daniel J Drucker"],
  "firstAuthor": "Daniel J Drucker",
  "affiliations": ["Department of Medicine, Lunenfeld-Tanenbaum Research Institute, Mt. Sinai Hospital, Toronto, ON M5G 1X5, Canada."],
  "journal": "Molecular metabolism",
  "journalAbbreviation": "Mol Metab",
  "issn": "2212-8778",
  "volume": "57",
  "pages": "101351",
  "publishedDate": "2022-03",
  "publicationTypes": ["Journal Article", "Research Support, Non-U.S. Gov't", "Review"],
  "language": ["eng"],
  "meshTerms": ["Diabetes Mellitus, Type 2", "Glucagon-Like Peptide 1", "Humans", "Liraglutide", "Obesity"],
  "keywords": ["Brain", "Diabetes", "Hunger", "Obesity", "Weight loss"],
  "doi": "10.1016/j.molmet.2021.101351",
  "pmcId": "PMC8859548",
  "pubmedUrl": "https://pubmed.ncbi.nlm.nih.gov/34626851/",
  "doiUrl": "https://doi.org/10.1016/j.molmet.2021.101351",
  "pmcUrl": "https://pmc.ncbi.nlm.nih.gov/articles/PMC8859548/"
}
```

### Input

| Field | What it does |
|---|---|
| Search query | Same syntax as pubmed.ncbi.nlm.nih.gov, field tags included (`crispr[Title] AND 2024[dp]`). |
| Authors | Keep articles by any of these authors. |
| Journals | Keep articles from any of these journals. |
| Publication types | Review, Clinical Trial, Meta-Analysis, Systematic Review... |
| Free full text only | Keep only articles with a free full text. |
| Published on or after / before | Publication date range. |
| PMIDs | Fetch given articles by PMID or PubMed URL. |
| Sort by | Best match, most recent, first author or journal. |
| Max articles | Up to 9,999 per run. |
| NCBI API key | Optional, raises the NCBI rate limit for very large runs. |

### Pricing

Pay per result: **$0.001 per article saved** ($1 per 1,000 articles). Searches with no result are free. Set a maximum charge per run to stay in control.

### Good to know

- Data comes from the official NCBI E-utilities API, used within NCBI's rate limits. PubMed abstracts may be protected by their publishers' copyright: use them for research and analysis, and check the publisher's terms before republishing them.
- PubMed contains citations and abstracts, not full texts. Use the `pmcUrl` or `doiUrl` to reach the full text when it is available.
- 20 articles take a few seconds; 1,000 articles about a minute.

# Actor input Schema

## `query` (type: `string`):

Words to search in PubMed, exactly like on pubmed.ncbi.nlm.nih.gov. Field tags work too, for example crispr\[Title] AND 2024\[dp] or "heart failure"\[MeSH Terms].

## `authors` (type: `array`):

Author names (any of them), for example "Doudna JA" or "Smith J".

## `journals` (type: `array`):

Journal names or abbreviations (any of them), for example "Nature", "N Engl J Med", "Lancet".

## `publicationTypes` (type: `array`):

Keep only these types (any of them), for example "Review", "Clinical Trial", "Randomized Controlled Trial", "Meta-Analysis", "Systematic Review".

## `freeFullTextOnly` (type: `boolean`):

Keep only articles with a free full text (PubMed Central or publisher).

## `dateFrom` (type: `string`):

Only articles published on or after this date (YYYY-MM-DD).

## `dateTo` (type: `string`):

Only articles published on or before this date (YYYY-MM-DD).

## `pmids` (type: `array`):

Fetch these articles directly by PubMed id or PubMed URL, for example 33567185 or https://pubmed.ncbi.nlm.nih.gov/33567185/.

## `sortBy` (type: `string`):

Order of the search results.

## `maxResults` (type: `integer`):

Maximum number of articles to save (up to 9999).

## `ncbiApiKey` (type: `string`):

Your own free NCBI API key raises the rate limit from 3 to 10 requests per second. Not needed for normal use.

## Actor input object example

```json
{
  "query": "glp-1 obesity",
  "freeFullTextOnly": false,
  "sortBy": "relevance",
  "maxResults": 20
}
```

# Actor output Schema

## `results` (type: `string`):

All rows produced by the run.

# 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 = {
    "query": "glp-1 obesity",
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("klyve1/pubmed-paper-search").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 = {
    "query": "glp-1 obesity",
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("klyve1/pubmed-paper-search").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 '{
  "query": "glp-1 obesity",
  "maxResults": 20
}' |
apify call klyve1/pubmed-paper-search --silent --output-dataset

```

## MCP server setup

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

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/zxpTTho5d9LYQtzT9/builds/EFqHrAkGshZqw7ndu/openapi.json
