# RSS & Atom Structured Feed Extractor (`datamule/rss-structured-feed-extractor`) Actor

Point at ANY RSS or Atom feed (news, blogs, podcasts, GitHub releases, YouTube) and get clean structured rows. Auto-detects RSS 2.0 / RSS 1.0 / Atom and normalizes every entry to one schema: title, link, content, author, categories, ISO-8601 dates, enclosures. Pay per item.

- **URL**: https://apify.com/datamule/rss-structured-feed-extractor.md
- **Developed by:** [Datamule](https://apify.com/datamule) (community)
- **Categories:** Developer tools, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## 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 & Atom Structured Feed Extractor

**Point at ANY RSS or Atom feed, get a clean structured dataset.** One actor turns every
feed on the web — RSS 2.0, RSS 1.0 (RDF) and Atom 1.0 — into the same normalized rows. No
per-site scraper, no dialect wrangling.

RSS / Atom is *the* universal syndication format. News organizations, blogs, podcasts,
GitHub releases, status pages, government notices, journal tables-of-contents and YouTube
channels (Atom) all publish it. Give this actor a feed URL and it detects the dialect and
flattens every entry into one consistent schema.

### What it does

Fetches the feed, auto-detects the dialect, and normalizes **every** entry to one row
shape regardless of whether the source is RSS or Atom:

| Field | Notes |
|---|---|
| `title`, `link`, `guid` | RSS `<link>` text and Atom `<link rel="alternate" href=>` both resolve to `link`. |
| `summary` | RSS `<description>` / Atom `<summary>`. |
| `content`, `contentType` | Full text: RSS `content:encoded` / Atom `<content>` (toggle with `fullContent`). |
| `author`, `authorEmail`, `authorUri` | Includes Dublin Core `dc:creator`. |
| `categories[]` | Merges RSS `<category>`, Atom `<category term=>` and `dc:subject`. |
| `publishedAt`, `updatedAt` | **Normalized to ISO-8601 UTC** — parsed from RFC-822 (RSS `pubDate`) *and* RFC-3339 (Atom). The raw strings are kept in `publishedRaw` / `updatedRaw`. |
| `enclosures[]` | Podcast / media `{url, type, length}`. |
| `mediaThumbnails[]`, `mediaContent[]` | Media RSS (`media:thumbnail` / `media:content`). |
| `itunes*` | Podcast fields (duration, episode, season, author, explicit, image). |
| `commentsUrl` | RSS `<comments>`. |

Every row is also stamped with the **feed-level envelope** — `feedTitle`, `feedLink`,
`feedDescription`, `feedLanguage`, `feedUpdated`, `generator` — plus provenance
(`_feedUrl`, `_dialect` = `rss2` / `rdf` / `atom`, `_rowIndex`) and a lossless `_raw` of
the full parsed entry.

**The parse is the point.** Real feeds omit most optional elements (a plain RSS item may
carry only title + link + date; a GitHub Atom entry has `<updated>` but no `<published>`),
so every field is read by node presence and is **nullable** — an absent element is `null`,
never a crash or a shifted column.

### Input

| Field | Description |
|---|---|
| `feedUrl` | An RSS or Atom feed URL, e.g. `https://feeds.bbci.co.uk/news/rss.xml`. Required unless `feedUrls` is given. |
| `feedUrls` | Optional: harvest several feeds in one run. Each row is tagged with its `_feedUrl`. |
| `maxItems` | Optional global cap on rows across all feeds (one billable event per row). |
| `fullContent` | Include the full-text body when present (default `true`). |
| `userAgent` | Optional override. A descriptive User-Agent is sent by default — some feeds 403 a blank / generic UA. |
| `timeoutSecs` | Optional read timeout (default 60s). |
| `bearer` / `extraHeaders` | Optional, for auth-gated feeds. Never required, never logged. |

### Examples

**A single news feed:**

```json
{ "feedUrl": "https://feeds.bbci.co.uk/news/rss.xml" }
```

**Harvest several feeds at once (mixed dialects):**

```json
{
  "feedUrls": [
    "https://feeds.bbci.co.uk/news/rss.xml",
    "https://hnrss.org/frontpage",
    "https://github.com/apify/apify-sdk-python/releases.atom"
  ],
  "maxItems": 200
}
```

**A YouTube channel (Atom) or a podcast feed** works the same way — just pass the feed URL.

### Resilience

A feed that returns a 4xx/5xx, times out, serves a non-feed body (an HTML error / anti-bot
page) or malformed XML that is not a recognizable feed is **skipped with a warning** and the
batch continues. A run where **every** feed is skipped **fails** so nothing broken ships. A
reachable feed with **0 entries** yields 0 rows and a clean success (unpopular is fine; the
actor never fabricates rows). Feeds are parsed with the `<!DOCTYPE>` stripped first, so
external-entity (XXE) and billion-laughs payloads cannot expand.

### Pricing

Pay-per-event: one **item** charge per emitted row.

# Actor input Schema

## `feedUrl` (type: `string`):

The URL of ANY RSS or Atom feed. One actor handles all of them — RSS 2.0, RSS 1.0 (RDF) and Atom 1.0 are auto-detected and normalized to one schema. Works on news feeds (https://feeds.bbci.co.uk/news/rss.xml), blogs, podcasts, GitHub releases (https://github.com/OWNER/REPO/releases.atom), status pages, YouTube channels (https://www.youtube.com/feeds/videos.xml?channel\_id=...), journal tables-of-contents and more. Required unless you use "Feed URLs" below to harvest several at once.

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

Optional: harvest MULTIPLE feeds in one run — each output row is tagged with its \_feedUrl. Use this OR the single "Feed URL" above (at least one is required). A feed that is unreachable, auth-gated, returns a non-feed HTML page, or is malformed XML is skipped with a warning and the batch continues.

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

A GLOBAL cap on the number of item rows emitted across ALL feeds (each row is one feed entry and one billable event). Reached mid-feed, the run stops deterministically. Leave empty to emit every entry in every feed.

## `fullContent` (type: `boolean`):

Include the full-text body of each entry (RSS content:encoded / Atom <content>) in the content field when the feed provides it. Turn OFF to keep only the short summary / description and produce smaller rows.

## `userAgent` (type: `string`):

Optional override for the request User-Agent. A descriptive User-Agent is sent by default — some feeds return 403 to a blank or generic UA. Only override if a specific feed asks you to identify differently.

## `timeoutSecs` (type: `integer`):

How long to wait for a feed to answer (default 60). A dead connection fails fast regardless.

## `bearer` (type: `string`):

Optional bearer token for an auth-gated feed (sent as Authorization: Bearer ...). NOT required for public feeds. Never logged.

## `extraHeaders` (type: `object`):

Optional extra HTTP headers as a JSON object, e.g. {"X-Api-Key": "..."} or a Cookie for a gated feed. Not required for public feeds. Header values are never logged.

## Actor input object example

```json
{
  "feedUrl": "https://feeds.bbci.co.uk/news/rss.xml",
  "feedUrls": [
    "https://feeds.bbci.co.uk/news/rss.xml",
    "https://hnrss.org/frontpage"
  ],
  "maxItems": 1000,
  "fullContent": true
}
```

# Actor output Schema

## `results` (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 = {
    "feedUrl": "https://feeds.bbci.co.uk/news/rss.xml",
    "feedUrls": [
        "https://feeds.bbci.co.uk/news/rss.xml",
        "https://hnrss.org/frontpage"
    ],
    "maxItems": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamule/rss-structured-feed-extractor").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 = {
    "feedUrl": "https://feeds.bbci.co.uk/news/rss.xml",
    "feedUrls": [
        "https://feeds.bbci.co.uk/news/rss.xml",
        "https://hnrss.org/frontpage",
    ],
    "maxItems": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("datamule/rss-structured-feed-extractor").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 '{
  "feedUrl": "https://feeds.bbci.co.uk/news/rss.xml",
  "feedUrls": [
    "https://feeds.bbci.co.uk/news/rss.xml",
    "https://hnrss.org/frontpage"
  ],
  "maxItems": 1000
}' |
apify call datamule/rss-structured-feed-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=datamule/rss-structured-feed-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/koSJM6jn4EkXPQotW/builds/WDFsSu9V7yfyHA0JQ/openapi.json
