Google API for fetching RSS feeds

Google API for fetching RSS feeds

Google has provided simplest and easiest feeds API. Using Google Feed API, you can easily fetch feeds from a URL using only Javascript. You just need to customize the data fetched by this API.

Here is the link where you can get complete documentation of Google Feed API:


// You need to include this javascript file on your page to get the API to work
    <script type="text/javascript" src=""></script>
    <script type="text/javascript">

    google.load("feeds", "1");

// this function loads the feeds from the given URL
    function initialize() {
      var feed = new google.feeds.Feed("");
      feed.load(function(result) {
        if (!result.error) {
          var container = document.getElementById("feed");
          for (var i = 0; i < result.feed.entries.length; i++) {
            var entry = result.feed.entries[i];
            var div = document.createElement("div");

// Calling the initialize function on your page load


    <div id="feed"></div>

Browser compatibility:
The Google Feed API supports Firefox 1.5+, IE6+, Safari, Opera 9+, and Chrome.

Return Format:

This API returns result in two basic formats. One is JSON, and other is XML. There is third format, which is MIXED.

The Google Feed API provides feed results in very well structured format, that we can use the attributes of the result set in the way we like to use. It provides feed time, feed title, feed content, feed image and other parts of the feed.

Google Feed API also provides specific methods for this API.
I am providing list of these methods here:

  • Setting the number of feed entries
  • This sets the number of entries to be fetched from given public RSS Feed

  • Setting the feed format
  • This sets the feed result format

  • Loading historical entries
  • This returns feed entries stored by Google that are no longer in the feed XML.

  • Returning nodes by element ID
  • This returns a NodeList of all the elements with a given local name and namespace URI.

  • Matching feeds to a query
  • google.feeds.findFeeds(query, callback) is a global method that returns a list of feeds that match the given query

So, it is super simple to use the API in your website, web page, application or blog for showing feeds from the blogs you like the most.
Just dig into the API, and google will do the rest itself.

Please write us if you need additional help.

Leave a Reply

Your email address will not be published. Required fields are marked *