Thursday, April 13, 2017

Use Google Feed API to Convert RSS to JSON

Here is a quick tip for anyone sick of working with the xml in RSS feeds. You can use the Google Feed API in your scripts to automatically convert the XML in the RSS feed to JSON which makes working with them much easier. For example, there is an RSS Feed from the Consumer Product Safety Commission and it has all the government recalls in the United States. Using this simple trick, you could easily pull the fresh feed on a regular basis and parse out information about recalls to use in your account. You can also configure Google Alerts to generate RSS feeds based on specific keywords you are interested in. For example, here is an RSS feed for the keyword "smx".


* Use Google Feed API to convert RSS to json
* Version 1.0 
* Created By: Russ Savage
// Usage: var jsonData = convertRssToJson('');
function convertRssToJson(rssUrl) {
  var FEED_API_URL = ""
  var url = FEED_API_URL+encodeURIComponent(rssUrl);
  var resp = UrlFetchApp.fetch(url);
  if(resp.getResponseCode() == 200) {
    return JSON.parse(resp.getContentText());
  } else {
    throw "An error occured while trying to parse: "+rssUrl;


  1. I have read your blog its very attractive and impressive. I like it your blog.


  2. If you want to improve your writing skill I recommend you to visit this site!

  3. I am hoping the same best effort from you in the future as well. In fact your creative writing skills has inspired me. buy Google reviews

  4. Very informative post! There is a lot of information here that can help any business get started with a successful social networking campaign. convert money

  5. When you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style. Buy Pinterest Followers

  6. buenos dias mi amor Very informative information on your site here. I like this post because we can get some useful information from your blog. I expect more post from you

  7. buenos dias mi amor Very informative information on your site here. I like this post because we can get some useful information from your blog. I expect more post from you

  8. This customer is incredibly blessed to have built up a reliable after among past clients who generously examine their inclinations, buys and post photographs of their prized exclusively improved autos on various well known, exceptional intrigue vehicle gatherings on the Internet.Google Ads Audit

  9. AnyConv is very easy to use. Just visit their website, upload your original files, choose the format you want to convert them to, and then hit Convert Now. Converted files can be downloaded immediately.

  10. It was wondering if I could use this write-up on my other website, I will link it back to your website though.Great Thanks. buy likes on instagram idigic

  11. Artificial intelligence is the branch in Computer science which aims to develop machines to act the way humans work with his intelligence. artificial intelligence courses in hyderabad

  12. This is my first visit to your blog! We are a team of volunteers and new
    initiatives in the same niche. Blog gave us useful information to work. You
    have done an amazing job!

    artificial intelligence training in Bangalore

  13. First off, data science training helps candidates choose better career paths. Therefore, these jobs are offered across the world. This training will help you be more skillful, proficient and technological aware. data science course in hyderabad

  14. Google+ allows businesses to come up with pages for their accounts. This gives an advantage to businesses for they can choose one cover picture or go for five smaller ones for the top side of page. This means that businesses would now have the choice to focus from five different facets of their business. best email spider

  15. With the visual computerization industry being so serious, it's imperative to make yourself stand apart from your rivals.Professional graphic design

  16. this blog was really great, never seen a great blog like this before. i think im gonna share this to my friends..
    Best Digital Marketing Courses in Hyderabad