Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-news-rss-to-js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-news-rss-to-js

An RSS scraper for Google News

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

google-news-rss-to-js

An RSS scraper for Google News.

Installation

npm i google-news-rss-to-js --save

Usage

const googleNews = require('google-news-rss-to-js');

//  Get top stories from the Google News homepage
const topStories = await googleNews.search();

//  Get top stories by country & language
const topStoriesCN = await googleNews.search({ cc: 'CN', lc: 'zh' });
//  You can also search by country name and/or language
const topStoriesCA = await googleNews.search({ country: 'Canada' });

//  Search by keywords
const marthaStewartStories = await googleNews.search({ q: 'Martha Stewart' });

Topics

const googleNews = require('google-news-rss-to-js');

//  Get available topics
const topics = await googleNews.getTopics();

//  Get stories by topic
const entertainmentStories = await googleNews.searchByTopic({ topic: 'entertainment' });

//  If you happen to know the Google News topic Id, you can provide that
const businessStories = await googleNews.searchByTopic({
    topicId: 'CAAqJggKIiBDQkFTRWdvSUwyMHZNRGx6TVdZU0FtVnVHZ0pWVXlnQVAB',
});

//  As with regular search, you area also able to search by country and language
const businessCanada = await googleNews.search({
    topic: 'business',
    country: 'Canada',
    lc: 'en',
});

Keywords

FAQs

Package last updated on 23 May 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc