# PubMed Research Articles & Biomedical Metadata Scraper (`plainkitbin/pubmed-research-articles`) Actor

Extract PubMed research article bibliographic metadata (PMID, title, journal, publication dates, DOI, PMC ID, ISSN, author count, first author) via the US NIH/NLM NCBI E-utilities JSON API. Metadata only; no abstracts or emails.

- **URL**: https://apify.com/plainkitbin/pubmed-research-articles.md
- **Developed by:** [PlainKit bin](https://apify.com/plainkitbin) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.80 / 1,000 pubmed article records

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/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 Research Articles & Biomedical Metadata Scraper

`plainkitbin/pubmed-research-articles`: Extract structured bibliographic metadata from the US NIH/NLM NCBI PubMed E-utilities JSON API without an API key or proxy. Designed for biomedical research pipelines, clinical literature monitoring, citation indexing, and AI agents.

### Introduction

Clinical intelligence teams, medical librarians, biotech analysts, and research engineers need clean PubMed article metadata without writing custom XML/JSON parsers or managing E-utilities throttling. This Actor queries PubMed's `esearch` and `esummary` JSON endpoints, respects the NCBI rate limit (at most 3 requests per second with `>= 0.35s` spacing), batches summaries up to 100 PMIDs per request, and emits clean bibliographic rows.

**Metadata-only copyright and privacy boundary:** This Actor intentionally outputs bibliographic metadata only (`pmid`, `title`, `journal`, `full_journal_name`, `pub_date`, `epub_date`, `sort_pub_date`, `volume`, `issue`, `pages`, `pub_types`, `language`, `doi`, `pmc_id`, `issn`, `author_count`, `first_author`, and `pubmed_url`). It never retrieves or emits publisher abstracts, full article text, or personal email addresses.

This Actor is an independent tool and is not affiliated with the US National Institutes of Health (NIH), National Library of Medicine (NLM), or NCBI. Bibliographic records are sourced from the public US NIH/NLM NCBI E-utilities service (public domain US government information with acknowledgment to NLM).

### Pricing

The price is **$0.004** per delivered PubMed article record on the `FREE` tier of Apify Pay-Per-Event (event name: `pubmed-article-record`).

- Event name: `pubmed-article-record`
- Pricing model: Apify Pay-Per-Event
- Tiered pricing:
  - FREE: $0.004 per record
  - BRONZE: $0.0036 per record
  - SILVER: $0.0032 per record
  - GOLD: $0.0028 per record
  - PLATINUM: $0.0028 per record
  - DIAMOND: $0.0026 per record

Each article record is pushed to the dataset first and charged right after a successful push. A refused charge stops work immediately and that row stays delivered and uncharged; a reached spending limit stops work after that row was charged. Failed upstream requests push nothing and charge nothing. If the platform restarts or resumes a run, previously delivered articles are recognized by `pmid` and are never pushed or charged twice.

### Input and Output Examples

#### Example Input

```json
{
  "query": "oncology clinical trial",
  "sort": "relevance",
  "max_items": 5
}
```

#### Example Output

```json
{
  "pmid": "40055572",
  "title": "Hallmarks of artificial intelligence contributions to precision oncology.",
  "journal": "Nat Cancer",
  "full_journal_name": "Nature cancer",
  "pub_date": "2025 Mar",
  "epub_date": "2025 Mar 7",
  "sort_pub_date": "2025/03/01 00:00",
  "volume": "6",
  "issue": "3",
  "pages": "417-431",
  "pub_types": [
    "Journal Article",
    "Review"
  ],
  "language": "eng",
  "doi": "10.1038/s43018-025-00917-2",
  "pmc_id": "PMC11957836",
  "issn": "2662-1347",
  "author_count": 5,
  "first_author": "Chang TG",
  "pubmed_url": "https://pubmed.ncbi.nlm.nih.gov/40055572/"
}
```

### Configuration

| Field | Type | Description | Default |
| --- | --- | --- | --- |
| `query` | String (required) | PubMed search query (keywords, MeSH terms, author, or journal filter). | `"oncology clinical trial"` (prefill) |
| `min_date` | String | Earliest publication date in `YYYY/MM/DD` or `YYYY-MM-DD` format. | `""` |
| `max_date` | String | Latest publication date in `YYYY/MM/DD` or `YYYY-MM-DD` format. | `""` |
| `sort` | String (select) | `relevance` or `pub_date` (newest publication date first). | `"relevance"` |
| `max_items` | Integer (1-500) | Maximum number of PubMed article records to output. | `25` |

### Reliability and Limitations

- **Rate limiting & retries**: Requests are sent exclusively to `eutils.ncbi.nlm.nih.gov` with `>= 0.35s` spacing (`<= 3 req/s`), zero redirect hops, and bounded exponential-backoff retries on transient HTTP `429`, `500`, `502`, `503`, `504`, and network `FETCH_ERROR` failures. Persistent upstream failures raise a clear error with zero unpushed charges.
- **Date range handling**: Supplying `min_date` or `max_date` filters by PubMed publication date (`datetype=pdat`). When only one bound is specified, the Actor supplies the open-ended counterpart (`1800/01/01` or `2099/12/31`) so NCBI applies the publication date window accurately.

### Support

Open an issue on the Actor page with your input parameters and run link, or reach out at `support@example.com`.

### Use as an MCP Tool (AI Agents)

AI agents and MCP clients (such as Claude Desktop or Cursor) can invoke `plainkitbin/pubmed-research-articles` directly via `@apify/actors-mcp-server` over `stdio`:

```bash
APIFY_TOKEN=<YOUR_APIFY_TOKEN> npx -y @apify/actors-mcp-server --actors plainkitbin/pubmed-research-articles
```

Hosted (Streamable HTTP): connect to `https://mcp.apify.com?tools=plainkitbin/pubmed-research-articles` using OAuth or the header `Authorization: Bearer <YOUR_APIFY_TOKEN>`.

Example MCP client configuration (`mcpServers`):

```json
{
  "mcpServers": {
    "pubmed-research-articles": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "plainkitbin/pubmed-research-articles"
      ],
      "env": {
        "APIFY_TOKEN": "<YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

Example JSON tool call matching `.actor/input_schema.json`:

```json
{
  "query": "oncology clinical trial",
  "max_items": 5
}
```

Catalog and registry: browse all Actors at [PlainKitBin](https://plainkitbin.com/) or discover the multi-Actor server `com.plainkitbin/public-data-actors` in the MCP Registry.

# Actor input Schema

## `query` (type: `string`):

PubMed search query (keywords, MeSH terms, author, or journal filter).

## `min_date` (type: `string`):

Earliest publication date in YYYY/MM/DD or YYYY-MM-DD format. Leave empty for no lower bound.

## `max_date` (type: `string`):

Latest publication date in YYYY/MM/DD or YYYY-MM-DD format. Leave empty for no upper bound.

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

Sort order for PubMed search results: relevance or pub_date (newest publication date first).

## `max_items` (type: `integer`):

Maximum number of PubMed article records to output (1 to 500, default 25).

## Actor input object example

```json
{
  "query": "oncology clinical trial",
  "min_date": "",
  "max_date": "",
  "sort": "relevance",
  "max_items": 25
}
```

# Actor output Schema

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

Dataset items produced by this run.

# 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 = {
    "query": "oncology clinical trial",
    "min_date": "",
    "max_date": "",
    "sort": "relevance",
    "max_items": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("plainkitbin/pubmed-research-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 = {
    "query": "oncology clinical trial",
    "min_date": "",
    "max_date": "",
    "sort": "relevance",
    "max_items": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("plainkitbin/pubmed-research-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 '{
  "query": "oncology clinical trial",
  "min_date": "",
  "max_date": "",
  "sort": "relevance",
  "max_items": 25
}' |
apify call plainkitbin/pubmed-research-articles --silent --output-dataset

```

## MCP server setup

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