# RSS / XML Scraper (`scrapers-hub/rss-xml-scraper`) Actor

RSS / XML Scraper parses any feed URL into structured items - title, link, description, pubDate, GUID, author, category, enclosure, media content and Dublin Core fields. 🗞️ For feed ingestion, podcast catalogues and news pipelines.

- **URL**: https://apify.com/scrapers-hub/rss-xml-scraper.md
- **Developed by:** [Scrapers Hub](https://apify.com/scrapers-hub) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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 / XML Scraper – Feed Parser for RSS, Atom & XML with Media Namespaces

The **RSS / XML Scraper** turns any RSS, Atom or generic XML feed into a clean Apify dataset, one item per entry, with namespaced extensions preserved rather than discarded. Point it at a feed URL and it fetches, parses and pushes structured records containing titles, links, descriptions, publication dates, GUIDs, authors, categories, enclosures and the `media:` and `dc:` extension fields that most lightweight parsers throw away.

Feeds remain the most reliable public interface a publisher offers. There is no anti-bot layer, no rendering step, no layout that breaks every quarter — just a structured document the site maintains deliberately because it wants machines to read it. The awkward part is that "RSS" in practice covers RSS 2.0, Atom, and a long tail of vendor-specific XML dialects, and reconciling them is fiddly. This RSS scraper handles that reconciliation and gives you a consistent dataset regardless of which flavour the publisher chose.

It is a plain HTTP fetcher built on `requests`, `xmltodict` and a dedicated feed parser. No proxy is used, no browser is launched, and runs are correspondingly fast and light.

***

### 📊 What Data Can You Extract with This RSS / XML Scraper?

Each dataset item corresponds to one feed entry, optionally preceded by a single channel-header item. Because feed formats vary, the fields present on any given record depend on what the publisher included — the scraper does not invent values for elements the feed omitted.

| Category | Fields | What it gives you |
|---|---|---|
| **Feed metadata** | `channel`, `atom:link` | Channel-level information about the feed itself — its title, link, description and self-referencing Atom link — emitted as the first item when the header option is enabled |
| **Core entry data** | `title`, `link`, `description`, `content`, `summary` | The headline, the canonical article URL, and the entry body in whichever of the RSS and Atom conventions the publisher used |
| **Identity & timing** | `guid`, `id`, `pubDate`, `updated` | The RSS GUID or Atom ID for deduplication, plus publication and last-modified timestamps for chronological ordering |
| **Attribution** | `author`, `dc:creator` | Byline information in both the RSS `author` form and the Dublin Core `dc:creator` form that many CMS platforms emit instead |
| **Classification** | `category` | The entry's categories or tags, returned as an array so multi-tagged entries stay intact |
| **Media & enclosures** | `enclosure`, `media:content`, `media:credit`, `media:description` | Attached media such as podcast audio and article imagery, including Media RSS content objects with their credit and caption text |

The pair worth understanding properly is `guid` and `id`. RSS 2.0 uses `<guid>`, Atom uses `<id>`, and a feed will typically populate one and leave the other empty. Any deduplication logic that reads only one of them will silently reprocess every entry from feeds using the other convention. Coalescing the two — falling back to `link` when both are absent — is the correct pattern, and having both fields exposed is what makes it possible.

***

### 🌟 Key Features of the RSS / XML Scraper

| Feature | Description |
|---|---|
| 🔄 **RSS, Atom and XML in one actor** | Handles RSS 2.0, Atom and generic XML feeds through the same input, normalising them into a consistent dataset shape |
| 🏷️ **Namespace extensions preserved** | `dc:creator`, `media:content`, `media:credit`, `media:description` and `atom:link` are retained rather than being stripped as unrecognised elements |
| 📋 **Optional channel header item** | Enable `header` and the feed's channel-level metadata is pushed as the first dataset item, giving you feed context alongside the entries |
| 🎙️ **Enclosure and media support** | `enclosure` and `media:content` capture podcast audio, video and article imagery with their associated metadata |
| 🆔 **Dual identity fields** | Both `guid` (RSS) and `id` (Atom) are exposed, so deduplication works correctly across feed formats |
| 🧹 **Configurable text trimming** | Text fields are whitespace-stripped by default; `dev_no_strip` disables this when byte-exact fidelity to the source matters |
| ♻️ **Dataset reset option** | `dev_dataset_clear` empties the default dataset before pushing, which keeps scheduled runs snapshot-shaped rather than cumulative |
| 🚀 **No proxy, no browser** | A direct HTTP fetch with `requests` and `xmltodict` — no proxy layer and no rendering step, so runs are fast and lightweight |
| 📚 **Multi-tag categories** | `category` is returned as an array, preserving every tag on entries that carry several |

***

### 🚀 Why Choose This RSS / XML Scraper?

**Namespace fidelity that other parsers lose.** A great deal of genuinely useful feed data lives in extension namespaces. News publishers put photographer bylines in `media:credit` and image captions in `media:description`; WordPress and most CMS platforms write the author into `dc:creator` rather than the plain `author` element. This RSS scraper keeps all of it, so you are not left reconstructing attribution from the article body.

**Format-agnostic input.** You do not need to know in advance whether a URL serves RSS 2.0 or Atom. Both are parsed, and both the RSS and Atom variants of overlapping concepts — `description` versus `summary`, `guid` versus `id`, `pubDate` versus `updated` — are exposed so your downstream code can coalesce them with a simple fallback chain.

**Snapshot or accumulate, your choice.** `dev_dataset_clear` determines whether a scheduled run appends to history or replaces it. Accumulating builds an archive suitable for trend analysis; clearing gives you a current-state snapshot that is trivial to consume as "the latest N entries" without any date filtering.

**No infrastructure to configure.** There is no proxy setup, no browser, no anti-bot handling to think about. Feeds are published for machine consumption, so a straightforward HTTP fetch is the correct and fastest approach, and this actor does exactly that.

***

### 📥 Input

```json
{
  "url": "https://rss.nytimes.com/services/xml/rss/nyt/US.xml",
  "header": false,
  "dev_no_strip": false,
  "dev_dataset_clear": false
}
```

#### 🔧 RSS / XML Scraper Input Fields

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `url` | string | ✅ Yes | prefilled with `https://rss.nytimes.com/services/xml/rss/nyt/US.xml` | URL of the RSS/XML/Atom feed to fetch. |
| `header` | boolean | No | `false` | If enabled, the feed's channel-level metadata is included as the first output item. |
| `dev_no_strip` | boolean | No | `false` | If enabled, text fields are kept as-is instead of having surrounding whitespace stripped. |
| `dev_dataset_clear` | boolean | No | `false` | If enabled, the default dataset is cleared before new items are pushed. |

#### 💡 Input Examples

**Basic news feed pull**

```json
{
  "url": "https://rss.nytimes.com/services/xml/rss/nyt/US.xml"
}
```

**Include the channel header for feed context**

```json
{
  "url": "https://news.ycombinator.com/rss",
  "header": true
}
```

**Scheduled snapshot run with a clean dataset each time**

```json
{
  "url": "https://blog.apify.com/rss/",
  "header": true,
  "dev_dataset_clear": true
}
```

***

### 📤 Output

With `header` enabled, the first item carries channel-level metadata about the feed.

```json
{
  "channel": {
    "title": "NYT > U.S. News",
    "link": "https://www.nytimes.com/section/us",
    "atom:link": { "href": "https://rss.nytimes.com/services/xml/rss/nyt/US.xml" }
  }
}
```

Subsequent items are individual feed entries:

```json
{
  "title": "Example article headline",
  "link": "https://www.example.com/2026/01/example-article.html",
  "description": "A short standfirst summarising the article for feed readers.",
  "pubDate": "Mon, 12 Jan 2026 09:30:00 +0000",
  "guid": { "#text": "https://www.example.com/2026/01/example-article.html" },
  "dc:creator": "Jane Doe",
  "category": ["Politics", "Economy"],
  "media:content": { "url": "https://static.example.com/images/lead.jpg", "medium": "image" },
  "media:credit": "Photographer Name/Agency",
  "media:description": "Caption text describing the lead image."
}
```

#### 🧾 RSS / XML Scraper Output Fields

| Field | Type | Description |
|---|---|---|
| `channel` | object | null | Channel the item belongs to. |
| `title` | string | null | Title of the item. |
| `link` | string | null | Link to the item. |
| `description` | string | null | Long-form description text. |
| `pubDate` | string | null | Date of the pub. |
| `guid` | object | null | Identifier of the guid. |
| `author` | string | null | Author of the item. |
| `category` | array | null | Category of the item. |
| `enclosure` | object | null | Enclosure of the item. |
| `id` | string | null | Unique identifier of the item. |
| `updated` | string | null | When the item was last updated. |
| `summary` | string | null | Short summary of the item. |
| `content` | string | null | Extracted textual content. |
| `atom:link` | object | null | Atom:link of the item. |
| `dc:creator` | string | null | Dc:creator of the item. |
| `media:content` | object | null | Media:content of the item. |
| `media:credit` | string | null | Media:credit of the item. |
| `media:description` | string | null | Media:description of the item. |

Which fields appear depends entirely on the source feed. An RSS 2.0 feed typically populates `title`, `link`, `description`, `pubDate` and `guid`; an Atom feed populates `title`, `link`, `summary`, `content`, `id` and `updated`. Fields the publisher did not include are simply absent or null.

***

### 💻 How to Use the RSS / XML Scraper (Step by Step)

#### Step 1: Find the feed URL

Before running the actor you need the feed's address. Many sites expose it in a `<link rel="alternate" type="application/rss+xml">` tag in the page head — view source and search for "rss" or "atom" to find it. Common conventions worth trying directly are `/rss`, `/feed`, `/rss.xml`, `/atom.xml` and `/index.xml`. Podcast feeds are usually published openly by the hosting platform. Once you have a candidate URL, open it in a browser to confirm it returns XML rather than an HTML page.

#### Step 2: Open the RSS / XML Scraper on Apify

Sign in to Apify and open the actor page. Create a free account if you do not have one — an API token will also be needed if you plan to call the RSS scraper from your own code or schedule it as part of a wider pipeline. Click **Try for free** or **Start** to open the input form, which is prefilled with a working news feed so you can see the output shape immediately.

#### Step 3: Enter the feed URL

Paste your feed address into `url`, the only required field. Include the full scheme — `https://example.com/feed`, not `example.com/feed`. The actor fetches this URL directly and parses whatever XML it returns, so a URL that redirects to an HTML page or returns a 404 will not produce usable items. If you are unsure whether a URL is a feed, the browser check from step 1 is worth thirty seconds.

#### Step 4: Decide whether to include the channel header

Set `header` to `true` if you want the feed's channel-level metadata pushed as the first dataset item. This is useful when you are aggregating several feeds into one store and need to know which publication each batch of entries came from, or when you want the feed's own title and description for display in an interface. Leave it at `false` when you only care about the entries and would rather every dataset item have the same shape, which simplifies downstream processing.

#### Step 5: Choose your text handling

`dev_no_strip` controls whitespace treatment. By default, text fields have surrounding whitespace stripped, which is what you want almost always — feed XML is frequently pretty-printed and raw values arrive padded with newlines and indentation. Enable `dev_no_strip` only when you need byte-exact fidelity to the source document, such as when you are checksumming content to detect edits and any normalisation would corrupt the comparison.

#### Step 6: Decide between snapshot and archive mode

`dev_dataset_clear` determines what a scheduled run leaves behind. With it disabled, each run appends to the default dataset, building a growing archive — the right choice for trend analysis or long-term content monitoring, though you will need to deduplicate on `guid` or `id` because feeds re-publish the same entries on every fetch. With it enabled, the dataset is emptied first, so it always contains exactly the current contents of the feed. That is the simpler option for dashboards and notification workflows that only care about what is live now.

#### Step 7: Run, then process the entries

Click **Start**. Feed runs are typically quick because there is a single HTTP request and a parse. When the run finishes, open **Storage → Dataset** and export to JSON, CSV, Excel or XML. In your downstream code, coalesce the format-variant fields with a fallback chain — `guid` then `id` then `link` for identity, `description` then `summary` then `content` for body text, `dc:creator` then `author` for byline — and you will get consistent results across RSS and Atom sources alike.

***

### 🔌 API Access & Integrations

Call the RSS / XML scraper directly from your own code.

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~rss-xml-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://rss.nytimes.com/services/xml/rss/nyt/US.xml",
    "header": true
  }'
```

Python, using the official client:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run_input = {
    "url": "https://news.ycombinator.com/rss",
    "header": False,
    "dev_dataset_clear": True,
}

run = client.actor("scrapers-hub/rss-xml-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    entry_id = item.get("guid") or item.get("id") or item.get("link")
    body = item.get("description") or item.get("summary") or item.get("content")
    author = item.get("dc:creator") or item.get("author")
    print(item.get("title"), "|", author, "|", item.get("pubDate"))
```

The RSS scraper also connects to Zapier, Make, Google Sheets and Slack through Apify's integrations, and a webhook on run completion lets new feed entries trigger downstream workflows automatically.

***

### 💡 Best Use Cases for RSS Feed Data

#### 📡 News monitoring and media aggregation

Schedule the RSS scraper against a set of publisher feeds and you have a continuously refreshing news store. `title`, `link`, `pubDate` and `category` give you everything a monitoring dashboard needs, while `media:content` supplies lead imagery for a visual timeline. Deduplicating on `guid` keeps repeated fetches from inflating the archive.

#### 🎙️ Podcast catalogue and episode tracking

Podcast feeds publish episode audio in the `enclosure` element along with its URL and type. Combined with `title`, `description`, `pubDate` and `dc:creator`, that is a complete episode record. Running the same feed on a schedule and diffing on `guid` gives you a reliable new-episode trigger without polling a podcast platform's API.

#### 🏢 Competitor content intelligence

Track your competitors' blog feeds to see what they publish, how often, and on which topics. The `category` array shows their editorial focus over time and `pubDate` reveals publishing cadence. Aggregating across a set of competitor feeds turns scattered blog posts into a comparable content strategy dataset.

#### 📊 Content archiving and trend analysis

With `dev_dataset_clear` disabled, repeated runs accumulate a longitudinal archive of everything a publisher has released. That historical corpus supports topic-frequency analysis, tracking how a story develops across outlets, and building a training or retrieval set — none of which is possible from a single point-in-time fetch.

#### 🔔 Alerting and notification pipelines

Pair a scheduled run with a webhook and you get instant alerts on new entries. Filter on `title`, `description` or `category` for the keywords you care about, and route matches to Slack or email. Because feeds update the moment a publisher posts, this is usually faster than any polling of the underlying site.

#### 🤖 RAG and language model ingestion

`content` and `description` carry the article text a publisher chose to syndicate, already separated from site navigation and advertising. That makes feeds an unusually clean ingestion source for retrieval-augmented generation, with `link`, `pubDate` and `dc:creator` supplying the citation metadata a well-behaved RAG pipeline needs.

#### 🖼️ Media and image harvesting

For publishers that use Media RSS, `media:content`, `media:credit` and `media:description` provide image URLs with photographer attribution and caption text. That combination is exactly what a licensing-aware image pipeline requires, since it preserves the credit information that a bare image URL would lose.

***

### ⚙️ Tips for Better RSS Feed Scraping Results

- **Verify the URL returns XML before scheduling it.** Opening the feed URL in a browser takes seconds and catches the most common failure, which is a URL that redirects to an HTML page or has been retired by the publisher.
- **Deduplicate on `guid`, falling back to `id` and then `link`.** RSS and Atom use different identity elements, and code that reads only one will reprocess entries from every feed using the other convention.
- **Enable `header` when aggregating multiple feeds.** The channel item tells you which publication a batch of entries came from, which is otherwise awkward to reconstruct once several feeds share a store.
- **Use `dev_dataset_clear` for snapshot workflows and leave it off for archives.** Choosing the wrong mode is the usual cause of either a dataset full of duplicates or a history you meant to keep being wiped.
- **Read `dc:creator` before `author`.** Most CMS-generated feeds populate the Dublin Core element and leave the plain RSS `author` element empty, so byline extraction that checks only `author` will look broken on the majority of blog feeds.
- **Expect only the newest entries.** Feeds publish a rolling window, commonly the ten to fifty most recent items. Building a deep archive requires running on a schedule frequent enough that no entry falls out of the window between runs.

***

### 🛠️ Troubleshooting

**The run returned no items at all.**
Confirm the URL actually serves a feed. Open it in a browser: if you see a rendered web page rather than XML or a browser's feed view, the URL points at an HTML page and there is nothing to parse. Also check that the feed has not been retired — publishers deprecate feeds without announcement, and a 404 or a redirect to the homepage will yield an empty dataset.

**Fields I expected are missing from the output.**
The RSS scraper returns what the feed contains and does not fabricate values. An Atom feed will populate `summary`, `content`, `id` and `updated` while leaving `description`, `guid` and `pubDate` empty, and an RSS feed does the reverse. Write your consumer to coalesce the equivalent pairs rather than depending on one convention.

**Every scheduled run returns the same entries again.**
That is how feeds work: each fetch returns the current window of recent items, so overlap between runs is inevitable. Either enable `dev_dataset_clear` so each run holds only the current state, or deduplicate downstream on `guid` or `id` before storing.

**Text fields contain unexpected leading or trailing whitespace.**
Check whether `dev_no_strip` is enabled. With it on, values are returned exactly as they appear in the source XML, and feed documents are frequently pretty-printed with indentation that ends up inside the text nodes. Disable it to get stripped values.

**`media:content` or `enclosure` is empty for a feed I know has images.**
Not every publisher declares media through the Media RSS or enclosure elements — many embed images directly in the HTML of the `description` or `content` field instead. In that case, parse the image out of the body HTML rather than expecting a structured media element.

***

### ❓ Frequently Asked Questions About RSS / XML Scraping

**What does the RSS / XML Scraper do?**
It fetches an RSS, Atom or generic XML feed from a URL, parses it, and pushes one dataset item per entry with the entry's title, link, description, dates, identifiers, author, categories, enclosures and namespaced media fields.

**Does this RSS scraper support Atom feeds as well as RSS?**
Yes. Both formats are handled through the same `url` input. Atom-specific fields such as `id`, `updated`, `summary` and `content` are exposed alongside the RSS equivalents.

**Can I scrape more than one feed in a single run?**
No. The input takes a single `url` per run. For multiple feeds, call the actor once per URL through the API, or create one scheduled task per feed — which also keeps per-feed failures isolated.

**Do I need proxies for the RSS scraper?**
No. The actor makes a direct HTTP request with no proxy layer. Feeds are published for machine consumption and are not typically protected by anti-bot measures.

**How many entries will one run return?**
As many as the feed publishes in its current window, which is entirely up to the publisher — commonly between ten and fifty entries. The actor does not impose a limit of its own.

**What is the difference between `guid` and `id`?**
`guid` is the RSS 2.0 unique identifier and `id` is the Atom equivalent. A given feed usually populates one and leaves the other empty, so deduplication logic should check both and fall back to `link`.

**What does the `header` option add?**
It pushes the feed's channel-level metadata — title, link, description and self-referencing Atom link — as the first item in the dataset, ahead of the entries.

**Why are `dc:creator` and `author` different fields?**
`author` is the standard RSS element, while `dc:creator` comes from the Dublin Core namespace and is what most CMS platforms actually emit. Both are exposed because feeds in the wild use one or the other inconsistently.

**Can I get full article text from a feed?**
Only what the publisher chooses to syndicate. Full-text feeds populate `content` with the complete article; summary feeds put a short standfirst in `description` and expect readers to follow `link` for the rest. This RSS scraper returns whichever the feed provides and does not fetch the linked page.

**What does `dev_dataset_clear` do?**
It empties the default dataset before pushing new items, so the dataset always reflects only the most recent run. Leave it off if you want runs to accumulate into an archive.

**Can I schedule the RSS scraper to run automatically?**
Yes. Apify's scheduler runs the actor on any cron expression, which is the standard pattern for news monitoring. Attach a webhook so each completed run can trigger a downstream notification or ingestion step.

**How do I handle podcast feeds with this scraper?**
Podcast feeds are RSS, so they work directly. Episode audio arrives in the `enclosure` field with its URL and media type, alongside the usual `title`, `description` and `pubDate`.

**Is scraping RSS feeds legal?**
Feeds are published explicitly for automated consumption, so fetching them is generally uncontroversial. Republishing the content is a separate matter governed by the publisher's copyright and terms, so check those before redistributing anything beyond headlines and links.

**Why does `category` come back as an array?**
Because feed entries frequently carry several categories or tags. Returning an array preserves all of them rather than discarding everything after the first.

**Can I archive historical entries that are no longer in the feed?**
Not retroactively — feeds only expose their current window. Build the archive going forward by scheduling runs with `dev_dataset_clear` disabled, at an interval short enough that entries do not age out between runs.

***

### 🆘 Support & Feedback

If a feed does not parse as expected, or a field you rely on stops populating, open a ticket on the **Issues** tab of the actor page and include the run ID and the feed URL. A concrete failing feed is by far the fastest route to a fix.

Need something this RSS scraper does not do — multiple feeds per run, full-text enrichment from the linked article, or a custom output shape delivered into your own store? Email **scraperhubapi@gmail.com** with a description of what you are building.

If the RSS / XML Scraper is useful to you, please leave a review on its Apify page. Ratings and written feedback shape which improvements get built next.

***

### ⚖️ Disclaimer

The RSS / XML Scraper fetches only publicly published feeds — documents that publishers make available specifically so that software can read them. It does not bypass authentication, access private feeds, or retrieve content that is not openly served at the URL you supply.

You are responsible for how you use the data this RSS scraper returns. Feed content is generally protected by copyright, and syndication through a feed does not grant a licence to republish. Check the publisher's terms before redistributing anything beyond headlines and links. Where entries contain personal data — author names in `dc:creator` or `author`, or individuals named in article text — processing must comply with applicable data protection law including the GDPR and UK GDPR. Respect any rate limits or usage terms stated by the feed publisher.

This actor is an independent tool and is not affiliated with or endorsed by any publisher whose feed you choose to scrape. All trademarks referenced belong to their respective owners.

If you believe data collected through this actor relates to you and you would like it removed, contact **scraperhubapi@gmail.com** with the details and the request will be handled promptly.

# Actor input Schema

## `url` (type: `string`):

URL of the RSS/XML/Atom feed to fetch.

## `header` (type: `boolean`):

If enabled, the feed's channel-level metadata is included as the first output item.

## `dev_no_strip` (type: `boolean`):

If enabled, text fields are kept as-is instead of having surrounding whitespace stripped.

## `dev_dataset_clear` (type: `boolean`):

If enabled, the default dataset is cleared before new items are pushed.

## Actor input object example

```json
{
  "url": "https://rss.nytimes.com/services/xml/rss/nyt/US.xml",
  "header": false,
  "dev_no_strip": false,
  "dev_dataset_clear": false
}
```

# Actor output Schema

## `results` (type: `string`):

Records scraped by RSS / XML Scraper, stored in the run's default dataset.

# 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 = {
    "url": "https://rss.nytimes.com/services/xml/rss/nyt/US.xml"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers-hub/rss-xml-scraper").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 = { "url": "https://rss.nytimes.com/services/xml/rss/nyt/US.xml" }

# Run the Actor and wait for it to finish
run = client.actor("scrapers-hub/rss-xml-scraper").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 '{
  "url": "https://rss.nytimes.com/services/xml/rss/nyt/US.xml"
}' |
apify call scrapers-hub/rss-xml-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers-hub/rss-xml-scraper"
        }
    }
}

```

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/KWB2x4KInnTfR2Rzh/builds/vQQ283V9zUCITe9Mv/openapi.json
