# 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 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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## 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

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "RSS News Dataset & Deduplicator",
        "description": "Aggregate public RSS and Atom feeds into a normalized, cross-source deduplicated article dataset with failure-safe NEW/SEEN snapshots.",
        "version": "0.1",
        "x-build-id": "IjcoPUedDWPGrv9ze"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/silicon1235~rss-news-dataset-deduplicator/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-silicon1235-rss-news-dataset-deduplicator",
                "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/silicon1235~rss-news-dataset-deduplicator/runs": {
            "post": {
                "operationId": "runs-sync-silicon1235-rss-news-dataset-deduplicator",
                "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/silicon1235~rss-news-dataset-deduplicator/run-sync": {
            "post": {
                "operationId": "run-sync-silicon1235-rss-news-dataset-deduplicator",
                "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": [
                    "feedUrls"
                ],
                "properties": {
                    "feedUrls": {
                        "title": "RSS or Atom feeds",
                        "type": "array",
                        "description": "Public RSS, Atom, or RDF feed URLs to aggregate into one article dataset.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "Feed URL",
                                    "description": "Public RSS, Atom, or RDF URL, up to 2048 characters.",
                                    "maxLength": 2048
                                }
                            }
                        }
                    },
                    "maxFeeds": {
                        "title": "Maximum feeds",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Hard cap for unique feed URLs processed in one run.",
                        "default": 10
                    },
                    "maxItemsPerFeed": {
                        "title": "Maximum articles per feed",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Caps parsed entries from each feed before cross-source deduplication.",
                        "default": 100
                    },
                    "maxItems": {
                        "title": "Maximum output articles",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Hard cap for final dataset rows after filtering and deduplication.",
                        "default": 500
                    },
                    "maxRetainedBytes": {
                        "title": "Maximum normalized data bytes",
                        "minimum": 1000000,
                        "maximum": 32000000,
                        "type": "integer",
                        "description": "Run-level memory guard for normalized article data retained before filtering and deduplication.",
                        "default": 16000000
                    },
                    "includeKeywords": {
                        "title": "Include keywords",
                        "type": "array",
                        "description": "Optional case-insensitive terms. An article must match at least one term in its title, summary, content, or categories.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "excludeKeywords": {
                        "title": "Exclude keywords",
                        "type": "array",
                        "description": "Optional case-insensitive terms that remove matching articles.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "publishedAfterDays": {
                        "title": "Published within days",
                        "minimum": 0,
                        "maximum": 3650,
                        "type": "integer",
                        "description": "Keep entries with a parseable publication date within this many days. Use 0 to disable date filtering.",
                        "default": 0
                    },
                    "stripTracking": {
                        "title": "Strip tracking parameters",
                        "type": "boolean",
                        "description": "Remove common UTM and click-tracking query parameters before cross-feed URL deduplication.",
                        "default": true
                    },
                    "concurrency": {
                        "title": "HTTP concurrency",
                        "minimum": 1,
                        "maximum": 2,
                        "type": "integer",
                        "description": "Maximum feed requests in flight.",
                        "default": 2
                    },
                    "timeoutMs": {
                        "title": "Timeout per feed in milliseconds",
                        "minimum": 1000,
                        "maximum": 60000,
                        "type": "integer",
                        "description": "Maximum total request and redirect time for each feed.",
                        "default": 20000
                    },
                    "maxFeedBytes": {
                        "title": "Maximum bytes per feed",
                        "minimum": 10000,
                        "maximum": 5000000,
                        "type": "integer",
                        "description": "Stops oversized feed responses before excessive memory is consumed.",
                        "default": 2000000
                    },
                    "parseTimeoutMs": {
                        "title": "XML parse timeout in milliseconds",
                        "minimum": 100,
                        "maximum": 15000,
                        "type": "integer",
                        "description": "Stops feeds whose XML cannot be parsed within this isolated-worker time limit.",
                        "default": 5000
                    },
                    "maxRedirects": {
                        "title": "Maximum redirects",
                        "minimum": 0,
                        "maximum": 3,
                        "type": "integer",
                        "description": "Maximum redirect hops per feed.",
                        "default": 3
                    },
                    "snapshotKey": {
                        "title": "Snapshot storage key",
                        "pattern": "^(?!(?:[Ii][Nn][Pp][Uu][Tt]|[Oo][Uu][Tt][Pp][Uu][Tt]|[Ss][Uu][Mm][Mm][Aa][Rr][Yy]|[Rr][Ee][Pp][Oo][Rr][Tt])$)[A-Za-z0-9][A-Za-z0-9_-]{2,63}$",
                        "minLength": 3,
                        "maxLength": 64,
                        "type": "string",
                        "description": "Key-value store record used to mark articles NEW or SEEN across scheduled runs.",
                        "default": "RSS_NEWS_DATASET_SNAPSHOT"
                    },
                    "saveSnapshot": {
                        "title": "Save article snapshot",
                        "type": "boolean",
                        "description": "Persist output article IDs so later scheduled runs can distinguish NEW from SEEN rows.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
