Get Google News as JSON by Parsing rss feed

Google-News-Nuhil
As you know already that, Google News search API has been deprecated few years ago. Still developers need to have Google news as an usable format like JSON for different purpose & development platforms.

Google still provides the news service but in rss format. So, we can have those data for using just by parsing and reformatting them. I wrote a very small php class which will first search  news on Google by specific keywords and load the XML. Then it will parse the XML carefully to dissect parts of news & finally will provide a formatted JSON data set.

As of JSON, all knows that how universal this data format is to implement on several software development platforms. Hope this tiny class help some one 🙂

The class file:

Example usage:

 

You will find this source code on github also. Feel free to use and or fork.

3 thoughts on “Get Google News as JSON by Parsing rss feed”

Comments are closed.