Parse RSS with jQuery

WARNING

The Google Feed API is officially deprecated and doesn’t work anymore!


No need for a whole plugin. This will return your RSS as a JSON object to a callback function:

function parseRSS(url, callback) {
  $.ajax({
    url: document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' + encodeURIComponent(url),
    dataType: 'json',
    success: function(data) {
      callback(data.responseData.feed);
    }
  });
}

Leave a Comment