# OpenAlex Scholarly Works Search: Papers, Citations, Abstracts (`fecklesspleb/openalex-works-search`) Actor

Search 300M+ scholarly works in OpenAlex (CC0 metadata) by keywords, year, type and open access, or look up a DOI list. Title, DOI, year, citations, open-access link, authors, institutions, abstract and topics. Unofficial.

- **URL**: https://apify.com/fecklesspleb/openalex-works-search.md
- **Developed by:** [fecklesspleb](https://apify.com/fecklesspleb) (community)
- **Categories:** Education, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 scholarly works

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 Works Search

Search more than 300 million scholarly works (journal articles, preprints, books, datasets) in **OpenAlex**, the open catalogue of research, by keywords, publication year, work type and open access, or look up a list of DOIs. Each result has the title, DOI, year, citation count, open-access status and link, journal or source, author and institution names, the abstract when OpenAlex has one, and topics. Open CC0 scholarly metadata for literature search, bibliometrics and research monitoring.

Unofficial; not affiliated with OpenAlex or OurResearch. OpenAlex metadata is CC0. Abstracts are rebuilt from OpenAlex's index and may be copyrighted by their authors or publishers (OpenAlex does not ship plaintext abstracts "for legal reasons"); check reuse rights before republishing them.

### What you get

| Field | Meaning |
|---|---|
| `recordType` | `item` for a work, `status` for a free status row (see below) |
| `id` | OpenAlex work ID (URL) |
| `doi`, `doiUrl` | DOI (lower case) and its https://doi.org link |
| `title`, `publicationYear`, `publicationDate`, `type`, `language` | Basic bibliographic data |
| `citedByCount` | Citations counted by OpenAlex |
| `isOpenAccess`, `oaStatus`, `oaUrl`, `pdfUrl` | Open-access status and the best free copy OpenAlex knows |
| `source` | Journal, repository or other source name |
| `authors`, `authorsCount` | Author display names (first 100) and the total number of authors |
| `authorships` | For each author (first 100): `author` name and `institutions` names |
| `institutions` | All institution names on the work |
| `abstract` | Rebuilt from OpenAlex's abstract index when `includeAbstract` is true (off by default). Abstracts may be copyrighted by their authors or publishers (OpenAlex does not ship plaintext abstracts "for legal reasons"); check reuse rights before republishing them. |
| `primaryTopic`, `topics`, `concepts` | OpenAlex subject labels (concepts: top 10 by score) |
| `dataSource` | Data from OpenAlex (https://openalex.org). OpenAlex metadata is CC0. Abstracts are rebuilt from OpenAlex's index and may be copyrighted by their authors or publishers (OpenAlex does not ship plaintext abstracts "for legal reasons"); check reuse rights before republishing them. |

Only the public bibliographic names are kept. ORCID iDs, emails and raw affiliation strings are never output, including in abstracts when `includeAbstract` is true (ORCID URLs and Cloudflare "\[email protected]" placeholders are removed too).

### Input

| Field | Default | Notes |
|---|---|---|
| `search` | `large language models` | Keywords; empty to list by filters only |
| `dois` | none | Up to 1,000 DOIs; when set, search text is ignored and every DOI found is returned |
| `fromYear`, `toYear` | none | Publication year range |
| `types` | all | `article`, `review`, `preprint`, `book`, `book-chapter`, `dataset`, ... |
| `openAccessOnly` | `false` | Only works free to read somewhere |
| `oaStatus` | `any` | `diamond`, `gold`, `green`, `hybrid`, `bronze`, `closed` |
| `sort` | relevance with search text, else newest | `relevance`, `mostCited`, `newest`, `oldest` |
| `includeAbstract` | `false` | Rebuild the abstract from OpenAlex's index when OpenAlex has one. Off by default. |
| `maxItems` | `9` | Up to 10,000 (OpenAlex's paging limit) |
| `apiKey` | none | Your own free OpenAlex API key (secret). Recommended, see below |

#### Why an OpenAlex API key helps

OpenAlex is free, but it meters API usage. Without a key, every caller on the same IP address shares one free budget of $0.10 a day (about 100 searches or 1,000 filter requests). On Apify, other users can share your IP address, so that budget can be used up by someone else. With your own free key (create one at openalex.org, Settings, API key) you get $1 a day of free OpenAlex usage for yourself. The key is stored encrypted, sent only in the Authorization header, and never logged or saved. If the budget runs out mid-run, the run stops and saves a free status row explaining this.

### Status rows (free)

The dataset is never empty. When nothing could be saved (no matches, invalid input, OpenAlex rate limit or budget, robots.txt refusal, or a maximum cost per run too low for one work), the run writes one row with `recordType: "status"` and a `message`. DOIs not found in OpenAlex are listed in one status row (`doisNotFound`). Status rows are never charged. Skip them in your code as shown below.

### Pricing

Pay per event: **$0.001 per work** saved ($1 per 1,000). No start fee; status rows are free. The default input saves at most 9 works ($0.009). The run stops at your maximum cost per run.

### Use it from code

Python (apify-client 3.x):

```python
from apify_client import ApifyClient

client = ApifyClient('<YOUR_APIFY_TOKEN>')
run = client.actor('<USERNAME>/openalex-works-search').call(run_input={
    'search': 'coral reef bleaching',
    'fromYear': 2020,
    'openAccessOnly': True,
    'sort': 'mostCited',
    'maxItems': 100,
})
for item in client.dataset(run.default_dataset_id).iterate_items():
    if item.get('recordType') != 'item':
        print('status:', item.get('message'))
        continue
    print(item['publicationYear'], item['citedByCount'], item['title'], item['doiUrl'])
```

JavaScript (apify-client):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('<USERNAME>/openalex-works-search').call({
    search: 'coral reef bleaching',
    fromYear: 2020,
    openAccessOnly: true,
    sort: 'mostCited',
    maxItems: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
    if (item.recordType !== 'item') continue; // free status rows
    console.log(item.publicationYear, item.citedByCount, item.title, item.doiUrl);
}
```

### Data source and licence

Data comes from the OpenAlex API (https://help.openalex.org/api/), which states that "all data is CC0". OpenAlex metadata is CC0. Abstracts are rebuilt from OpenAlex's index and may be copyrighted by their authors or publishers (OpenAlex does not ship plaintext abstracts "for legal reasons"); check reuse rights before republishing them. OpenAlex requests the citation: Priem, J., Piwowar, H., & Orr, R. (2022). OpenAlex: A fully-open index of scholarly works, authors, venues, institutions, and concepts. arXiv:2205.01833. Each row records the source in `dataSource`.

### Limits

- Up to 10,000 works per search (OpenAlex's page-paging limit).
- Relevance order needs search text.
- Keyless runs share OpenAlex's small per-IP budget; add your own key for reliable use.

# Changelog

This Actor's version history is a separate document: https://apify.com/fecklesspleb/openalex-works-search/changelog.md

# Actor input Schema

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

Keywords matched against titles, abstracts and full text by OpenAlex. Leave empty to list works by filters only, or when you give a DOI list.

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

Optional. Look up these works by DOI (10.1234/abc, doi:10.1234/abc or https://doi.org/10.1234/abc), up to 1,000 per run. When set, the search text is ignored; the year, type and open-access filters still apply. DOIs not in OpenAlex are listed in one free status row.

## `fromYear` (type: `integer`):

Optional. Only works published in or after this year.

## `toYear` (type: `integer`):

Optional. Only works published in or before this year.

## `types` (type: `array`):

Optional. Only these OpenAlex work types. Empty means all types.

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

Only works that are free to read somewhere (OpenAlex is_oa).

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

Optional. Only works with this OpenAlex open-access status.

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

Empty means relevance when there is search text, otherwise newest first.

## `includeAbstract` (type: `boolean`):

Rebuild the abstract text from OpenAlex's abstract index when OpenAlex has one. Off by default. Abstracts may be copyrighted by their authors or publishers; check reuse rights before republishing them.

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

Stop after this many works are saved (up to 10,000, OpenAlex's paging limit). With a DOI list, the cap rises to the number of DOIs (each DOI found is one work; use the maximum cost per run to cap spend).

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

Your own free OpenAlex API key (openalex.org/settings/api). Without it, OpenAlex gives one free budget of $0.10 a day shared by everyone on the same IP address, which on Apify can run out. With it you get your own $1 a day of free OpenAlex usage (about 1,000 searches or 10,000 filter requests). Stored encrypted, sent only in the Authorization header, never logged or saved.

## Actor input object example

```json
{
  "search": "large language models",
  "openAccessOnly": false,
  "oaStatus": "any",
  "includeAbstract": false,
  "maxItems": 9
}
```

# Actor output Schema

## `works` (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 = {
    "search": "large language models",
    "maxItems": 9
};

// Run the Actor and wait for it to finish
const run = await client.actor("fecklesspleb/openalex-works-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 = {
    "search": "large language models",
    "maxItems": 9,
}

# Run the Actor and wait for it to finish
run = client.actor("fecklesspleb/openalex-works-search").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 '{
  "search": "large language models",
  "maxItems": 9
}' |
apify call fecklesspleb/openalex-works-search --silent --output-dataset

```

## MCP server setup

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

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/fA8RL1C4HKr53TPtH/builds/CscZsaAWXSE15CE8I/openapi.json
