# OpenAlex API Scraper: Works, DOI, Funders, Institutions (`s-r/openalex-scraper`) Actor

Search OpenAlex scholarly works or look up DOI and work IDs. Filter by publication year, citations, open access, institution, country, funder and grant. Export authors, funding, topics and citation history.

- **URL**: https://apify.com/s-r/openalex-scraper.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** Education, Business
- **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 work returneds

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 Scraper

OpenAlex Scraper searches scholarly works and retrieves publications by DOI or OpenAlex work ID. Combine research topics with institution, country, funding, publication year, citation and open access filters. Each result includes a consistent scholarly record that you can export for literature discovery, institutional reporting and research analytics.

The actor returns records from OpenAlex. It searches the academic index directly, and the returned `engine` is `openalex`. Coverage, citation counts and funding matches reflect what that index knows at the time of collection. A missing record does not prove that the publication does not exist elsewhere.

### OpenAlex Scraper input

Provide at least one search term, DOI, work ID or filter. `queries` accepts either one string or an array of strings. Whitespace is trimmed, empty terms are removed, and duplicate terms are searched once. Every term has its own result limit and ranking. You can supply up to one hundred terms in one run.

This input was used to retrieve the three works in the included search example:

```json
{
  "queries": ["crispr"],
  "year_from": 2023,
  "year_to": 2023,
  "open_access_only": true,
  "work_types": ["article"],
  "min_citations": 51,
  "max_results": 3
}
```

For identifier lookup, put DOI strings in `dois` or OpenAlex work identifiers in `openalex_ids`. DOI URLs and the `doi:` prefix are accepted. DOI values are normalized to lowercase. Work identifiers may be written as `W2100837269` or as the complete OpenAlex URL. Matching rows are returned in the order of the normalized input list. Duplicate identifiers are processed once. Unknown identifiers produce a warning and no dataset row; filters can also exclude an otherwise valid identifier.

#### Filters and ordering

Publication years use inclusive `year_from` and `year_to` bounds. Use `open_access_only` for an open access restriction, or `oa_status` for gold, green, hybrid, bronze, diamond or closed status. `min_citations` is inclusive. `work_types` accepts article, book, book-chapter, book-review, conference-abstract, conference-paper, data-paper, dataset, dissertation, editorial, erratum, letter, libguides, other, paratext, peer-review, preprint, reference-entry, report, retraction, review, software, software-paper, standard, supplementary-materials.

Use `institution_rors` for ROR identifiers or URLs, `countries` for institution country codes, `funder_ids` for OpenAlex funder IDs, and `award_ids` for either OpenAlex grant IDs or funder award numbers. Values within one filter field are alternatives; different filter fields are combined. Use one award identifier form per request: OpenAlex IDs and grant numbers cannot be mixed in the same `award_ids` array. Country filtering concerns author affiliations, rather than the language of a publication.

The optional `language` field restricts publication language using a two-letter code. Sorting supports `relevance`, `cited_by_count:desc`, `publication_date:desc` and `publication_date:asc`. Without a search term, relevance uses the source's default ordering. `max_results` defaults to one hundred and permits up to ten thousand works per search term or filter-only stream. DOI and work-ID lists are processed in full, independently of that numeric limit. When forms are combined, search terms are processed first, followed by DOIs and work IDs, with the same filters applied throughout.

### Output and exports

The default dataset contains one scholarly work per row. Core fields include `source`, `fetched_at`, `engine`, `url`, `title`, `doi`, `authors`, `venue`, `year`, `cited_by_count`, `abstract`, `pdf_url` and `language`. Search results also have `query`. Identifier lookups and filter-only lists omit that field. `position` follows the individual search stream or original normalized identifier list, including gaps for missing identifiers.

Additional fields include `openalex_id`, `publication_date`, `type`, `is_oa`, `oa_status`, `oa_url`, `pmid`, `pmcid`, `awards`, `funders`, `institutions`, `countries`, `topics`, `primary_topic`, `referenced_works_count`, `counts_by_year`, `fwci`, `is_retracted` and `biblio`. Funding arrays include source grant and funder identifiers so you can join results to your own research information system. Institutions are collected from authorships and deduplicated by their identifier.

An absent DOI, venue, PDF or publication date is represented by null. An absent abstract is an empty string; `include_abstract: false` also produces an empty string. List fields remain arrays even when no values are known. Abstracts are reconstructed from the source's inverted word index, without adding text. A PDF link indicates a location known to the index; the actor does not download full-text files or promise that every linked document remains accessible.

The run output also reports warnings, whether results are partial, and a continuation cursor when collection remains unfinished. The actor follows those continuations automatically during a normal Apify run. Source limits or exhausted run time can leave a partial collection; inspect its warnings before treating it as complete. `total_count` describes source matches for the current stream, which can exceed your requested delivery limit.

### OpenAlex Scraper use cases

- **Institutional output:** combine a university's ROR with a publication year range to list its works, then group by `type`, `oa_status` or `topics`.
- **Funding analysis:** filter on `funder_ids` or `award_ids` and read the `awards` and `funders` arrays to see which publications a funder or grant is linked to.
- **Pharma and biotech monitoring:** run recurring topic searches with a citation threshold and sort by publication date to follow new open access research.
- **Bibliographic enrichment:** pass a list of DOIs and receive title, authors, venue, citation count and citation history for each, in your input order.
- **Literature discovery:** search several terms in one run, restrict to articles or reviews, and export abstracts and PDF links where the index has them.

### OpenAlex Scraper compared with the alternatives

| Option | What you get | What you have to do |
|---|---|---|
| Calling the OpenAlex API yourself | Full control over every parameter | Write cursor paging, filter syntax, abstract reconstruction and retry logic, and keep it running |
| Exporting from a web search page | A few hundred records at a time | Repeat by hand, with no stable record format |
| This actor | One consistent row per work, filters as plain input fields, DOI and ID lookup, funding and institution arrays | Fill in the input form or call the actor from your own code |

Other OpenAlex actors exist in the Store. This one is built around funding and institutional analysis: ROR, country, funder and grant filters, `awards`, `funders`, `institutions` and `counts_by_year` are part of every row, and every field keeps the same type from run to run.

### Pricing and result limits

The billing unit is one delivered scholarly work. The configured event is `work-scraped`; missing identifiers and empty searches produce no billable row. There is no configured start event. Consult the actor's current Pricing tab for the published rate and any account-specific terms.

Accounts subject to the free-plan limit receive at most ten rows per run, and their numeric request limit and identifier lists are capped before collection. This is a volume limit; the Pricing tab determines the applicable charges. Paid accounts can collect multiple search streams and larger identifier batches within their selected run limits. The same work matching two different search terms may appear once under each term, and each delivered row is counted.

### Data quality and responsible interpretation

OpenAlex funding matches can be noisy. Some works carry hundreds of awards or funders, and those lists are preserved as provided by the source. Verify grant attribution against an authoritative grant register before using it for financial reporting. Citation counts are specific to the index and should be compared within that source. Large collaborations may have authorships truncated by OpenAlex, so a list response is not a guarantee of every contributor or affiliation.

### FAQ

#### Can I look up a DOI instead of running a topic search?

Yes. Supply an array in `dois`. The actor accepts bare DOIs and DOI URLs, restores input order, and reports identifiers that are unknown or excluded by your filters.

#### Can I measure a university's funded publications?

Yes. Combine its ROR in `institution_rors` with `funder_ids` or `award_ids`, and optionally restrict publication years. Check the returned institution and funding arrays when interpreting the results.

#### Does every work include an abstract or PDF?

No. The actor returns only what the index supplies. Missing abstracts remain empty strings and missing PDF links remain null. Open access status alone does not guarantee a direct PDF URL.

#### What happens if the source is temporarily unavailable?

No diagnostic rows are added to the dataset. The run reports a readable error or partial-result warning, and only delivered works count toward row billing. A service budget limit may require waiting for the source budget to reset.

# Actor input Schema

## `queries` (type: `array`):

Search terms. Each unique term is searched separately; up to 100 terms.

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

DOIs, DOI URLs or doi: identifiers, returned in input order. Unknown or filtered DOIs produce warnings.

## `openalex_ids` (type: `array`):

OpenAlex work IDs (W followed by digits) or OpenAlex URLs, returned in input order.

## `year_from` (type: `integer`):

First publication year, inclusive.

## `year_to` (type: `integer`):

Last publication year, inclusive.

## `open_access_only` (type: `boolean`):

Only works marked open access by OpenAlex.

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

Optional open access category.

## `work_types` (type: `array`):

OpenAlex work types, combined with OR. See the README for supported types.

## `min_citations` (type: `integer`):

Minimum citation count, inclusive.

## `institution_rors` (type: `array`):

ROR institution IDs or https://ror.org URLs, combined with OR.

## `countries` (type: `array`):

ISO 3166-1 alpha-2 institution country codes, combined with OR.

## `funder_ids` (type: `array`):

OpenAlex funder IDs (F followed by digits) or OpenAlex URLs, combined with OR.

## `award_ids` (type: `array`):

OpenAlex award IDs (G followed by digits) OR funder grant numbers. Do not mix the two forms in one request.

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

Optional ISO 639-1 publication language.

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

Result ordering. Relevance uses the OpenAlex default when no search term is supplied.

## `max_results` (type: `integer`):

Maximum works per query or filter-only stream. DOI and ID lists are processed in full.

## `include_abstract` (type: `boolean`):

Return reconstructed full abstracts where available. Missing abstracts remain empty strings.

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

Opaque continuation cursor. Repeat all other input unchanged; Apify follows this automatically.

## Actor input object example

```json
{
  "queries": [
    "crispr"
  ],
  "year_from": 2023,
  "year_to": 2023,
  "open_access_only": false,
  "oa_status": "",
  "work_types": [
    "article"
  ],
  "min_citations": 51,
  "language": "",
  "sort": "relevance",
  "max_results": 100,
  "include_abstract": true
}
```

# Actor output Schema

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

One row per OpenAlex work.

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

Row counts, pagination cursor and unresolved identifiers.

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

Failures with a code and a redacted message.

# 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 = {
    "queries": [
        "crispr"
    ],
    "year_from": 2023,
    "year_to": 2023,
    "work_types": [
        "article"
    ],
    "min_citations": 51
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/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 = {
    "queries": ["crispr"],
    "year_from": 2023,
    "year_to": 2023,
    "work_types": ["article"],
    "min_citations": 51,
}

# Run the Actor and wait for it to finish
run = client.actor("s-r/openalex-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 '{
  "queries": [
    "crispr"
  ],
  "year_from": 2023,
  "year_to": 2023,
  "work_types": [
    "article"
  ],
  "min_citations": 51
}' |
apify call s-r/openalex-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,s-r/openalex-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/7RxCEj9Wa3oFdPgoL/builds/5vGtHJui9WiMUACam/openapi.json
