# arXiv Paper Monitor (`muhzuhaib/arxiv-monitor`) Actor

Watch arXiv categories, keywords and authors on a schedule. Each run remembers exactly which papers it has already seen and delivers only the NEW ones, with optional webhook alerts (Discord, Slack, generic) and a digest mode. Built on the documented arXiv export API.

- **URL**: https://apify.com/muhzuhaib/arxiv-monitor.md
- **Developed by:** [Muhammad Zuhaib Zahid](https://apify.com/muhzuhaib) (community)
- **Categories:** AI, News, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $500.00 / 1,000 daily monitoring of one watches

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 Paper Monitor

Watch arXiv categories, keywords and authors on a schedule. Each run remembers exactly
which papers it has already seen and delivers only the NEW ones, so you can poll as
often as you like without seeing the same paper twice.

Built entirely on the documented arXiv export API (export.arxiv.org). No scraping, no
unofficial endpoints, and the documented courtesy rate limit is enforced by the actor.

![Run summary from a real run](https://api.apify.com/v2/key-value-stores/fzPqfSUYe9NdjD4vQ/records/arxiv-shot-1.png)

### What it does

- **Category watches** follow a subject: `cs.AI`, `stat.ML`, `math.CO`, or any OR-list
  of categories. Case matters (`stat.ML`).
- **Keyword watches** match papers where ALL keywords appear, in the whole record
  (`all`), the title (`ti`) or the abstract (`abs`). Multi-word phrases are supported.
- **Author watches** follow one or more authors by name phrase.
- **Cross-run memory:** seen papers are stored between runs; a scheduled run emits
  only genuinely new papers. The FIRST run of each watch seeds the baseline quietly, so
  you never get a flood of the current front page, and its whole first day is free.
- **Webhook alerts:** each batch (or each paper) posted to Discord, Slack or your own
  receiver as ready-to-use payloads. Shape is auto-detected from the webhook URL.
- **Digest mode:** one summary item per run instead of one item per paper, if you would
  rather read one post than many.
- **Spend guard:** maxEventsPerRun caps billable watch-days per run; the dataset still
  receives everything found, and the run summary tells you when the cap engaged.

### How to use

1. Add watches (the input schema has a working prefill, so the default run needs nothing).
2. Set a schedule (e.g. every 4 hours). arXiv publishes new papers about once a day.
3. Optionally add a webhook for alerts, or enable digest mode for one summary per run.
4. Read results from the dataset: one item per new paper (title, authors, abstract,
   abs + pdf URLs, primary category, matched watch), plus a run summary.

![New papers in the dataset](https://api.apify.com/v2/key-value-stores/fzPqfSUYe9NdjD4vQ/records/arxiv-shot-2.png)

### Pricing

One event, one price: **watch-monitored-day, $0.50**, charged once per watch per UTC day.

- **The first day of every new watch is free.** Add a watch, see exactly what it finds,
  and decide before anything is charged.
- **The number of papers never changes the price.** A quiet day and a day with forty new
  papers cost the same, because you are paying for the watch being kept, not per result.
- **Run it as often as you like.** Four runs a day cost the same as one: the day is
  charged once, on the first run that monitors the watch successfully.
- **A watch that fails is never charged.** If arXiv is unreachable for a watch, that
  watch costs nothing for that day and is billed when it next succeeds.

So three watches on any schedule cost $1.50 a day, about $45 a month. Compute is included
in the price; the only other charge is the platform's standard Actor start event
($0.00005 per run).

### Notes

- arXiv's courtesy limit is one request every 3 seconds; the actor spaces its calls
  and backs off on 429/5xx. Keep the number of watches reasonable.
- Metadata only: title, authors, abstract, links. No PDF downloads.
- Memory between runs lives in a named key-value store in your own account
  (`arxiv-monitor-state` by default, set by the `stateStoreName` input). Deleting that
  store, or pointing the input at a new name, re-seeds every watch on the next run.

# Actor input Schema

## `watches` (type: `array`):

What to watch on arXiv. Category watches follow a subject (e.g. cs.AI). Keyword watches match title/abstract/all-field phrases. Author watches follow one or more authors. Every watch needs a first seeding run that records a baseline quietly (no alerts on the first run).

## `alerts` (type: `object`):

Optional webhook delivery. Leave the mode on 'none' to write results to the dataset only. Any target that resolves to a private, loopback or link-local address is refused, and redirects are never followed.

## `digest` (type: `boolean`):

Instead of one dataset item per paper, write ONE summary item per run (papers listed inside it). It does not change what you pay: billing is per watch per day either way.

## `maxResultsPerWatch` (type: `integer`):

Upper bound of papers fetched from arXiv per watch per run. Default 30, max 100.

## `maxEventsPerRun` (type: `integer`):

Hard spend guard: the most watch-days this run may charge. The dataset still receives everything found, and a watch-day the cap held back is billed on the next run instead of being lost. Default 200.

## `debug` (type: `boolean`):

Write extra diagnostic lines to the run log. It changes nothing about what is delivered or charged.

## `stateStoreName` (type: `string`):

The named key-value store holding which papers have already been delivered. Change it to keep separate watch lists apart, for example one per client. Leave it alone unless you need that.

## Actor input object example

```json
{
  "watches": [
    {
      "type": "category",
      "categories": [
        "cs.AI"
      ],
      "label": "AI"
    },
    {
      "type": "keyword",
      "keywords": [
        "large language model"
      ],
      "section": "ti",
      "label": "LLM papers"
    }
  ],
  "digest": false,
  "maxResultsPerWatch": 30,
  "maxEventsPerRun": 200,
  "debug": false,
  "stateStoreName": "arxiv-monitor-state"
}
```

# Actor output Schema

## `papers` (type: `string`):

Papers matching a watch that have not been delivered before. Each carries the title, authors, abstract, primary category, publication timestamp, the watch it matched, and links to the abstract and the PDF.

## `runState` (type: `string`):

Per-watch fetch counts, which watches seeded, events charged, whether the spend cap was reached, and any per-watch errors.

# 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 = {
    "watches": [
        {
            "type": "category",
            "categories": [
                "cs.AI"
            ],
            "label": "AI"
        },
        {
            "type": "keyword",
            "keywords": [
                "large language model"
            ],
            "section": "ti",
            "label": "LLM papers"
        }
    ],
    "maxResultsPerWatch": 30,
    "maxEventsPerRun": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhzuhaib/arxiv-monitor").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 = {
    "watches": [
        {
            "type": "category",
            "categories": ["cs.AI"],
            "label": "AI",
        },
        {
            "type": "keyword",
            "keywords": ["large language model"],
            "section": "ti",
            "label": "LLM papers",
        },
    ],
    "maxResultsPerWatch": 30,
    "maxEventsPerRun": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("muhzuhaib/arxiv-monitor").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 '{
  "watches": [
    {
      "type": "category",
      "categories": [
        "cs.AI"
      ],
      "label": "AI"
    },
    {
      "type": "keyword",
      "keywords": [
        "large language model"
      ],
      "section": "ti",
      "label": "LLM papers"
    }
  ],
  "maxResultsPerWatch": 30,
  "maxEventsPerRun": 200
}' |
apify call muhzuhaib/arxiv-monitor --silent --output-dataset

```

## MCP server setup

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

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/XhMY2okZHCpSf23WL/builds/yz289YrZ9FenHKgoz/openapi.json
