package.json
{..."dependencies":{"express":"^4.17.1","newsapi":"^2.4.1"}}
index.js
/* require newsapi */constNewsAPI=require('newsapi');constnewsapi=newNewsAPI('YOUR-API-KEY');/* require express */constexpress=require('express')constapp=express()app.get("/",function(req,res){// To query sources// All options are optionalnewsapi.v2.sources().then(response=>{console.log(response.sources)})})app.listen(4000)
References
Top comments(1)
Subscribe

Vineet Prasad•
Newsdataio provides free access to news API that developers can use. The API provides real-time breaking news and historical news. NewsData.io API is the best alternative for Google News API.
- LocationIndia
- Joined
Hi there! I noticed that you're using Newsapi.org for your news data. Have you considered usingNewsData.io news API? I've found it to be really comprehensive and easy to use. It might be worth checking out as an alternative for your news data needs. Good luck with your project
For further actions, you may consider blocking this person and/orreporting abuse