Socket
Socket
Sign inDemoInstall

google-news-rss

Package Overview
Dependencies
7
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    google-news-rss

A node module that searches Google News RSS Feed and returns a usable JSON response


Version published
Maintainers
1
Created

Readme

Source

google-news-rss Travis branch Coveralls branch

🗞 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.

RSS Example

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));
	
//
// [ 
//   { 
//      title: 'Why don\'t unicorns exist? You asked Google – here\'s the answer ... - The Guardian',
//      link: 'http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNGNR4Qg8LGbjszT1yt2s2lMXvvufQ&clid=c3a7d30bb8a4878e06b80cf16b898331&cid=52779522121279&ei=VQU7WYjiFoLEhQHIs4HQCQ&url=https://www.theguardian.com/commentisfree/2017/jun/07/why-dont-unicorns-exist-google',
//      pubDate: 'Wed, 07 Jun 2017 07:01:30 GMT',
//      description: 'Why don't unicorns exist? You asked Google – here's the answer ...',
//      publisher: 'The Guardian',
//      imgSrc: '//t2.gstatic.com/images?q=tbn:ANd9GcRa2NGl3_alXByd3kpnDDImMJFGeskk4Mf_AWZc-ohe_O8iEtmBs7hMxieldT_--jQWuDr4gQc'    
//    }
//  ... 9 more articles
// ]

API

GoogleNewsRss()

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

PropertiesDescriptionExample
titleTitle of the articleWhy don't unicorns exist? You asked Google – here's the answer ... - The Guardian
linkGoogle news link to articleArticle Link
pubDatePublished dateWed, 07 Jun 2017 07:01:30 GMT
descriptionShort description of articleWhy don't unicorns exist? You asked Google - here's the answer ...
thumbnailUrlThumbnail Url//t2.gstatic.com/images?q=tbn:ANd9GcRa2NGl3_alXByd3kpnDDImMJFGeskk4Mf_AWZc-ohe_O8iEtmBs7hMxieldT_--jQWuDr4gQc
publisherPublisher of articleThe Guardian

License

MIT © Brandon Him

Keywords

FAQs

Last updated on 09 Jun 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc