# PubMed Article Search Scraper (`dabooti/pubmed-search-scraper`) Actor

Search PubMed and export articles with title, abstract, authors, affiliations, journal, publication date, MeSH terms, keywords, DOI and PMC link. Filter by date or fetch by PMID. Official NCBI API, no key.

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

## Pricing

from $2.50 / 1,000 articles

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Article Search Scraper

Search PubMed and export biomedical articles with title, full abstract, authors, affiliations, journal, volume, issue, pages, publication date, publication types, MeSH terms, keywords, DOI, PMCID and free full-text link. Use any PubMed query, filter by publication date, or fetch articles by PMID. Export to JSON, CSV or Excel.

It uses NCBI's official E-utilities API. No login, API key or proxy needed.

### What you can use it for

- **Systematic and literature reviews**: export every match for a search string with abstracts and MeSH terms.
- **Clinical and pharma research**: track new publications on a drug, disease or method.
- **AI and NLP datasets**: build abstract corpora labelled with MeSH terms and publication types.
- **Bibliometrics**: analyse journals, publication years and institutions.
- **Reference management**: get DOIs and PMC links for a list of PMIDs.

### What data you get

| Field | Description |
|---|---|
| `pmid`, `pubmedUrl` | PubMed ID and link |
| `title`, `abstract` | Title and full abstract (structured abstracts keep their section labels) |
| `authors`, `affiliations` | Author names and institutions |
| `journal`, `journalAbbreviation`, `volume`, `issue`, `pages` | Citation details |
| `publicationDate` | Publication date (YYYY-MM-DD, YYYY-MM or YYYY) |
| `publicationTypes`, `language` | For example Journal Article, Review, Randomized Controlled Trial |
| `meshTerms`, `keywords` | MeSH descriptors and author keywords |
| `doi`, `doiUrl` | DOI and link |
| `pmcid`, `freeFullTextUrl` | PubMed Central ID and free full-text link when available |
| `query`, `scrapedAt` | Matching query and scrape time |

### How to use it

1. Add **Search queries** exactly as you would type them on pubmed.ncbi.nlm.nih.gov (field tags like `[MeSH]`, `[tiab]`, `[au]` work).
2. Optionally add **PMIDs**, a **Published from / to** range and the **Sort**.
3. Click **Start** and export from the **Output** tab.

#### Example input

```json
{
  "queries": ["\"sepsis\"[MeSH] AND children[tiab]", "CRISPR AND malaria"],
  "dateFrom": "2024",
  "dateTo": "2026-06",
  "sortBy": "newest",
  "maxResultsPerQuery": 500
}
```

#### Example output

One record from a real run:

```json
{
  "query": "antimicrobial resistance machine learning",
  "pmid": "33724378",
  "title": "Machine learning and applications in microbiology.",
  "abstract": "To understand the intricacies of microorganisms at the molecular level requires making sense of copious volumes of data such that it may now be humanly impossible to detect insightful data patterns without an artificial intelligence application called machine learning. Applying machine learning to address biological problems is expected to grow at an unprecedented rate, yet it is perceived by the uninitiated as a mysterious and daunting entity entrusted to the domain of mathematicians and computer scientists. The aim of this review is to identify key points required to start the journey of becoming an effective machine learning practitioner. These key points are further reinforced with an evaluation of how machine learning has been applied so far in a broad scope of real-life microbiology examples. This includes predicting drug targets or vaccine candidates, diagnosing microorganisms causing infectious diseases, classifying drug resistance against antimicrobial medicines, predicting disease outbreaks and exploring microbial interactions. Our hope is to inspire microbiologists and other related researchers to join the emerging machine learning revolution.",
  "authors": [
    "Stephen J Goodswen",
    "Joel L N Barratt",
    "Paul J Kennedy",
    "Alexa Kaufer",
    "Larissa Calarco",
    "John T Ellis"
  ],
  "affiliations": [
    "School of Life Sciences, University of Technology Sydney (UTS), 15 Broadway, Ultimo, NSW 2007, Australia",
    "Parasitic Diseases Branch, Division of Parasitic Diseases and Malaria, Center for Global Health, Centers for Disease Control and Prevention, 1600 Clifton Rd, Atlanta, GA 30333, USA",
    "School of Computer Science, Faculty of Engineering and Information Technology and the Australian Artificial Intelligence Institute, University of Technology Sydney (UTS), 15 Broadway, Ultimo, NSW 2007, Australia"
  ],
  "journal": "FEMS microbiology reviews",
  "journalAbbreviation": "FEMS Microbiol Rev",
  "volume": "45",
  "issue": "5",
  "pages": null,
  "publicationDate": "2021-09-08",
  "publicationTypes": [
    "Journal Article",
    "Review"
  ],
  "language": [
    "eng"
  ],
  "meshTerms": [
    "Artificial Intelligence",
    "Machine Learning"
  ],
  "keywords": [
    "K-means clustering",
    "classification",
    "machine learning",
    "microbiology",
    "supervised learning",
    "unsupervised learning"
  ],
  "doi": "10.1093/femsre/fuab015",
  "pmcid": "PMC8498514",
  "pubmedUrl": "https://pubmed.ncbi.nlm.nih.gov/33724378/",
  "doiUrl": "https://doi.org/10.1093/femsre/fuab015",
  "freeFullTextUrl": "https://pmc.ncbi.nlm.nih.gov/articles/PMC8498514/",
  "scrapedAt": "2026-11-14T18:10:04.888Z"
}
```

### Pricing

Pay per event: **$2.50 per 1,000 articles** saved, plus a tiny standard start fee and Apify platform usage (usually a fraction of a cent per run). Set **Max cost per run** to cap spending.

### Tips and limits

- Up to 9,999 articles per query (the E-utilities limit). For larger result sets, split the query by publication year.
- The Actor stays under NCBI's limit of 3 requests per second and fetches 200 articles per request, so 1,000 articles take about 10 seconds.
- Some older articles have no abstract in PubMed; `abstract` is then empty.
- E-mail addresses that sometimes appear inside affiliation text are removed.
- A `RUN_SUMMARY` record shows total matches and articles saved per query.

### FAQ

**Can I get the full text?** When an article is in PubMed Central, `freeFullTextUrl` links to the free full text. The Actor itself exports metadata and abstracts.

**Does it support the same search syntax as the PubMed website?** Yes, queries go to the same search engine.

### Legal note

This Actor uses NCBI's public E-utilities API within its usage guidelines. PubMed abstracts may be protected by copyright held by publishers; check the terms before redistributing them. This Actor is not affiliated with NCBI or the NLM.

# Actor input Schema

## `queries` (type: `array`):

PubMed search terms. Full PubMed syntax works, for example "sepsis"\[MeSH] AND children\[tiab] or smith j\[au].

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

Optional. Fetch specific articles by PubMed ID or URL.

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

Order of search results.

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

Optional, YYYY, YYYY-MM or YYYY-MM-DD (publication date).

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

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

## `includeAbstract` (type: `boolean`):

Turn off for smaller exports with metadata only.

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

Up to 9,999 (the PubMed API limit per query). Split by date range to get more.

## Actor input object example

```json
{
  "queries": [
    "antimicrobial resistance machine learning"
  ],
  "sortBy": "relevance",
  "includeAbstract": true,
  "maxResultsPerQuery": 50
}
```

# Actor output Schema

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

No description

## `resultsFull` (type: `string`):

No description

## `summary` (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 = {
    "queries": [
        "antimicrobial resistance machine learning"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dabooti/pubmed-search-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 = { "queries": ["antimicrobial resistance machine learning"] }

# Run the Actor and wait for it to finish
run = client.actor("dabooti/pubmed-search-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 '{
  "queries": [
    "antimicrobial resistance machine learning"
  ]
}' |
apify call dabooti/pubmed-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dabooti/pubmed-search-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/oz3DzMAsvfqHsuUFt/builds/KIqg695GirQ7i5Ld1/openapi.json
