# PubMed Articles Search (`grit-77/pubmed-articles-search`) Actor

PubMed articles scraper for bibliographic research. Export article IDs, authors, journals, publication dates, indexing terms and available abstracts as JSON with source links.

- **URL**: https://apify.com/grit-77/pubmed-articles-search.md
- **Developed by:** [Grit](https://apify.com/grit-77) (community)
- **Categories:** Education, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.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 Articles Search

PubMed articles scraper returns bibliographic records and available abstracts from NCBI. PubMed API results include identifiers, authors, journal details, publication dates, indexing terms, and source links.

### Input example

```json
{
  "pmids": [
    "31452104"
  ],
  "maxItems": 2
}
```

The input keys and allowed values follow [input_schema.json](.actor/input_schema.json).

### Output fields

| Field | Type | Example or excerpt from sample |
|---|---|---|
| `source` | string | `"NCBI PubMed E-utilities"` |
| `pmid` | string | `"31452104"` |
| `url` | string | `"https://pubmed.ncbi.nlm.nih.gov/31452104/"` |
| `title` | string | `"Molegro Virtual Docker for Docking."` |
| `abstract` | string or null | `"Molegro Virtual Docker is a protein-ligand docking simulation program that allows us…` |
| `abstractSections` | array | `[]` |
| `authors` | array | `[{"name": "Gabriela Bitencourt-Ferreira", "lastName": "Bitencourt-Ferreira", "foreNam…` |
| `journal` | string | `"Methods in molecular biology (Clifton, N.J.)"` |
| `journalAbbreviation` | string | `"Methods Mol Biol"` |
| `issn` | string | `"1940-6029"` |
| `publicationDate` | string | `"2019"` |
| `publicationYear` | integer | `2019` |
| `volume` | string | `"2053"` |
| `issue` | string or null | `"8"` |
| `pages` | string | `"149-167"` |
| `doi` | string | `"10.1007/978-1-4939-9752-7_10"` |
| `doiUrl` | string | `"https://doi.org/10.1007/978-1-4939-9752-7_10"` |
| `pmcId` | string or null | `null` |
| `meshTerms` | array | `[]` |
| `meshHeadings` | array | `[]` |
| `keywords` | array | `[]` |
| `languages` | array | `["eng"]` |
| `publicationTypes` | array | `["Journal Article", "Research Support, Non-U.S. Gov't"]` |
| `status` | string | `"ok"` |
| `errors` | array | `[]` |
| `retrievedAt` | string | `"2026-10-05T13:50:30.094Z"` |

### Output example

Trimmed from [sample_output.json](sample_output.json); omitted fields remain available in the dataset.

```json
{
  "source": "NCBI PubMed E-utilities",
  "pmid": "31452104",
  "url": "https://pubmed.ncbi.nlm.nih.gov/31452104/",
  "title": "Molegro Virtual Docker for Docking.",
  "abstract": "Molegro Virtual Docker is a protein-ligand docking simulation program that allows us to carry out docking simulations in a fully integrated computational package. MVD has been successfully applied to hundreds of different proteins, with docking performance similar to other docking programs such as AutoDock4 and AutoDock Vina. The program MVD has four search algorithms and four native scoring functions. Considering that we may have water molecules or not in the docking simulations, we have a total of 32 docking protocols. The integration of the programs SAnDReS ( https://github.com/azevedolab/sandres ) and MVD opens the possibility to carry out a detailed statistical analysis of docking results, which adds to the native capabilities of the program MVD. In this chapter, we describe a tutorial to carry out docking simulations with MVD and how to perform a statistical analysis of the docking results with the program SAnDReS. To illustrate the integration of both programs, we describe the redocking simulation focused the cyclin-dependent kinase 2 in complex with a competitive inhibitor.",
  "abstractSections": [
    {
      "label": null,
      "category": null,
      "text": "Molegro Virtual Docker is a protein-ligand docking simulation program that allows us to carry out docking simulations in a fully integrated computational package. MVD has been successfully applied to hundreds of different proteins, with docking performance similar to other docking programs such as AutoDock4 and AutoDock Vina. The program MVD has four search algorithms and four native scoring functions. Considering that we may have water molecules or not in the docking simulations, we have a total of 32 docking protocols. The integration of the programs SAnDReS ( https://github.com/azevedolab/sandres ) and MVD opens the possibility to carry out a detailed statistical analysis of docking results, which adds to the native capabilities of the program MVD. In this chapter, we describe a tutorial to carry out docking simulations with MVD and how to perform a statistical analysis of the docking results with the program SAnDReS. To illustrate the integration of both programs, we describe the redocking simulation focused the cyclin-dependent kinase 2 in complex with a competitive inhibitor."
    }
  ],
  "authors": [
    {
      "name": "Gabriela Bitencourt-Ferreira",
      "lastName": "Bitencourt-Ferreira",
      "foreName": "Gabriela",
      "initials": "G",
      "suffix": null,
      "affiliations": [
        "Escola de Ciências da Saúde, Pontifícia Universidade Católica do Rio Grande do Sul-PUCRS, Porto Alegre, RS, Brazil."
      ],
      "orcid": null
    },
    {
      "name": "Walter Filgueira de Azevedo Jr",
      "lastName": "de Azevedo",
      "foreName": "Walter Filgueira",
      "initials": "WF",
      "suffix": "Jr",
      "affiliations": [
        "Escola de Ciências da Saúde, Pontifícia Universidade Católica do Rio Grande do Sul-PUCRS, Porto Alegre, RS, Brazil. walter@azevedolab.net."
      ],
      "orcid": null
    }
  ],
  "status": "ok"
}
```

### Limits and failure behavior

- ESearch exposes the first 10,000 matching PubMed records. Narrow broad searches with date ranges or field tags; this actor does not bypass that limit.
- NCBI permits 3 requests/second without an API key and 10 with a key by default. One limiter covers this run's search, summary, fetch and retries; separate runs or other clients sharing an IP/key also count toward NCBI's limit. See [NCBI usage guidelines](https://eutilities.github.io/site/API_Key/usageandkey/).
- Article requests use batches of 50 and at most the configured number of active batches. They have a 30-second HTTP timeout and four attempts with backoff. Transient responses honor Retry-After; a cooldown over 300 seconds returns a diagnostic so the run can be retried later.
- Missing PMID records, malformed items and failed article enrichment produce per-item diagnostics. When EFetch fails but a summary has a title, the record is partial. An unavailable search fails the run clearly and preserves any rows already saved.
- Empty searches succeed with no rows. Invalid global settings fail before querying NCBI. maxItems and the Apify event budget limit output.
- Abstracts, DOI, affiliations, ORCID and MeSH can be absent in the source. Missing abstracts do not indicate a failure. The actor does not download full text or infer unpublished metadata.
- Bibliographic content and abstracts can carry publisher copyright. Review NCBI and publisher reuse terms for your use case. No login or proxy configuration is needed by this implementation.

### FAQ

**What are the output limits?** `maxItems` caps output. ESearch exposes the first 10,000 matching records; narrow broad searches with date filters.

**Do I need a proxy or login?** Public NCBI E-utilities need no login or proxy. An API key is optional; a contact email is recommended for production use.

**How is this priced?** Proposed pay per event: $0.002 for each usable `article` row, including partial records with a title. Error-only rows are uncharged. These are proposals in [PRICING.md](PRICING.md); the owner must configure Store billing.

**How are rate limits handled?** The shared limiter follows NCBI defaults of 3 requests per second without a key or 10 with a key; retries honor `Retry-After`.

**How fresh is the data?** PubMed records can be updated and abstracts may be absent. `retrievedAt` marks collection time. This actor does not fetch full text, assess clinical validity, or provide medical advice; check publisher reuse terms.

### Use with AI agents / MCP

After the actor is published, connect your agent to the [Apify MCP server](https://docs.apify.com/integrations/mcp) with an Apify API token. Use `call-actor` with the published actor identifier and the JSON input shown above. Read the returned dataset with `get-dataset-items`; the run response itself contains status and storage IDs, not the result rows. Alternatively, use the [Apify API](https://docs.apify.com/api/v2) to start a run and read its default dataset. Keep the actor input bounded with `maxItems`, and inspect source links and any error fields before using results in an answer.

# Actor input Schema

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

PubMed search syntax, including Boolean operators and field tags. Provide either this query or a PMID list.

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

Fetch specific PubMed IDs. Duplicates are skipped; invalid IDs produce uncharged error rows. Leave query empty when using this list.

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

Hard cap including article and error rows. ESearch supports at most the first 10,000 matches; narrow large queries with dates or field tags.

## `concurrency` (type: `integer`):

At most this many batches are active. All E-utilities requests, including retries, share the 3/s or 10/s rate limit.

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

Relevance or most recent publication date. Ignored for explicit PMIDs.

## `fromDate` (type: `string`):

Optional inclusive publication date in YYYY-MM-DD format. Used only with query.

## `toDate` (type: `string`):

Optional inclusive publication date in YYYY-MM-DD format. Used only with query.

## `tool` (type: `string`):

Sent as the tool parameter on every request. No spaces; use letters, digits, dots, underscores or hyphens. Register production tool/contact details with NCBI as required by their guidelines.

## `email` (type: `string`):

Recommended: your valid contact address, sent only to NCBI in the email parameter. Empty by default; supply one for production usage. Never copied into result rows or logs.

## `apiKey` (type: `string`):

Your NCBI key raises the shared run limit from 3 to 10 requests per second. NCBI also aggregates use across other clients of the same key. No key is required for 3/s access.

## Actor input object example

```json
{
  "query": "31452104[uid] OR 10000000[uid]",
  "pmids": [],
  "maxItems": 100,
  "concurrency": 2,
  "sort": "relevance",
  "tool": "pubmed-articles-search"
}
```

# Actor output Schema

## `dataset` (type: `string`):

PubMed article metadata and per-item diagnostics in the default dataset.

# 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": "31452104[uid] OR 10000000[uid]"
};

// Run the Actor and wait for it to finish
const run = await client.actor("grit-77/pubmed-articles-search").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": "31452104[uid] OR 10000000[uid]" }

# Run the Actor and wait for it to finish
run = client.actor("grit-77/pubmed-articles-search").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": "31452104[uid] OR 10000000[uid]"
}' |
apify call grit-77/pubmed-articles-search --silent --output-dataset

```

## MCP server setup

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

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/tBP7eOCv6hDoBVpmY/builds/Q7wGvaXQ001IhAKda/openapi.json
