# PubMed Evidence Finder (`a.jonzy/pubmed-evidence-finder`) Actor

Search PubMed and get abstracts, MeSH terms, study-design evidence tiers and NIH iCite citation metrics. Official NCBI APIs.

- **URL**: https://apify.com/a.jonzy/pubmed-evidence-finder.md
- **Developed by:** [Aidan Jones](https://apify.com/a.jonzy) (community)
- **Categories:** Other, Agents, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 95.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Evidence Finder

Search PubMed and get one clean dataset: full abstracts split into sections, MeSH terms, DOI and PMC links, a study-design evidence tier, and NIH iCite citation metrics (relative citation ratio, NIH percentile). Built on the official NCBI E-utilities and NIH iCite APIs. No scraping.

Use it to build a literature review shortlist, find the strongest trials on a drug or condition, feed abstracts to a summarizer or RAG pipeline, or track new papers on a topic.

### What you get

- Search with full PubMed syntax, several queries per run, duplicates across queries returned once
- Filters: study type (meta-analysis, RCT, clinical trial, guideline, review, case report), year range, humans only, free full text, abstract required
- Evidence tier from PubMed publication types (see Data and limits for the exact types per tier)
- Sort by PubMed best match, newest, relative citation ratio, or evidence tier then relative citation ratio
- Optional NCBI API key and contact email, as NCBI's usage policy asks for heavy use

### Price

Pay per event. You pay for what is returned.

| Event | Price |
|---|---|
| Actor start | $0.005 per start event. Apify bills one start event per GB of memory, minimum one; the default run uses 512 MB, so one event. |
| PubMed article returned | $0.005 |

100 articles cost about $0.51. A query that fails produces one error item that is not charged. Set `maxItems` to cap spend.

### Example input

```json
{
    "queries": ["sglt2 inhibitors heart failure"],
    "studyType": "meta-analysis",
    "minYear": 2022,
    "sortBy": "rcr",
    "maxResultsPerQuery": 25
}
```

### Example output

```json
{
    "status": "found",
    "query": "sglt2 inhibitors heart failure",
    "pmid": "36351458",
    "title": "Impact of diabetes on the effects of sodium glucose co-transporter-2 inhibitors on kidney outcomes: collaborative meta-analysis of large placebo-controlled trials.",
    "journal": "Lancet (London, England)",
    "year": 2022,
    "doi": "10.1016/S0140-6736(22)02074-8",
    "pmcid": "PMC7613836",
    "authors": ["Nuffield Department of Population Health Renal Studies Group", "SGLT2 inhibitor Meta-Analysis Cardio-Renal Trialists' Consortium"],
    "abstract": "BACKGROUND: Large trials have shown that ...",
    "abstractSections": { "BACKGROUND": "Large trials have shown that ...", "METHODS": "We did a systematic review and meta-analysis ..." },
    "publicationTypes": ["Systematic Review", "Meta-Analysis", "Journal Article"],
    "evidenceTier": 1,
    "evidenceLabel": "Systematic review or meta-analysis",
    "meshTerms": ["Humans", "Adult", "Adolescent", "Sodium-Glucose Transporter 2 Inhibitors"],
    "citationCount": 907,
    "relativeCitationRatio": 77.83,
    "nihPercentile": 100,
    "citationsPerYear": 226.75,
    "isClinical": false,
    "url": "https://pubmed.ncbi.nlm.nih.gov/36351458/"
}
```

A run summary (articles returned, duplicates skipped, query errors, total PubMed matches per query) is saved under the key-value store key `SUMMARY`.

### FAQ

**Where does the data come from?** PubMed records come from NCBI E-utilities (`esearch` and `efetch`). Citation metrics come from NIH iCite. Both are free public APIs of the U.S. National Institutes of Health.

**Is the evidence tier a quality score?** No. It is publication-type metadata assigned by PubMed indexers, taking the strongest listed type. It says nothing about risk of bias or quality. Read the paper.

**Why is a field null?** Not every record has a DOI, PMC id or abstract, and iCite has no metrics for very recent papers.

**Which contact email does NCBI see?** Yours if you enter one, otherwise the publisher's support address (support@studystore.co). NCBI uses it only to reach the caller about heavy use.

**How fast is it?** Without an NCBI key the actor stays under NCBI's limit of 3 requests per second. Add your own free key for 10 per second.

**Does it return full text?** No. It returns abstracts and the PMC id, so you can fetch open-access full text from PMC.

### Data and limits

- Source: PubMed (NLM/NCBI) and NIH iCite. Records and metrics reflect the sources at run time.
- The relative citation ratio and the relative sort use the fetched window (`maxResultsPerQuery`), not all PubMed matches for the query. Raise it for a wider pool.
- Tiers by PubMed publication type (strongest present wins): 1 Meta-Analysis, Systematic Review. 2 Randomized Controlled Trial. 3 Clinical Trial (all phases), Controlled Clinical Trial, Pragmatic Clinical Trial, Practice Guideline, Guideline, Consensus Development Conference, Observational Study. 4 Review, Case Reports. 5 Editorial, Comment, Letter, News, Biography, Historical Article. Observational Study ranks above Review by design (primary data over secondary commentary). Records with none of these are Unclassified (null). Generic types such as Journal Article, Comparative Study and Multicenter Study are not ranked.
- Up to 1000 records per query and 5000 per run.
- This is a research aid. It is not medical advice.

# Actor input Schema

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

One or more PubMed searches. Any PubMed syntax works, for example: sglt2 inhibitors heart failure, or "metformin"\[MeSH Terms] AND cancer.

## `studyType` (type: `string`):

Restrict results to one PubMed publication type.

## `minYear` (type: `integer`):

Earliest publication year to include. Leave empty for no limit.

## `maxYear` (type: `integer`):

Latest publication year to include. Leave empty for no limit.

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

Only studies indexed with the Humans MeSH term.

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

Only articles with a free full text link.

## `requireAbstract` (type: `boolean`):

Drop records that have no abstract.

## `minEvidenceTier` (type: `integer`):

Keep articles at this tier or better (a PubMed publication-type label, not a quality grade): 1 systematic review or meta-analysis, 2 randomized trial, 3 clinical trial, guideline or observational study, 4 review or case report, 5 opinion or letter. Articles with no recognised type are dropped when this is set.

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

Order of results within each query. Relative citation ratio and evidence tier sort the fetched window, so raise the results per query for a wider pool.

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

Adds citation count, relative citation ratio, NIH percentile and clinical flag from NIH iCite.

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

How many PubMed records to fetch for each query.

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

Safety cap on the total number of articles returned (and billed) in one run.

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

Your own free NCBI key raises the rate limit from 3 to 10 requests per second. Get one in your NCBI account settings.

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

Sent to NCBI so they can reach you about heavy use, as their usage policy asks. If empty, the actor sends its publisher's support address.

## Actor input object example

```json
{
  "queries": [
    "sglt2 inhibitors heart failure"
  ],
  "studyType": "any",
  "humansOnly": false,
  "freeFullTextOnly": false,
  "requireAbstract": false,
  "sortBy": "relevance",
  "includeCitationMetrics": true,
  "maxResultsPerQuery": 25,
  "maxItems": 500
}
```

# Actor output Schema

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

One item per PubMed article returned. A query that fails produces one item with status error.

## `summary` (type: `string`):

Counts of articles returned, duplicates skipped, query errors and total PubMed matches per query.

# 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": [
        "sglt2 inhibitors heart failure"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("a.jonzy/pubmed-evidence-finder").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": ["sglt2 inhibitors heart failure"] }

# Run the Actor and wait for it to finish
run = client.actor("a.jonzy/pubmed-evidence-finder").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": [
    "sglt2 inhibitors heart failure"
  ]
}' |
apify call a.jonzy/pubmed-evidence-finder --silent --output-dataset

```

## MCP server setup

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

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/5xKuhMJ07I8IBvjER/builds/JotrjudaAwhsbvBLV/openapi.json
