# $3/1K | PubMed Scraper - Articles, Abstracts & Authors (`scrapercompany/pubmed-scraper`) Actor

Scrape PubMed: search with PubMed's own syntax and get full records with title, abstract, authors and affiliations, journal, dates, DOI, PMCID, MeSH terms, keywords and publication types; or read articles by PMID. Made by ScraperCompany.

- **URL**: https://apify.com/scrapercompany/pubmed-scraper.md
- **Developed by:** [ScraperCompany](https://apify.com/scrapercompany) (community)
- **Categories:** AI, Lead generation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 pubmed search pages

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 Scraper - Articles, Abstracts & Authors

**PubMed Scraper** by ScraperCompany runs **PubMed searches** and returns **full records**, up to 100 a page: **PMID, title, abstract** (with its labelled sections), **authors with affiliations**, **journal, volume and issue**, **publication date, DOI, PMCID, publication types, MeSH terms, keywords** and the article link.

### ⭐ Like this Actor? Leave a review

If PubMed Scraper saved you time, please [leave a review on the Store](https://apify.com/scrapercompany/pubmed-scraper/reviews). It takes a minute, helps other people find a scraper that works, and tells us what to build next.

> 🟢 **Nothing to set up:** no code, no login and no keys. Click **Try for free**, start a run, and export JSON, CSV or Excel, or pull the results through the Apify API. You pay only for results; failed and empty requests are free.

### 📦 What you get

| Mode | What you get | Price | Per 1,000 |
| --- | --- | --- | --- |
| `search` | One page of full PubMed records matching a query: title, abstract, authors, affiliations, journal, dates, DOI, PMCID, MeSH terms, keywords and publication types | $0.003 | $3.00 |
| `article` | One full PubMed record by PMID or PubMed link | $0.003 | $3.00 |

- 💵 **Price:** **$3 per 1,000** `search-page` events ($0.003 each); failed and empty requests are free.
- ⚙️ **Setup:** none. No account on the site, no cookies, no keys.
- 📁 **Export:** JSON, CSV, Excel or HTML from the **Output** tab, or the Apify API.
- 🔁 **Automate:** schedules, webhooks, Make, Zapier, n8n and AI agents (MCP).

### ✨ What can this PubMed scraper do?

**Article details** read records by **PMID or link**. Use PubMed's own query syntax, a date range and a sort order. No login. Pricing is pay-per-event: **$0.003 per page of up to 100 articles** and **$0.003 per article**; empty pages and unknown PMIDs are free.

- Search in **PubMed's own syntax**: field tags such as <code>\[Title]</code> and <code>\[MeSH]</code>, phrases, AND / OR / NOT.
- **Full records, up to 100 a page**, for the price of one request.
- **Abstracts** with labelled sections (background, methods, results...).
- **Authors with affiliations**, journal, dates, DOI, PMCID, MeSH terms, keywords and publication types.
- Filter by **publication date**; sort by relevance, newest, first author or journal.
- Empty pages and unknown PMIDs are free.

### 🚀 Quick start: how to scrape PubMed articles

1. Click **Try for free** (or open the Actor in Apify Console) and go to the **Input** tab.
2. Enter **Searches**, one per line, as you would type them in PubMed. For single articles, switch **Mode** and paste PMIDs or links.
3. Adjust the options if needed.
4. Click **Start** and wait for the run to finish.
5. Download the results from the **Output** tab as JSON, CSV, Excel or HTML, or fetch them with the Apify API.

💡 **Tip:** run it once with the pre-filled input to see the output, then change the input to your own.

### ⚖️ What makes it different?

| | **PubMed Scraper** | Many alternatives |
| --- | --- | --- |
| Setup | Nothing to configure: no login, no keys | Often your own accounts, cookies or network setup |
| You pay for | Successful results; failed and empty requests are free | Often run time, or every attempt |
| When a request fails | Retried automatically, and never charged | Often an empty or failed run |

### 👥 Who uses PubMed data?

- **Researchers and systematic reviews**: Export every record for a search, with abstracts and MeSH terms, ready to screen.
- **Pharma and medtech teams**: Track new publications on a drug, device or condition, newest first.
- **Data and AI teams**: Build biomedical datasets with structured abstracts, authors and affiliations.

### 🧭 Common jobs

#### Systematic review export

Run your full search string with 100 articles a page and Pages per query at 100.

#### New papers watch

Sort by newest, set Published from to last week, and schedule the run weekly.

#### Author or affiliation research

Search <code>smith j\[Author]</code> or <code>harvard\[Affiliation]</code> and read the authors field.

### 📋 What PubMed data can you extract?

| Field | Description |
| --- | --- |
| `articles[].pmid / title / link` | Which article (Search) |
| `articles[].abstract / abstract_sections` | Abstract, whole and by section |
| `articles[].authors[] (names, affiliations)` | Authors |
| `articles[].journal (title, volume, issue, issn)` | Journal |
| `articles[].publication_date / year / doi / pmcid` | Dates and identifiers |
| `articles[].mesh_terms / keywords / publication_types` | Subjects and article type |
| `total / query_translation` | Hit count and how PubMed read the search |
| `article` | One full record (Article details) |

Every dataset item also carries `input` (the options used for that request), `request_id` (quote it to support), `billed` and `scraped_at`.

### ⌨️ Input

| Input | Name | What it does |
| --- | --- | --- |
| `mode` | Mode | Search PubMed, or read articles by PMID. |
| `searches` | Searches (Search PubMed) | One search per line, in PubMed's own syntax: words, phrases, field tags such as `cancer[Title]` or `"cold water"[MeSH]`, and AND / OR / NOT. |
| `maxPages` | Pages per query | How many pages to fetch for each search (up to 100). Each page is a separate request and is charged separately; paging stops at the last page. |
| `page_size` | Articles per page | Full records per page (1-100). The price is per page. |
| `sort` | Sort | Result order: relevance, newest first, first author or journal. |
| `date_from` | Published from | Earliest publication date: `YYYY`, `YYYY/MM` or `YYYY/MM/DD`. |
| `date_to` | Published to | Latest publication date, same formats. |
| `page` | Start page | Results page to start from. |
| `articles` | Articles (Article details) | ....gov/39879231/\`. |

### 📥 Input example

This is the default input; running the Actor without changes uses it.

```json
{
  "mode": "search",
  "searches": [
    "cold-water immersion"
  ],
  "maxPages": 1,
  "page_size": 100,
  "articles": [
    "39879231"
  ],
  "includeErrors": true,
  "maxConcurrency": 3,
  "maxRetries": 2
}
```

### 📤 Output example

One dataset item per request (trimmed here; real items contain all the fields):

```json
{
  "mode": "search",
  "input": {
    "term": "cold-water immersion"
  },
  "articles": [
    {
      "abstract": "BACKGROUND: Cold-water immersion (CWI) has gained popularity as a health and wellbeing intervention among the general population.\n\nOBJECTIVE: This systematic...",
      "abstract_sections": [
        {
          "label": "BACKGROUND",
          "text": "Cold-water immersion (CWI) has gained popularity as a health and wellbeing intervention among the general population."
        },
        {
          "label": "OBJECTIVE",
          "text": "This systematic review and meta-analysis aimed to evaluate the psychological, cognitive, and physiological effects of CWI in healthy adults."
        }
      ],
      "authors": [
        {
          "fore_name": "Tara",
          "initials": "T",
          "last_name": "Cain",
          "name": "Tara Cain",
          "orcid": "0009-0005-3566-9972"
        }
      ],
      "conflict_of_interest": "The authors have declared that no competing interests exist.",
      "copyright": "Copyright: © 2025 Cain et al. This is an open access article distributed under the terms of the Creative Commons Attribution License…",
      "doi": "10.1371/journal.pone.0317615",
      "history": {
        "accepted": "2025-01-01",
        "pubmed": "2025-01-29",
        "received": "2024-08-06"
      },
      "journal": {
        "iso_abbreviation": "PLoS One",
        "issn": "1932-6203",
        "issn_type": "Electronic",
        "issue": "1",
        "pub_date": "2025",
        "title": "PloS one",
        "volume": "20"
      },
      "keywords": [],
      "languages": [
        "eng"
      ],
      "link": "https://pubmed.ncbi.nlm.nih.gov/39879231/",
      "mesh_terms": [
        {
          "descriptor": "Humans",
          "major_topic": false,
          "ui": "D006801"
        },
        {
          "descriptor": "Cold Temperature",
          "major_topic": true,
          "ui": "D003080"
        }
      ],
      "pii": "e0317615",
      "pmcid": "PMC11778651",
      "pmid": "39879231",
      "publication_date": "2025-01-29",
      "publication_status": "epublish",
      "publication_types": [
        "Journal Article",
        "Systematic Review"
      ],
      "reference_count": 50,
      "title": "Effects of cold-water immersion on health and wellbeing: A systematic review and meta-analysis.",
      "year": 2025
    }
  ],
  "meta": {
    "source": "pubmed"
  },
  "next_page": 2,
  "query_translation": "\"cold-water\"[All Fields] AND (\"immersion\"[MeSH Terms] OR \"immersion\"[All Fields])",
  "search_parameters": {
    "page": 1,
    "page_size": 10,
    "sort": "relevance",
    "term": "cold-water immersion"
  },
  "total": 1963,
  "request_id": "req_3f9c0d6e2b8a4c1f9e7d5b3a1c0e8f6d",
  "billed": true,
  "scraped_at": "2026-10-01T14:03:27.512Z"
}
```

A request that fails is saved with an `error` message instead (turn off **Include failed requests** to skip those). Failed requests are never charged.

### 💰 How much does it cost to scrape PubMed articles?

This Actor uses **pay-per-event** pricing: you pay for successful requests, not for compute time.

| Event | Charged when | Price | Per 1,000 |
| --- | --- | --- | --- |
| `search-page` | One page of up to 100 full PubMed records: title, abstract, authors with affiliations, journal, dates, DOI, MeSH terms and keywords. An empty page is free. | $0.003 | $3.00 |
| `article` | One full PubMed record by PMID or link. An unknown PMID is free. | $0.003 | $3.00 |

The **$3/1K** in the title is the price of 1,000 `search-page` events.

#### Cost examples

| Job | Cost |
| --- | --- |
| A 2,000-record search (20 pages of 100) | **$0.06** |
| 500 articles by PMID | **$1.50** |

Apify's $5 of free monthly usage covers about **1,666** `search-page` events.

- ✅ Failed requests (errors, invalid input, a site refusing after retries) are **free**.
- ✅ Requests where the source returns nothing at all (no results, nothing priced) are saved but **not charged**.
- ✅ Set **Maximum cost per run** when you start a run and the Actor stops cleanly before going over it.

### 🔌 Integrations

#### ⏰ Schedules and webhooks

Use Apify **Schedules** to repeat a run hourly, daily or weekly and compare results over time, and **webhooks** or the **Integrations** tab to push new results to Make, Zapier, n8n, Google Sheets, Slack or your own warehouse.

#### 🤖 AI agents and MCP

Results are structured JSON, so they are easy to feed to a model. AI agents such as Claude can run this Actor and read its results through the [Apify MCP server](https://mcp.apify.com).

#### 💻 API: JavaScript and Python

Call the Actor from any language through the [Apify API](https://docs.apify.com/api/v2). With the JavaScript client (`npm install apify-client`):

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('scrapercompany/pubmed-scraper').call({
    "mode": "search",
    "searches": [
        "cold-water immersion"
    ]
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

With Python (`pip install apify-client`):

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("scrapercompany/pubmed-scraper").call(run_input={
    "mode": "search",
    "searches": ["cold-water immersion"],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### ❓ FAQ

#### Do I need an account on the site, or an API key?

No. The Actor is ready to run as is, and you only pay the per-event prices above.

#### Does it use PubMed's search syntax?

Yes. The search goes to PubMed as you write it; `query_translation` shows how PubMed read it.

#### How many articles can one search return?

Up to 100 a page and 100 pages: 10,000 records. Narrow larger searches by date.

#### Does it return full text?

No. It returns the PubMed record with the abstract; `pmcid` points to the free full text in PubMed Central when there is one.

#### Is it legal to scrape PubMed articles?

The Actor collects publicly available information that anyone can see without logging in. You are responsible for how you use the results: respect the source site's terms, copyright and privacy law (such as GDPR) and do not collect personal data without a lawful basis. If in doubt, ask a lawyer.

#### What happens when a request fails?

Failed attempts are retried automatically. If a request still fails it is saved with the error message and not charged, and the rest of the batch keeps going. A run only fails when every request failed.

#### Why did a request return an error?

Read the `error` field: it says what was wrong with the input, for example a malformed date or an unknown id. Fix it and run again; failed requests cost nothing.

#### How many requests can I run at once?

Any number per run. The Actor sends up to 3 requests in parallel by default (change it under **Run options**); larger batches simply take longer.

### 🔗 Related scrapers

- [Google Patents Scraper](https://apify.com/scrapercompany/google-patents-scraper): patents by keyword
- [Internet Archive Scraper](https://apify.com/scrapercompany/internet-archive-scraper): archive.org items and Wayback snapshots
- [Google Search Scraper](https://apify.com/scrapercompany/google-search-scraper): organic results and SERP features

### 📝 Tried it? Tell others

Once you have run PubMed Scraper, a [short review on the Store](https://apify.com/scrapercompany/pubmed-scraper/reviews) helps the next person decide.

### 💬 Support

Questions, a field you need, or a site that stopped working? Open an issue on the **Issues** tab. Include the `request_id` from the dataset item so we can trace the request. We read every issue.

# Changelog

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

# Actor input Schema

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

Search PubMed, or read articles by PMID.

## `searches` (type: `array`):

One search per line, in PubMed's own syntax: words, phrases, field tags such as <code>cancer\[Title]</code> or <code>"cold water"\[MeSH]</code>, and AND / OR / NOT.

## `maxPages` (type: `integer`):

How many pages to fetch for each search (up to 100). Each page is a separate request and is charged separately; paging stops at the last page.

## `page_size` (type: `integer`):

Full records per page (1-100). The price is per page.

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

Result order: relevance, newest first, first author or journal.

## `date_from` (type: `string`):

Earliest publication date: <code>YYYY</code>, <code>YYYY/MM</code> or <code>YYYY/MM/DD</code>.

## `date_to` (type: `string`):

Latest publication date, same formats.

## `page` (type: `integer`):

Results page to start from.

## `articles` (type: `array`):

One article per line: its PMID such as <code>39879231</code> or a PubMed link such as <code>https://pubmed.ncbi.nlm.nih.gov/39879231/</code>.

## `customRequests` (type: `array`):

Optional list of JSON objects, one request each, using the field names shown above. Each object is merged over the options above, so you only need to give what differs. Add <code>"mode": "article"</code> with a <code>pmid</code> to mix in single articles. Example: <code>{"term":"semaglutide\[Title]","sort":"pub_date"}</code>

## `includeErrors` (type: `boolean`):

When on, a request that fails (for example an unknown property id) is saved as a dataset item with an <code>error</code> message so you can see what went wrong. Failed requests are never charged.

## `maxConcurrency` (type: `integer`):

How many requests run at the same time (1-8). Parallel runs share one limit, so extra requests wait for a free slot instead of failing.

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

How many times a request that failed for a temporary reason is tried again right away. A request still failing then gets one more try at the end of the run, after a 30-second pause. Invalid input is never retried.

## Actor input object example

```json
{
  "mode": "search",
  "searches": [
    "cold-water immersion"
  ],
  "maxPages": 1,
  "page_size": 100,
  "sort": "relevance",
  "page": 1,
  "articles": [
    "39879231"
  ],
  "includeErrors": true,
  "maxConcurrency": 3,
  "maxRetries": 2
}
```

# Actor output Schema

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

One dataset item per request.

## `summary` (type: `string`):

Counts of succeeded, failed, skipped and charged requests.

# 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 = {
    "searches": [
        "cold-water immersion"
    ],
    "page_size": 100,
    "articles": [
        "39879231"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapercompany/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 = {
    "searches": ["cold-water immersion"],
    "page_size": 100,
    "articles": ["39879231"],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapercompany/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 '{
  "searches": [
    "cold-water immersion"
  ],
  "page_size": 100,
  "articles": [
    "39879231"
  ]
}' |
apify call scrapercompany/pubmed-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapercompany/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/2LXUOkyrncvSPV2Tc/builds/G8DD4cBaA1kUY3Vui/openapi.json
