# Research Paper Finder (OpenAlex) + MCP (`whistled_barn_kzw/openalex-research`) Actor

Search 250M+ academic papers from OpenAlex by keyword, DOI, year, topic, institution, author and citation count. Optional AI paper summaries and structured literature reviews with your own LLM key, plus a Standby MCP server at /mcp.

- **URL**: https://apify.com/whistled_barn_kzw/openalex-research.md
- **Developed by:** [Piotrek](https://apify.com/whistled_barn_kzw) (community)
- **Categories:** AI, MCP servers, Developer tools
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

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

## Research Paper Finder (OpenAlex) + MCP

Search over **250 million academic papers**, preprints, conference proceedings, and journal articles from the free **OpenAlex REST API** — with **reconstructed abstracts**, citation counts, open-access PDF links, author affiliations, and optional **AI paper summaries and structured literature reviews**.

Run it in **two modes** from the same Apify Actor:

1. **Batch Mode (API & Apify Console)**: Search by keyword, DOI list, publication year range, open-access status, minimum citations, topic, institution, or author. Export clean JSON, CSV, or Excel datasets, plus an optional Markdown + JSON literature review (`REVIEW` / `REVIEW.md`) in the key-value store.
2. **MCP Server Mode (Apify Standby)**: Connect any Model Context Protocol (MCP) client over **Streamable HTTP** at `/mcp` to run live literature searches, fetch papers by DOI or OpenAlex ID, traverse citation graphs, find authors, and synthesize research topics.

An **OpenAlex API key** is required (`openalexApiKey`, sent as `Authorization: Bearer` on every request). A free key gives **$1/day** at [openalex.org](https://openalex.org/). The Actor uses page-cursor pagination, exponential backoff retries for transient rate limits and server errors, immediate failure on daily-budget exhaustion (`429`), per-request timeouts, and a 30-second deadline guard that saves partial results cleanly before any run timeout.

### What does Research Paper Finder & Literature Review do?

- **Full-text and DOI search**: Query OpenAlex titles, abstracts, and full text, or pass an exact list of DOIs (or combine both without duplicates).
- **Rich academic filters**: Filter by `yearFrom` / `yearTo`, `openAccessOnly`, `minCitations`, `topic` (OpenAlex ID or name), `institution` (OpenAlex ID, ROR, or name), and `author` (OpenAlex ID, ORCID, or name). Sort by `relevance`, `citations`, or `date`.
- **Clean, standardized paper records**: Reconstructs plain-text abstracts from OpenAlex `abstract_inverted_index`, normalizes DOIs and OpenAlex IDs, extracts best open-access PDF URLs, and lists author names with their institution names only.
- **Optional AI summaries & literature review (BYOK)**: Pass your own `llmApiKey` (Google Gemini, OpenAI, OpenRouter, or any OpenAI-compatible endpoint) to add a concise summary per paper and synthesize a structured literature review (overview, key themes, key papers, research gaps) saved to the key-value store as `REVIEW` (JSON) and `REVIEW.md` (Markdown). Your API key is never logged and never read from environment variables.
- **Standby MCP server at `/mcp`**: Exposes five structured tools (`search_papers`, `get_paper`, `get_citations`, `find_authors`, `summarize_topic`) over Streamable HTTP.

### Why use OpenAlex for literature reviews and research automation?

- **Academic literature reviews**: Collect top-cited papers on any topic, reconstruct abstracts automatically, and generate a structured synthesis with themes and research gaps.
- **Citation network analysis**: Use `get_citations` in MCP mode to trace both papers citing a work (`cited_by`) and papers it references (`references`).
- **R\&D and patent prior-art research**: Filter by year range, minimum citations, and open-access PDF availability to build a verifiable reading list.
- **Author and institution benchmarking**: Resolve researchers via `find_authors` or filter works by ROR / OpenAlex institution ID.
- **MCP workflows and automations**: Plug `/mcp` directly into MCP-compatible clients, n8n, Make, Zapier, or custom pipelines via the Apify API.

### Mode 1: Batch Run (API & Console)

#### Input

| Field              | Type     | Default        | Description                                                                                      |
| ------------------ | -------- | -------------- | ------------------------------------------------------------------------------------------------ |
| `openalexApiKey`   | string   | *required*     | Secret OpenAlex API key (`Authorization: Bearer`). Free key gives `$1/day` at `openalex.org`     |
| `query`            | string   | —              | Full-text search across OpenAlex titles, abstracts, and full text                                |
| `dois`             | string\[] | —              | List of DOIs (`10.xxxx/...` or `https://doi.org/...`) to fetch directly                          |
| `yearFrom`         | integer  | —              | Inclusive start publication year (1500–2100)                                                     |
| `yearTo`           | integer  | —              | Inclusive end publication year (1500–2100)                                                       |
| `openAccessOnly`   | boolean  | `false`        | Return only papers with an open-access version                                                   |
| `minCitations`     | integer  | —              | Minimum `citedByCount` threshold                                                                 |
| `topic`            | string   | —              | OpenAlex Topic ID (e.g. `T10109`) or topic name                                                  |
| `institution`      | string   | —              | OpenAlex Institution ID (e.g. `I136199984`), ROR ID, or institution name                         |
| `author`           | string   | —              | OpenAlex Author ID (e.g. `A5023888391`), ORCID, or author name                                   |
| `sort`             | string   | `relevance`    | `relevance`, `citations`, or `date`                                                              |
| `maxPapers`        | integer  | `50`           | Maximum papers to save (1–2000)                                                                  |
| `excludeWorkTypes` | string\[] | `["paratext"]` | OpenAlex work types to exclude (defaults to `["paratext"]`; pass `[]` to include all work types) |
| `mailto`           | string   | —              | Optional contact email included in OpenAlex request headers                                      |
| `enableAi`         | boolean  | `false`        | Enable AI per-paper summaries and literature review                                              |
| `includeReview`    | boolean  | `true`         | Save `REVIEW` (JSON) and `REVIEW.md` (Markdown) when AI is enabled                               |
| `outputLanguage`   | string   | `en`           | Output language for AI summaries and review                                                      |
| `llmProvider`      | string   | `gemini`       | `gemini`, `openai`, `openrouter`, or `openai-compatible`                                         |
| `llmApiKey`        | string   | —              | Secret LLM API key (required only when `enableAi` is `true`)                                     |
| `llmModel`         | string   | —              | Optional model override                                                                          |
| `llmBaseUrl`       | string   | —              | Base URL for `openai-compatible` providers                                                       |
| `aiConcurrency`    | integer  | `3`            | Parallel LLM requests (1–10)                                                                     |

Provide `openalexApiKey` and at least one of `query`, `dois`, `topic`, `institution`, or `author`.

Example batch input:

```json
{
    "openalexApiKey": "YOUR_OPENALEX_API_KEY",
    "query": "retrieval augmented generation",
    "yearFrom": 2022,
    "openAccessOnly": true,
    "minCitations": 25,
    "sort": "citations",
    "maxPapers": 30,
    "enableAi": true,
    "includeReview": true,
    "llmProvider": "gemini",
    "llmApiKey": "YOUR_LLM_API_KEY"
}
```

#### Output

Each dataset item represents one academic paper:

```json
{
    "title": "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks",
    "doi": "https://doi.org/10.48550/arxiv.2005.11401",
    "openalexId": "W3028926520",
    "year": 2020,
    "venue": "Neural Information Processing Systems",
    "authors": [
        {
            "name": "Patrick Lewis",
            "institutions": ["Facebook AI Research"]
        }
    ],
    "abstract": "Large pre-trained language models have been shown to store factual knowledge in their parameters...",
    "citedByCount": 5120,
    "referencedWorksCount": 48,
    "isOpenAccess": true,
    "bestOaPdfUrl": "https://arxiv.org/pdf/2005.11401.pdf",
    "topics": ["Natural Language Processing", "Information Retrieval"],
    "aiSummary": "Introduces retrieval-augmented generation (RAG), combining dense passage retrieval with sequence-to-sequence models to improve factual accuracy on knowledge-intensive tasks.",
    "scrapedAt": "2026-11-20T10:00:00.000Z"
}
```

Key-value store records written on batch runs:

- `RUN_SUMMARY`: JSON summary with `pages`, `scannedWorks`, `saved`, `aiSummaries`, `reviewGenerated`, `limitReached`, `timedOut`, and `error` (when a fatal error occurs after partial results were saved).
- `REVIEW` and `REVIEW.md` (when `enableAi` and `includeReview` are enabled): structured JSON and formatted Markdown literature review containing `overview`, `themes`, `keyPapers`, and `gaps`.

### Mode 2: MCP Server (Apify Standby)

The Actor supports **Apify Standby (Server Actor)** mode and serves an MCP **Streamable HTTP** endpoint at `/mcp`.

Endpoint URL format once Standby is enabled in the Apify Console:

```text
https://<your-actor-standby-url>/mcp
```

Pass your Apify API token via `Authorization: Bearer <APIFY_TOKEN>` (or `?token=<APIFY_TOKEN>`).

Pass your OpenAlex API key per request via the `X-OpenAlex-Api-Key` HTTP header or the `openalexApiKey` tool argument (tool argument overrides header, which overrides the Actor run input `openalexApiKey`). Request bodies to `/mcp` are capped at **1 MB** (`413 Payload Too Large` above that).

#### Available MCP Tools

| Tool              | Parameters                                                                                                                                                                                             | What it returns                                                                                                                                                          |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `search_papers`   | `query`, `yearFrom`, `yearTo`, `openAccessOnly`, `minCitations`, `topic`, `institution`, `author`, `sort`, `limit` (1–50), optional `excludeWorkTypes`, `openalexApiKey`                               | Matching OpenAlex papers with reconstructed abstracts and OA PDF links                                                                                                   |
| `get_paper`       | `idOrDoi`, optional `openalexApiKey`                                                                                                                                                                   | Full metadata and reconstructed abstract for a single DOI or OpenAlex work ID                                                                                            |
| `get_citations`   | `idOrDoi`, `direction` (`both` | `cited_by` | `references`), `limit` (1–50), optional `openalexApiKey`                                                                                               | Papers citing this work and/or papers referenced by it                                                                                                                   |
| `find_authors`    | `query`, `institution`, `limit` (1–50), optional `openalexApiKey`                                                                                                                                      | Matching authors with OpenAlex ID, ORCID, h-index, citation counts, institutions, and topics                                                                             |
| `summarize_topic` | `topic`, `yearFrom`, `yearTo`, `openAccessOnly`, `minCitations`, `limit` (1–30), optional `excludeWorkTypes`, `openalexApiKey`, `llmApiKey`, `llmProvider`, `llmModel`, `llmBaseUrl`, `outputLanguage` | Structured overview of top papers (year range, citation totals, top venues, top topics, top papers). Runs AI literature synthesis only if the caller passes `llmApiKey`. |

### Pay-per-event pricing

This Actor uses Apify pay-per-event billing. Every item is charged at most once, and the Actor stops gracefully if your max cost per run is reached.

| Event          | Price (USD) | Charged when                                                                                                                       |
| -------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `paper-result` | `$0.002`    | One paper saved to the dataset in batch mode                                                                                       |
| `tool-call`    | `$0.005`    | One MCP tool call that returns a successful OpenAlex result in Standby mode (failed requests, 429s, and not-found are not charged) |
| `ai-summary`   | `$0.010`    | One AI paper summary or literature review synthesis (requires your own LLM API key)                                                |

### Reliability, limits, and data attribution

- **Data source**: [OpenAlex](https://openalex.org/) (CC0 public-domain scholarly metadata).
- **API key authentication**: Every request sends `Authorization: Bearer <key>` from `openalexApiKey` (or `X-OpenAlex-Api-Key` / tool argument in Standby MCP mode). A free key gives `$1/day` at [openalex.org](https://openalex.org/).
- **Retries & timeouts**: Each OpenAlex request has a 20-second timeout and retries transient `429` / `5xx` / network errors with exponential backoff (respecting `Retry-After`). A daily-budget-exhausted `429` (`reason: "daily_budget"`) fails immediately with a clear error and no retries.
- **Deadline guard**: In batch mode, the Actor stops starting new page fetches or AI calls 30 seconds before `Actor.getEnv().timeoutAt`, pushes all collected papers incrementally, and sets `timedOut: true` in `RUN_SUMMARY`.
- **Privacy**: Only public author display names and institution display names are exported. No OpenAlex or LLM API keys are ever read from environment variables or written to logs or datasets.

# Actor input Schema

## `openalexApiKey` (type: `string`):

Your OpenAlex API key, sent as Authorization: Bearer on every request. A free key gives $1/day at https://openalex.org. Stored encrypted and never logged.

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

Full-text search across OpenAlex titles, abstracts and full text. Provide a query, a list of DOIs, or at least one filter (topic, institution, author).

## `dois` (type: `array`):

Exact DOIs to fetch (e.g. 10.1038/s41586-021-03819-2 or https://doi.org/...). Can be combined with a search query or used on its own.

## `yearFrom` (type: `integer`):

Inclusive start publication year (e.g. 2020).

## `yearTo` (type: `integer`):

Inclusive end publication year (e.g. 2026).

## `openAccessOnly` (type: `boolean`):

Return only papers with an open-access version available.

## `minCitations` (type: `integer`):

Keep only papers cited at least this many times.

## `topic` (type: `string`):

OpenAlex topic ID (e.g. T10109) or topic name to resolve via OpenAlex.

## `institution` (type: `string`):

OpenAlex institution ID (e.g. I136199984), ROR ID, or institution name to resolve via OpenAlex.

## `author` (type: `string`):

OpenAlex author ID (e.g. A5023888391), ORCID, or author name to resolve via OpenAlex.

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

Result ordering. Relevance requires a search query; otherwise falls back to citations.

## `maxPapers` (type: `integer`):

Maximum number of papers to save to the dataset. Each saved paper is one billable paper-result event.

## `excludeWorkTypes` (type: `array`):

OpenAlex work types to exclude from search results (default: \["paratext"]). Pass an empty list to include all work types, or add types such as editorial, erratum, retraction, letter, book-review, dataset, or software.

## `mailto` (type: `string`):

Optional contact email included in OpenAlex request headers.

## `enableAi` (type: `boolean`):

Generate a concise summary for each paper and a structured literature review (themes, key papers, gaps) saved as REVIEW in the key-value store. Requires your own LLM API key.

## `includeReview` (type: `boolean`):

When AI is enabled, synthesize themes, key papers and research gaps into REVIEW (JSON) and REVIEW.md (Markdown) in the key-value store.

## `outputLanguage` (type: `string`):

Language for AI paper summaries and the literature review.

## `llmProvider` (type: `string`):

Which API your key belongs to.

## `llmApiKey` (type: `string`):

Your API key for the selected provider. Stored encrypted, never logged, and never read from environment variables.

## `llmModel` (type: `string`):

Leave empty for the default (gemini-2.5-flash-lite, gpt-4.1-mini, or google/gemini-2.5-flash-lite on OpenRouter).

## `llmBaseUrl` (type: `string`):

Only for "Other OpenAI-compatible API", e.g. https://api.mistral.ai/v1.

## `aiConcurrency` (type: `integer`):

Parallel LLM requests for per-paper summaries. Lower it if your provider rate-limits you.

## Actor input object example

```json
{
  "query": "retrieval augmented generation",
  "openAccessOnly": false,
  "sort": "relevance",
  "maxPapers": 50,
  "excludeWorkTypes": [
    "paratext"
  ],
  "enableAi": false,
  "includeReview": true,
  "outputLanguage": "en",
  "llmProvider": "gemini",
  "aiConcurrency": 3
}
```

# Actor output Schema

## `papers` (type: `string`):

No description

## `aiSummaries` (type: `string`):

No description

## `reviewMarkdown` (type: `string`):

No description

## `reviewJson` (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 = {
    "query": "retrieval augmented generation"
};

// Run the Actor and wait for it to finish
const run = await client.actor("whistled_barn_kzw/openalex-research").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": "retrieval augmented generation" }

# Run the Actor and wait for it to finish
run = client.actor("whistled_barn_kzw/openalex-research").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": "retrieval augmented generation"
}' |
apify call whistled_barn_kzw/openalex-research --silent --output-dataset

```

## MCP server setup

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

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/TaWDLP1kvOtJ5hEkI/builds/gpQn6w9rM4WCoZec6/openapi.json
