Mark up RSS feed

Why do I need to adapt my RSS feed for Zen?

If you adapt your RSS for Zen:

  • Extraneous material will not end up in your Zen feed. If your site doesn't have RSS, the robot will get Zen content that resembles articles from your site, but this may result in ads or user profiles mistakenly ending up in the feed.
  • Headings, descriptions, and illustrations in your articles will stay in their correct places on Zen. Our robot is still learning and may make mistakes that could be avoided using RSS.
  • “Adult” content on your site won't lower your Zen ranking for other materials from your site.
  • Readers will get the articles that they're interested in. The more information Zen has about an article, the better the chance that it will display to readers who actually want to read it. For this reason, RSS feeds need to contain the article's release date, complete text, and links to all illustrations in the article.
Note. RSS feeds prepared for Yandex.News will not work for Yandex.Zen. Zen uses a different group of mandatory attributes and has different illustration size requirements. You can, however, use an RSS adapted for Yandex.News while you are working on adapting your feed for Zen.

Description of RSS markup for Zen

Tip. After you mark up your RSS feed, make sure to validate it.
<rss>, <channel>, <title>, <link>, <description>, <language> and <item> tags

Example:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:georss="http://www.georss.org/georss">
<channel>
<title>Pasternak</title>
<link>http://example.com/</link>
<description>
Project about fruits and vegetables. Let's talk about how to grow, cook, and eat vegetables.
</description>
<language>ru</language>
<item>
...
</item>
</channel>

Tag description:

  1. <rss> — Data format. The XML-based RSS 2.0 format is used to export data for placement on Zen. We support RSS, HTML5, and the Media RSS and GeoRSS micro-formats.
  2. <channel> — Information about the source and its contents. Contents of tags:
    • <title> — Name of publication.
    • <link> — Address of publication site.
    • <description> — Description of publication.
    • <language> — Language of article according to ISO 639-1 standard.
    • <item> — Contains publisher material. You should have at least 50 materials of this type in your Zen RSS feed.
<title>, <link>, <pubDate>, <author>, <category>, <description> and <content:encoded> tags

Example:

<title>Android is restoring farm in Japan</title>
<link>http://example.com/2023/07/04/android-happy-farmer</link>
<guid>2fd4e1c67a2d28fced849ee1bb76e7391b93eb12</guid>
<pubDate>Tue, 4 Jul 2023 04:20:00 +0300</pubDate>
<author>Pyotr Strugatsky</author></author>
<category>Technology</category>
<description><![CDATA[
Abandoned land next to Tokyo University was given to an android who looks like a famous Japanese writer.
]]></description>
<content:encoded><![CDATA[
<p>
Full article text found here.
</p>
]]></content:encoded>

Tag description:

  1. <title> — Article heading.
  2. <link> — Article heading. URL of site whose data is streamed. The RSS link should be identical to the site link. This will help our recommender work.

    For example, these URLs are considered to be identical:

    • http://example.com/2023/07/04/android-happy-farmer
    • http://example.com/2023/07/04/android-happy-farmer

    But these ones are not identical:

    • http://example.com/2023/07/04/android-happy-farmer
    • http://example.com/2023/07/04/android-happy-farmer/
    • http://example.com/2023/07/04/android-happy-farmer?utm_medium=cpc&utm_source=yandex. {source_type}&utm_campaign={campaign_id}&utm_content={ad_id}&utm_term={keyword}
    Note. We understand that RSS tags help analyze traffic, which is why we are working on a separate tool for this that will be released next year. Don't add tags now; it will be much easier to do it later.
  3. <pubDate> — Date published (in RFC822 format). For example: “Wed, 02 Oct 2002 15:00:00 +0300”. If this tag is not specified, then Zen will consider the date to be when the RSS was uploaded, which may not be correct.
  4. <author> — Author of article.
  5. <category> — Theme of article. Marking up articles helps Zen recommend them to relevant readers. Articles may correspond to several themes at once.
    Themes used in Zen
    • Happenings
    • Politics
    • War
    • Society
    • Economy
    • Sports
    • Technology
    • Science
    • Gaming
    • Music
    • Literature
    • Cinema
    • Culture
    • Fashion
    • Celebrities
    • Psychology
    • Health
    • Auto
    • Home
    • Hobbies
    • Food
    • Design
    • Photography
    • Humor
    • Nature
    • Travel
  6. <description> — Short article annotation.
  7. <content:encoded> — Full text of article. We accept articles that are at least 300 characters long.
<media:rating> tag

We request that you use this tag to mark up “adult” content. This is so that Zen doesn't pessimize your whole site (only the adult material) if there is a rule violation. Be sure to mark your “adult” content, or else all material on your site will be pessimized.

Here is how content that can be shown to teenagers 13 and over should be marked up:

<media:rating scheme="urn:simple">nonadult</media:rating>

Here is how “adult” content should be marked up:

<media:rating scheme="urn:simple">adult</media:rating>
<figure>, <img>, <video> and <figcaption> tags

We request that you send links to all illustrations and videos contained in your article. Articles should contain at least one image of no less than 400 pixels in width.

Example:

<figure>
<img src="http://example.com/2023/07/04/pic1.jpg" width="1200" height="900">
<figcaption>
The first android-farmer looks out at his land
<span class="copyright">Mikhail Rodchenkov</span>
</figcaption>
</figure>

Tag description:

  1. <figure> — Illustration or video. Every illustration or videoclip should be marked up using a separate <figure> tag.
  2. <figcaption> — Caption under illustration or video.
  3. <img> — Illustration in JPEG, GIF, or PNG format of at least 600 pixels in width. The first illustration in the article that is marked up using this tag will be used as a preview image in the Zen feed.
  4. <video> — Video in a supported format (MP4 (H.264), YouTube, Vimeo).
<media:content>, <media:description>, <media:copyright> tags

You can use these tags as an alternative method to insert media content in RSS.

Example:

<item>
<media:content type="image/jpeg" medium="image" width="900" height="600"
url="http://example.com/2023/07/04/pic1.jpg">
<media:description type="plain">The first android-farmer looks out at his land</media:description>
<media:copyright>Mikhail Rodchenkov</media:copyright>
</media:content>
</item>

Tag description:

  1. <media:content> — Illustrations, audio or videoclips in supported formats:
    • Images in JPEG, GIF, PNG format.
    • Videoclips in MP4 (H.264) format, YouTube, Vimeo.
    • Audioclips in MP3 format, SoundCloud.
  2. <media:description> — Caption under illustration or video.
  3. <media:copyright> — Author's rights to illustration or video.
<enclosure> tag

This element is mandatory for illustrations, and audio- and video-files.

If an article contains several illustrations or an illustration and video-file, use more than one <enclosure> element. If the article contains several versions of one illustration and they differ by size, then you need to specify the URL for the larger image in the <enclosure> element. The <enclosure> tag duplicates the <figure> tag, but both of them are mandatory. The second one is found in the body of the article; the first one — outside the body of the text in the description.

Example:

<enclosure url="http://example.com/2023/07/04/pic1.jpg" type="image/jpeg"/>
<enclosure url="http://example.com/2023/07/04/pic2.jpg" type="image/jpeg"/>
<enclosure url="http://example.com/2023/07/04/video/42420" type="video/x-ms-asf"/>
<pdalink> and <amplink> tags

Example:

<pdalink>http://m.example.com/2023/07/04/android-happy-farmer</pdalink>
<amplink>http://amp.example.com/2023/07/04/android-happy-farmer</amplink>

Tag description:

  1. <pdalink> — Link to version of message adapted for mobile devices.
  2. <amplink> — Link to AMP version of message.
Inserted code

We request that you exclude any HTML that is not described in the current RSS recommendations, for example:

  • Videos
    <iframe src="URL Vimeo or YouTube" height="480" width="640"/>
  • Instagram, Twitter, and Facebook
    <iframe src="//instagram.com/p/INSTID/" ...>
    </iframe>
    <blockquote class=“twitter-tweet” ...>
    <p>Status text</p>
    <a href=“https://t.co/...”>media reference</a>
    </blockquote>
    <script async src=“//platform.twitter.com/widgets.js” charset=“utf-8”></script>
    <div class=“fb-post” data-href=“facebook_url_to_the_post”> ... </div>
    <div class=“fb-video” data-href=“facebook_url_to_video”> ... </div>

Example of RSS feed with all elements

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:georss="http://www.georss.org/georss">
<channel>
<title>Pasternak</title>
<link>http://example.com/</link>
<description>
Project about fruits and vegetables. Let's talk about how to grow, cook, and eat vegetables.
</description>
<language>ru</language>
<item>
<title>Android restores farm in Japan</title>
<link>http://example.com/2023/07/04/android-happy-farmer</link>
<pdalink>http://m.example.com/2023/07/04/android-happy-farmer</pdalink>
<amplink>http://amp.example.com/2023/07/04/android-happy-farmer</amplink>
<guid>2fd4e1c67a2d28fced849ee1bb76e7391b93eb12</guid>
<pubDate>Tue, 4 Jul 2023 04:20:00 +0300</pubDate>
<media:rating scheme="urn:simple">nonadult</media:rating>
<author>Pyotr Strugatsky</author>
<category>Technology</category>
<enclosure url="http://example.com/2023/07/04/pic1.jpg" type="image/jpeg"/>
<enclosure url="http://example.com/2023/07/04/pic2.jpg" type="image/jpeg"/>
<enclosure url="http://example.com/2023/07/04/video/42420" type="video/x-ms-asf"/>
<description><![CDATA[
Abandoned land next to Tokyo University given to android
who looks like famous Japanese author.
]]></description>
<content:encoded><![CDATA[
<p>Full text of article here.
This text may be broken up by pictures, video, or other media content 
just like in the original article. Example of inserted image below.</p>
<figure>
<img src="http://example.com/2023/07/04/pic1.jpg" width="1200" height="900">
<figcaption>
The first android-farmer looks out at his land
<span class="copyright">Mikhail Rodchenkov</span>
</figcaption>
</figure>
<p>Article continues after inserted image. The article talks about
the plowing technology that the Japanese android-farmer uses.
So you'll need to have a videoclip for this type of material. Example of videoclip below.</p>
<figure>
<video width="1200" height="900">
<source src="http://example.com/2023/07/04/video/42420" type="video/mp4">
</video>
<figcaption>
Android-farmer plows land using technology of his own invention
<span class="copyright">Mikhail Rodchenkov</span>
</figcaption>
</figure>
<p>Article continues after video. Android digs up potatoes.
Farms are thriving. Japanese in constant amazement.</p>
]]></content:encoded>
</item>
</channel>
</rss>