# RSS & Atom New Items Monitor — Stateful Dedupe (`slimjones/rss-new-items-monitor`) Actor

Stateful RSS/Atom monitor: give it feed URLs and it returns ONLY items never seen in previous runs. Persistent dedupe (GUID, canonical link, content hash) in your own Apify storage, scoped per monitor key and feed. For scheduled newsletter, media-monitoring and research pipelines.

- **URL**: https://apify.com/slimjones/rss-new-items-monitor.md
- **Developed by:** [Slim Jones](https://apify.com/slimjones) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 new or updated items

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

## RSS & Atom New Items Monitor — Stateful Dedupe

Give this Actor a list of RSS/Atom feed URLs, run it on a schedule, and it returns **only the items it has never seen before**. No downstream deduplication, no seen-items table to maintain yourself: the state lives in your own Apify storage and persists across runs.

Built for newsletter automation, media monitoring, competitor-watching and research pipelines — anywhere a plain RSS reader would flood you with the same items on every run.

### What it does

- Fetches each feed with plain HTTP (no browser, no proxies, no paid APIs) using conditional GET (`ETag` / `Last-Modified`), so unchanged feeds cost almost nothing.
- Identifies items by **feed GUID** first, **canonical link** second (tracking parameters like `utm_*`/`fbclid` are stripped conservatively — meaningful query parameters survive), and a clearly labeled **content fingerprint** only when a feed provides neither.
- Emits each item **once**: later runs return an empty item dataset until the feed actually publishes something new.
- Optionally emits **updated** items (edited title/summary/link/date) with `changeType: "updated"` — off by default, because many feeds churn timestamps.
- A broken or malformed feed **never** wipes its baseline: it produces a free diagnostic row in the `feed-status` dataset and the run moves on.

### Pricing — read this first

Pay-per-event, two events, no run/start fee:

| Event | Price | When it is charged |
| --- | --- | --- |
| `feed-check` | **$0.001** | Once per feed that was successfully checked — including unchanged (304) feeds and baseline-only first runs. |
| `new-item` | **$0.005** | Once per new or updated item actually emitted to the dataset. |

Error rows, unchanged items and repeated items are **never** charged. A quiet day on a 10-feed daily monitor costs about one cent in feed checks.

### Input

| Field | Type | Default | Notes |
| --- | --- | --- | --- |
| `feedUrls` | string list | — (required) | Public RSS/Atom URLs, up to 50 per run. |
| `monitorKey` | string | `"default"` | Scopes the dedupe state — one key per watchlist/project. |
| `includeExistingOnFirstRun` | boolean | `true` | `true`: first run returns the feed's current items and seeds state. `false` (baseline only): first run returns nothing, later runs emit only genuinely new posts. |
| `includeUpdates` | boolean | `false` | Also emit items whose content changed, as `changeType: "updated"`. |
| `maxItemsPerFeed` | integer | `50` | Emission window per feed per run. State still seeds from up to 1,000 entries. |
| `maxNewItems` | integer | `500` | Run-wide emission cap. Items past the cap are **not** marked seen — they come out on the next run. |
| `retentionDays` | integer | `30` | Seen history older than this is forgotten; also capped at 1,000 items per feed. |

#### Example input

```json
{
  "feedUrls": [
    "https://feeds.bbci.co.uk/news/rss.xml",
    "https://www.nasa.gov/rss/dyn/breaking_news.rss"
  ],
  "monitorKey": "daily-news-brief",
  "includeExistingOnFirstRun": true,
  "includeUpdates": false,
  "maxItemsPerFeed": 50
}
```

### Output

Default dataset — one row per **new** (or updated) item:

```json
{
  "type": "item",
  "changeType": "new",
  "itemId": "9f2c…(sha256)",
  "identitySource": "guid",
  "feedUrl": "https://feeds.bbci.co.uk/news/rss.xml",
  "feedTitle": "BBC News - Home",
  "title": "Example headline",
  "link": "https://www.bbc.co.uk/news/articles/example",
  "guid": "https://www.bbc.co.uk/news/articles/example",
  "publishedAt": "2026-11-19T14:03:00+00:00",
  "author": null,
  "summary": "Short description from the feed…",
  "contentHash": "ab41…(sha256)",
  "firstSeenAt": "2026-11-19T16:40:00+00:00",
  "fetchedAt": "2026-11-19T16:40:00+00:00"
}
```

`publishedAt` is `null` when the feed gives no parseable date — dates are never fabricated.

A second dataset, **`feed-status`**, gets one free row per feed per run: `status` (`ok` / `not_modified` / `error`), HTTP status, item counts, `firstRun` flag, and the error message when a feed fails. A `RUN_SUMMARY` record in the run's key-value store totals the run.

### Typical workflow (scheduled feeds → deduplicated pipeline)

1. Create a schedule (hourly or daily) running this Actor with your feed list and a stable `monitorKey`.
2. Attach the run-finished webhook to your n8n / Make / Zapier flow, or poll the dataset.
3. Every item that lands in the dataset is genuinely new — append it to Google Sheets, post it to Slack, or feed it to your newsletter draft. Nothing to dedupe.

### State, resets and limits — the honest details

- State is stored per **monitor key + feed URL** in a named key-value store (`rss-new-items-monitor-state`) in **your** Apify account. Different customers never share state; different monitor keys never share a baseline.
- To reset a monitor: use a new `monitorKey`, or delete that feed's `FEED__…` record from the store.
- Run two schedules with the **same** monitor key at the same time and they can race on state — use distinct keys for distinct schedules.
- Exactly-once delivery is guaranteed for this Actor's own dataset; it cannot control what downstream systems do with the rows.
- Private/loopback/link-local destinations are refused, redirects are re-validated per hop, responses are capped at 5 MB, and each feed has a 20-second timeout.

# Actor input Schema

## `feedUrls` (type: `array`):

Public RSS or Atom feed URLs to watch. Up to 50 per run.

## `includeExistingOnFirstRun` (type: `boolean`):

First-run behavior. ON (default): the first run for a feed returns its current items and seeds the seen-state from them. OFF (baseline only): the first run returns nothing and only records the current items, so later runs emit only genuinely new posts.

## `includeUpdates` (type: `boolean`):

Also emit items whose content changed since they were first seen (edited title, summary, link or date), with changeType = "updated". Off by default: most feeds churn timestamps and would create noise.

## `maxItemsPerFeed` (type: `integer`):

Only this many of a feed's most recent items are considered for emission per run. State is still seeded from up to 1,000 entries so older items are not re-emitted later.

## `maxNewItems` (type: `integer`):

Hard cap on new/updated items emitted per run across all feeds. Items past the cap are NOT marked as seen — they are emitted on the next run instead of being lost.

## `monitorKey` (type: `string`):

Scopes the deduplication state. Use a different key per watchlist/project so separate monitors never share a baseline. State is stored per key + feed URL in your account's storage.

## `retentionDays` (type: `integer`):

Seen-item history older than this is forgotten (an item reappearing after the window can be emitted again). History is also capped at 1,000 items per feed.

## Actor input object example

```json
{
  "feedUrls": [
    "https://feeds.bbci.co.uk/news/rss.xml"
  ],
  "includeExistingOnFirstRun": true,
  "includeUpdates": false,
  "maxItemsPerFeed": 50,
  "maxNewItems": 500,
  "monitorKey": "default",
  "retentionDays": 30
}
```

# Actor output Schema

## `dataset` (type: `string`):

The dataset containing only new/updated item rows.

## `datasetItems` (type: `string`):

Direct link to the new item rows as clean JSON.

# 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 = {
    "feedUrls": [
        "https://feeds.bbci.co.uk/news/rss.xml"
    ],
    "monitorKey": "default"
};

// Run the Actor and wait for it to finish
const run = await client.actor("slimjones/rss-new-items-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 = {
    "feedUrls": ["https://feeds.bbci.co.uk/news/rss.xml"],
    "monitorKey": "default",
}

# Run the Actor and wait for it to finish
run = client.actor("slimjones/rss-new-items-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 '{
  "feedUrls": [
    "https://feeds.bbci.co.uk/news/rss.xml"
  ],
  "monitorKey": "default"
}' |
apify call slimjones/rss-new-items-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,slimjones/rss-new-items-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/INYXYvhCHpclnK6eG/builds/Tn5UwbjknNpw5AigQ/openapi.json
