# arXiv Papers Scraper with AI Topic Tags (`elder_contrabasson/arxiv-scraper`) Actor

Search arXiv.org for academic papers by keyword, author, or category. Get clean structured data with optional AI topic tagging via Claude. Perfect for literature reviews, research monitoring, and academic datasets.

- **URL**: https://apify.com/elder\_contrabasson/arxiv-scraper.md
- **Developed by:** [Andrei](https://apify.com/elder_contrabasson) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 75.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Papers Scraper with AI Tags

Search arXiv.org for academic papers by keyword, author, or category. Get clean structured data with optional AI-powered topic tagging via Claude. Perfect for literature reviews, research monitoring, and building academic datasets.

### What this actor does

arXiv has 2M+ papers but their search interface is clunky and there's no direct way to export results. This actor solves that:

- **Full arXiv search syntax** — search by keyword, title, abstract, authors, or category
- **Category filter** — restrict to specific fields (cs.AI, math.PR, physics.bio-ph, etc.)
- **AI topic tagging** — Claude reads each abstract and assigns 3-5 relevant tags (optional, BYOK)
- **Citation extraction** — pulls cited references from paper metadata when available
- **Retry logic** — handles arXiv API rate limits and transient errors gracefully

### Quick start

Just search for something:

    {
      "searchQuery": "transformer attention mechanism",
      "maxResults": 20
    }

That's it. The actor will return up to 20 papers matching your query with full metadata.

### Input fields

- **searchQuery** (required) — Search terms (keyword, author, title, or arXiv ID)
- **category** — Filter by arXiv category code (cs.AI, math.ST, etc., leave empty for all)
- **maxResults** — Number of papers to fetch (default 50, max 1000)
- **sortBy** — Sort by relevance, lastUpdatedDate, or submittedDate (default relevance)
- **enableAiTags** — Generate AI topic tags for each paper (default false)
- **anthropicApiKey** — Your Anthropic API key (BYOK, required if AI tags enabled)
- **extractCitations** — Pull cited references metadata when available (default true)

### Output format

Each item in the dataset:

    {
      "id": "2412.01234",
      "title": "Attention Is All You Need: A Survey",
      "authors": ["Vaswani A.", "Shazeer N."],
      "abstract": "The dominant sequence transduction models...",
      "publishedDate": "2024-12-01",
      "updatedDate": "2024-12-15",
      "pdfUrl": "https://arxiv.org/pdf/2412.01234.pdf",
      "absUrl": "https://arxiv.org/abs/2412.01234",
      "categories": ["cs.LG", "cs.AI"],
      "primaryCategory": "cs.LG",
      "doi": "10.xxxx/yyyy",
      "comment": "Accepted at NeurIPS 2024",
      "journalRef": null,
      "aiTags": ["transformer architecture", "attention mechanism", "survey paper"],
      "citationCount": 12
    }

Field aiTags appears only with AI tagging enabled.

### Use cases

**Literature review** — Pull all papers on your research topic from the last 6 months in one query.

**Research monitoring** — Schedule daily runs to track new arXiv submissions in your field.

**Dataset building** — Collect abstracts and metadata for training NLP models on academic text.

**Trend analysis** — Aggregate AI tags across thousands of papers to spot emerging research topics.

**Citation tracking** — Build citation graphs from extracted references for bibliometric studies.

### Technical notes

- Uses arXiv's official Atom API — fully ToS-compliant, no scraping
- Automatic retry with exponential backoff for rate limits (arXiv allows ~3 req/sec)
- AI tagging uses Claude Haiku 4.5 (fast and cheap, ~$0.001 per paper)
- All abstracts and metadata are public domain (arXiv license)
- Citation extraction works only for papers with structured reference metadata

### Pricing

Currently free during early access. Pay-per-paper pricing will be enabled later.

### Support

Found a bug? Have feature requests? Contact the developer through the actor's page on Apify.

# Actor input Schema

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

Keywords to search in title, abstract, or authors. Use arXiv search syntax. Examples: 'large language models', 'ti:transformer AND abs:attention'
## `category` (type: `string`):

Filter by arXiv category code. Examples: cs.LG (Machine Learning), cs.AI, cs.CL (NLP), physics.gen-ph, math.OC. Leave empty for all categories.
## `maxResults` (type: `integer`):

Maximum number of papers to return. arXiv API supports up to 2000 per query.
## `sortBy` (type: `string`):

How to sort results
## `enableAiTags` (type: `boolean`):

If enabled, each paper will be enriched with AI-generated tags: subtopic classification, methodology type, contribution type. Requires Anthropic API key.
## `anthropicApiKey` (type: `string`):

Your Anthropic API key (sk-ant-...). Used only for AI tagging. We don't store it. Get one at console.anthropic.com
## `extractCitations` (type: `boolean`):

Extract DOIs, arXiv IDs, and URLs mentioned in the abstract as separate fields.

## Actor input object example

```json
{
  "searchQuery": "large language models",
  "category": "cs.LG",
  "maxResults": 50,
  "sortBy": "submittedDate",
  "enableAiTags": false,
  "extractCitations": true
}
````

# 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 = {};

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

# Run the Actor and wait for it to finish
run = client.actor("elder_contrabasson/arxiv-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 '{}' |
apify call elder_contrabasson/arxiv-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "arXiv Papers Scraper with AI Topic Tags",
        "description": "Search arXiv.org for academic papers by keyword, author, or category. Get clean structured data with optional AI topic tagging via Claude. Perfect for literature reviews, research monitoring, and academic datasets.",
        "version": "0.0",
        "x-build-id": "tsjNAu0gZFBsK3kCv"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/elder_contrabasson~arxiv-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-elder_contrabasson-arxiv-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/elder_contrabasson~arxiv-scraper/runs": {
            "post": {
                "operationId": "runs-sync-elder_contrabasson-arxiv-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/elder_contrabasson~arxiv-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-elder_contrabasson-arxiv-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "searchQuery"
                ],
                "properties": {
                    "searchQuery": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Keywords to search in title, abstract, or authors. Use arXiv search syntax. Examples: 'large language models', 'ti:transformer AND abs:attention'",
                        "default": "large language models"
                    },
                    "category": {
                        "title": "arXiv category (optional)",
                        "type": "string",
                        "description": "Filter by arXiv category code. Examples: cs.LG (Machine Learning), cs.AI, cs.CL (NLP), physics.gen-ph, math.OC. Leave empty for all categories.",
                        "default": "cs.LG"
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Maximum number of papers to return. arXiv API supports up to 2000 per query.",
                        "default": 50
                    },
                    "sortBy": {
                        "title": "Sort by",
                        "enum": [
                            "submittedDate",
                            "relevance",
                            "lastUpdatedDate"
                        ],
                        "type": "string",
                        "description": "How to sort results",
                        "default": "submittedDate"
                    },
                    "enableAiTags": {
                        "title": "Enable AI tagging (optional)",
                        "type": "boolean",
                        "description": "If enabled, each paper will be enriched with AI-generated tags: subtopic classification, methodology type, contribution type. Requires Anthropic API key.",
                        "default": false
                    },
                    "anthropicApiKey": {
                        "title": "Anthropic API key (only if AI tagging enabled)",
                        "type": "string",
                        "description": "Your Anthropic API key (sk-ant-...). Used only for AI tagging. We don't store it. Get one at console.anthropic.com"
                    },
                    "extractCitations": {
                        "title": "Extract citations from abstract",
                        "type": "boolean",
                        "description": "Extract DOIs, arXiv IDs, and URLs mentioned in the abstract as separate fields.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
