Technical Feed requirements

The information in your feed powers your Google News Publication. Follow our technical requirements to build a feed that renders all of its embedded features.

General advice

Publishers should provide full articles and media assets for readers to fully engage with their content. Set up your feed properly to prevent errors, failed approvals, or removals.

To improve your feed:

Technical feed specification

We accept both standard RSS and Atom feeds. The Google News feed follows these parameters:

  • Update frequency: Each feed is fetched about every 30 minutes, unless WebSub is used to notify Google News of changes. Learn more about Update frequency of feed content.

  • Size limit: 1 MB per article, and 2 MB per feed. 

  • Readability: Up to 60 new articles per fetch, without including previously read articles.
     

    Tip: To make sure that all content is retrieved, do not exceed fetch or file limits.

Article updates

The <guid> tag in RSS, and <id> tag in Atom are required to identify unique articles. We suggest using the article title as the <guid> / <id> tag, since it’s likely to change. 

Tips:

  • If you provide your original article’s full URL in the <guid> / <id> tags, the isPermaLink is optional.
  • If you don't provide the full URL, isPermaLink must be set to 'false'.

When and how to use the isPermaLink value

Full URL is used
  • Does not use isPermaLink
     
  • Sets isPermaLink to 'true'
  • <guid>https://www.yoursite.com/url-to-article.html</guid>
     
  • <guid isPermaLink=”true”>https://www.yoursite.com/url-to-article.html</guid>
Full URL is not used
  • Sets isPermaLink always set to 'false'
  • <guid isPermaLink=”false”>sample-id-1234567890</guid>


Important: We use the <pubDate> tag to determine whether the article has been modified.

Article contents and markup


Follow the below guidelines:

  • Use <content:encoded> to contain the full contents of every article. If you do not use a <content:encoded> tag, Google News defaults to content in the <description> tag. 

  • If both <content:encoded>  and <description> tags are present in the feed, Google News drops the tag with the least number of characters.  

  • For <content:encoded>, use the namespace xmlns:content="http://purl.org/rss/1.0/modules/content/

  • HTML must be escaped or preferably wrapped in a CDATA section. For example:

<content:encoded><![CDATA[<b>This is some HTML text.</b>]]></content:encoded>

Important:

  • Google News removes <script> tags.

  • Google News removes inline styles (e.g. <style> tags or style="") attributes.

Best Practices

  • Mark up your content with semantically meaningful HTML tags, such as <p>, <h1>, <ul>, etc.

  • Avoid <br> if possible.

  • Use block-level elements to avoid zero-pixel border issues.

  • Avoid the use of smart quotes.

  • Use UTF-8 if a character encoding must be specified.

Media assets

We recommend that you use Media RSS tags to identify multimedia content in Atom and RSS feeds. Learn more about Media RSS tags here.

Important: To use Media RSS, include the namespace. For example: xmlns:media="http://search.yahoo.com/mrss/".

Video

The guidelines below will help you enhance your video:

RSS tags

RSS tags help enhance video performance, and provide smoother user interface (UI) elements and muted auto-play. We accept several formats for publisher-hosted video, including: MP4, WebM, DASH, SmoothStreaming, and HLS. To include video directly in your feed, use Media RSS tags. 

Example:

<media:content url="https://ia600806.us.archive.org/17/items/VintageCartoonsSet2MP4/052750AnEggScrambleMmBr.mp4" medium="video" height="768" width="1024">

  <media:title>Sample MP4 Video</media:title>

  <media:description>

    <![CDATA[This is a sample MP4 video]]>

  </media:description>

  <media:credit role="author" scheme="urn:ebu">

    <![CDATA[Warner Brothers]]>

  </media:credit>

</media:content>

Important: Video content resolution must be at least 640x480 (width x height) and use HTTPS.

Multiple bit rates

Specify multiple <media:content> objects within a <media:group>, to provide multiple bit rates of a video. 

Example:

<media:group>

  <media:content url="https://ia600806.us.archive.org/17/items/VintageCartoonsSet2MP4/052750AnEggScrambleMmBr_1280.mp4" medium="video" height="768" width="1024" bitrate=”1280”>

    <media:title>Sample MP4 Video</media:title>

    <media:description>

      <![CDATA[This is a sample MP4 video]]>

    </media:description>

    <media:credit role="author" scheme="urn:ebu">

      <![CDATA[Warner Brothers]]>

    </media:credit>

  </media:content>

  <media:content url="https://ia600806.us.archive.org/17/items/VintageCartoonsSet2MP4/052750AnEggScrambleMmBr_4080.mp4" medium="video" height="768" width="1024" bitrate=”4080”>

    <media:title>Sample MP4 Video</media:title>

    <media:description>

      <![CDATA[This is a sample MP4 video]]>

    </media:description>

    <media:credit role="author" scheme="urn:ebu">

      <![CDATA[Warner Brothers]]>

    </media:credit>

  </media:content>

</media:group>

YouTube association

To improve our understanding of your video content, associate your publisher-hosted video with its YouTube counterpart. The YouTube video can be added into the <media:group> element.

Example:

<media:group>

  <media:content      url="https://archive.org/download/Fleischer_The_Tantalizing_Fly_1919/Tantalizing_Fly_1919_512kb.mp4"  medium="video" type="video/mp4" height="240" width="360">

    <media:title>The Tantalizing Fly</media:title>

    <media:thumbnail url="https://archive.org/download/Fly_1/RIMG0019.JPG"/>

  </media:content>

  <media:content url="https://www.youtube.com/watch?v=_dlP0nXMKXA" medium="video" type="video/3gpp">

    <media:title>The Tantalizing Fly</media:title>

  </media:content>

</media:group>

External video players

We also support external players embedded within your articles via iFrame.

Tip: Your iFrames, and any content served inside them, must be served over HTTPS to appear correctly.

Examples:

  • Brightcove

<iframe width="560" height="315" src="https://players.brightcove.net/1752604059001/VJCJXL3Ye_default/index.html?videoId=example" frameBorder="0"></iframe>

  • Dailymotion

<iframe frameborder="0" width="600" height="338" src="https://www.dailymotion.com/embed/video/EXAMPLE-logo=&ui-start-screen-inf0&endscreen-enable=0"></iframe>

  • Instagram

<iframe width="320" height="320" frameBorder="0" src="https://www.instagram.com/p/EXAMPLE/embed" frameborder="0"></iframe>

  • Ooyala

<iframe width="560" height="315" src="https://player.ooyala.com/iframe.html?embedCode=EXAMPLE" frameborder="0"></iframe>

  • Vimeo

<iframe width="560" height="315" src="https://player.vimeo.com/video/135639717?color=ff9933&byline=0"></iframe>

  • Vine

<iframe width="320" height="320" src="https://vine.co/v/bVE2IMdIV2E/embed/simple" frameborder="0"></iframe>

  • YouTube

<iframe width="560" height="315" src="https://www.youtube.com/embed/FTePI_3zpII" frameborder="0"></iframe>

Audio

  • MP3

<media:content url="http://cylinders.library.ucsb.edu/mp3s/5000/5907/cusb-cyl5907d.mp3" medium="audio">

  <media:title>Sample MP3 Audio</media:title>

  <media:description>

    <![CDATA[This is a sample MP3]]>

  </media:description>

  <media:credit role="author" scheme="urn:ebu">

    <![CDATA[Thomas Edison]]>

  </media:credit>

</media:content>

  • SoundCloud

<iframe width="560" height="162" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/221689840" frameborder="0"></iframe>

Images

Follow these best practices: 

  • Use images that are at least 800 px on a side.
  • Do not add multiple versions (e.g. sizes, aspect ratios) of the same image to the same article.

  • Include images directly in your feed using Media RSS tags.
  • Example of a Media RSS tag:

    <media:content url="https://www.google.com/images/srpr/logo11w.png" type="image/png" expression="full" width="538" height="190">

      <media:description type="plain">

        <![CDATA[Google logo]]>

      </media:description>

      <media:credit role="author" scheme="urn:ebu">

        <![CDATA[Google]]>

      </media:credit>

    </media:content> 

     

    If you use <img> tags and an image has a caption or attribution text, use the following markup:

    <figure>

      <img src="..." />

      <figcaption>The caption of this image

        <span class="copyright">The attribution of this image</span>

      </figcaption>

    </figure>

    You can also use images in these areas:

  • Hero Images
  • The article headline (or hero) image will be the largest image closest to square dimensions,  unless one inline image is designated by annotating it with the class name class="type:primaryImage" as follows:

    <img src="www.publisher.com/image.png" class="type:primaryImage">

    <figure> <img src="www.publisher.com/image.png" class="type:primaryImage"> ... </figure>

    <div> <img src="www.publisher.com/image.png" class="type:primaryImage"> ... </div>

  • Slide shows 
  • News can render a group of images with supporting captions in an inline interactive slideshow in articles. To indicate that a group of images belongs in a slide show, use the following markup in your feed:

     <section class="type:slideshow">

        <figure>...</figure>

        <figure>...</figure>

     </section>

    Important: Figures should be formatted according to the Image section above.

    Publishers can rely on these external image providers: 

  • External image providers

GIPHY

<iframe width="480" height="277" frameBorder="0" class="giphy-embed" src="https://giphy.com/embed/TK4yMeRswlKWA" frameborder="0"></iframe>

Instagram

<iframe width="320" height="320" frameBorder="0" src="https://www.instagram.com/p/EXAMPLE/embed" frameborder="0"></iframe>

Google Docs

<iframe width="480" height="560" src="https://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" frameborder="0"></iframe>

Sample Feeds

Sample RSS 2.0 feed

<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"

  xmlns:content="http://purl.org/rss/1.0/modules/content/"

  xmlns:media="http://search.yahoo.com/mrss/">

  <channel>

    <lastBuildDate>Fri, 23 Jan 2015 23:26:19 +0000</lastBuildDate>

    <title>Google News RSS Examples</title>

    <description>Google News RSS Examples</description>

    <link>http://google-news-examples.blogspot.com/</link>

    <item>

      <guid isPermaLink="false">sample-post-478956386763692725</guid>

      <pubDate>Fri, 23 Jan 2015 23:17:00 +0000</pubDate>

      <title>Sample RSS post #1</title>

      <description>An example RSS article</description>

      <content:encoded>

        <![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras egestas mattis lectus eget porttitor. Nunc iaculis luctus libero, quis viverra mi ultricies sed. Nulla pellentesque dui sed maximus tristique. Sed tempor pulvinar ex in mattis.</p><p><a href="http://www.google.com/">Sample Link</a></p><p><a href="https://www.google.com/images/srpr/logo11w.png"><img border="0" height="113" src="https://www.google.com/images/srpr/logo11w.png" width="320" /></a></p><p>Nulla dictum magna orci, et accumsan velit elementum sit amet. Vestibulum egestas, nulla nec facilisis iaculis, elit metus molestie mi, et vulputate enim eros vitae sem. Aliquam eget sagittis dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam mattis ex sit amet lectus semper tempus.</p><iframe width="560" height="315" src="//www.youtube.com/embed/200E9e8_hHY" frameborder="0" allowfullscreen></iframe>]]>

          </content:encoded>

      <link>http://google-news-examples.blogspot.com/2015/01/sample-post.html</link>

      <author>mail@example.com (Lauren Ipson)</author>

    </item>

  </channel>

</rss>

For more information, refer to RSS 2.0 at Harvard Law

Sample Atom 1.0 feed

<feed xmlns="http://www.w3.org/2005/Atom">

  <id>tag:blogger.com,1999:blog-4719018909174563858</id>

  <updated>2015-01-23T15:26:19.468-08:00</updated>

  <title type="text">Google News Atom Examples</title>

  <subtitle type="html">Example subtitle</subtitle>

  <author>

    <name>Lauren Ipson</name>

    <email>email@example.com</email>

  </author>

  <entry>

    <id>http://example.com/sample-atom-478956386763692725</id>

    <published>2015-01-23T15:17:00.004-08:00</published>

    <updated>2015-01-23T15:26:19.486-08:00</updated>

    <title type="text">Sample Atom Post #1</title>

    <content type="html">

      <![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras egestas mattis lectus eget porttitor. Nunc iaculis luctus libero, quis viverra mi ultricies sed. Nulla pellentesque dui sed maximus tristique. Sed tempor pulvinar ex in mattis.</p><p><a href='http://www.google.com/'>Sample Link</a></p><p><a href='https://www.google.com/images/srpr/logo11w.png'><img border='0' height='113' src='https://www.google.com/images/srpr/logo11w.png' width='320' /></a></p><p>Nulla dictum magna orci, et accumsan velit elementum sit amet. Vestibulum egestas, nulla nec facilisis iaculis, elit metus molestie mi, et vulputate enim eros vitae sem. Aliquam eget sagittis dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam mattis ex sit amet lectus semper tempus.</p><iframe width='560' height='315' src='//www.youtube.com/embed/IS9gmW7uFXo' frameborder='0'></iframe>]]>

    </content>

    <author>

      <name>Lauren Ipson</name>

      <email>email@example.com</email>

    </author>

  </entry>

</feed>

Learn more about Atom Syndication Format.

 

Czy to było pomocne?
Jak możemy ją poprawić?