# PubMed Scraper (`labrat011/pubmed-scraper`) Actor

Search 35M+ PubMed research papers and medical articles. Extract abstracts, authors, journals, MeSH terms, DOIs, and grants for literature reviews, systematic reviews, pharma research, and AI/RAG pipelines. No API key required.

- **URL**: https://apify.com/labrat011/pubmed-scraper.md
- **Developed by:** [mick\_](https://apify.com/labrat011) (community)
- **Categories:** AI, Education, Business
- **Features:** Limited permissions
- **Stats:** 27 total users, 6 monthly users, 98.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

<img src="https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/wCP1WauwRX2Gr3Gir-actor-iBqfsSC5uMVWOav7J-RUpdKssUQp-pubmed-scraper.png" alt="PubMed Scraper logo" width="120">

## PubMed Scraper

> **Search 35 million biomedical research papers and medical articles from PubMed/MEDLINE. Batch queries, MeSH filtering, full abstracts, author affiliations, and structured metadata, ready for literature reviews, systematic reviews, AI and RAG pipelines, and drug research.**

Extract structured article data from PubMed via the NCBI E-utilities API. No API key required. Clean JSON output with consistent fields, ready for downstream analysis, RAG pipelines, or LLM tool use.

***

### 🚀 What's New (v1.1.0)

#### Batch Query Search

Run multiple search queries in a single job. Pass `queriesList: ["cancer immunotherapy", "CAR-T therapy", "checkpoint inhibitors"]` and get merged, deduplicated results across all queries. One paid run replaces 10+ separate searches, built for systematic reviews and broad topic mapping.

#### Emoji Input Labels

All input fields now have emoji labels for faster navigation in the Apify console.

***

### 🎯 Use Cases

#### 🤖 AI Agents & LLM Pipelines

PubMed is the gold standard for biomedical knowledge. Wire this actor into your AI pipeline as a callable tool:

- **RAG knowledge bases**: Index 10,000+ abstracts for semantic search over medical literature
- **MCP tool use**: AI agents call this actor in real time to look up evidence, find citations, or answer clinical questions
- **Literature-grounded generation**: Pull structured abstracts as context before generating summaries, reports, or clinical content
- **Evidence retrieval**: Agent receives a medical question → queries PubMed → returns cited sources

One run can return thousands of structured, citable records ready for embedding. The consistent schema (`pmid`, `abstract`, `mesh_terms`, `doi_url`) means no cleaning required.

**Example (AI agent topic scan):**

```json
{
    "mode": "search_articles",
    "queriesList": ["GLP-1 receptor agonist", "semaglutide weight loss", "tirzepatide clinical trial"],
    "publicationType": "Clinical Trial",
    "dateFrom": "2022",
    "maxResults": 500
}
```

#### 💊 Pharma & Biotech Research

Track the scientific landscape around drug targets, mechanisms, and therapeutic areas, without manual PubMed sessions:

- **Competitive intelligence**: Monitor competitor publications by author, institution, or research area
- **Target validation**: Pull all publications on a gene or protein target to assess research depth
- **Clinical trial landscape**: Filter by Clinical Trial or RCT publication type to see what's been run
- **Drug repurposing**: Cross-reference MeSH terms across therapeutic areas to find unexplored connections
- **Pipeline monitoring**: Track publications on specific drugs or mechanisms as they emerge

**Example (drug target landscape):**

```json
{
    "mode": "search_articles",
    "meshTerm": "PCSK9",
    "publicationType": "Review",
    "sort": "pub_date",
    "maxResults": 200
}
```

#### 📑 Systematic Reviews & Meta-Analyses

Systematic reviews require comprehensive literature searches across multiple query formulations. This is where batch search pays off:

- **Multi-query search**: Cover all synonyms and related terms in one job, no manual re-running
- **Deduplication**: Results automatically deduplicated by PMID, no overlap in your dataset
- **Date-bounded searches**: Filter to a specific review window with `dateFrom`/`dateTo`
- **Study design filtering**: Filter to RCTs, meta-analyses, or systematic reviews only
- **Export ready**: Download as CSV or Excel directly from the Apify dataset UI

**Example (systematic review search):**

```json
{
    "mode": "search_articles",
    "queriesList": [
        "cognitive behavioral therapy depression",
        "CBT major depressive disorder",
        "psychotherapy depressive symptoms randomized"
    ],
    "publicationType": "Randomized Controlled Trial",
    "dateFrom": "2015",
    "dateTo": "2024",
    "maxResults": 1000
}
```

***

### 📖 Usage Examples

#### Example 1: Batch Query Search (Systematic Review)

```json
{
    "mode": "search_articles",
    "queriesList": ["cancer immunotherapy", "CAR-T cell therapy", "PD-1 inhibitor"],
    "publicationType": "Clinical Trial",
    "maxResults": 500
}
```

#### Example 2: Single Keyword Search

```json
{
    "mode": "search_articles",
    "query": "CRISPR gene editing",
    "publicationType": "Review",
    "maxResults": 100
}
```

#### Example 3: MeSH Term Search

```json
{
    "mode": "search_articles",
    "meshTerm": "Alzheimer Disease",
    "publicationType": "Meta-Analysis",
    "dateFrom": "2020",
    "maxResults": 200
}
```

#### Example 4: Author Search

```json
{
    "mode": "search_by_author",
    "author": "Zhang F",
    "query": "CRISPR",
    "maxResults": 50
}
```

#### Example 5: Journal Search

```json
{
    "mode": "search_by_journal",
    "journal": "Nature Medicine",
    "query": "immunotherapy",
    "sort": "pub_date",
    "maxResults": 100
}
```

#### Example 6: Single Article Lookup

```json
{
    "mode": "get_article",
    "pmid": "33243215"
}
```

#### Example 7: Date-Bounded Search

```json
{
    "mode": "search_articles",
    "query": "COVID-19 long COVID",
    "dateFrom": "2023/01/01",
    "dateTo": "2024/12/31",
    "sort": "pub_date",
    "maxResults": 300
}
```

***

### 👥 Who Uses This

#### 🔬 Systematic Reviewers & Meta-Analysts

Running a systematic review means covering all synonyms and related terms, one query isn't enough. Batch search handles this in a single run.

- Cover all query variants (`queriesList`) and get a deduplicated PMID set across all of them
- Bound by date range to match your review window
- Filter to the exact study design you need (RCT, Meta-Analysis, Systematic Review)
- Download as CSV/Excel directly from the Apify dataset UI, no cleaning needed

```json
{
    "mode": "search_articles",
    "queriesList": [
        "cognitive behavioral therapy depression",
        "CBT major depressive disorder",
        "psychotherapy depressive symptoms"
    ],
    "publicationType": "Randomized Controlled Trial",
    "dateFrom": "2015",
    "dateTo": "2024",
    "maxResults": 1000
}
```

#### 💊 Pharma & Biotech Teams

Track the publication landscape around a drug target, mechanism, or therapeutic area without manual PubMed sessions.

- Map all publications on a gene or protein target to assess research depth before investing in it
- Monitor competitor publications by author, institution, or research area over time
- Filter to Review or Clinical Trial types to see what stage the evidence is at
- Track emerging publications with `sort: pub_date` + date range

```json
{
    "mode": "search_articles",
    "meshTerm": "PCSK9",
    "publicationType": "Clinical Trial",
    "sort": "pub_date",
    "dateFrom": "2022",
    "maxResults": 500
}
```

#### 🧪 Clinical Researchers

Find evidence for a specific intervention, track a researcher's publication record, or monitor a journal's output.

- Pull all papers by a specific author to build their publication profile
- Search a journal combined with a keyword to scope relevant output
- Use MeSH terms for precise clinical concept matching (avoids terminology variation)
- Combine author + query to track a researcher's work on a specific topic

```json
{
    "mode": "search_by_author",
    "author": "Bhatt DL",
    "query": "cardiovascular outcomes trial",
    "maxResults": 100
}
```

#### 🤖 AI/LLM Engineers

PubMed is the gold-standard source for biomedical knowledge. Wire this into your pipeline as a callable data source.

- Index thousands of abstracts into a vector store for semantic retrieval over medical literature
- Use via MCP so AI agents can look up live evidence during a conversation
- Pull literature as structured context before generating summaries, clinical notes, or reports
- The consistent output schema (`pmid`, `abstract`, `mesh_terms`, `doi_url`) means no field normalization needed downstream

```json
{
    "mode": "search_articles",
    "queriesList": ["GLP-1 receptor agonist", "semaglutide weight loss", "tirzepatide efficacy"],
    "publicationType": "Clinical Trial",
    "dateFrom": "2020",
    "maxResults": 500
}
```

#### 📝 Medical Writers & Journalists

Find citations fast, scope coverage on a topic, or pull an author's full bibliography without spending hours on PubMed.

- Single article lookup by PMID to get structured metadata for citation formatting
- Author search to build a bibliography or verify publication history
- Topic search with date range to understand how coverage of a story has evolved
- `pmc_url` field points directly to free full text when available

```json
{
    "mode": "get_article",
    "pmid": "36352213"
}
```

***

### 🔗 Related Actors

Other actors from the same portfolio that pair well with PubMed Scraper:

| Actor | What It Does |
|---|---|
| [NPI Provider Contact Finder](https://apify.com/labrat011/npi-provider-contact-finder) | Finds doctor emails, practice websites, and LinkedIn profiles from the NPPES NPI Registry |
| [FDA Drug Labels Scraper](https://apify.com/labrat011/fda-drug-labels-scraper) | Pulls structured drug label data from FDA DailyMed, pair with PubMed for full drug research coverage |
| [Academic Paper Scraper](https://apify.com/labrat011/academic-paper-scraper) | Research papers from ArXiv, Semantic Scholar, and CrossRef, broader coverage beyond biomedical |

***

### 🔍 Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `mode` | `string` | `search_articles` | `search_articles`, `get_article`, `search_by_author`, `search_by_journal` |
| `query` | `string` | `""` | Single keyword search. Ignored when `queriesList` is provided |
| `queriesList` | `array` | `[]` | Batch search multiple queries, results merged and deduplicated. `meshTerm`, `author`, `journal`, `publicationType` and the date range apply to every query |
| `pmid` | `string` | `""` | PubMed ID for `get_article` mode |
| `author` | `string` | `""` | Author name (e.g. `"Smith J"`) |
| `journal` | `string` | `""` | Journal name (e.g. `"Nature"`, `"Cell"`) |
| `meshTerm` | `string` | `""` | MeSH subject heading (e.g. `"Neoplasms"`) |
| `publicationType` | `string` | `""` | Filter by study design: `Clinical Trial`, `Review`, `Meta-Analysis`, `Randomized Controlled Trial`, `Systematic Review` |
| `dateFrom` | `string` | `""` | Publication start date: `YYYY`, `YYYY/MM`, or `YYYY/MM/DD` |
| `dateTo` | `string` | `""` | Publication end date: `YYYY`, `YYYY/MM`, or `YYYY/MM/DD` |
| `sort` | `string` | `relevance` | `relevance`, `pub_date`, `Author`, `JournalName` |
| `maxResults` | `integer` | `100` | Max articles to return (1 to 10,000). Free Apify plan: 10 per run |
| `requestIntervalSecs` | `number` | `0.34` | Seconds between requests to NCBI (0.2 to 5) |
| `timeoutSecs` | `integer` | `30` | Timeout for each HTTP request (5 to 120) |
| `maxRetries` | `integer` | `5` | Retries on failed or rate-limited requests (0 to 10) |

***

### 📊 Output Format

Each article is pushed as a structured JSON record. Download as JSON, CSV, or Excel from the Apify dataset UI.

```json
{
    "schema_version": "1.0",
    "type": "article",
    "pmid": "38786024",
    "doi": "10.3390/cells13100800",
    "pmc_id": "PMC11119143",
    "title": "CRISPR-Based Gene Therapies: From Preclinical to Clinical Treatments.",
    "abstract": "In recent years, clustered regularly interspaced short palindromic repeats (CRISPR)...",
    "authors": [
        {
            "last_name": "Laurent",
            "fore_name": "Marine",
            "initials": "M",
            "affiliation": "INTEGRARE, UMR_S951, Genethon, Inserm, Univ Evry, Université Paris-Saclay, 91190 Evry, France."
        }
    ],
    "journal": "Cells",
    "journal_abbreviation": "Cells",
    "issn": "2073-4409",
    "volume": "13",
    "issue": "10",
    "pages": "",
    "publication_date": "2024 May 08",
    "pub_year": "2024",
    "keywords": ["CRISPR/Cas9", "Duchenne muscular dystrophy", "gene editing"],
    "mesh_terms": ["Humans", "Genetic Therapy", "CRISPR-Cas Systems", "Gene Editing"],
    "publication_types": ["Journal Article", "Review"],
    "language": "eng",
    "country": "Switzerland",
    "grant_list": [],
    "reference_count": 207,
    "pubmed_url": "https://pubmed.ncbi.nlm.nih.gov/38786024/",
    "doi_url": "https://doi.org/10.3390/cells13100800",
    "pmc_url": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11119143/"
}
```

#### Output Fields

| Field | Description |
|-------|-------------|
| `pmid` | PubMed ID |
| `doi` / `pmc_id` | DOI and PubMed Central ID |
| `title` | Article title |
| `abstract` | Full abstract text |
| `authors` | List with last name, first name, initials, affiliation |
| `journal` / `journal_abbreviation` / `issn` | Full and abbreviated journal name, and journal ISSN |
| `volume` / `issue` / `pages` | Publication details |
| `publication_date` / `pub_year` | Date and year |
| `keywords` | Author-provided keywords |
| `mesh_terms` | MeSH subject headings |
| `publication_types` | Article types (Review, Clinical Trial, etc.) |
| `language` / `country` | Article language (ISO 639-2 code) and the journal's country |
| `grant_list` | Funding sources |
| `reference_count` | Number of references |
| `pubmed_url` / `doi_url` / `pmc_url` | Direct links to PubMed, DOI, and free full text |

***

### 🤖 MCP Integration

Wire this actor as a tool in your AI agent pipeline via the Apify MCP server. No custom server needed.

- **Endpoint:** `https://mcp.apify.com?tools=labrat011/pubmed-scraper`
- **Auth:** `Authorization: Bearer <APIFY_TOKEN>`
- **Works with:** Claude Desktop, Cursor, VS Code, Windsurf, Warp, Gemini CLI

**MCP config:**

```json
{
    "mcpServers": {
        "pubmed-scraper": {
            "url": "https://mcp.apify.com?tools=labrat011/pubmed-scraper",
            "headers": {
                "Authorization": "Bearer <APIFY_TOKEN>"
            }
        }
    }
}
```

Ask your AI: *"Find all clinical trials on semaglutide published in the last 2 years and summarize the findings"*

***

### 💰 Pricing

**Pay-per-result** pricing: $0.80 per 1,000 articles, plus a small one-time start fee of $0.005 per run. You only pay for the articles you scrape.

| Tier | Limit | Use case |
|------|-------|----------|
| Free Apify plan | 10 results/run | Testing and integration verification |
| Paid Apify plan | Up to 10,000 results/run | Systematic reviews, RAG pipelines, bulk research |

***

### ❓ FAQ

#### Can I get full text?

This actor returns abstracts and metadata. Check the `pmc_url` field, if present, the full text is freely available on PubMed Central. Otherwise use `doi_url` to reach the publisher.

#### What are MeSH terms?

Medical Subject Headings (MeSH) are controlled vocabulary terms assigned by NLM indexers. They help find articles on specific topics even when authors use different terminology. Use the [MeSH Browser](https://meshb.nlm.nih.gov/) to find the right term.

#### How current is the data?

PubMed is updated daily. This actor queries NCBI directly, so results reflect the current state of the database.

#### Is there a rate limit?

NCBI allows 3 requests/second without an API key. Rate limiting is built in, you don't need to configure anything.

#### What's the difference between `query` and `queriesList`?

`query` runs a single search. `queriesList` runs multiple searches in one job and merges the results, deduplicating by PMID. Use `queriesList` for systematic reviews where you need to cover multiple synonyms or related terms.

***

### 📚 Resources

- [PubMed](https://pubmed.ncbi.nlm.nih.gov/): Web interface
- [MeSH Browser](https://meshb.nlm.nih.gov/): Search MeSH terms
- [NCBI E-utilities](https://www.ncbi.nlm.nih.gov/books/NBK25501/): API documentation
- [PubMed Help](https://pubmed.ncbi.nlm.nih.gov/help/): Search syntax guide

***

**Built for researchers, AI engineers, and data scientists who need biomedical literature at scale.**

# Actor input Schema

## `mode` (type: `string`):

Select what to do: search articles, get a specific article by PMID, search by author, or search by journal.

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

General search term. Searches across title, abstract, and full text. Use queriesList for multiple queries in one run.

## `queriesList` (type: `array`):

Run multiple search queries in a single job: results are merged and deduplicated by PMID. Ideal for systematic reviews, meta-analyses, and broad topic mapping. Overrides the single Query field. Example: \["cancer immunotherapy", "CAR-T cell therapy", "checkpoint inhibitors"]

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

PubMed identifier (e.g., '33243215'). Required for Get Article mode.

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

Author name (e.g., 'Smith J', 'Zhang Wei'). Use format: LastName FirstInitial.

## `journal` (type: `string`):

Journal name (e.g., 'Nature', 'Cell', 'NEJM', 'The Lancet').

## `meshTerm` (type: `string`):

Medical Subject Heading (MeSH) term (e.g., 'Neoplasms', 'Diabetes Mellitus', 'CRISPR-Cas Systems'). Use the MeSH Browser to find exact terms.

## `publicationType` (type: `string`):

Filter by publication type to narrow results to the study design you need.

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

Start date for publication date filter. Format: YYYY/MM/DD, YYYY/MM, or YYYY (e.g., '2023/01/01' or '2023').

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

End date for publication date filter. Format: YYYY/MM/DD, YYYY/MM, or YYYY (e.g., '2024/12/31' or '2024').

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

How to sort results.

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

Maximum number of articles to return (1-10,000). Free Apify plan users are limited to 10 per run. Paid plans get up to 10,000 results, enough for systematic reviews and meta-analyses.

## `requestIntervalSecs` (type: `number`):

Minimum seconds between requests. NCBI allows max 3 requests/second without API key.

## `timeoutSecs` (type: `integer`):

Timeout for each HTTP request.

## `maxRetries` (type: `integer`):

Maximum retry attempts on failed or rate-limited requests.

## Actor input object example

```json
{
  "mode": "search_articles",
  "query": "CRISPR gene editing",
  "queriesList": [],
  "sort": "relevance",
  "maxResults": 10,
  "requestIntervalSecs": 0.34,
  "timeoutSecs": 30,
  "maxRetries": 5
}
```

# Actor output Schema

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

Dataset containing all scraped article records

# 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": "CRISPR gene editing",
    "queriesList": [],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("labrat011/pubmed-scraper").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": "CRISPR gene editing",
    "queriesList": [],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("labrat011/pubmed-scraper").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": "CRISPR gene editing",
  "queriesList": [],
  "maxResults": 10
}' |
apify call labrat011/pubmed-scraper --silent --output-dataset

```

## MCP server setup

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

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/iBqfsSC5uMVWOav7J/builds/1UYQTnCiLscf4Zedi/openapi.json
