# OpenAlex Research Works Scraper (`apt_marble/openalex-research-works-scraper`) Actor

OpenAlex research works: titles, authors, institutions, citations, abstracts and open access links.

- **URL**: https://apify.com/apt_marble/openalex-research-works-scraper.md
- **Developed by:** [Hamza](https://apify.com/apt_marble) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 1,000 results

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

## OpenAlex Research Works Scraper

Search over 250 million research works on OpenAlex. Get title, authors with institutions, abstract, citations, open access links, topics, keywords and journal for every match.

### What you get

- Keyword search across titles and abstracts
- Filter by year range, type, open access and minimum citations
- Authors with institutions and countries
- Abstract rebuilt as plain text, topics and keywords
- Best open access PDF link when one exists
- Deep pagination with no page limit

### How to use

1. Open the Input tab. The form is already filled with a working example.
2. Change the fields to your own search, or keep the example to see the output format.
3. Click **Start** and download the results as JSON, CSV, Excel or HTML from the Output tab, or read them through the Apify API.

### Input

| Field | What it does |
|---|---|
| Search query | Words to search for. |
| Published from | DD-MM-YYYY (optional). |
| Published to | DD-MM-YYYY (optional). |
| Type | Kind of work. |
| Open access only | Only works with a free full text. |
| Minimum citations | Skip works cited fewer times. |
| Sort by | Order of results. |
| Maximum results | Stop after this many works. |

Example input:

```json
{
  "query": "retrieval augmented generation",
  "sort": "relevance_score",
  "maxItems": 100
}
```

### Output

Each result is one row. Main fields:

| Field | Description |
|---|---|
| openAlexId | OpenAlex ID |
| url | OpenAlex page |
| doi | DOI |
| title | Title |
| type | Work type |
| publicationDate | Publication date |
| year | Publication year |
| citations | Times cited |
| authors | Authors with institutions |
| journal | Journal or source |
| publisher | Publisher |
| isOpenAccess | Open access |
| openAccessUrl | Best free full text link |
| abstract | Abstract (plain text) |
| topics | Topics |
| keywords | Keywords |
| referencesCount | Number of references |
| language | Language |
| isRetracted | Retracted |
| countries | Author countries |

Example output (shortened):

```json
{
  "openAlexId": "https://openalex.org/W4389519118",
  "url": "https://openalex.org/W4389519118",
  "doi": "https://doi.org/10.18653/v1/2023.emnlp-main.495",
  "title": "Active Retrieval Augmented Generation",
  "type": "conference-paper",
  "publicationDate": "2023-01-01",
  "year": 2023,
  "citations": 462,
  "authors": [
    {
      "name": "Zhengbao Jiang",
      "orcid": "https://orcid.org/0000-0002-0315-6727",
      "institutions": [
        "Carnegie Mellon University"
      ],
      "position": "first"
    },
    {
      "name": "Frank F. Xu",
      "orcid": "https://orcid.org/0000-0002-9662-7582",
      "institutions": [
        "Carnegie Mellon University"
      ],
      "position": "middle"
    },
    {
      "name": "Luyu Gao",
      "orcid": "https://orcid.org/0009-0006-5806-3022",
      "institutions": [
        "Carnegie Mellon University"
      ],
      "position": "middle"
    }
  ],
  "journal": "Conference on Empirical Methods in Natural Language Processing (EMNLP)",
  "isOpenAccess": true,
  "openAccessUrl": "https://aclanthology.org/2023.emnlp-main.495.pdf",
  "abstract": "Zhengbao Jiang, Frank Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi-Yu, Yiming Yang, Jamie Callan, Graham Neubig. Pr...",
  "topics": [
    "Topic Modeling",
    "Information Retrieval and Search Behavior",
    "Natural Language Processing Techniques"
  ],
  "keywords": [
    "retrieval-augmented generation",
    "active learning (machine learning)",
    "document retrieval"
  ],
  "referencesCount": 62,
  "language": "en",
  "isRetracted": false,
  "countries": [
    "US"
  ]
}
```

### Good to know

- The Actor never fails on a bad or empty input. It finishes with a clear message in the run status explaining what to change.
- Results are saved while the run is going, so you can open the dataset before it finishes.

### Support

Found a field that is missing or a result that looks wrong? Open an issue from the Actor page and include the run link.

# Actor input Schema

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

Words to search for.

## `dateFrom` (type: `string`):

DD-MM-YYYY (optional).

## `dateTo` (type: `string`):

DD-MM-YYYY (optional).

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

Kind of work.

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

Only works with a free full text.

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

Skip works cited fewer times.

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

Order of results.

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

Stop after this many works.

## Actor input object example

```json
{
  "query": "retrieval augmented generation",
  "type": "",
  "openAccessOnly": false,
  "minCitations": 0,
  "sort": "relevance_score",
  "maxItems": 100
}
```

# Actor output Schema

## `results` (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",
    "dateFrom": "",
    "dateTo": "",
    "type": "",
    "openAccessOnly": false,
    "minCitations": 0,
    "sort": "relevance_score",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("apt_marble/openalex-research-works-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 = {
    "query": "retrieval augmented generation",
    "dateFrom": "",
    "dateTo": "",
    "type": "",
    "openAccessOnly": False,
    "minCitations": 0,
    "sort": "relevance_score",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("apt_marble/openalex-research-works-scraper").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",
  "dateFrom": "",
  "dateTo": "",
  "type": "",
  "openAccessOnly": false,
  "minCitations": 0,
  "sort": "relevance_score",
  "maxItems": 100
}' |
apify call apt_marble/openalex-research-works-scraper --silent --output-dataset

```

## MCP server setup

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

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/p8khVqYTdLaUDPgW3/builds/D5xfJptVOPn2Qaegg/openapi.json
