rss

Reads an RSS feed from the specified URL and generates one record per item. Supports RSS 2.0 and Atom formats.

Command properties

PropertyDescription
Command typeDriver query
Required permissionNone
License usageCounted
Parallel executionNot supported
Distributed executionNot supported

Syntax

rss url=STR [strip=BOOL]

Options

url=STR
URL of the RSS feed to fetch.
strip=BOOL
Whether to strip HTML tags. When set to t, removes HTML tags from the content field of each RSS item. (Default: f)

Output fields

FieldTypeDescription
idintegerSequential number of the RSS item
sourcestringFeed source name
titlestringItem title
authorstringItem author
contentstringItem body text
linkstringItem URL
guidstringItem unique identifier
created_attimestampItem creation time
modified_attimestampItem modification time

Error codes

Parsing errors
Error codeMessageDescription
23002url option is required.The url option was not specified.
Runtime errors
Error codeMessageDescriptionAction
23001Cannot connect to RSS.Unable to connect to the RSS feed URL.Aborts the query.

Description

The rss command downloads an RSS feed from the specified URL and converts each item into a record. When the strip option is enabled, it removes HTML tags from the content field, leaving only plain text.

Items without date information use the current time as the created_at value. Items without a guid use the link value as guid.

Examples

  1. Retrieve an RSS feed

    rss url="https://example.com/feed.xml"
    

    Reads the RSS feed from the specified URL and outputs all items as records.

  2. Retrieve an RSS feed with HTML tags stripped

    rss url="https://example.com/feed.xml" strip=t
    

    Reads the RSS feed and removes HTML tags from the content field.

  3. Search for a specific keyword in an RSS feed

    rss url="https://example.com/feed.xml" strip=t
    | search content == "*security*"
    

    Searches for items whose body contains the word security.