# PubMed Scraper: Abstracts, Authors, MeSH, DOIs, Citations (`joesimo/pubmed-articles`) Actor

Search PubMed through the official NCBI E-utilities API or look up PMIDs, PMCIDs and DOIs. Get titles, abstracts, authors, affiliations, journals, MeSH terms, DOIs, PMC links and NIH iCite citation counts. No login. Failed or empty inputs are free.

- **URL**: https://apify.com/joesimo/pubmed-articles.md
- **Developed by:** [Joe Simo](https://apify.com/joesimo) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 articles

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: Abstracts, Authors, MeSH, DOIs, Citations

Search PubMed through the official NCBI E-utilities API and get one clean row per article: title, abstract, authors, affiliations, journal, dates, publication types, MeSH terms, keywords, grants, DOI, PubMed Central link and citation counts from NIH iCite. Search with plain keywords or full PubMed syntax, or look up PMIDs, PMCIDs and DOIs.

Empty input runs a short demo of 20 recent CRISPR therapy reviews, so you can try the Actor from the Store without filling in a form.

**$0.001 per article** ($1.00 per 1,000). Invalid inputs, unknown ids and searches with no matches are saved as free status rows. You are not charged for errors.

This Actor is an independent tool. It is not affiliated with or endorsed by the National Library of Medicine (NLM), NCBI or NIH.

### What you get

Each paid row has `status: ok` and `kind: article` (or `book` for NCBI Bookshelf records), with:

- `pmid`, `url`, `doi`, `doiUrl`, `pmcid`, `pmcUrl` (free full text when the article is in PubMed Central)
- `title`, `abstract`, `abstractSections` (labels such as BACKGROUND, METHODS, RESULTS for structured abstracts)
- `authors`, `authorCount`, `firstAuthor`, `lastAuthor`, `affiliations`, `authorDetails` (names, initials, ORCID, affiliations per author)
- `journal`, `journalAbbrev`, `issn`, `eissn`, `volume`, `issue`, `pages`
- `pubDate`, `pubYear`, `articleDate` (online date), `pubmedDate` (date added to PubMed)
- `publicationTypes`, `isReview`, `isRetracted`, `language`
- `meshTerms` (descriptor, major topic flag, qualifiers), `meshMajorTopics`, `keywords`, `chemicals`, `grants`
- `citationCount`, `relativeCitationRatio`, `nihPercentile`, `isClinical`, `citedByClinicalCount` (NIH iCite, no extra charge)
- `query`, `source`, `rank` (position in the search results), `scrapedAt`

An article that matches two of your searches is saved and charged once.

### How to run it

| Goal | Input |
| --- | --- |
| Keyword search | `"searchTerms": ["semaglutide cardiovascular outcomes"]` |
| Several topics in one run | `"searchTerms": ["long covid fatigue", "GLP-1 alcohol use disorder"]` |
| PubMed syntax | `"searchTerms": ["CRISPR[ti] AND sickle cell[tiab]"]` |
| Only trials or reviews | `"publicationTypes": ["Randomized Controlled Trial"]` or `["Systematic Review", "Meta-Analysis"]` |
| Date window | `"dateFrom": "2024", "dateTo": "2025-06-30"` |
| New articles this week | `"searchTerms": ["tirzepatide"], "dateType": "edat", "dateFrom": "2026-11-03", "sort": "most_recent"` |
| Free full text only | `"freeFullTextOnly": true` |
| Specific articles | `"pmids": ["33283989", "PMC7279235", "10.1056/NEJMoa2031054"]` |
| An author's papers | `"searchTerms": ["Doudna JA[au]"]` |

**Max articles per search** (default 100, up to 9,999) and **Max articles in total** cap the run. Sort by best match (default), publication date or most recent.

### Good uses

- Literature review and systematic review screening lists with abstracts and MeSH terms.
- Weekly alerts on a drug, disease or gene, sent to Slack, email or Google Sheets with an Apify schedule.
- Finding the most cited papers on a topic with iCite citation counts and relative citation ratios.
- Datasets of titles and abstracts for embeddings, RAG or topic models.
- Tracking a lab's, journal's or institution's output.

### How it works

- Searches go to NCBI ESearch (with the search history server), then records are fetched with EFetch in pages of 100. No HTML pages, no browser, no proxy, no login.
- NCBI allows 3 requests per second without an API key. The Actor sends at most 2.5 per second over one connection, and identifies itself with the `tool` and `email` parameters NCBI asks for. With your own NCBI API key it goes faster.
- Citation metrics come from the NIH iCite API in one request per page of articles.
- Email addresses inside affiliation strings are removed.

Tested on Apify on Nov 10, 2026: two keyword searches (semaglutide, long covid fatigue) returned 1,000 articles in 48 seconds at 512 MB, with 934 abstracts, 992 DOIs, 604 PMC links and iCite metrics for 895. Platform usage was about $0.0066, under 0.7% of the $1.00 that 1,000 articles cost.

### Pricing

| Event | Price | When it is charged |
| --- | --- | --- |
| `article` | $0.001 | One article row with `status: ok` |
| (free) | $0 | `failed`, `not_found`, `invalid_input`, `empty` |

Examples: the 20-article demo costs $0.02. A search that returns 500 articles costs $0.50. Apify keeps 20% of pay-per-event revenue as its commission.

### Input example

```json
{
  "searchTerms": ["semaglutide cardiovascular outcomes"],
  "publicationTypes": ["Randomized Controlled Trial"],
  "dateFrom": "2022",
  "sort": "relevance",
  "maxResultsPerQuery": 200
}
```

### Output example

Real row from cloud run wXrkyNgmhJhS4e9Ph (Nov 10, 2026), shortened where marked with `...`. `authorDetails`, `affiliations`, `meshTerms`, `chemicals` and `grants` are left out here to keep it short.

```json
{
  "status": "ok",
  "kind": "article",
  "pmid": "33283989",
  "url": "https://pubmed.ncbi.nlm.nih.gov/33283989/",
  "doi": "10.1056/NEJMoa2031054",
  "doiUrl": "https://doi.org/10.1056/NEJMoa2031054",
  "pmcid": null,
  "pmcUrl": null,
  "title": "CRISPR-Cas9 Gene Editing for Sickle Cell Disease and β-Thalassemia.",
  "abstract": "Transfusion-dependent β-thalassemia (TDT) and sickle cell disease (SCD) are severe monogenic diseases with severe and ...",
  "abstractSections": [],
  "authors": [
    "Haydar Frangoul",
    "David Altshuler",
    "M Domenica Cappellini",
    "..."
  ],
  "authorCount": 26,
  "firstAuthor": "Haydar Frangoul",
  "lastAuthor": "Selim Corbacioglu",
  "journal": "The New England journal of medicine",
  "journalAbbrev": "N Engl J Med",
  "issn": null,
  "eissn": "1533-4406",
  "volume": "384",
  "issue": "3",
  "pages": "252-260",
  "pubDate": "2021-01-21",
  "pubYear": 2021,
  "articleDate": "2020-12-05",
  "pubmedDate": "2020-12-08",
  "publicationTypes": [
    "Clinical Trial",
    "Journal Article",
    "Research Support, Non-U.S. Gov't"
  ],
  "isReview": false,
  "isRetracted": false,
  "language": "eng",
  "meshMajorTopics": [
    "Anemia, Sickle Cell",
    "CRISPR-Cas Systems",
    "Fetal Hemoglobin",
    "Gene Editing",
    "Genetic Therapy",
    "Repressor Proteins",
    "beta-Thalassemia"
  ],
  "keywords": [],
  "publicationStatus": "ppublish",
  "citationStatus": "MEDLINE",
  "citationCount": 1491,
  "relativeCitationRatio": 82.93,
  "nihPercentile": 100,
  "isClinical": true,
  "citedByClinicalCount": 25,
  "query": "33283989",
  "source": "id"
}
```

The OUTPUT record in the key-value store has a run summary: articles saved, total PubMed matches and the query translation PubMed used for each search, request counts and the stop reason.

### Limits and notes

- PubMed pages through at most the first 10,000 matches of one search. Split bigger pulls by date range.
- Very new articles often have no iCite metrics yet (`citationCount` null or 0).
- PubMed records are provided by NLM. Some abstracts are under publisher copyright; check the terms before you republish them. The Actor returns links to full text, not full text files.
- Large runs (thousands of articles) are best scheduled on weekends or between 9 PM and 5 AM US Eastern time, as NCBI recommends.

### Integrations and API

Run it from the Apify API, a schedule, Make, Zapier, n8n, Google Sheets, webhooks or the Apify MCP server. Results are a standard Apify dataset (JSON, CSV, Excel, XML).

### FAQ

**Do I need an NCBI account or API key?** No. A key is optional and only makes very large runs faster.

**Does it support PubMed search syntax?** Yes. Field tags such as `[ti]`, `[tiab]`, `[au]`, `[mh]` and `[journal]`, quotes, and AND, OR, NOT work as on pubmed.ncbi.nlm.nih.gov. The run summary shows how PubMed translated each search.

**Are failed lookups charged?** No. Only `status: ok` article rows are charged.

**Can I get full text?** When an article is in PubMed Central, `pmcUrl` links to the free full text. Reuse of full text depends on each article's license.

# Actor input Schema

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

PubMed searches, one per line. Plain keywords work, and so does full PubMed syntax (AND, OR, NOT, "phrases", field tags such as \[ti], \[tiab], \[au], \[mh], \[journal]). Leave this and PMIDs empty for a demo of 20 recent CRISPR therapy reviews.

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

Look up specific articles: PMIDs (33283989), PubMed URLs, PMCIDs (PMC7279235) or DOIs (10.1056/NEJMoa2031054).

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

Only keep these PubMed publication types, matched with OR. Examples: Review, Systematic Review, Meta-Analysis, Randomized Controlled Trial, Clinical Trial, Case Reports, Guideline.

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

YYYY, YYYY-MM or YYYY-MM-DD. Applies to searches, not to PMID lookups.

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

YYYY, YYYY-MM or YYYY-MM-DD.

## `dateType` (type: `string`):

Which date the range filters on. Publication date is what most people want; Entrez date is when the record was added to PubMed (best for monitoring new articles).

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

Only articles with a free full text link (PubMed filter "free full text").

## `language` (type: `string`):

Optional article language in English words, for example english, spanish, german.

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

Best match is PubMed's relevance ranking. Publication date gives newest first. Most recent gives the newest additions to PubMed first.

## `maxResultsPerQuery` (type: `integer`):

Stop each search after this many articles. PubMed pages through at most the first 10,000 matches of a search; split large searches by date range.

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

Hard cap on paid articles for the whole run. 0 means no cap (the run still stops at your maximum cost per run).

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

Adds citationCount, relativeCitationRatio, nihPercentile and isClinical from the NIH iCite API. Very new articles may have no metrics yet. No extra charge.

## `includeAuthorDetails` (type: `boolean`):

Adds authorDetails: last name, fore name, initials, ORCID and affiliations per author. Turn off for smaller rows.

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

Your own free NCBI API key raises the request limit from 3 to 10 per second, which speeds up very large runs. Not needed for normal use.

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

Timeout for one NCBI request.

## Actor input object example

```json
{
  "searchTerms": [
    "semaglutide cardiovascular outcomes"
  ],
  "pmids": [],
  "publicationTypes": [],
  "dateType": "pdat",
  "freeFullTextOnly": false,
  "sort": "relevance",
  "maxResultsPerQuery": 100,
  "maxItems": 0,
  "includeCitationMetrics": true,
  "includeAuthorDetails": true,
  "timeoutSecs": 60
}
```

# Actor output Schema

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

One item per article, plus free status rows for failed, empty or invalid inputs.

## `runSummary` (type: `string`):

JSON summary: articles saved, total matches and PubMed query translation per search, request counts and stop reason.

# 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 = {
    "searchTerms": [
        "semaglutide cardiovascular outcomes"
    ]
};

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

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

```

## MCP server setup

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

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/2WcFc0Wnu4oO1WdHS/builds/LFRA7AfW9GOPFiGjw/openapi.json
