# arXiv Pro Scraper - API & Full Text (`exuberant_promotion/arxiv-pro-scraper`) Actor

A professional, low-cost arXiv scraper that uses the official API to find papers, then downloads, cleans, and chunks the full PDF text—creating AI-ready datasets in one click.

- **URL**: https://apify.com/exuberant_promotion/arxiv-pro-scraper.md
- **Developed by:** [Lukas](https://apify.com/exuberant_promotion) (community)
- **Categories:** AI, Automation, Developer tools
- **Security:** Full permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 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.

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 API & Full-Text Scraper (AI-Ready)

This Apify Actor provides a complete, AI-ready dataset from arXiv.org.

It uses the **official arXiv API** for fast and reliable metadata scraping, then downloads, cleans, and chunks the full text from each paper's PDF.

This tool is designed for AI/LLM developers, researchers, and data scientists who need high-quality text corpora for model training and Retrieval-Augmented Generation (RAG) pipelines.

### Key Competitive Features

- **⚡️ Blazing Fast & Low Cost:** Uses the official arXiv API, not a slow browser, to find papers. This is thousands of times faster and cheaper than other scrapers.
- **🤖 AI-Ready Chunking:** Automatically splits the clean text into overlapping chunks, perfect for ingestion into vector databases (RAG).
- **🧹 Automatic Text Cleaning:** Cleans the raw PDF text to remove headers, footers, page numbers, and bibliographies.
- **🎯 Powerful Search:** Scrape by keyword, category code (e.g., `cs.AI`), or both.

***

### Input

The actor accepts the following JSON input. `searchQuery` or `category` is required.

| Field | Type | Description | Default |
| :--- | :--- | :--- | :--- |
| `searchQuery` | String | (Optional) The keyword search query (e.g., "black hole physics"). | ` ` |
| `category` | String | (Optional) The arXiv category code (e.g., `cs.AI` for AI, `gr-qc` for General Relativity). | ` ` |
| `maxPages` | Number | The maximum number of result pages to scrape (50 results per page). | `1` |
| `chunkSize` | Number | (Optional) The target size (in characters) for each text chunk. | `1000` |
| `chunkOverlap`| Number | (Optional) The number of characters to overlap between chunks. | `200` |

#### Example Input (Simple Keyword Search)

````json
{
  "searchQuery": "quantum computing",
  "maxPages": 3
}

#### Example Input (AI-Ready Category Search)
```json
{
  "category": "cs.CL",
  "maxPages": 10,
  "chunkSize": 1500,
  "chunkOverlap": 300
}

#### Example Output
{
  "title": "Quantum black holes: inside and outside",
  "authors": "Bernard S. Kay",
  "abstract": "We review and add to a conjectured 'principle' according to which...",
  "url": "[http://arxiv.org/abs/2510.20799v1](http://arxiv.org/abs/2510.20799v1)",
  "cleanedFullText": "Quantum black holes: inside and outside\n\nBernard S. Kay\n\n(Dated: October 23, 2025)\n\nAbstract\nWe review and add to a conjectured 'principle' according to which...\n\n[... rest of the cleaned paper text ...]\n\n",
  "textChunks": [
    "Quantum black holes: inside and outside\n\nBernard S. Kay\n\n(Dated: October 23, 2025)\n\nAbstract\nWe review and add to a conjectured 'principle' according to which a necessary condition for a ... [900 more characters]",
    "necessary condition for a ... [800 more characters] ... The principle is intended to apply only to 'civilized' spacetimes. We shall recall a ... [and 200 more characters]",
    "[... etc ...]"
  ]
}



# Actor input Schema

## `searchQuery` (type: `string`):

Enter the topic or keywords you want to search for (e.g., 'quantum computing').
## `maxPages` (type: `integer`):

Set the maximum number of search result pages to scrape. Each page contains up to 50 papers.

## Actor input object example

```json
{
  "searchQuery": "quantum computing",
  "maxPages": 3
}
````

# 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 = {
    "searchQuery": "quantum computing",
    "maxPages": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("exuberant_promotion/arxiv-pro-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 = {
    "searchQuery": "quantum computing",
    "maxPages": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("exuberant_promotion/arxiv-pro-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 '{
  "searchQuery": "quantum computing",
  "maxPages": 3
}' |
apify call exuberant_promotion/arxiv-pro-scraper --silent --output-dataset

```

## MCP server setup

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