# Rss Atom Feed Converter (`eichan/rss-atom-feed-converter`) Actor

- **URL**: https://apify.com/eichan/rss-atom-feed-converter.md
- **Developed by:** [Eichan Jolly](https://apify.com/eichan) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.01 / actor start

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 Feed Converter

Convert **one public RSS or Atom XML feed** into a clean dataset with **one uniform row per entry**. Useful for developers, researchers, no-code automation builders and content monitors who need JSON rows instead of XML. No logins or feed subscriptions are required.

### What it does

- Downloads the supplied public RSS 2.0 / Atom 1.0 feed, with limited RSS 1.0 (RDF) support.
- Automatically identifies the feed format from the XML root.
- Exports up to `maxEntries` items (default **20**, allowed **1–100**), in source feed order.
- Normalizes dates to ISO 8601 UTC (`Z`) when a timezone is provided; unknown, malformed or timezone-free dates become `null`.
- Converts summaries to **plain text**, stripping HTML tags and removing script/style content. Summaries are capped at 5,000 characters.
- If XML is malformed or the feed type is not supported, writes **one error item with the same fields** and a safe, plain-language `error` value.

### Example input

```json
{"feedUrl":"https://blog.rust-lang.org/feed.xml","maxEntries":2}
```

The prefill is the public Rust project blog feed, reported working in an October 2026 feed catalog. Feed publishers may change their endpoints.

### Example output

Illustrative, **fictional fixture item**, not a claim about a live Rust blog entry:

```json
{
  "title": "Release One",
  "link": "https://blog.rust-lang.org/2026/11/01/release-one/",
  "publishedAt": "2026-11-01T01:15:00Z",
  "author": "Editorial",
  "summary": "Hello developers! & welcome.",
  "sourceFeed": "https://blog.rust-lang.org/feed.xml",
  "error": null
}
```

All normal items use `title`, `link`, `publishedAt`, `author`, `summary`, `sourceFeed`, `error`. Missing optional metadata is `null`, summary may be empty. Error records have null title/link/date/author and a readable `error` string. A **valid but empty feed returns zero dataset rows**.

### Honest limitations

- One URL, one feed request, one pass. No pagination, automatic feed discovery, subscriptions, crawling linked articles, or deduplication.
- No redirects, cookies, authentication, login sites or hostile targets. Submit the final public feed URL directly.
- 10 MB response limit (before and after supported gzip compression), 10-second network timeout, public DNS and verified TLS. IP literal URLs, non-standard ports and domains resolving to non-public IPs are blocked.
- `maxEntries` counts entries, not pages; dates without explicit timezones are intentionally not guessed. Non-standard feed extensions may not be mapped.
- HTML summaries are normalized with a best-effort parser; formatting and embedded images are discarded. The feed's text is not verified against original articles.
- DTD/entity declarations are rejected as a safety measure.

### Run locally

Python 3.12+ (Python standard library only):

```bash
ACTOR_INPUT_JSON='{"feedUrl":"https://blog.rust-lang.org/feed.xml","maxEntries":2}' python src/main.py
```

Alternatively, create `storage/key_value_stores/default/INPUT.json`. Output rows go to `storage/datasets/default/*.json`. Set `APIFY_LOCAL_STORAGE_DIR` to change the local output directory.

On Apify the Actor loads its JSON input using **REST GET** from the default run key-value store at `/v2/key-value-stores/{id}/records/{inputKey}`, then stores results using **REST POST** to `/v2/datasets/{id}/items`. It relies exclusively on Apify's runtime-provided `APIFY_TOKEN` and storage IDs; no user credentials or SDK are required. `ACTOR_INPUT_JSON` is available for local/testing overrides.

### Verification

```bash
python tests/run_smoke.py
python -m unittest discover -s tests -p 'test_*.py' -v
```

The smoke runner actually executes **`python src/main.py` as a subprocess** with the public feed URL input but answers over a local TLS fixture, avoiding dependence on live connectivity. Recorded terminal output and actual dataset rows: `verification/script-mode-smoke.txt` and `verification/dataset-items.json`. This is **not** a live network test or Apify cloud build.

### Store / pricing recommendation

Category: **`DEVELOPER_TOOLS`**. Suggested: **$0.003 per successful Actor run** (pay-per-event; not per feed item), advisory only. No billing or publication configured; `store_metadata.json` describes the proposal.

# Actor input Schema

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

Public RSS 2.0, RSS 1.0, or Atom feed URL. No login required.

## `maxEntries` (type: `integer`):

Maximum feed entries to output; from 1 to 100 (default 20).

## Actor input object example

```json
{
  "feedUrl": "https://blog.rust-lang.org/feed.xml",
  "maxEntries": 20
}
```

# Actor output Schema

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

Dataset containing the Actor's result items

# 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://blog.rust-lang.org/feed.xml",
    "maxEntries": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("eichan/rss-atom-feed-converter").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://blog.rust-lang.org/feed.xml",
    "maxEntries": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("eichan/rss-atom-feed-converter").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 '{
  "feedUrl": "https://blog.rust-lang.org/feed.xml",
  "maxEntries": 20
}' |
apify call eichan/rss-atom-feed-converter --silent --output-dataset

```

## MCP server setup

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

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/EXXXbEQj0IhDMTLLT/builds/LEKO8LsPIkutJwZLm/openapi.json
