# RSS News Dataset & Deduplicator (`silicon1235/rss-news-dataset-deduplicator`) Actor

Aggregate public RSS and Atom feeds into a normalized, cross-source deduplicated article dataset with failure-safe NEW/SEEN snapshots.

- **URL**: https://apify.com/silicon1235/rss-news-dataset-deduplicator.md
- **Developed by:** [X L](https://apify.com/silicon1235) (community)
- **Categories:** News, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 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 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

## RSS News Dataset & Deduplicator

Aggregate public RSS, Atom, and RDF feeds into one normalized article dataset. The Actor collapses the same canonical article across feeds, strips common tracking parameters, filters by keyword or publication window, and stores a snapshot for `NEW` versus `SEEN` scheduled-run workflows.

### What it returns

Each article row includes the normalized article URL, title, publication date, author, categories, summary text, bounded content text, source feeds, duplicate count, matched keywords, and incremental status.

Feed failures stay visible in `SUMMARY.feedErrors` while successful feeds continue. `REPORT` provides a compact Markdown run summary and article preview.

### Inputs

- `feedUrls`: up to 20 public RSS, Atom, or RDF URLs
- `maxItemsPerFeed`: parsed-entry cap per feed
- `maxItems`: final dataset cap after filtering and deduplication
- `maxRetainedBytes`: run-level normalized-data memory budget
- `includeKeywords` / `excludeKeywords`: case-insensitive article filters
- `publishedAfterDays`: optional publication window; dated filtering excludes entries without a parseable date
- `stripTracking`: remove common tracking query parameters before deduplication
- `snapshotKey` and `saveSnapshot`: incremental `NEW` / `SEEN` state

### Guardrails

- Public HTTP(S) feeds only; private, loopback, reserved, and local network addresses are rejected.
- DNS results are pinned for each request so a hostname cannot be re-resolved to a private address after validation.
- Feed URL length, redirects, request time, feed bytes, feed count, concurrency, retained normalized data, and output rows are capped.
- XML parsing runs in an isolated worker with time and heap limits; item normalization is capped before article objects are built.
- Failed feeds retain their prior per-feed snapshot state. A run where every feed fails exits as failed without replacing the snapshot.
- XML entity processing is disabled; output text is cleaned after parsing.
- No browser, proxy, API key, or external AI service is required.

### Local validation

```powershell
npm test
npm run smoke
```

The first Store release should remain free while organic usage is measured. A future PPE boundary is `article-emitted`, charged only for visible normalized article rows, never failed feeds or entries removed before output.

# Actor input Schema

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

Public RSS, Atom, or RDF feed URLs to aggregate into one article dataset.

## `maxFeeds` (type: `integer`):

Hard cap for unique feed URLs processed in one run.

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

Caps parsed entries from each feed before cross-source deduplication.

## `maxItems` (type: `integer`):

Hard cap for final dataset rows after filtering and deduplication.

## `maxRetainedBytes` (type: `integer`):

Run-level memory guard for normalized article data retained before filtering and deduplication.

## `includeKeywords` (type: `array`):

Optional case-insensitive terms. An article must match at least one term in its title, summary, content, or categories.

## `excludeKeywords` (type: `array`):

Optional case-insensitive terms that remove matching articles.

## `publishedAfterDays` (type: `integer`):

Keep entries with a parseable publication date within this many days. Use 0 to disable date filtering.

## `stripTracking` (type: `boolean`):

Remove common UTM and click-tracking query parameters before cross-feed URL deduplication.

## `concurrency` (type: `integer`):

Maximum feed requests in flight.

## `timeoutMs` (type: `integer`):

Maximum total request and redirect time for each feed.

## `maxFeedBytes` (type: `integer`):

Stops oversized feed responses before excessive memory is consumed.

## `parseTimeoutMs` (type: `integer`):

Stops feeds whose XML cannot be parsed within this isolated-worker time limit.

## `maxRedirects` (type: `integer`):

Maximum redirect hops per feed.

## `snapshotKey` (type: `string`):

Key-value store record used to mark articles NEW or SEEN across scheduled runs.

## `saveSnapshot` (type: `boolean`):

Persist output article IDs so later scheduled runs can distinguish NEW from SEEN rows.

## Actor input object example

```json
{
  "feedUrls": [
    {
      "url": "https://hnrss.org/frontpage"
    },
    {
      "url": "https://www.nasa.gov/feed/"
    }
  ],
  "maxFeeds": 10,
  "maxItemsPerFeed": 100,
  "maxItems": 500,
  "maxRetainedBytes": 16000000,
  "includeKeywords": [],
  "excludeKeywords": [],
  "publishedAfterDays": 0,
  "stripTracking": true,
  "concurrency": 2,
  "timeoutMs": 20000,
  "maxFeedBytes": 2000000,
  "parseTimeoutMs": 5000,
  "maxRedirects": 3,
  "snapshotKey": "RSS_NEWS_DATASET_SNAPSHOT",
  "saveSnapshot": true
}
```

# Actor output Schema

## `items` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `report` (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 = {
    "feedUrls": [
        {
            "url": "https://hnrss.org/frontpage"
        },
        {
            "url": "https://www.nasa.gov/feed/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("silicon1235/rss-news-dataset-deduplicator").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": [
        { "url": "https://hnrss.org/frontpage" },
        { "url": "https://www.nasa.gov/feed/" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("silicon1235/rss-news-dataset-deduplicator").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 '{
  "feedUrls": [
    {
      "url": "https://hnrss.org/frontpage"
    },
    {
      "url": "https://www.nasa.gov/feed/"
    }
  ]
}' |
apify call silicon1235/rss-news-dataset-deduplicator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=silicon1235/rss-news-dataset-deduplicator",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/WwouyNpmKCVg2j1JS/builds/IjcoPUedDWPGrv9ze/openapi.json
