# arXiv Research Papers Scraper (`leorochasantos/arxiv-papers-scraper`) Actor

Search arXiv's 2.5M+ research papers by keyword, category, author, or paper ID. Returns clean typed JSON — no API key required.

- **URL**: https://apify.com/leorochasantos/arxiv-papers-scraper.md
- **Developed by:** [Leonardo Santos](https://apify.com/leorochasantos) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.13 / 1,000 arxiv paper results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## arXiv Research Papers Scraper

Search arXiv's 2.5M+ open-access research papers by keyword, category, author, or paper ID. Returns clean typed JSON — no API key required. The arXiv API is a stateless XML service with no auth and no rate limits; this actor is a thin, reliable HTTP → XML → JSON wrapper.

### Features

- **Keyword search** — search all fields for any query, including boolean AND/OR and exact phrases
- **Category filter** — limit results to a specific arXiv category (`cs.AI`, `stat.ML`, `hep-th`, etc.)
- **Author search** — find papers by author name
- **ID lookup** — fetch specific papers by arXiv ID (with or without version suffix)
- **Sorting** — by relevance, submission date, or last updated date, ascending or descending
- **Pagination** — `start` offset and `maxResults` limit (1–100)
- **Typed flat JSON** — one row per paper, designed for LLM / MCP consumers
- **No auth, no rate limits** — the arXiv API is entirely open

### Use cases

- Academic literature reviews and systematic surveys
- Staying current with new papers in your field
- Training data preparation for ML/NLP research
- Citation tracking and bibliometric analysis

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `query` | string | (required) | arXiv search query. Examples: `transformer`, `cat:cs.AI`, `au:bengio`, `2301.00001` |
| `searchMode` | enum | `all` | `all` (keyword), `category`, `author`, or `idList` |
| `sortBy` | enum | `relevance` | `relevance`, `submittedDate`, or `lastUpdatedDate` |
| `sortOrder` | enum | `descending` | `descending` or `ascending` |
| `maxResults` | integer | `10` | 1–100 results per run |
| `start` | integer | `0` | Pagination offset |

### Output

Each dataset row is a flat paper object:

```json
{
  "input": "transformer",
  "id": "http://arxiv.org/abs/1706.03762v7",
  "arxivId": "1706.03762v7",
  "title": "Attention Is All You Need",
  "authors": ["Ashish Vaswani", "Noam Shazeer", "Niki Parmar"],
  "abstract": "The dominant sequence transduction models are based on...",
  "categories": ["cs.CL", "cs.LG"],
  "primaryCategory": "cs.CL",
  "published": "2017-06-12T17:57:27Z",
  "updated": "2023-08-02T00:36:53Z",
  "comment": "15 pages, 5 figures",
  "journalRef": null,
  "doi": null,
  "abstractUrl": "https://arxiv.org/abs/1706.03762v7",
  "pdfUrl": "https://arxiv.org/pdf/1706.03762v7",
  "error": null,
  "scraped_at": "2026-07-28T12:00:00Z"
}
```

Empty results emit a single row with `totalResults: 0`. Error items carry a non-null `error` field and are never charged.

### Pricing

Pay per event, and **the platform usage is on us** — the price you see is the price you pay, with no compute bill on top.

| Event | Price | What one charge buys |
|---|---|---|
| arXiv paper result | **$0.0002** | Charged for each arXiv paper returned by the search. Empty results are never charged. Errors and parse failures are free. |
| Actor Start | **$0.002** | One run, whatever it returns. |

Higher Apify subscription tiers pay less on every event (Silver −20%, Gold −35%).

### Reliability

- **<2% failure rate target** over 30 days
- arXiv API has been stable since 2005 with no authentication and no rate limits
- All upstream parsing logic is isolated in `src/source.ts` for fast repair

### Limitations

- No date range filtering (arXiv API does not support it — use sort + pagination instead)
- No PDF download or content extraction (links only)
- Single query per run (no multi-query batching)
- Pure arXiv only — not a multi-source academic search

# Actor input Schema

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

arXiv search query. Examples: 'transformer', 'cat:cs.AI', 'au:bengio', or paper IDs for idList mode ('2301.00001,2301.00002'). Supports boolean AND/OR and phrase search with double-quotes.

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

How to interpret the query. 'all' = keyword search across all fields. 'category' = filter by arXiv category (query is the category, e.g. 'cs.AI'). 'author' = search by author name. 'idList' = fetch specific papers by comma-separated arXiv IDs.

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

Sort results by relevance, submission date, or last updated date.

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

Sort direction.

## `maxResults` (type: `integer`):

Maximum number of papers to return (1–100). This is a billing boundary — you are only charged for the papers actually delivered.

## `start` (type: `integer`):

Pagination offset — skip the first N results.

## `proxyConfiguration` (type: `object`):

Proxy to use for outgoing requests. arXiv is an open service with no auth; the default Apify datacenter proxy works.

## Actor input object example

```json
{
  "query": "transformer",
  "searchMode": "all",
  "sortBy": "relevance",
  "sortOrder": "descending",
  "maxResults": 10,
  "start": 0
}
```

# 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": "transformer"
};

// Run the Actor and wait for it to finish
const run = await client.actor("leorochasantos/arxiv-papers-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": "transformer" }

# Run the Actor and wait for it to finish
run = client.actor("leorochasantos/arxiv-papers-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": "transformer"
}' |
apify call leorochasantos/arxiv-papers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=leorochasantos/arxiv-papers-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/MrtSei4h4gdoQaPHV/builds/oLliEi2n8Ly2xd8lc/openapi.json
