# RSS Feed Reader: RSS, Atom and JSON Feed to Dataset (`thoob/rss-feed-reader`) Actor

RSS feed reader for RSS 2.0, RSS 1.0, Atom 1.0 and JSON Feed 1.1 feeds: turns each feed into flat dataset rows. Can discover feeds linked from HTML pages and deliver only items not seen on earlier runs. Billed per delivered feed item.

- **URL**: https://apify.com/thoob/rss-feed-reader.md
- **Developed by:** [Pono Data](https://apify.com/thoob) (community)
- **Categories:** News, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 feed 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 Feed Reader: RSS, Atom and JSON Feed to Dataset, New Items Only

This actor reads RSS 2.0, RSS 1.0 (RDF), Atom 1.0 and JSON Feed 1.1 feeds and saves each item as a dataset row, for anyone who wants to track news, notices or posts without checking feeds by hand.

### What you get

- Feed details: `feedUrl`, `feedTitle`, `feedLink`
- Item identity: `itemKey` (guid or id, else link, else title plus published date), `title`, `link` (absolute)
- Dates: `published` and `updated` in ISO UTC, or null when absent or unparseable
- People and topics: `author`, `categories`
- Text: `summary` (tags stripped, entities decoded, up to 2,000 characters) and `contentHtml` (full content when present, up to 20,000 characters)
- Media: `enclosureUrl`, `enclosureType`
- Provenance: `sourceUrl`, `retrievedAt`

### Input

```json
{
    "feedUrls": [
        "https://www.federalregister.gov/documents/search.rss?conditions%5Bagencies%5D%5B%5D=environmental-protection-agency",
        "https://hnrss.org/frontpage"
    ],
    "discoverFeeds": true,
    "onlyNew": false,
    "maxItemsPerFeed": 100,
    "maxRecords": 0
}
```

If a URL returns an HTML page and `discoverFeeds` is on, the actor reads every feed the page lists in `link rel="alternate"`. With `onlyNew`, it remembers seen items per feed and returns only items not seen on an earlier run. `0` means no cap.

### Output

Illustration only, values shortened:

```json
{
    "feedUrl": "https://hnrss.org/frontpage",
    "feedTitle": "Hacker News: Front Page",
    "feedLink": "https://news.ycombinator.com/",
    "itemKey": "https://news.ycombinator.com/item?id=40000000",
    "title": "Show HN: A small tool",
    "link": "https://example.com/post",
    "published": "2024-05-06T07:08:09Z",
    "updated": null,
    "author": "someuser",
    "categories": [],
    "summary": "Article URL: https://example.com/post Comments: ...",
    "contentHtml": null,
    "enclosureUrl": null,
    "enclosureType": null,
    "sourceUrl": "https://example.com/post",
    "retrievedAt": "2024-05-06T08:00:00Z"
}
```

### Pricing

Event `feed-item`, USD 0.001 per delivered item, which is USD 1.00 per 1,000 items. Every delivered row is charged. Items skipped by `onlyNew`, by duplicate checks or by caps are not delivered and are not charged.

### Data source

The public feeds you list, or the feeds advertised by the pages you list. Every row carries `sourceUrl` (the item link, else the feed URL) and `retrievedAt`.

### Limits

- A feed that fails to fetch or parse is skipped with a warning in the log; the run continues.
- Requests to the same host wait 1 second apart, with up to 4 hosts in parallel, so large lists on one host take time.
- Dates are never guessed: if a feed gives no date or one that cannot be parsed, `published` is null.
- The first `onlyNew` run of a feed delivers everything up to `maxItemsPerFeed`; later runs deliver only new items.

### Who uses it

- Content teams pulling `title`, `link` and `published` from industry feeds into a daily digest.
- Podcast researchers collecting `enclosureUrl` and `enclosureType` across show feeds.
- News analysts tracking coverage by `categories` and `author` across many sources.
- Developers sending `summary` or `contentHtml` from new items into their own alerts or search index.

### FAQ

#### What goes in `feedUrls`?

URLs of RSS 2.0, RSS 1.0, Atom 1.0 or JSON Feed 1.1 feeds. With `discoverFeeds` turned on, ordinary HTML page URLs can be given and the feeds linked from those pages are read.

#### What does an empty result mean?

The feed had no items, or `onlyNew` was on and every item had already been seen on an earlier run. Items already seen are not billed.

#### How can I limit the volume?

`maxItemsPerFeed` limits items taken from each feed, and `maxRecords` limits delivered rows for the whole run.

#### Can it run on a schedule or through the Apify API?

Yes. It can be started from Apify Schedules or the Apify API. Pairing a schedule with `onlyNew` returns only items not delivered on earlier runs.

# Actor input Schema

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

Feed or web page URLs to read, one per line.

## `discoverFeeds` (type: `boolean`):

When a URL returns HTML, read every RSS, Atom or JSON feed linked from it with link rel="alternate".

## `onlyNew` (type: `boolean`):

Remember seen item keys per feed in the key-value store 'rss-feed-reader-state' and deliver only items not seen on an earlier run.

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

Cap on delivered items per feed, where 0 means no cap.

## `maxRecords` (type: `integer`):

Cap on delivered, billed rows across all feeds, where 0 means no cap.

## Actor input object example

```json
{
  "feedUrls": [
    "https://www.federalregister.gov/documents/search.rss?conditions%5Bagencies%5D%5B%5D=environmental-protection-agency",
    "https://hnrss.org/frontpage"
  ],
  "discoverFeeds": true,
  "onlyNew": false,
  "maxItemsPerFeed": 100,
  "maxRecords": 0
}
```

# Actor output Schema

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

One row per feed item.

# 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://www.federalregister.gov/documents/search.rss?conditions%5Bagencies%5D%5B%5D=environmental-protection-agency",
        "https://hnrss.org/frontpage"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("thoob/rss-feed-reader").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://www.federalregister.gov/documents/search.rss?conditions%5Bagencies%5D%5B%5D=environmental-protection-agency",
        "https://hnrss.org/frontpage",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("thoob/rss-feed-reader").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://www.federalregister.gov/documents/search.rss?conditions%5Bagencies%5D%5B%5D=environmental-protection-agency",
    "https://hnrss.org/frontpage"
  ]
}' |
apify call thoob/rss-feed-reader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thoob/rss-feed-reader"
        }
    }
}
```

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/BWHUhsBNnFJxrTUye/builds/IPmv2sheXWMkdSfGV/openapi.json
