# OpenAlex Scraper (`shahidirfan/openalex-scraper`) Actor

Extract scholarly data from OpenAlex—titles, authors, institutions, venues, concepts—using this fast Apify actor. Get academic research in bulk via API, and export results as CSV, Excel, or HTML datasets for research, analytics, or discovery.

- **URL**: https://apify.com/shahidirfan/openalex-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Developer tools, Other, Automation
- **Stats:** 21 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Data Scraper

Extract comprehensive academic data from OpenAlex, the largest open database of scholarly works, authors, institutions, venues, and concepts. Gather research papers, profiles, and metadata at scale to power your bibliometric analysis, literature reviews, and research intelligence.

***

### Features

- **Multi-Entity Extraction** — Scrape works, authors, institutions, venues, and concepts in one place
- **Flexible Search Capabilities** — Search by title, author name, keyword, or institution details
- **Automated Pagination** — Retrieve thousands of records without manual page shifting
- **Polite Data Scraping** — Optimized performance and respectful rate limit management
- **Clean Data Formatting** — Get data ready in structured formats for spreadsheet and analysis tools

***

### Use Cases

#### Bibliometric Analysis

Track citation patterns, monitor research impact, and visualize academic networks over time. Perfect for university departments and institutional analysis.

#### Literature Reviews

Systematically collect research papers, abstracts, and metadata on specific subjects to accelerate research projects and reviews.

#### Talent Scouting

Discover top researchers, authors, and industry experts in specific scientific domains by analyzing publication counts and citation records.

#### Institutional Tracking

Analyze and compare the research output, collaboration networks, and geographic distribution of academic institutions.

***

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `search` | String | No | `"machine learning"` | Search query (title, author, institution name, etc.) |
| `entity` | String | No | `"works"` | The entity type to scrape (`works`, `authors`, `institutions`, `venues`, `sources`, `concepts`) |
| `results_wanted` | Integer | No | `20` | Maximum number of results to collect |
| `max_pages` | Integer | No | `10` | Maximum number of pages to fetch |
| `sort` | String | No | `"relevance_score:desc"` | Sort order (e.g., `'relevance_score:desc'` or `'cited_by_count:desc'`) |

***

### Output Data

Each item in the dataset contains clean, structured metadata. Below are the key fields extracted depending on the entity type:

| Field | Type | Description |
|-------|------|-------------|
| `id` | String | Unique OpenAlex identifier |
| `url` | String | Web URL for the entity |
| `title` | String | Title of the work or publication |
| `authors` | Array | Names of the authors involved |
| `institutions` | Array | Affiliated institutions and organizations |
| `publication_year` | Integer | Year of publication |
| `doi` | String | Digital Object Identifier for the work |
| `abstract` | String | Reconstructed abstract/summary text |
| `cited_by_count` | Integer | Total number of citations |
| `display_name` | String | Display name for authors, institutions, or venues |
| `works_count` | Integer | Number of publications for an author/institution |
| `last_known_institution` | String | Last known institution for an author |
| `orcid` | String | ORCID identifier for researchers |
| `country_code` | String | Country code for institutions |

***

### Usage Examples

#### Basic Research Paper Search

Search for scholarly articles related to machine learning:

```json
{
  "search": "machine learning",
  "entity": "works",
  "results_wanted": 20
}
```

#### High-Impact Author Extraction

Find leading authors sorted by citation count:

```json
{
  "search": "artificial intelligence",
  "entity": "authors",
  "sort": "cited_by_count:desc",
  "results_wanted": 50
}
```

#### Institutional Profiles

Retrieve specific institution details:

```json
{
  "search": "Stanford University",
  "entity": "institutions",
  "results_wanted": 5
}
```

***

### Sample Output

Here is an example of a research work item extracted from the dataset:

```json
{
  "id": "https://openalex.org/W2741809807",
  "url": "https://openalex.org/W2741809807",
  "source": "openalex.org",
  "title": "Deep Learning",
  "authors": [
    "Yann LeCun",
    "Yoshua Bengio",
    "Geoffrey Hinton"
  ],
  "institutions": [
    "New York University",
    "Université de Montréal",
    "University of Toronto"
  ],
  "publication_year": 2015,
  "doi": "https://doi.org/10.1038/nature14539",
  "abstract": "Deep learning allows computational models that are composed of multiple processing layers...",
  "concepts": [
    "Deep learning",
    "Artificial intelligence",
    "Machine learning"
  ],
  "cited_by_count": 48512,
  "type": "journal-article"
}
```

***

### Tips for Best Results

#### Refine Your Search Queries

- Use specific terminology rather than general keywords to get highly relevant matches.
- Double check names and spelling when searching for authors and institutions.

#### Balance Results and Pages

- Set `results_wanted` to a smaller value (e.g., 20-50) for fast tests.
- Ensure `max_pages` is sufficiently high if you want to retrieve a large number of results, as each page retrieves up to 100 items.

***

### Integrations

Connect your extracted academic data with:

- **Google Sheets** — Export for spreadsheets and manual analysis
- **Airtable** — Build research databases
- **Slack** — Get alerts when new papers match your criteria
- **Webhooks** — Automate downstream data workflows

#### Export Formats

Download data in multiple standard formats:

- **JSON** — Ready for developers and APIs
- **CSV** — For spreadsheet calculations
- **Excel** — For business reporting
- **XML** — For custom integrations

***

### Frequently Asked Questions

#### Can I scrape journals and publication venues?

Yes, set the `entity` parameter to `venues` or `sources` to extract journals, conferences, and publishers.

#### How are abstracts reconstructed?

The scraper automatically converts the internal inverted index format into readable text, providing full-text summaries where available.

#### What is the limit of results I can extract?

You can retrieve thousands of records. The system handles pagination automatically to fetch up to your specified count limit.

#### Is an API key required to use this scraper?

No, the scraper handles all connections natively without requiring user-provided API credentials.

#### What should I do if a field is empty?

Some academic records may have incomplete details in the public catalog. In those cases, the corresponding fields will display as empty or null.

***

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)
- [Scheduling Runs](https://docs.apify.com/schedules)

***

### Legal Notice

This actor is designed for legitimate data collection purposes. Users are responsible for ensuring compliance with website terms of service and applicable laws. Use data responsibly and respect rate limits.

# Actor input Schema

## `search` (type: `string`):

Search query for the entity (e.g., title, author name).

## `entity` (type: `string`):

The OpenAlex entity to fetch.

## `results_wanted` (type: `integer`):

The maximum number of results to collect.

## `max_pages` (type: `integer`):

Maximum number of API pages to fetch.

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

Sort order (e.g., 'relevance\_score:desc').

## Actor input object example

```json
{
  "search": "machine learning",
  "entity": "works",
  "results_wanted": 20,
  "max_pages": 10,
  "sort": "relevance_score:desc"
}
```

# Actor output Schema

## `overview` (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 = {
    "search": "machine learning",
    "results_wanted": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/openalex-scraper").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 = {
    "search": "machine learning",
    "results_wanted": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/openalex-scraper").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 '{
  "search": "machine learning",
  "results_wanted": 20
}' |
apify call shahidirfan/openalex-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/GnI5kKxO1WxEeb6cl/builds/88smSbXlGilPrFrTX/openapi.json
