# PubMed Scraper: Papers, MeSH and Citations (`parselab/pubmed-research-papers-scraper`) Actor

Scrape PubMed papers by topic, author, journal, MeSH term or institution. Get abstracts, authors with affiliations and countries, MeSH terms, grants, trial registrations and NIH citation metrics such as relative citation ratio. Includes yearly publication trends. Export to CSV or Excel.

- **URL**: https://apify.com/parselab/pubmed-research-papers-scraper.md
- **Developed by:** [ParseLab](https://apify.com/parselab) (community)
- **Categories:** Other, News
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.75 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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: Papers, Abstracts, MeSH Terms and Citation Metrics

This PubMed scraper turns the biomedical literature into clean rows. Search by topic, author, journal, institution, MeSH term or publication type and get one row per paper with the title, the full abstract, the authors with their institutions and countries, the MeSH terms, keywords, grants, clinical trial registration numbers and the links to the paper, the DOI and the free full text.

Each paper also comes with the citation metrics of the National Institutes of Health: number of citations, citations per year, relative citation ratio, percentile among papers of the same age and field, how many clinical articles cite it and a translation score that shows how close the work is to human use. That is the information that literature reviews, competitive intelligence and research funding decisions need, without joining several sources by hand.

Pharma and biotech analysts, medical affairs teams, systematic reviewers, research offices, health tech builders, journalists and students use it to find and rank evidence.

### What can you do with this PubMed scraper?

- Pull all papers on a drug, a disease or a method, with abstracts
- Keep only randomized trials, meta-analyses or systematic reviews
- Rank papers by relative citation ratio or citations per year
- Find the most active institutions and countries on a topic
- Follow what one author or one journal publishes
- Look up a list of PubMed ids or DOIs with all their data
- Find papers that cite or register a clinical trial number
- Spot retracted papers and papers with a retraction notice
- Count how many papers a topic had each year and its growth
- Export to CSV or Excel, or send new papers to your own tools

### What data can you extract from PubMed?

| Mode | One row is | Highlights |
|---|---|---|
| Search articles | One paper | PubMed id, DOI, PMC id, title, abstract and its sections, journal, abbreviation, ISSN, country, volume, issue, pages, publication date, electronic date, status, authors with institutions, ORCID and country, first and last author, countries, MeSH headings with qualifiers and main topics, keywords, publication types, review, trial, randomized, meta-analysis, case report and retraction flags, trial registrations, grants and funding agencies, chemicals, number of references, links, citation count, citations per year, relative citation ratio, NIH percentile, clinical citations, translation score, human, animal and molecular scores |
| Look up | One paper by PubMed id or DOI | Same fields |
| Trends | One search term and one year | Articles, change from the year before, share of all PubMed papers, total in the year, partial year flag |

### How to scrape PubMed

1. Choose **Search articles**, **Look up** or **Publication trends**.
2. Type search terms, one per line, using plain words or PubMed syntax.
3. Add filters: authors, journals, MeSH terms, institutions, publication types, dates.
4. Set **Max Items** and click **Start**.
5. Export the dataset as CSV, Excel or from the Apify console.

### Input example

```json
{
  "mode": "articles",
  "searchTerms": ["semaglutide cardiovascular outcomes"],
  "publicationTypes": ["Randomized Controlled Trial"],
  "dateFrom": "2023",
  "includeCitationMetrics": true,
  "maxItems": 200
}
```

### Paper output example

```json
{
  "pmid": "33301246",
  "doi": "10.1056/NEJMoa2034577",
  "title": "Safety and Efficacy of the BNT162b2 mRNA Covid-19 Vaccine",
  "journal": "The New England journal of medicine",
  "publicationDate": "2020-12-31",
  "authorCount": 30,
  "referenceCount": 13,
  "citationCount": 11726,
  "relativeCitationRatio": 600.78,
  "nihPercentile": 100,
  "clinicalArticlesCiting": 610
}
```

### Trends output example

```json
{
  "searchTerm": "glp-1 receptor agonist",
  "year": 2023,
  "articles": 1494,
  "changeFromPreviousYearPct": 15.8,
  "shareOfPubMedPct": 0.088
}
```

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

You pay per result: $17 per 1,000 rows plus a tiny start fee. The free plan returns up to 10 rows per run. A trends table is one row per term and year, so it costs a few cents.

### Tips for better results

- You can use the PubMed search syntax in a term, for example heart failure\[ti] AND humans\[mh]. Plain words work too.
- PubMed returns at most 10,000 papers per search. For more, the Actor cuts the search into years when you ask for more than 9,000 rows.
- Citation metrics come from the NIH database and cover papers indexed in PubMed. Very new papers can have no relative citation ratio yet.
- Countries are read from the last part of each affiliation text, so some papers have none.
- Author names are the public names printed in the paper. Emails are not collected.
- A free NCBI access code speeds up large runs from 3 to 10 requests per second. Paste it in the optional field.
- The publication date uses the date of the journal issue. The electronic date shows when the paper first appeared online.
- Review and meta-analysis flags come from the publication types that PubMed assigns, which are added some weeks after the paper appears.

### Who uses PubMed data?

- **Pharma, biotech and medical affairs teams** map evidence and leading experts.
- **Systematic reviewers** collect and screen candidate papers.
- **Research offices and funders** measure output and impact.
- **Health tech and AI builders** feed abstracts into search and language models.
- **Journalists and students** find and compare studies.

### Automate and connect

Schedule the Actor every week with the publication date of the last seven days and send new papers to Slack, Google Sheets, Zapier, Make or n8n, or trigger a webhook when a run ends.

### FAQ

**Do I need an account or a login?**
No. The Actor works without any login. A free NCBI access code is optional.

**Does it return the full text of papers?**
No. It returns the abstract and the links. The free full text link is in the row when it exists.

**What is the relative citation ratio?**
A measure of the influence of a paper compared with other papers of the same field and year. A value of 1 is the average.

**Can I search by clinical trial number?**
Yes. Put the NCT number in a search term.

**How current is the data?**
New papers appear in PubMed within days. Citation metrics are refreshed regularly by the NIH.

**Is this medical advice?**
No. It is a list of published research. Ask a doctor about treatment.

### Legal note

This Actor collects information that is publicly visible on the website. Abstracts remain the property of their publishers. Check the source site's terms and your local rules before using the data.

### Support

Missing a field or found a bug? Open an issue from the Actor page.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000.

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

Articles returns the papers that match a search. Lookup returns papers by PubMed id or DOI. Trends returns how many papers per year match each search term.

## `searchTerms` (type: `array`):

Words or PubMed searches, for example semaglutide weight loss or glioblastoma AND immunotherapy. Each term is searched on its own and repeated papers are removed. Put one search per line.

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

Author names as written in PubMed, for example Smith JA or Fauci AS.

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

Journal names or abbreviations, for example Lancet or N Engl J Med.

## `meshTerms` (type: `array`):

Medical subject headings assigned by indexers, for example Diabetes Mellitus, Type 2.

## `affiliations` (type: `array`):

Part of an author affiliation, for example Mayo Clinic or Karolinska.

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

For example Review, Meta-Analysis, Randomized Controlled Trial, Clinical Trial, Case Reports, Systematic Review.

## `languages` (type: `array`):

For example English, Spanish, German.

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

Lookup mode. PubMed ids (PMID), for example 33301246.

## `dois` (type: `array`):

Lookup mode. DOIs, for example 10.1056/NEJMoa2034577.

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

First publication date: 2024, 2024-05 or 2024-05-31.

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

Last publication date: 2025, 2025-06 or 2025-06-30.

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

Keep papers that can be read for free.

## `hasAbstractOnly` (type: `boolean`):

Skip records that have a title only.

## `humansOnly` (type: `boolean`):

Keep papers indexed with the human subject heading.

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

Articles mode.

## `includeCitationMetrics` (type: `boolean`):

Adds citations, citations per year, relative citation ratio, percentile, clinical citations and translation score from the NIH citation database.

## `abstractMaxChars` (type: `integer`):

Cut each abstract after this many characters. Leave empty for the full abstract.

## `yearsBack` (type: `integer`):

Trends mode. How many years back to count when no dates are given.

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

Free code from your NCBI account. Without it PubMed allows 3 requests per second, with it 10, so large runs are about three times faster.

## `contactEmail` (type: `string`):

NCBI asks tools to send a contact email. It is only sent to NCBI.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "articles",
  "searchTerms": [
    "semaglutide cardiovascular outcomes"
  ],
  "freeFullTextOnly": false,
  "hasAbstractOnly": false,
  "humansOnly": false,
  "sortBy": "newest",
  "includeCitationMetrics": true,
  "yearsBack": 10
}
```

# Actor output Schema

## `overview` (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 = {
    "maxItems": 10,
    "searchTerms": [
        "semaglutide cardiovascular outcomes"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("parselab/pubmed-research-papers-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 = {
    "maxItems": 10,
    "searchTerms": ["semaglutide cardiovascular outcomes"],
}

# Run the Actor and wait for it to finish
run = client.actor("parselab/pubmed-research-papers-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 '{
  "maxItems": 10,
  "searchTerms": [
    "semaglutide cardiovascular outcomes"
  ]
}' |
apify call parselab/pubmed-research-papers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parselab/pubmed-research-papers-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/QV11aVW06JaoZtVDb/builds/JnbJhbZ17MnTrc7fd/openapi.json
