# OpenAlex & arXiv Scraper – Academic Papers (`justaduck/openalex-arxiv-papers`) Actor

Search academic papers in OpenAlex and arXiv by keyword, date, open access, type or arXiv category, or look up DOIs and arXiv IDs. Get title, abstract, authors, venue, citation count, open-access link and topics, merged and de-duplicated by DOI and arXiv ID. Official APIs, no login.

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

## Pricing

from $0.70 / 1,000 papers

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/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 & arXiv Scraper – Academic Papers

**OpenAlex and arXiv paper search in one run: search academic papers by keyword, or look up a list of DOIs and arXiv IDs, merged into one de-duplicated table.**

- **What you get:** one row per paper with `title`, `abstract`, `authors`, `publicationDate`, `venue`, `doi`, `arxivId`, `citedByCount`, `isOpenAccess`, `fullTextUrl`, `topics`, arXiv categories and `sourceUrl`.
- **What it costs:** US$1.00 per 1,000 papers plus US$0.0005 per run start. Apify's free plan (US$5 of usage a month) covers about 5,000 papers. That is the price on Apify's Free plan; on paid Apify plans it goes down to US$0.70 per 1,000 papers, the "from" price on the Store page.
- **Try it:** Click **Start** on the prefilled form: it looks up two DOIs and one arXiv ID and returns 3 papers (US$0.00305) in a few seconds.

Search academic papers in **OpenAlex** (hundreds of millions of scholarly works, with citation counts and open-access status) and **arXiv** (preprints) in one run, or look up a list of DOIs and arXiv IDs. Results from both sources are merged into one table and de-duplicated by DOI and arXiv ID. Data comes only from the official public APIs: the OpenAlex works API (`api.openalex.org`) and the arXiv API (`export.arxiv.org`). No browser, no proxies, no login.

### What you can do with it

- Find papers by keyword or by words in the title, across OpenAlex and arXiv at once.
- Filter by publication date range, publication year, or "published in the last N days" (for scheduled runs).
- OpenAlex filters: open access yes/no, work type (article, preprint, review, book-chapter, dataset…), sort by citations.
- arXiv filters: subject categories (cs.CL, cs.LG, hep-th, math.CO…), with or without a query.
- Sort by relevance, newest first, or most cited (OpenAlex).
- Look up DOIs (OpenAlex) and arXiv IDs (arXiv) directly.
- Get titles, abstracts, publication dates, venues, DOIs, arXiv IDs, citation counts, open-access status and full-text links, topics / arXiv categories, institutions and (optionally) author names with ORCID iDs.
- Follow a topic on a schedule with `publishedWithinDays` (remove the papers you already have by `openalexId` or `arxivId`).

### How to use the paper scraper

1. Open [this Actor on Apify Store](https://apify.com/justaduck/openalex-arxiv-papers) and try it in Apify Console. A free Apify account is enough; no credit card is needed.
2. The input form is prefilled with a small example: it looks up two DOIs and one arXiv ID and returns 3 papers. Click **Start** to try it; it finishes in a few seconds.
3. Enter **Search queries**, or paste **DOIs to look up** and **arXiv IDs to look up**. Optionally narrow by date, **Open access**, **Work types** or **arXiv categories**, and choose **Sort by**. Set **Max items** to cap the run and its cost.
4. Click **Start** and open the **Output** tab when the run finishes. Preview the papers as a table, or export them as JSON, CSV or Excel.
5. To automate it, save the input as a task and **schedule** it, call the Actor through the **Apify API**, or send the results to Make, Zapier, n8n, Slack or a webhook with Apify **integrations**.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `queries` | string\[] | — | One search per line. Words are combined with AND; put an exact phrase in double quotes (`"retrieval augmented generation"`). `AND`/`OR`/`NOT` and parentheses are not supported (the two sources use different syntax); add one line per alternative instead. |
| `searchIn` | `all` | `title` | `all` | `all`: OpenAlex searches title, abstract, full text and keywords; arXiv searches all its fields. `title`: titles only. |
| `sources` | string\[] | `["openalex","arxiv"]` | Which sources to search. With both, OpenAlex results come first. |
| `dois` | string\[] | — | DOIs to look up in OpenAlex (`10.1234/abcd` or `https://doi.org/10.1234/abcd`). Filters and `sources` do not apply. |
| `arxivIds` | string\[] | — | arXiv IDs to look up on arXiv (`2403.01698`, `2403.01698v2`, `hep-th/9901001`, or an `arxiv.org/abs/` link). Filters and `sources` do not apply. |
| `publishedFrom`, `publishedTo` | `YYYY-MM-DD` | — | Date range (inclusive). OpenAlex: publication date. arXiv: date the first version was submitted (GMT). |
| `yearFrom`, `yearTo` | integer | — | Publication years instead of exact dates. |
| `publishedWithinDays` | integer 1–3650 | — | Today (UTC) and the N−1 days before. Use one of: dates, years, or this. |
| `openAccess` | `any` | `yes` | `no` | `any` | OpenAlex only. |
| `types` | string\[] | — | OpenAlex work types (`article`, `preprint`, `review`, `book-chapter`, `dataset`, …). OpenAlex only. |
| `arxivCategories` | string\[] | — | arXiv categories (any of them). arXiv only. Can be used without `queries`. |
| `sortBy` | `relevance` | `newest` | `citations` | `relevance` | `citations` is OpenAlex only. |
| `includeAuthors` | boolean | `true` | Author names as printed on the paper, with ORCID iDs where known, and the affiliation text arXiv authors typed in. Off: `authors` is `null`, and `institutions` is `null` for arXiv records. |
| `openAlexApiKey` | secret string | — | Optional free OpenAlex API key (see below). Stored encrypted; never written to the log or the output. |
| `maxItems` | integer 1–10,000 | `1000` | Maximum papers per run. With both sources, OpenAlex results are taken first. |

**Filters one source cannot apply.** If you set a filter that one source does not support (`openAccess`, `types` or `sortBy: citations` for arXiv; `arxivCategories` for OpenAlex), that source is **skipped** for the search and the reason is written to the run summary — you never get unfiltered results mixed in.

Example input:

```json
{
    "queries": ["large language models"],
    "sources": ["openalex", "arxiv"],
    "publishedFrom": "2024-03-01",
    "publishedTo": "2024-03-03",
    "includeAuthors": true,
    "maxItems": 10
}
```

### OpenAlex API key (optional, free)

The Actor works without a key. **Without a key, OpenAlex gives one small shared daily budget per IP address** (US$0.10 a day, about 100 searches or 1,000 filter-only calls; resets at midnight UTC — [OpenAlex pricing](https://help.openalex.org/access/example-costs/)). On Apify's servers that IP is shared with other users, so the budget may already be used up when your run starts. When that happens, the OpenAlex searches of your run fail with a clear message in the run summary (you are not charged for them); DOI lookups are still tried and arXiv still runs.

**When OpenAlex says "too many requests" (HTTP 429).** The Actor reads OpenAlex's answer and handles the two kinds differently:

- *Temporary limit* — for example OpenAlex limiting searches made without a key while its search servers are busy (it then asks to wait about 30–40 seconds), or a per-second limit. The Actor waits the time OpenAlex asks for (at most 60 seconds at a time) and tries again. Waiting is capped at about 2.5 minutes per run in total, so a run still ends within a few minutes; if OpenAlex is still refusing by then, that search fails with a message saying so (nothing charged). The other OpenAlex searches in the same run are then not tried (they are marked failed with "Not tried" in the run summary), while DOI lookups and arXiv still run. In our own test of 4 keyless searches on 2026-11-28 (a busy period), 3 got through after 0–3 waits and 1 was still refused after 4 waits — so add a free key if you need searches to succeed every time.
- *Daily budget used up* — OpenAlex says today's budget is spent (it resets at midnight UTC). Retrying cannot help, so the Actor does not wait: the OpenAlex searches of that run fail at once with a message asking you to add a free API key. DOI lookups are still tried (OpenAlex does not charge them against the budget), and arXiv still runs.

For reliable runs, get a **free** OpenAlex key with its own US$1/day budget (about 1,000 searches a day): create an account at [openalex.org](https://openalex.org/settings/api) and copy the key from *Settings → API key* ([OpenAlex docs: Authentication](https://help.openalex.org/api/authentication/)). Paste it into `openAlexApiKey`. The key is sent only to `api.openalex.org` in the `Authorization` header.

DOI lookups use OpenAlex's single-work endpoint, which OpenAlex does not charge against the budget.

### Output

One item per paper. Real example (from the input above):

```json
{
  "source": "openalex",
  "openalexId": "W4387327030",
  "arxivId": null,
  "doi": "10.4274/dir.2023.232417",
  "title": "Large language models in radiology: fundamentals, applications, ethical considerations, risks, and future directions",
  "abstract": "With the advent of large language models (LLMs), the artificial intelligence revolution in medicine and radiology is now more tangible than ever. Every day, an increasingly large number of articles are published that utilize LLMs in radiology. To adopt and safely implement this new technology in the field, radiologists should be familiar with its key concepts, understand at least the technical basics, and be aware of the potential risks and ethical considerations that come with it. In this review article, the authors provide an overview of the LLMs that might be relevant to the radiology community and include a brief discussion of their short history, technical basics, ChatGPT, prompt engineering, potential applications in medicine and radiology, advantages, disadvantages and risks, ethical and regulatory considerations, and future directions.",
  "publicationDate": "2024-03-01",
  "publicationYear": 2024,
  "type": "article",
  "language": "en",
  "venue": "Diagnostic and Interventional Radiology",
  "journalRef": null,
  "citedByCount": 289,
  "isOpenAccess": true,
  "oaStatus": "diamond",
  "fullTextUrl": "https://doi.org/10.4274/dir.2023.232417",
  "topics": [
    "Artificial Intelligence in Healthcare and Education",
    "Multimodal Machine Learning Applications",
    "Artificial Intelligence Applications"
  ],
  "arxivPrimaryCategory": null,
  "arxivCategories": null,
  "institutions": [
    "Kantonsspital Baselland",
    "University of Naples Federico II",
    "University of Zurich",
    "University Hospital Zurich",
    "University of Padua",
    "Azienda Ospedale - Università Padova",
    "University of Crete",
    "FORTH Institute of Computer Science",
    "University Hospital of Heraklion",
    "Foundation for Research and Technology Hellas",
    "University of Salerno",
    "University of Palermo",
    "Sağlık Bilimleri Üniversitesi",
    "İstanbul Başakşehir Çam ve Sakura Şehir Hastanesi"
  ],
  "authors": [
    {
      "name": "Tugba Akinci D’Antonoli",
      "orcid": "https://orcid.org/0000-0002-7237-711X"
    },
    {
      "name": "Arnaldo Stanzione",
      "orcid": "https://orcid.org/0000-0002-7905-5789"
    },
    {
      "name": "Christian Bluethgen",
      "orcid": "https://orcid.org/0000-0001-7321-5676"
    },
    {
      "name": "Federica Vernuccio",
      "orcid": "https://orcid.org/0000-0003-0350-1794"
    },
    {
      "name": "Lorenzo Ugga",
      "orcid": "https://orcid.org/0000-0001-7811-4612"
    },
    {
      "name": "Michail E. Klontzas",
      "orcid": "https://orcid.org/0000-0003-2731-933X"
    },
    {
      "name": "Renato Cuocolo",
      "orcid": "https://orcid.org/0000-0002-1452-1574"
    },
    {
      "name": "Roberto Cannella",
      "orcid": "https://orcid.org/0000-0002-3808-0785"
    },
    {
      "name": "Burak Koçak",
      "orcid": "https://orcid.org/0000-0002-7307-396X"
    }
  ],
  "authorsTruncated": false,
  "sourceUrl": "https://openalex.org/W4387327030"
}
```

#### Fields

| Field | Type | Description |
|---|---|---|
| `source` | string | `openalex` or `arxiv`: where this record came from. |
| `openalexId` | string | null | OpenAlex work ID (e.g. `W4387327030`). |
| `arxivId` | string | null | arXiv ID without version. OpenAlex records carry it when OpenAlex knows the arXiv copy. |
| `doi` | string | null | DOI without the `https://doi.org/` prefix. arXiv: the DOI the authors added (journal version), if any. |
| `title` | string | null | Title. |
| `abstract` | string | null | Abstract. For OpenAlex records this is text rebuilt from the inverted index provided by OpenAlex (OpenAlex does not provide the abstract as plain text). arXiv: the abstract as given by arXiv. `null` when the source has none. |
| `publicationDate` | string | null | `YYYY-MM-DD`. OpenAlex: publication date. arXiv: date version 1 was submitted (UTC). |
| `publicationYear` | integer | null | Year of `publicationDate`. |
| `type` | string | null | OpenAlex work type (`article`, `preprint`, …). `null` for arXiv. |
| `language` | string | null | OpenAlex language code of the title/abstract. `null` for arXiv. |
| `venue` | string | null | OpenAlex: journal / conference / repository of the primary location. `null` for arXiv. |
| `journalRef` | string | null | arXiv: journal reference added by the authors. `null` for OpenAlex. |
| `citedByCount` | integer | null | OpenAlex citation count. `null` for arXiv (arXiv has no citation counts). |
| `isOpenAccess` | boolean | null | OpenAlex open-access flag. `null` for arXiv (the arXiv API has no such field). |
| `oaStatus` | string | null | OpenAlex OA status: `diamond`, `gold`, `green`, `hybrid`, `bronze`, `closed`. |
| `fullTextUrl` | string | null | OpenAlex best open-access URL, or the arXiv PDF link. Link only; the Actor does not download files. |
| `topics` | string\[] | null | OpenAlex topics (up to 3). |
| `arxivPrimaryCategory` | string | null | arXiv primary category. |
| `arxivCategories` | string\[] | null | All arXiv categories of the paper. |
| `institutions` | string\[] | null | OpenAlex: names of the authors' institutions as matched by OpenAlex. arXiv: the affiliation text the authors typed in themselves (may include a full address); only when `includeAuthors` is on, otherwise `null`. |
| `authors` | object\[] | null | `{ name, orcid }` per author, as printed on the paper. `null` when `includeAuthors` is off. |
| `authorsTruncated` | boolean | null | OpenAlex lists at most the first 100 authors in search results; `true` means the list is cut. |
| `sourceUrl` | string | OpenAlex record page or arXiv abstract page. |

### How results from both sources are merged

- The two sources run one after the other: OpenAlex first, then arXiv.
- A paper is the same paper when it has the **same arXiv ID** (any version) **or the same DOI** (case-insensitive). OpenAlex records know the arXiv ID when OpenAlex has the arXiv copy (arXiv DOI `10.48550/arXiv.…` or an `arxiv.org/abs/` location).
- An arXiv record of a paper that OpenAlex already returned in the same run is dropped and counted in the run summary (`duplicatesDropped`). So with both sources you get the OpenAlex record (citations, open access, venue) for papers OpenAlex has, plus arXiv-only papers. Two different OpenAlex works are both returned, even if they share a DOI or arXiv ID (OpenAlex keeps them as separate works).
- DOI and arXiv ID lookups are merged the same way.
- If neither record carries a shared identifier (OpenAlex has the journal version but no link to the arXiv copy, and the arXiv record has no DOI), the two records cannot be matched and both are returned.

### Run time limit and scheduled runs

- **Time limit:** one run lasts at most 20 minutes. Results are written page by page as they arrive, so when the limit is reached everything already written is kept (and charged as usual). In the run summary (`SUMMARY` in the run's key-value store) the input that was running is marked `partial` ("time budget … more results are available") and inputs not reached are marked `not-run` (nothing charged for them).
- **Speed:** OpenAlex returns 100 papers per page (up to 5 requests per second) and arXiv 200 per page (one request every 3 seconds), so even the maximum of 10,000 papers per search finishes in a few minutes. With many searches, DOIs or arXiv IDs in one run, split them into several runs so each stays well under 20 minutes.
- **When the source fails:** a page that fails its format check is not written and the run ends as failed (results from earlier pages are kept); an input that keeps failing (timeouts, server errors) is marked `failed` or `partial`, and after 3 such inputs in a row the remaining inputs of that source are marked `not-run`.
- **Scheduled runs:** This Actor does not keep track of what earlier runs returned. To follow a topic, schedule it with `publishedWithinDays: 2` (a little overlap so nothing falls between runs): each run returns, and charges for, every paper in that window. Remove the ones you already have by `openalexId` (OpenAlex rows) or `arxivId` (arXiv rows).

### Pricing

Pay per result: **US$1.00 per 1,000 papers** (US$0.001 per paper) plus **US$0.0005 per run start**. You pay only for papers written to the dataset; searches with no results, skipped inputs, duplicates and failed searches cost nothing.

| Example | Cost |
|---|---|
| Default input (2 DOIs + 1 arXiv ID = 3 papers) | 3 × $0.001 + $0.0005 = **$0.0035** |
| 500 papers | 500 × $0.001 + $0.0005 = **$0.5005** |

Discounts by Apify plan (per 1,000 results): Free $1.00, Bronze $0.90, Silver $0.80, Gold $0.70.

**Free plan:** Apify's free plan includes US$5 of prepaid usage every month (no credit card needed). With this Actor that is enough for about 5,000 papers a month.

### Use with AI agents (MCP)

AI agents can run this Actor through the [Apify MCP server](https://docs.apify.com/mcp) (Model Context Protocol). There are two ways to connect:

- **Load this Actor as its own tool:** add `https://mcp.apify.com?tools=justaduck/openalex-arxiv-papers` to your MCP client. The server exposes it as the tool `justaduck--openalex-arxiv-papers`.
- **Let the agent find it:** connect to `https://mcp.apify.com` (default tools). The agent can find this Actor with `search-actors`, read its input schema with `fetch-actor-details` and start it with `call-actor`.

On first connection you sign in to Apify with OAuth (or send your Apify API token as a Bearer header). The agent passes the same fields as in the Input section. A run returns its dataset ID, and the agent reads the rows with `get-dataset-items`. Runs started this way run on your Apify account and are charged as in the Pricing section; `call-actor` also accepts `maxTotalChargeUsd` in `callOptions` to cap what one run can spend.

### FAQ

**Do I need an account or API key?** No account. An OpenAlex key is optional but recommended (free, see above). arXiv needs no key.

**How fresh is the data?** Each run queries both APIs live.

**How many papers can one run return?** Up to 10,000 (`maxItems`). OpenAlex results are paged with `page`/`per_page`, which OpenAlex allows for the first 10,000 results of a search, with or without a key. For more, split the search by date range.

**Why is arXiv slower?** arXiv's terms ask for no more than one request every three seconds; the Actor follows that (200 papers per request).

**Why does a search return the OpenAlex part only?** `maxItems` counts the whole run and OpenAlex results come first. If OpenAlex already filled `maxItems`, the arXiv search is not run (it is listed as `not-run` in the run summary). Raise `maxItems` or run arXiv separately.

**What if one of my arXiv IDs is not valid?** IDs are checked against arXiv's identifier format first; an invalid one is skipped with the reason and the others are still looked up. If arXiv rejects an ID that looked valid, only that ID is skipped. If arXiv rejects every ID of a batch (up to 100 IDs per batch; two or more IDs) or keeps rejecting a large batch, the batch is reported as an arXiv failure (try again later) rather than as invalid IDs. A single ID given on its own that arXiv rejects is reported as that ID's problem. If a source is down (server errors or timeouts after retries), the remaining inputs for that source are marked failed instead of being retried one by one, so a run still finishes within a few minutes.

**What happens with a wrong input?** A bad date, an unknown work type, a malformed DOI or arXiv ID, or a query with `OR`/parentheses skips only that input; the reason is in the run summary (`SUMMARY` in the key-value store) and everything else still runs. A DOI or arXiv ID that does not exist is skipped the same way. The run fails only if every input is invalid.

**What if OpenAlex or arXiv changes its API?** Every response is checked. If required fields disappear or change type, the run fails with "Source format changed" instead of returning wrong or half-filled data.

**Does it download PDFs?** No. arXiv's API terms do not allow serving e-prints from other servers; you get the official links.

**What licence is the data under?** OpenAlex: "Every record is released under a CC0 public-domain license" ([OpenAlex pricing](https://help.openalex.org/access/pricing/)). arXiv: descriptive metadata (title, abstract, authors, identifiers, categories) is free to use under CC0 1.0 ([arXiv API terms of use](https://info.arxiv.org/help/api/tou.html)). This Actor is not affiliated with or endorsed by OpenAlex or arXiv.

### What this Actor does not output, and why

- **Author names only if you want them.** Author bylines are public bibliographic data, but they are names of people, so they are behind `includeAuthors` (on by default). Turn it off and `authors` is `null`. The data comes from the official public records; you are responsible for how you use it.
- **No author emails or other personal details.** Only the name as printed on the paper and the public ORCID iD. For OpenAlex records, `institutions` lists institution names matched by OpenAlex (OpenAlex's raw affiliation strings are not returned). For arXiv records, `institutions` is the affiliation text the authors typed in (it can include a street address); it is returned only when `includeAuthors` is on, with email addresses and phone numbers removed.
- **Email addresses and phone numbers in text are removed.** In titles, abstracts and all other text fields they are replaced with `[email removed]` / `[phone removed]` (best effort). Names written inside abstracts are not removed.
- **No PDFs or source files** (links only).

### Related Actors

Another research data Actor by the same author:

- **[Wikipedia Scraper – Articles, Wikidata & Pageviews](https://apify.com/justaduck/wikipedia-wikidata-scraper)**: Wikipedia articles in any language with Wikidata facts and 30-day pageviews. Use it for background articles and Wikidata facts on the topics, people and institutions in your papers.

# Actor input Schema

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

One search per line. Words are combined with AND; put an exact phrase in double quotes, e.g. "retrieval augmented generation". Boolean operators and parentheses are not supported: add one line per alternative instead.

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

all = title, abstract and (OpenAlex) full text and keywords; arXiv: all fields. title = titles only.

## `sources` (type: `array`):

Where to search. With both, OpenAlex results come first and arXiv papers already found in OpenAlex (same DOI or arXiv ID) are dropped. DOI and arXiv ID lookups below ignore this setting.

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

Look up these works in OpenAlex directly (10.1234/abcd or https://doi.org/10.1234/abcd). Filters do not apply. DOIs not found are listed in the run summary.

## `arxivIds` (type: `array`):

Look up these papers on arXiv directly (2403.01698, 2403.01698v2, hep-th/9901001 or an arxiv.org/abs/ link). Filters do not apply.

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

YYYY-MM-DD. OpenAlex: publication date. arXiv: date the first version was submitted (GMT).

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

YYYY-MM-DD (inclusive).

## `yearFrom` (type: `integer`):

First publication year (instead of exact dates).

## `yearTo` (type: `integer`):

Last publication year (inclusive).

## `publishedWithinDays` (type: `integer`):

Relative window for scheduled runs: today (UTC) and the N-1 days before. Use instead of the dates or years above.

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

OpenAlex only (arXiv has no such field; with this set, arXiv is skipped for searches).

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

OpenAlex work types, e.g. article, preprint, review. OpenAlex only (arXiv is skipped for searches when set).

## `arxivCategories` (type: `array`):

arXiv subject categories such as cs.CL, cs.LG, hep-th, math.CO (any of them). arXiv only (OpenAlex is skipped for searches when set). Can be used without a query.

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

relevance (both sources), newest (OpenAlex publication date / arXiv submission date) or citations (OpenAlex only; arXiv is skipped for searches).

## `includeAuthors` (type: `boolean`):

Author bylines as published on each paper, with ORCID iDs where known, plus the affiliation text arXiv authors typed in. This is public bibliographic data from OpenAlex/arXiv; you are responsible for how you use it. Off = authors is null, and institutions is null for arXiv records.

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

Free key from https://openalex.org/settings/api . Without a key, OpenAlex shares one small daily budget per IP address (US$0.10 a day, about 100 searches), which other users on the same IP may already have used. Stored encrypted; never written to the log or output.

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

Maximum number of papers to return in this run (default 1,000, up to 10,000). With both sources, OpenAlex results are taken first. You pay only for papers returned.

## Actor input object example

```json
{
  "searchIn": "all",
  "sources": [
    "openalex",
    "arxiv"
  ],
  "dois": [
    "10.1038/nature14539",
    "10.1038/s41586-021-03819-2"
  ],
  "arxivIds": [
    "1706.03762"
  ],
  "publishedFrom": "2024-03-01",
  "publishedTo": "2024-03-03",
  "openAccess": "any",
  "sortBy": "relevance",
  "includeAuthors": true,
  "maxItems": 10
}
```

# Actor output Schema

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

One dataset item per result. Field descriptions are in the dataset schema.

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

SUMMARY record: per-input status, item counts and the reason for any skipped or failed input.

# 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 = {
    "dois": [
        "10.1038/nature14539",
        "10.1038/s41586-021-03819-2"
    ],
    "arxivIds": [
        "1706.03762"
    ],
    "publishedFrom": "2024-03-01",
    "publishedTo": "2024-03-03",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("justaduck/openalex-arxiv-papers").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 = {
    "dois": [
        "10.1038/nature14539",
        "10.1038/s41586-021-03819-2",
    ],
    "arxivIds": ["1706.03762"],
    "publishedFrom": "2024-03-01",
    "publishedTo": "2024-03-03",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("justaduck/openalex-arxiv-papers").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 '{
  "dois": [
    "10.1038/nature14539",
    "10.1038/s41586-021-03819-2"
  ],
  "arxivIds": [
    "1706.03762"
  ],
  "publishedFrom": "2024-03-01",
  "publishedTo": "2024-03-03",
  "maxItems": 10
}' |
apify call justaduck/openalex-arxiv-papers --silent --output-dataset

```

## MCP server setup

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

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/9Gd0EAscfygK9ddFU/builds/qCyw6Dfryj7my3S85/openapi.json
