# PubMed Scraper — Bulk Abstracts API for Pharma R\&D (`azureblue/pubmed-abstract-scraper`) Actor

Scrape PubMed abstracts by keyword with optional date filtering. Returns title, authors, DOI, abstract, journal, and publication date as structured JSON.

- **URL**: https://apify.com/azureblue/pubmed-abstract-scraper.md
- **Developed by:** [azureblue](https://apify.com/azureblue) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$8.00 / 1,000 results

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?

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 Scraper — Bulk Abstracts API for Pharma R\&D

**Bulk-extract structured PubMed abstracts by keyword, MeSH, author, or date range. Built for pharma R\&D teams, systematic reviewers, and competitive-intelligence analysts who need clean JSON, not a browser session.**

***

### What this Actor does

Data source: [NCBI E-utilities](https://www.ncbi.nlm.nih.gov/books/NBK25497/) — the official PubMed API. No key required (3 req/sec uncapped).

Output is one JSON record per result, conforming to the **`azureblue/medical-core` envelope** so you can join across our other actors on `sourceUrl` and `dataHash`.

***

### Use Cases

#### 1. Systematic literature review automation

A researcher writing a meta-analysis on long-COVID neurology pulls 500 abstracts in one run with `keyword: "long COVID cognitive impairment"`. **Saves 6-10 hours/week** of manual PubMed-portal trawling and integrates directly with Zotero/Rayyan/Excel.

#### 2. Pharma competitive intelligence

A pharma CI analyst tracks every new publication on a competitor's molecule with a scheduled weekly run on `keyword: "semaglutide cardiovascular"`. **Detects investigator-led-study signals 2-4 weeks before press release**.

#### 3. Medical education content pipeline

A med-ed startup ingests current ESC heart-failure guidelines into their LLM-powered MCQ generator. **Refresh every 2 weeks** to keep question banks current without manual curation.

***

### Input

```json
{
  "keyword": "myocardial infarction reperfusion",
  "maxResults": 50,
  "dateFrom": "2022-01-01"
}
```

***

### Output (sample item)

```json
{
  "pmid": "38123456",
  "title": "Outcomes of primary PCI vs thrombolysis in STEMI: a meta-analysis",
  "authors": [
    "M\u00fcller A",
    "Schmidt B",
    "Jensen C"
  ],
  "doi": "10.1016/j.jacc.2023.11.042",
  "abstract": "Background: Primary PCI is the standard of care for STEMI... Conclusions: PCI significantly reduces 30-day mortality (OR 0.63, 95% CI 0.54\u20130.74).",
  "pubDate": "2024-01-15",
  "journal": "Journal of the American College of Cardiology"
}
```

***

### Pricing

| Event | Price | When it fires |
|---|---|---|
| **Per result** | **$0.008** | Per scraped record pushed to the dataset |

**Trial mode**: pass `mode: "trial"` to get 5 results free with no charges. Use it to evaluate output shape before subscribing.

Pricing on this Actor will rise on **2026-06-17** in line with our [monetization tier upgrade](https://apify.com/azureblue). Subscribers active before then keep the current price.

***

### Compliance

- **Public-data only** — every endpoint is the source's official public interface. No login walls, no PHI, no paywalled content.
- **GDPR Art. 6(1)(f) / equivalent** — buyer is responsible for downstream use of the extracted data.
- **Source attribution** — every dataset item includes `sourceUrl` linking back to the canonical source.

***

### Sister Actors — complementary coverage from `azureblue`

- [`clinical-trials-scraper`](https://apify.com/azureblue/clinical-trials-scraper)
- [`cochrane-review-scraper`](https://apify.com/azureblue/cochrane-review-scraper)
- [`bmj-lancet-article-scraper`](https://apify.com/azureblue/bmj-lancet-article-scraper)
- [`medical-conference-scraper`](https://apify.com/azureblue/medical-conference-scraper)

***

### Changelog

See `CHANGELOG.md` in this Actor.

# Actor input Schema

## `keyword` (type: `string`):

PubMed search query. Supports MeSH terms, author names, or free text. Example: 'myocardial infarction treatment' or 'BRCA1\[gene]'.

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

Maximum number of abstracts to retrieve (1–10,000).

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

Filter results published on or after this date. Format: YYYY-MM-DD.

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

Filter results published on or before this date. Format: YYYY-MM-DD. Defaults to today.

## Actor input object example

```json
{
  "keyword": "myocardial infarction treatment",
  "maxResults": 100,
  "dateFrom": "2020-01-01",
  "dateTo": "2024-12-31"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Open the run's default dataset to view, filter and export the scraped items.

# 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 = {
    "keyword": "myocardial infarction treatment"
};

// Run the Actor and wait for it to finish
const run = await client.actor("azureblue/pubmed-abstract-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 = { "keyword": "myocardial infarction treatment" }

# Run the Actor and wait for it to finish
run = client.actor("azureblue/pubmed-abstract-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 '{
  "keyword": "myocardial infarction treatment"
}' |
apify call azureblue/pubmed-abstract-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,azureblue/pubmed-abstract-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/0TFW9GjOwbnlBU1xV/builds/8nbWXsUb1rgyQSDa1/openapi.json
