# PubMed Scraper — Abstracts + MeSH, 11 Fields, No API Key (`themineworks/pubmed-ncbi-scraper`) Actor

Scrape 36M+ PubMed/NCBI biomedical articles: title, abstract, authors, journal, PMID, DOI, MeSH terms. No API key needed. Build literature reviews & AI training corpora. Works in Claude, ChatGPT & any MCP agent.

- **URL**: https://apify.com/themineworks/pubmed-ncbi-scraper.md
- **Developed by:** [The Mine Works](https://apify.com/themineworks) (community)
- **Categories:** Other, MCP servers
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 records

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

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🧬 PubMed NCBI Scraper: Biomedical Articles & MeSH (No Key)

### Overview

PubMed NCBI Scraper pulls biomedical literature from the NCBI PubMed database, which indexes 36M+ articles across medicine, life sciences, and healthcare. Search by keyword or by PubMed field tags (`[ti]` title, `[au]` author, `[ta]` journal, `[mh]` MeSH) with optional publication date range. Get back PMID, DOI, title, abstract, authors, journal, ISSN, MeSH terms, and publication year for every matching article. No API key required, with an optional free NCBI key that raises the rate limit.

It's the fastest way to build a biomedical literature corpus, feed a clinical RAG system, or run automated literature reviews.

Reliability posture: blocked, empty, or failed searches are never charged. You only pay for an article record that was actually delivered.

✅ No API key required | ✅ Full abstracts + MeSH | ✅ 36M+ articles | ✅ MCP-ready for AI agents

### Features

Field-tagged search. PubMed's native tag syntax (`[ti]`, `[au]`, `[ta]`, `[mh]`) supported end to end.
Date range. Filter by publication date (YYYY/MM/DD).
Full abstracts. Complete abstract text on every record.
MeSH terms. Standardised biomedical vocabulary tags for every article.
Optional NCBI key. Free key lifts the rate limit from 3 to 10 requests per second.

### How it works

The actor calls the official NCBI E-utilities API (ESearch, EFetch, ESummary), which is the source PubMed itself is built on. Your query is submitted via ESearch to get the matching PMIDs, then EFetch pulls the full XML record for each PMID and normalises it into a flat JSON row.

Runs work without any credentials against NCBI's public rate limit (3 requests per second). Supplying a free NCBI API key in `ncbiApiKey` lifts the limit to 10 requests per second, which makes large runs meaningfully faster.

### 🧾 Input configuration

```json
{
  "query": "GLP-1 receptor agonist[ti] AND diabetes[mh]",
  "dateFrom": "2020/01/01",
  "dateTo": "2026/06/30",
  "maxResults": 500
}
```

### 📤 Output format

```json
{
  "pmid": "42446258",
  "title": "Evaluation of insulin, leptin, ghrelin, and adiponectin levels in type 2 diabetic patients receiving combined metformin-sulfonylurea therapy.",
  "abstract": "Type 2 diabetes mellitus (T2DM) is a chronic metabolic disorder, which is commonly related to reduced insulin responsiveness and altered appetite-related hormones. In this study, we have evaluated how combined metformin and sulfonylurea therapy affects glycemic indicators and appetite hormones, with special focus on hormone ratios...",
  "authors": ["S M Hussein", "N K Zaidan"],
  "journal": "Biomeditsinskaia khimiia",
  "issn": "2310-6972",
  "year": "2026",
  "doi": "10.18097/PBMCE0047",
  "mesh_terms": [
    "Humans",
    "Diabetes Mellitus, Type 2",
    "Metformin",
    "Adiponectin",
    "Leptin",
    "Ghrelin",
    "Insulin",
    "Female",
    "Male",
    "Middle Aged",
    "Sulfonylurea Compounds",
    "Insulin Resistance",
    "Hypoglycemic Agents",
    "Blood Glucose",
    "Drug Therapy, Combination",
    "Adult",
    "Glycated Hemoglobin"
  ],
  "url": "https://pubmed.ncbi.nlm.nih.gov/42446258/",
  "scraped_at": "2026-07-15T04:22:06.073Z"
}
```

This is a genuine article record from a live run against the real PubMed database. Note: the actor's field is `url`, not `article_url`, and there is no separate `publication_date` field; `year` is the field actually returned.

Every article record contains these fields:

| Field | Description |
| --- | --- |
| 🆔 `pmid` | PubMed identifier |
| 📄 `title` | Article title |
| 📝 `abstract` | Full abstract text |
| 👥 `authors` | Array of author names |
| 📰 `journal` | Journal name |
| 🔢 `issn` | Journal ISSN |
| 📅 `year` | Publication year |
| 🔗 `doi` | Digital Object Identifier |
| 🏷️ `mesh_terms` | Array of MeSH (Medical Subject Headings) terms |
| 🌐 `url` | Canonical PubMed URL |
| 🕒 `scraped_at` | ISO timestamp of when the record was captured |

### 💼 Common use cases

**Systematic reviews & meta-analyses**
Pull every article on a topic in a date range and load into a review-management tool.
Filter by MeSH term for reproducible search strategies.

**Clinical RAG & AI assistants**
Feed biomedical abstracts into a retrieval-augmented generation system for a clinical decision-support tool.
Build a specialty-specific corpus (cardiology, oncology, endocrinology) for an AI agent.

**Pharma competitive intel**
Track publications on a molecule or mechanism across time.
Monitor a competitor's key opinion leaders by author search.

**Grant & academic research support**
Build reference lists for a grant application or a paper's introduction.
Monitor a lab's or institution's publication output.

### 🚀 Getting started

1. Open the actor and enter a PubMed `query`. Use tags for precision (`GLP-1 receptor agonist[ti] AND diabetes[mh]`).
2. Optionally set `dateFrom` and `dateTo` (YYYY/MM/DD).
3. Set `maxResults` to control cost.
4. Optionally paste a free NCBI key in `ncbiApiKey` for higher rate limits.
5. Click Start. Records stream to the dataset as pages parse.

### FAQ

**Do I need an NCBI API key?**
No. Runs work keyless at NCBI's public rate limit. A free NCBI key (from ncbi.nlm.nih.gov/account/settings/) lifts the rate limit and makes large runs significantly faster.

**What PubMed field tags are supported?**
All of them. Use `[ti]` title, `[au]` author, `[ta]` journal abbreviation, `[mh]` MeSH, `[dp]` publication date, and any others documented by PubMed. Combine with `AND`, `OR`, `NOT` and parentheses.

**How much does it cost?**
Pay per article returned, pay as you go. No subscription, no monthly minimum.

**Can I use it in an AI agent?**
Yes. It's exposed as an MCP tool. See below.

### Use in Claude, ChatGPT & any MCP agent

```
https://mcp.apify.com/?tools=themineworks/pubmed-ncbi-scraper
```

Or call it programmatically with the Apify client:

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('themineworks/pubmed-ncbi-scraper').call({
  query: 'GLP-1 receptor agonist[ti] AND diabetes[mh]',
  dateFrom: '2023/01/01',
  maxResults: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### 🛠️ Complete your biomedical research pipeline

Got the articles. Now widen the corpus:

- **[arXiv Paper Scraper](https://apify.com/themineworks/arxiv-preprint-search)**: pull preprints on the same topic before they hit a journal.
- **[Crossref Scholarly Metadata](https://apify.com/themineworks/crossref-scholarly-metadata)**: pull citation counts and journal metadata for any DOI.
- **[FDA Recalls Scraper](https://apify.com/themineworks/fda-recalls-scraper)**: cross-reference drug or device safety history.

Typical flow: pubmed pulls the peer-reviewed evidence, arxiv adds preprints, fda-recalls checks safety signals.

Questions or need a custom field set? Reach out through the Apify profile.

# Actor input Schema

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

PubMed search query. Supports field tags: \[ti] title, \[au] author, \[ta] journal, \[mh] MeSH. E.g. GLP-1 receptor agonist\[ti] AND diabetes\[mh]

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

Filter articles published from this date.

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

Filter articles published up to this date.

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

Free key from ncbi.nlm.nih.gov/account/settings/ lifts rate limit from 3 to 10 requests/sec.

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

Maximum articles to return.

## Actor input object example

```json
{
  "query": "GLP-1 receptor agonist diabetes",
  "dateFrom": "2020/01/01",
  "maxResults": 25
}
```

# Actor output Schema

## `results` (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 = {
    "query": "GLP-1 receptor agonist diabetes",
    "dateFrom": "2020/01/01",
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("themineworks/pubmed-ncbi-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": "GLP-1 receptor agonist diabetes",
    "dateFrom": "2020/01/01",
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("themineworks/pubmed-ncbi-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 receptor agonist diabetes",
  "dateFrom": "2020/01/01",
  "maxResults": 25
}' |
apify call themineworks/pubmed-ncbi-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=themineworks/pubmed-ncbi-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/oB9vACf6OuYcpf9AX/builds/4NXTfxiLPPrBPgAJ6/openapi.json
