Feeds
Read, download and write news feeds in RSS and Atom formats, all read into the same JSON shape. Typical uses: collect news from several sites, publish an RSS feed of your content.
feed readfeed readfeed fetchfeed fetchfeed writefeed write

feed read <text_or_path>


Description

    Read a feed given as text (it starts with <) or as a file path. Result: {format, version, feed, count, items, warnings}

Parameters

    text_or_path:   The XML of the feed, or the path of a file (same rights as file load) - String - required
admin
feed read "<?xml version=\"1.0\" encoding=\"UTF-8\"?><rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\"><channel><title>Shop news</title><link>https://shop.example.com/</link><description>New products</description><language>en</language><lastBuildDate>Tue, 10 Nov 2026 08:00:00 +0100</lastBuildDate><item><title>Winter collection</title><link>https://shop.example.com/winter</link><guid isPermaLink=\"false\">post-41</guid><pubDate>Mon, 09 Nov 2026 17:30:00 +0100</pubDate><description>Coats & boots are back.</description><content:encoded><![CDATA[<p>Coats & <b>boots</b> are back.</p>]]></content:encoded><dc:creator>Ann Martin</dc:creator><category>season</category><category>clothes</category><enclosure url=\"https://shop.example.com/winter.jpg\" length=\"48211\" type=\"image/jpeg\"/></item><item><title>Opening hours</title><link>https://shop.example.com/hours</link><pubDate>Sun, 8 Nov 2026 09:00:00 GMT</pubDate><author>contact@shop.example.com (Shop team)</author></item></channel></rss>"
mentdb
{"format": "rss", "version": "2.0", "feed": {"title": "Shop news", "link": "https://shop.example.com/", "description": "New products", "id": null, "language": "en", "updated": "2026-11-10T07:00:00Z", "published": null, "authors": [], "image": null, "generator": null, "self_url": null}, "count": 2, "items": [{"title": "Winter collection", "link": "https://shop.example.com/winter", "id": "post-41", "published": "2026-11-09T16:30:00Z", "updated": null, "summary": "Coats & boots are back.", "content": "<p>Coats & <b>boots</b> are back.</p>", "authors": [{"name": "Ann Martin", "email": null, "uri": null}], "categories": ["season", "clothes"], "enclosures": [{"url": "https://shop.example.com/winter.jpg", "length": 48211, "type": "image/jpeg"}]}, {"title": "Opening hours", "link": "https://shop.example.com/hours", "id": null, "published": "2026-11-08T09:00:00Z", "updated": null, "summary": null, "content": null, "authors": [{"name": "Shop team", "email": "contact@shop.example.com", "uri": null}], "categories": [], "enclosures": []}], "warnings": []}
Atom 1.0: xml:base makes the links absolute, the xhtml content is given as HTML
admin
feed read "<?xml version=\"1.0\" encoding=\"utf-8\"?><feed xmlns=\"http://www.w3.org/2005/Atom\" xml:base=\"https://blog.example.org/\"><title>Lab notes</title><id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id><updated>2026-11-10T07:00:00Z</updated><link rel=\"alternate\" href=\"/\"/><link rel=\"self\" href=\"/atom.xml\"/><author><name>Lab team</name><email>lab@example.org</email></author><entry><title type=\"html\">Results of <i>run 12</i></title><id>tag:blog.example.org,2026:12</id><link rel=\"alternate\" type=\"text/html\" href=\"2026/run-12.html\"/><published>2026-11-09T10:00:00+01:00</published><updated>2026-11-10T07:00:00Z</updated><summary>Yield up 4 %</summary><content type=\"xhtml\"><div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Yield up <b>4 %</b></p></div></content><category term=\"chemistry\"/><link rel=\"enclosure\" href=\"data/run-12.csv\" length=\"2048\" type=\"text/csv\"/></entry></feed>"
mentdb
{"format": "atom", "version": "1.0", "feed": {"title": "Lab notes", "link": "https://blog.example.org/", "description": null, "id": "urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6", "language": null, "updated": "2026-11-10T07:00:00Z", "published": null, "authors": [{"name": "Lab team", "email": "lab@example.org", "uri": null}], "image": null, "generator": null, "self_url": "https://blog.example.org/atom.xml"}, "count": 1, "items": [{"title": "Results of <i>run 12</i>", "link": "https://blog.example.org/2026/run-12.html", "id": "tag:blog.example.org,2026:12", "published": "2026-11-09T09:00:00Z", "updated": "2026-11-10T07:00:00Z", "summary": "Yield up 4 %", "content": "<p>Yield up <b>4 %</b></p>", "authors": [], "categories": ["chemistry"], "enclosures": [{"url": "https://blog.example.org/data/run-12.csv", "length": 2048, "type": "text/csv"}]}], "warnings": []}
RSS 1.0 (RDF)
admin
feed read "<?xml version=\"1.0\"?><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns=\"http://purl.org/rss/1.0/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"><channel rdf:about=\"https://news.example.net/rss\"><title>Old style news</title><link>https://news.example.net/</link><description>RSS 1.0</description></channel><item rdf:about=\"https://news.example.net/1\"><title>First</title><link>https://news.example.net/1</link><dc:date>2026-11-10T06:00:00+00:00</dc:date><dc:subject>misc</dc:subject></item></rdf:RDF>"
mentdb
{"format": "rss1", "version": "1.0", "feed": {"title": "Old style news", "link": "https://news.example.net/", "description": "RSS 1.0", "id": "https://news.example.net/rss", "language": null, "updated": null, "published": null, "authors": [], "image": null, "generator": null, "self_url": null}, "count": 1, "items": [{"title": "First", "link": "https://news.example.net/1", "id": "https://news.example.net/1", "published": "2026-11-10T06:00:00Z", "updated": null, "summary": null, "content": null, "authors": [], "categories": ["misc"], "enclosures": []}], "warnings": []}
RSS 0.91 with its DOCTYPE and HTML entities
admin
feed read "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\" \"http://my.netscape.com/publish/formats/rss-0.91.dtd\"><rss version=\"0.91\"><channel><title>Café news</title><link>http://cafe.example.com/</link><description>RSS 0.91 with HTML entities</description><item><title>Crème brûlée</title><link>/menu</link></item></channel></rss>"
mentdb
{"format": "rss", "version": "0.91", "feed": {"title": "Café news", "link": "http://cafe.example.com/", "description": "RSS 0.91 with HTML entities", "id": null, "language": null, "updated": null, "published": null, "authors": [], "image": null, "generator": null, "self_url": null}, "count": 1, "items": [{"title": "Crème brûlée", "link": "/menu", "id": null, "published": null, "updated": null, "summary": null, "content": null, "authors": [], "categories": [], "enclosures": []}], "warnings": []}

feed read <text_or_path> <json_params>


Description

    Read a feed with parameters: source (auto, text or path), base_url (to make the relative links absolute), max_items (10000, up to 100000), max_bytes (20 MB, up to 200 MB)

Parameters

    text_or_path:   The XML of the feed, or the path of a file - String - required
    json_params:   The parameters, as a JSON object - String - required
admin
feed read "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\" \"http://my.netscape.com/publish/formats/rss-0.91.dtd\"><rss version=\"0.91\"><channel><title>Café news</title><link>http://cafe.example.com/</link><description>RSS 0.91 with HTML entities</description><item><title>Crème brûlée</title><link>/menu</link></item></channel></rss>" "{\"base_url\": \"http://cafe.example.com/\", \"max_items\": 1}"
mentdb
{"format": "rss", "version": "0.91", "feed": {"title": "Café news", "link": "http://cafe.example.com/", "description": "RSS 0.91 with HTML entities", "id": null, "language": null, "updated": null, "published": null, "authors": [], "image": null, "generator": null, "self_url": null}, "count": 1, "items": [{"title": "Crème brûlée", "link": "http://cafe.example.com/menu", "id": null, "published": null, "updated": null, "summary": null, "content": null, "authors": [], "categories": [], "enclosures": []}], "warnings": []}
Used in use cases (1 recipe)

    Integrator & ETL developer › Merge the news feeds of suppliers into one feed for the intranet
Often used with

    array merge  ·  feed write

feed fetch <url>


Description

    Download and read a feed: GET, 15 s, 10 MB, 5 redirects. Result: {status, not_modified, url, redirects, etag, last_modified, content_type} and the fields of feed read

Parameters

    url:   The http or https address of the feed - String - required
admin
feed fetch "http://127.0.0.1:26080/feed.xml"
mentdb
{"status": 200, "not_modified": false, "url": "http://127.0.0.1:26080/feed.xml", "redirects": 0, "etag": "\"v1-abc\"", "last_modified": "Tue, 10 Nov 2026 08:00:00 GMT", "content_type": "application/rss+xml; charset=utf-8", "format": "rss", "version": "2.0", "feed": {"title": "Shop news", "link": "https://shop.example.com/", "description": "New products", "id": null, "language": "en", "updated": "2026-11-10T07:00:00Z", "published": null, "authors": [], "image": null, "generator": null, "self_url": null}, "count": 1, "items": [{"title": "Winter collection", "link": "https://shop.example.com/winter", "id": "post-41", "published": "2026-11-09T16:30:00Z", "updated": null, "summary": "Coats & boots are back.", "content": "<p>Coats & <b>boots</b> are back.</p>", "authors": [{"name": "Ann Martin", "email": null, "uri": null}], "categories": ["season", "clothes"], "enclosures": [{"url": "https://shop.example.com/winter.jpg", "length": 48211, "type": "image/jpeg"}]}], "warnings": ["only the first 1 items were read (max_items)"]}"

feed fetch <url> <json_params>


Description

    Download a feed with parameters: etag and last_modified (from the previous call: an unchanged feed answers 304 and is not downloaded), timeout_ms (15000, 100 to 120000, the whole call), max_bytes (10 MB, up to 100 MB, after decompression), max_items, user_agent, block_private (false; true refuses the internal addresses, also after a redirect)

Parameters

    url:   The http or https address of the feed - String - required
    json_params:   The parameters, as a JSON object - String - required
admin
feed fetch "http://127.0.0.1:26080/feed.xml" "{\"max_items\": 1}"
mentdb
{"status": 200, "not_modified": false, "url": "http://127.0.0.1:26080/feed.xml", "redirects": 0, "etag": "\"v1-abc\"", "last_modified": "Tue, 10 Nov 2026 08:00:00 GMT", "content_type": "application/rss+xml; charset=utf-8", "format": "rss", "version": "2.0", "feed": {"title": "Shop news", "link": "https://shop.example.com/", "description": "New products", "id": null, "language": "en", "updated": "2026-11-10T07:00:00Z", "published": null, "authors": [], "image": null, "generator": null, "self_url": null}, "count": 1, "items": [{"title": "Winter collection", "link": "https://shop.example.com/winter", "id": "post-41", "published": "2026-11-09T16:30:00Z", "updated": null, "summary": "Coats & boots are back.", "content": "<p>Coats & <b>boots</b> are back.</p>", "authors": [{"name": "Ann Martin", "email": null, "uri": null}], "categories": ["season", "clothes"], "enclosures": [{"url": "https://shop.example.com/winter.jpg", "length": 48211, "type": "image/jpeg"}]}], "warnings": ["only the first 1 items were read (max_items)"]}"
Fixed result from a real call on a local test server (127.0.0.1): the same etag: 304, nothing downloaded
admin
feed fetch "http://127.0.0.1:26080/feed.xml" "{\"etag\": \"\\"v1-abc\\"\"}"
mentdb
{"status": 304, "not_modified": true, "url": "http://127.0.0.1:26080/feed.xml", "redirects": 0, "etag": "\"v1-abc\"", "last_modified": "Tue, 10 Nov 2026 08:00:00 GMT", "content_type": null, "format": null, "version": null, "feed": null, "count": 0, "items": [], "warnings": []}
Fixed result from a real call on a local test server (127.0.0.1): the same date
admin
feed fetch "http://127.0.0.1:26080/feed.xml" "{\"last_modified\": \"Tue, 10 Nov 2026 08:00:00 GMT\"}"
mentdb
{"status": 304, "not_modified": true, "url": "http://127.0.0.1:26080/feed.xml", "redirects": 0, "etag": "\"v1-abc\"", "last_modified": "Tue, 10 Nov 2026 08:00:00 GMT", "content_type": null, "format": null, "version": null, "feed": null, "count": 0, "items": [], "warnings": []}
Fixed result from a real call on a local test server (127.0.0.1): a moved feed (301)
admin
feed fetch "http://127.0.0.1:26080/old" "{\"max_items\": 1}"
mentdb
{"status": 200, "not_modified": false, "url": "http://127.0.0.1:26080/feed.xml", "redirects": 1, "etag": "\"v1-abc\"", "last_modified": "Tue, 10 Nov 2026 08:00:00 GMT", "content_type": "application/rss+xml; charset=utf-8", "format": "rss", "version": "2.0", "feed": {"title": "Shop news", "link": "https://shop.example.com/", "description": "New products", "id": null, "language": "en", "updated": "2026-11-10T07:00:00Z", "published": null, "authors": [], "image": null, "generator": null, "self_url": null}, "count": 1, "items": [{"title": "Winter collection", "link": "https://shop.example.com/winter", "id": "post-41", "published": "2026-11-09T16:30:00Z", "updated": null, "summary": "Coats & boots are back.", "content": "<p>Coats & <b>boots</b> are back.</p>", "authors": [{"name": "Ann Martin", "email": null, "uri": null}], "categories": ["season", "clothes"], "enclosures": [{"url": "https://shop.example.com/winter.jpg", "length": 48211, "type": "image/jpeg"}]}], "warnings": ["only the first 1 items were read (max_items)"]}"
Fixed result from a real call on a local test server (127.0.0.1): a gzip answer
admin
feed fetch "http://127.0.0.1:26080/gz.xml" "{\"max_items\": 1, \"timeout_ms\": 5000}"
mentdb
{"status": 200, "not_modified": false, "url": "http://127.0.0.1:26080/gz.xml", "redirects": 0, "etag": null, "last_modified": null, "content_type": "application/rss+xml; charset=utf-8", "format": "rss", "version": "2.0", "feed": {"title": "Shop news", "link": "https://shop.example.com/", "description": "New products", "id": null, "language": "en", "updated": "2026-11-10T07:00:00Z", "published": null, "authors": [], "image": null, "generator": null, "self_url": null}, "count": 1, "items": [{"title": "Winter collection", "link": "https://shop.example.com/winter", "id": "post-41", "published": "2026-11-09T16:30:00Z", "updated": null, "summary": "Coats & boots are back.", "content": "<p>Coats & <b>boots</b> are back.</p>", "authors": [{"name": "Ann Martin", "email": null, "uri": null}], "categories": ["season", "clothes"], "enclosures": [{"url": "https://shop.example.com/winter.jpg", "length": 48211, "type": "image/jpeg"}]}], "warnings": ["only the first 1 items were read (max_items)"]}"
Fixed result from a real call on a local test server (127.0.0.1): a missing feed
admin
feed fetch "http://127.0.0.1:26080/missing"
mentdb
Sorry, an error appears (HTTP 404 from 127.0.0.1:26080).
Fixed result from a real call on a local test server (127.0.0.1): a body larger than max_bytes
admin
feed fetch "http://127.0.0.1:26080/big" "{\"max_bytes\": 100000}"
mentdb
Sorry, an error appears (the data is larger than 100000 bytes (max_bytes)).
Fixed result from a real call on a local test server (127.0.0.1): a server that does not answer in time
admin
feed fetch "http://127.0.0.1:26080/slow" "{\"timeout_ms\": 1000}"
mentdb
Sorry, an error appears (no answer from 127.0.0.1:26080 within 1000 ms).
block_private refuses an internal address before any connection
admin
feed fetch "http://127.0.0.1:26999/feed.xml" "{\"block_private\": true}"
mentdb
ERROR: Sorry, an error appears (the address of 127.0.0.1:26999 is internal (loopback, private, link-local or local): refused by block_private).

feed write <json_feed>


Description

    Write an RSS 2.0 feed from JSON {title, link, description, language, updated, published, authors, image, generator, items: [{title, link, id, published, updated, summary, content, authors, categories, enclosures}]}. The result of feed read is accepted as it is

Parameters

    json_feed:   The feed, as JSON - String - required
admin
feed write "{\"title\": \"Shop news\", \"link\": \"https://shop.example.com/\", \"description\": \"New products\", \"language\": \"en\", \"items\": [{\"title\": \"Winter collection\", \"link\": \"https://shop.example.com/winter\", \"id\": \"post-41\", \"published\": \"2026-11-09T16:30:00Z\", \"summary\": \"Coats & boots are back.\", \"content\": \"<p>Coats & <b>boots</b> are back.</p>\", \"authors\": [{\"name\": \"Ann Martin\", \"email\": \"ann@shop.example.com\"}], \"categories\": [\"season\"], \"enclosures\": [{\"url\": \"https://shop.example.com/winter.jpg\", \"length\": 48211, \"type\": \"image/jpeg\"}]}]}"
mentdb
<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/"> <channel> <title>Shop news</title> <link>https://shop.example.com/</link> <description>New products</description> <language>en</language> <item> <title>Winter collection</title> <link>https://shop.example.com/winter</link> <description>Coats & boots are back.</description> <content:encoded><p>Coats &amp; <b>boots</b> are back.</p></content:encoded> <author>ann@shop.example.com (Ann Martin)</author> <category>season</category> <guid isPermaLink="false">post-41</guid> <pubDate>Mon, 9 Nov 2026 16:30:00 +0000</pubDate> <enclosure url="https://shop.example.com/winter.jpg" length="48211" type="image/jpeg"/> </item> </channel> </rss>

feed write <json_feed> <json_params>


Description

    Write a feed with parameters: format (rss or atom), self_url (the address where the feed is published: atom:link rel=self, recommended), now (the date of an Atom feed without any date), pretty (true)

Parameters

    json_feed:   The feed, as JSON - String - required
    json_params:   The parameters, as a JSON object - String - required
admin
feed write "{\"title\": \"Shop news\", \"link\": \"https://shop.example.com/\", \"description\": \"New products\", \"language\": \"en\", \"items\": [{\"title\": \"Winter collection\", \"link\": \"https://shop.example.com/winter\", \"id\": \"post-41\", \"published\": \"2026-11-09T16:30:00Z\", \"summary\": \"Coats & boots are back.\", \"content\": \"<p>Coats & <b>boots</b> are back.</p>\", \"authors\": [{\"name\": \"Ann Martin\", \"email\": \"ann@shop.example.com\"}], \"categories\": [\"season\"], \"enclosures\": [{\"url\": \"https://shop.example.com/winter.jpg\", \"length\": 48211, \"type\": \"image/jpeg\"}]}]}" "{\"format\": \"atom\", \"self_url\": \"https://shop.example.com/atom.xml\"}"
mentdb
<?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> <id>https://shop.example.com/</id> <title>Shop news</title> <subtitle>New products</subtitle> <updated>2026-11-09T16:30:00Z</updated> <link rel="alternate" type="text/html" href="https://shop.example.com/"/> <link rel="self" type="application/atom+xml" href="https://shop.example.com/atom.xml"/> <entry> <id>post-41</id> <title type="html">Winter collection</title> <updated>2026-11-09T16:30:00Z</updated> <published>2026-11-09T16:30:00Z</published> <link rel="alternate" type="text/html" href="https://shop.example.com/winter"/> <author> <name>Ann Martin</name> <email>ann@shop.example.com</email> </author> <category term="season"/> <link rel="enclosure" href="https://shop.example.com/winter.jpg" length="48211" type="image/jpeg"/> <summary type="html">Coats & boots are back.</summary> <content type="html"><p>Coats &amp; <b>boots</b> are back.</p></content> </entry> </feed>
Atom needs an author
admin
feed write "{\"title\": \"T\", \"link\": \"https://e.com/\", \"items\": [{\"title\": \"a\", \"link\": \"https://e.com/a\"}]}" "{\"format\": \"atom\"}"
mentdb
ERROR: Sorry, an error appears (Atom needs an author: give authors to the feed or to every item (item 1 has none)).
Used in use cases (1 recipe)

    Integrator & ETL developer › Merge the news feeds of suppliers into one feed for the intranet
Often used with

    array merge  ·  feed read