🗞 A node module that searches Google News RSS Feed and returns a usable JSON response
This is an unofficial, super easy to use node module / API client that allows a user to fetch a Google News RSS feed based on search terms and returns an easy to use JSON response.
Coverts ⬇️
{
title: "Are there really antioxidants in that juice? How to protect against food fraud. - Washington Post",
description: "Regrettably, they are examples of food fraud that are perpetrated on unsuspecting Americans. The global food industry loses $10 billion to $15 billion per year through food substitutions, dilutions and fake labels, according to the Grocery ...",
pubDate: "Wed, 08 Jun 2017 07:01:30 GMT",
thumbnailUrl: "//t1.gstatic.com/images?q=tbn:ANd9GcS7OWziKD2Lc3zReERlqVcffAcgIuzzq723AR4zF807dKuqhzMY6EUEpQyzwGzHXpE05gGtFHNC",
publisher: "Washington Post"
}
Install
$ npm install --save google-news-rss
Usage
const GoogleNewsRss = require('google-news-rss');
const googleNews = new GoogleNewsRss();
googleNews
.search('unicorns')
.then(resp => console.log(resp));
API
Type: class
Usage: new GoogleNewsRss()
Instance Methods
.search(terms)
terms
Type: string
Search terms to search for within Google news. IE: ethereum,btc
Returns: Promise
that resolves 10 formatted articles
Article Properties
Properties | Description | Example |
---|
title | Title of the article | Why don't unicorns exist? You asked Google – here's the answer ... - The Guardian |
link | Google news link to article | Article Link |
pubDate | Published date | Wed, 07 Jun 2017 07:01:30 GMT |
description | Short description of article | Why don't unicorns exist? You asked Google - here's the answer ... |
thumbnailUrl | Thumbnail Url | //t2.gstatic.com/images?q=tbn:ANd9GcRa2NGl3_alXByd3kpnDDImMJFGeskk4Mf_AWZc-ohe_O8iEtmBs7hMxieldT_--jQWuDr4gQc |
publisher | Publisher of article | The Guardian |
License
MIT © Brandon Him