google-news-scraper-api is a REST api created using express.js and cheerio.
It works by web scraping Google News and extracting the relevant content.
GET request on /topic/{topicname}?country={countryname}&count={articlecount}
GET request on /search/{searchterm}?country={countryname}&count={articlecount}
In the utils/allowedorigins.js
,
change const allowedOrigins
to "*"
to allow requests from all origins or to an array
of origins to allow request from specific origins.
[
{
"title": "{news title}",
"source": "{news source}",
"image": "{link to image}",
"url": "{link to news article}"
},
{
"title": "{news title}",
"source": "{news source}",
"image": "{link to image}",
"url": "{link to news article}"
}
]