Google Feed APi & JSON

Using google feed API to download a google alert feed and convert to json

[ note: the below command as is copy paste might now work, after copy paste on terminal, change start quote of https and end quote before test_id to single quote from keyboard. ]

$ curl -e http://www.my-ajax-site.com ‘https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=1&q=https://www.google.com/alerts/feeds/14384131864905067124/13622349005191651788&callback=rssReader.parse&context=’test_id

 

Above command returns json like below, [ Note: in above command you can change URL, id i.e. test_id and “num” ( we are using num=1 for testing ]
/* callback */rssReader.parse(‘test_id’, {“feed”:{“feedUrl”:”https://www.google.com/alerts/feeds/14384131864905067124/13622349005191651788″,”title”:”Google Alert – agriculture”,”link”:””,”author”:””,”description”:””,”type”:”atom10″,”entries”:[{“title”:”UPDATE 2-US top court rules for California farmers over government raisin program”,”link”:”https://www.google.com/url?rctu003dju0026sau003dtu0026urlu003dhttp://in.reuters.com/article/2015/06/22/usa-court-raisins-idINL1N0Z80TV20150622u0026ctu003dgau0026cdu003dCAIyHmNlZDA1YTEzMDg0MTJhMzc6Y28uaW46ZW46SU46Ugu0026usgu003dAFQjCNFVa1VlKOOuT6WnEws9OQ34WWXGwQ”,”author”:””,”publishedDate”:”Mon, 22 Jun 2015 09:41:15 -0700″,”contentSnippet”:”The U.S. Department of Agriculture program traces its roots to the Agricultural Marketing Agreement Act, which was passed in …”,”content”:”The U.S. Department of u003cbu003eAgricultureu003c/bu003e program traces its roots to the u003cbu003eAgriculturalu003c/bu003e Marketing Agreement Act, which was passed in 1937 to control theĀ …”,”categories”:[]}]}}, 200, null, 200)

 

Reference : https://developers.google.com/feed/v1/jsondevguide

Android Android Commands Android Java Applications Application Libraries Bash / Shell Scripts Bluetooth driver Build Frameworks Commands and Packages Core Kernel C Programs Development Environment Setup Documents / Books Errors & Failures File Systems Framebuffer / Display Driver git Go Language Programs Hardware Platforms Home JAVA Programs Kernel & Device Drivers Kernel Booting and Porting Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL NDK / Middleware / HAL Network Driver OS Concepts PHP Procfs Filesystem Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded
Tags:

Leave a Reply