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

google-news-json

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-news-json

Simple to use google news api

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
327
increased by13.15%
Maintainers
1
Weekly downloads
 
Created
Source

Google News JSON API

Installation

npm install --save google-news-json
Or
yarn add google-news-json

Usage

Usage example:

let googleNewsAPI = require("google-news-json");
let news = await googleNewsAPI.getNews(googleNewsAPI.TOP_NEWS, null, "en-GB");

Also supports callback

googleNewsAPI.getNews(googleNewsAPI.SEARCH, "apple", "en-GB", (err, response) => {
    console.log(response);
});

Parameters

Method (defaults to TOP_NEWS or HIGHLIGHTS)

Query (this is ignored when method is TOP_NEWS or HIGHLIGHTS)

Locale (defaults to en-GB)

Callback (not required)

Methods

HIGHLIGHTS, TOP_NEWS, LOCATION, SEARCH, TOPIC, GEO

Supported TOPICS

TOPICS_WORLD, TOPICS_NATION, TOPICS_BUSINESS, TOPICS_TECHNOLOGY, TOPICS_ENTERTAINMENT, TOPICS_SCIENCE, TOPICS_SPORTS, TOPICS_HEALTH

Features and bugs

Please file feature requests and bugs at the issue tracker.

If you find this project helpful please

Buy Me A Coffee

Keywords

FAQs

Package last updated on 01 Mar 2022

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