# OpenAlex Scholarly Search (`foxk1996/openalex-scholarly-search`) Actor

Export scholarly works from the public OpenAlex API by query, author, institution, topic, year, open-access status, and citation count. No login, no proxies.

- **URL**: https://apify.com/foxk1996/openalex-scholarly-search.md
- **Developed by:** [Kronos Fox](https://apify.com/foxk1996) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 work scrapeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## OpenAlex Scholarly Search

Export clean, structured scholarly work records from the public OpenAlex API. This Apify actor is built for researchers, literature-review teams, market analysts, and RAG pipeline builders who need reliable metadata without creating an account, managing API keys, or scraping publisher pages.

### Scholarly literature search by keyword, author, institution, and topic

The actor searches OpenAlex works with a free-text query and optional filters for author, institution, topic, publication year, open-access status, and minimum citation count. You can provide OpenAlex IDs directly, such as `A5086198262`, `I136199984`, or `T10181`, or enter names and let the actor resolve the best matching OpenAlex entity before requesting works. Results are paginated with OpenAlex cursor pagination so larger exports are handled predictably.

### What you get

Each dataset row is a normalized work record containing title, OpenAlex ID, DOI, publication date and year, work type, language, citation count, referenced works, related works, reconstructed abstract text, authors, affiliations, institution names, open-access status, OA links, source/journal details, topics, keywords, bibliographic pages, and update dates. The raw OpenAlex abstract inverted index is converted into plain text, making the output ready for spreadsheet review, search indexing, enrichment, or embedding pipelines.

### Use cases for researchers and RAG builders

Use this actor to collect recent papers on a research area, export influential publications by citation threshold, build an institution-specific publication feed, seed a retrieval augmented generation corpus with DOI and OA PDF links, compare open-access coverage across topics, or monitor newly published work from a known author. Because it relies on OpenAlex, it avoids publisher scraping and uses a public scholarly metadata source designed for this kind of access.

### How to use

Start with the default input to export a small machine-learning sample in under five minutes. Increase `maxResults` for larger exports. Add `fromYear` and `toYear` to bound publication dates, set `openAccessStatus` to `oa`, `gold`, `green`, `hybrid`, `bronze`, or `closed`, and use `minCitations` for influence filters. For exact entity matching, prefer OpenAlex IDs over names. The actor uses polite request delays and honors `maxResults` exactly, truncating client-side if OpenAlex returns more rows than requested.

### Pricing

This actor uses Apify pay-per-event pricing. The single paid event is `work-scraped` at $0.005 per exported work record. There are no additional paid events. Local, free, or non-PPE runs are capped by the built-in free-run guard.

### FAQ

#### Does this scrape publisher websites?

No. It only calls HTTP-only public OpenAlex endpoints at `api.openalex.org`.

#### Do I need an OpenAlex API key?

No. OpenAlex works without a key for these endpoints.

#### Can I get full text PDFs?

The actor exports OA landing-page and PDF URLs when OpenAlex provides them. It does not download or extract PDF contents.

#### Why use OpenAlex IDs?

Names can be ambiguous. IDs make author, institution, and topic filters deterministic.

# Actor input Schema

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

Free-text work search query for OpenAlex works, such as 'machine learning', 'climate adaptation', or 'retrieval augmented generation'.
## `authorName` (type: `string`):

Optional author name to resolve through OpenAlex authors search and filter works by the best matching author.
## `authorId` (type: `string`):

Optional OpenAlex author ID or URL, for example A5086198262 or https://openalex.org/A5086198262. Overrides Author name when provided.
## `institutionName` (type: `string`):

Optional institution name to resolve through OpenAlex institutions search and filter works by the best matching institution.
## `institutionId` (type: `string`):

Optional OpenAlex institution ID or URL, for example I136199984 or https://openalex.org/I136199984. Overrides Institution name when provided.
## `topicName` (type: `string`):

Optional OpenAlex topic name to resolve through topics search and filter works by the best matching primary topic.
## `topicId` (type: `string`):

Optional OpenAlex topic ID or URL, for example T10181 or https://openalex.org/T10181. Overrides Topic name when provided.
## `fromYear` (type: `integer`):

Optional inclusive lower publication year filter.
## `toYear` (type: `integer`):

Optional inclusive upper publication year filter.
## `openAccessStatus` (type: `string`):

Open-access filter: any includes all works, oa keeps only open-access works, and gold/green/hybrid/bronze/closed filter by OpenAlex OA status.
## `minCitations` (type: `integer`):

Optional minimum cited_by_count filter for works.
## `maxResults` (type: `integer`):

Maximum number of work records to export. The actor truncates client-side exactly at this cap even if OpenAlex returns more.
## `sort` (type: `string`):

OpenAlex works sort order. Relevance works best with a query; cited_by_count:desc finds influential work; publication_date:desc finds newest work.

## Actor input object example

```json
{
  "query": "machine learning",
  "openAccessStatus": "any",
  "minCitations": 0,
  "maxResults": 25,
  "sort": "relevance_score:desc"
}
````

# 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": "machine learning"
};

// Run the Actor and wait for it to finish
const run = await client.actor("foxk1996/openalex-scholarly-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": "machine learning" }

# Run the Actor and wait for it to finish
run = client.actor("foxk1996/openalex-scholarly-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": "machine learning"
}' |
apify call foxk1996/openalex-scholarly-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=foxk1996/openalex-scholarly-search",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OpenAlex Scholarly Search",
        "description": "Export scholarly works from the public OpenAlex API by query, author, institution, topic, year, open-access status, and citation count. No login, no proxies.",
        "version": "0.1",
        "x-build-id": "Eu3jxDd0pUhZ7nqWl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/foxk1996~openalex-scholarly-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-foxk1996-openalex-scholarly-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/foxk1996~openalex-scholarly-search/runs": {
            "post": {
                "operationId": "runs-sync-foxk1996-openalex-scholarly-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/foxk1996~openalex-scholarly-search/run-sync": {
            "post": {
                "operationId": "run-sync-foxk1996-openalex-scholarly-search",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "maxResults"
                ],
                "properties": {
                    "query": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Free-text work search query for OpenAlex works, such as 'machine learning', 'climate adaptation', or 'retrieval augmented generation'."
                    },
                    "authorName": {
                        "title": "Author name",
                        "type": "string",
                        "description": "Optional author name to resolve through OpenAlex authors search and filter works by the best matching author."
                    },
                    "authorId": {
                        "title": "Author OpenAlex ID",
                        "type": "string",
                        "description": "Optional OpenAlex author ID or URL, for example A5086198262 or https://openalex.org/A5086198262. Overrides Author name when provided."
                    },
                    "institutionName": {
                        "title": "Institution name",
                        "type": "string",
                        "description": "Optional institution name to resolve through OpenAlex institutions search and filter works by the best matching institution."
                    },
                    "institutionId": {
                        "title": "Institution OpenAlex ID",
                        "type": "string",
                        "description": "Optional OpenAlex institution ID or URL, for example I136199984 or https://openalex.org/I136199984. Overrides Institution name when provided."
                    },
                    "topicName": {
                        "title": "Topic name",
                        "type": "string",
                        "description": "Optional OpenAlex topic name to resolve through topics search and filter works by the best matching primary topic."
                    },
                    "topicId": {
                        "title": "Topic OpenAlex ID",
                        "type": "string",
                        "description": "Optional OpenAlex topic ID or URL, for example T10181 or https://openalex.org/T10181. Overrides Topic name when provided."
                    },
                    "fromYear": {
                        "title": "From publication year",
                        "minimum": 1900,
                        "maximum": 2100,
                        "type": "integer",
                        "description": "Optional inclusive lower publication year filter."
                    },
                    "toYear": {
                        "title": "To publication year",
                        "minimum": 1900,
                        "maximum": 2100,
                        "type": "integer",
                        "description": "Optional inclusive upper publication year filter."
                    },
                    "openAccessStatus": {
                        "title": "Open access status",
                        "enum": [
                            "any",
                            "oa",
                            "gold",
                            "green",
                            "hybrid",
                            "bronze",
                            "closed"
                        ],
                        "type": "string",
                        "description": "Open-access filter: any includes all works, oa keeps only open-access works, and gold/green/hybrid/bronze/closed filter by OpenAlex OA status.",
                        "default": "any"
                    },
                    "minCitations": {
                        "title": "Minimum citations",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Optional minimum cited_by_count filter for works.",
                        "default": 0
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of work records to export. The actor truncates client-side exactly at this cap even if OpenAlex returns more.",
                        "default": 25
                    },
                    "sort": {
                        "title": "Sort order",
                        "enum": [
                            "relevance_score:desc",
                            "cited_by_count:desc",
                            "publication_date:desc"
                        ],
                        "type": "string",
                        "description": "OpenAlex works sort order. Relevance works best with a query; cited_by_count:desc finds influential work; publication_date:desc finds newest work.",
                        "default": "relevance_score:desc"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
