# arXiv Paper Scraper (`rainminer/arxiv-paper-scraper`) Actor

Search arXiv and export papers with authors, abstracts, primary and cross-listed categories, submission dates, DOI, journal reference and PDF link. Query by keyword, author, title or category, or fetch exact arXiv ids. No API key, no login.

- **URL**: https://apify.com/rainminer/arxiv-paper-scraper.md
- **Developed by:** [rainminer](https://apify.com/rainminer) (community)
- **Categories:** AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.74 / 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/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

## arXiv Paper Scraper

Search arXiv and get clean, structured paper metadata: authors, abstract,
categories, submission and update dates, DOI, journal reference and a direct PDF
link. Look papers up by keyword, author, title or category, or fetch exact arXiv
ids.

arXiv runs on an open API. This Actor turns its Atom feed into one dataset row
per paper, so a literature review, a monitoring job or a research dashboard can
work with rows instead of XML.

### What you get

One row per paper:

- `arxivId` and `version`
- `title` and `abstract`, with the whitespace arXiv injects collapsed
- `authors` in the order arXiv lists them
- `primaryCategory` plus every `categories` entry, including cross-lists
- `publishedAt` and `updatedAt`
- `absUrl` and `pdfUrl`
- `doi`, `journalRef` and the author `comment` when supplied
- `matchedQuery`, so a combined run stays traceable

A `SUMMARY` record reports the queries, paper count, request count and any query
that returned nothing.

### Use cases

1. Track new papers in a category, such as all of cs.CL, every morning.
2. Follow one author's output by using `au:` in the query.
3. Fetch exact ids from a reading list and keep the metadata in one table.
4. Build a dataset of abstracts for topic modelling or search.
5. Watch for papers that cite a method you care about.
6. Find papers with a DOI and journal reference, which means peer review.
7. Collect cross-listed papers that a single category filter misses.
8. Monitor submissions before a conference deadline.
9. Feed a literature review pipeline with title, abstract and PDF links.
10. Track how often a research group publishes by author list.

### Input

| Field | Default | Meaning |
| --- | --- | --- |
| `searchQueries` | required unless ids given | arXiv query syntax, for example `cat:cs.CL AND all:retrieval` |
| `arxivIds` | empty | Exact ids such as `2401.01234`, `2401.01234v2` or a full abs URL |
| `sortBy` | `submittedDate` | `submittedDate`, `lastUpdatedDate` or `relevance` |
| `sortOrder` | `descending` | Newest first or oldest first |
| `maxResultsPerQuery` | `50` | Papers kept per query, up to 2000 |

Query syntax worth knowing: `all:` searches everything, `ti:` title, `au:` author,
`abs:` abstract, `cat:` category, and `AND`, `OR`, `ANDNOT` combine them.

### How much it costs

| Event | Price | Charged when |
| --- | --- | --- |
| Paper | $0.00099 per paper | A paper is written to the dataset |

A default run of 50 papers costs about five cents. The arXiv API is free to
read, so no proxy or platform usage is billed on top.

### Output example

```json
{
  "arxivId": "2401.01234",
  "version": "v2",
  "title": "Scaling Attention with Sparse Routing & Cheap Kernels",
  "authors": ["Ada Lovelace", "Grace Hopper"],
  "abstract": "We study sparse routing for attention layers ...",
  "publishedAt": "2024-01-02T14:30:00Z",
  "primaryCategory": "cs.LG",
  "categories": ["cs.LG", "cs.CL"],
  "absUrl": "https://arxiv.org/abs/2401.01234",
  "pdfUrl": "http://arxiv.org/pdf/2401.01234v2",
  "doi": "10.1234/example.doi"
}
```

### Limits worth knowing before you buy

- arXiv asks callers to space requests out, so the Actor waits about three
  seconds between pages. Large runs are steady rather than instant.
- `relevance` sorting is arXiv's own score and is not documented in detail, so
  paging through it can be less stable than date sorting.
- The abstract is text only. Full text and figures are not extracted, but the
  PDF link is on every row.
- Retracted papers are not flagged by the API. Check the abs page when that
  matters.
- Category names change over time on arXiv. The Actor reports what the feed
  says rather than mapping to a fixed list.

### Local development

```bash
yarn install
yarn test
yarn start
```

Tests parse a recorded arXiv feed and need no network access.

# Actor input Schema

## `searchQueries` (type: `array`):

arXiv query syntax. Examples: all:electron, cat:cs.CL, au:Einstein, ti:diffusion, and compounds such as all:transformer AND cat:cs.CL.

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

Optional. Fetch these papers by id, ignoring the search queries. Accepts 2401.01234, 2401.01234v2, or a full abs URL.

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

How arXiv orders the matches before the page is taken.

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

Newest first, or oldest first.

## `maxResultsPerQuery` (type: `integer`):

How many papers to keep for each query. arXiv pages 100 at a time, and the Actor waits between pages as arXiv asks.

## Actor input object example

```json
{
  "searchQueries": [
    "cat:cs.CL AND all:retrieval"
  ],
  "sortBy": "submittedDate",
  "sortOrder": "descending",
  "maxResultsPerQuery": 50
}
```

# Actor output Schema

## `papers` (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 = {
    "searchQueries": [
        "cat:cs.CL AND all:retrieval"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rainminer/arxiv-paper-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 = { "searchQueries": ["cat:cs.CL AND all:retrieval"] }

# Run the Actor and wait for it to finish
run = client.actor("rainminer/arxiv-paper-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 '{
  "searchQueries": [
    "cat:cs.CL AND all:retrieval"
  ]
}' |
apify call rainminer/arxiv-paper-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rainminer/arxiv-paper-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/7t5hGEkacddGKyAyC/builds/ziOLV0pUO7GG421c9/openapi.json
