π° Google News Scraper

Get Google News results as JSON in one line of Node.js. Search any keyword, topic or the top stories, and get back titles, publisher links, sources and publish dates.
import googleNewsScraper from 'google-news-scraper';
const articles = await googleNewsScraper({ searchTerm: "OpenAI", timeframe: "1d" });
// [{ title: "...", link: "https://www.reuters.com/...", source: "Reuters", datetime: "2026-10-14T09:12:00.000Z", time: "3 hours ago", ... }]
- β‘ No headless browser. Results come straight from Google News feeds, so a search is a single HTTP request and runs happily on serverless platforms such as Vercel and AWS Lambda.
- π Real publisher URLs. Google's redirect links are resolved to the original article on the publisher's site.
- π Any language or region. Pass Google's
hl/gl/ceid parameters to search local editions.
- π§ Optional full text. Turn on
getArticleContent to pull each article's body text, ready for summarisation or LLM pipelines.
- π¦ TypeScript types included, and works with both ESM
import and CommonJS require.
- β
Checked daily against the live site, so breakages are caught before you notice them.
Good for news monitoring, brand and competitor tracking, market research, trading signals, newsletters and feeding fresh context to AI agents.
π€ Using an AI agent? There's an MCP server too, so Claude, Cursor and other MCP clients can search Google News directly: npx -y google-news-scraper-mcp.

Sponsors π
SerpApi - The News Monitoring API. We help you access real-time search engine data via a simple API, which includes news from Google, Bing, and DuckDuckGo.
Want your product in front of developers building with news data? Sponsorship puts your logo here and on the npm page. Sponsor via GitHub Sponsors, or get in touch to talk about placements.
Installation π
# Install via NPM
npm install google-news-scraper
# Install via Yarn
yarn add google-news-scraper
Usage πΉοΈ
Simply import the package and pass a config object.
import googleNewsScraper from 'google-news-scraper';
// Search
const articles = await googleNewsScraper({ searchTerm: "The Oscars" });
// Top stories in the UK edition
const topStories = await googleNewsScraper({ queryVars: { hl: "en-GB", gl: "GB" } });
// A topic page
const tech = await googleNewsScraper({ baseUrl: "https://news.google.com/topics/CAAqJggKIiBDQkFTRWdvSUwyMHZNRGRqTVhZU0FtVnVHZ0pWVXlnQVAB" });
A minimum working example can be found in this repo.
Full documentation on the config object can be found below.
Output π²
The output is an array of JSON objects, with each article following the structure below:
[
{
"title": "Article title",
"link": "http://url-to-website.com/path/to/article",
"image": "",
"source": "Name of publication",
"sourceUrl": "https://url-to-website.com",
"datetime": "2024-05-13T08:02:22.000Z",
"time": "2 hours ago",
"articleType": "regular",
"provider": "scraper"
}
]
provider says where the article came from: "scraper", or the source name (such as "serpapi") when it was fetched through third_party.
image is always an empty string, because Google News feeds don't include thumbnails. It's kept so code written for v2 doesn't break.
Config βοΈ
The config object passed to the function above has the following properties:
searchTerm
This is the search query you'd like to find articles for, simply pass the search string like so: searchTerm: "The Oscars".
The search term is no longer a required field, as hahagu added support for topic pages in #44. If searchTerm and baseUrl are both supplied, searchTerm wins. If neither is supplied, you get the Google News top stories.
baseUrl
The baseUrl property enables you to specify an alternate base URL for your search. This is useful when you want to scrape, for example, a specific Google news topic.
The scraper reads the RSS version of whatever page you pass, so https://news.google.com/topics/ABC is fetched as https://news.google.com/rss/topics/ABC. If neither searchTerm nor baseUrl is supplied, you get the top stories.
prettyURLs
The URLs that Google News supplies for each article are "ugly" links (eg: "https://news.google.com/articles/CAIiEPgfWP_e7PfrSwLwvWeb5msqFwgEKg8IACoHCAowjuuKAzCWrzwwt4QY?hl=en-GB&gl=GB&ceid=GB%3Aen"), buy default the scraper will retrieve the actual "pretty" URL (eg: "https://www.nytimes.com/2020/01/22/movies/expanded-best-picture-oscar.html"). This takes two small requests to Google per article, run five at a time. To prevent this default behaviour and retrieve the "ugly" links instead, pass prettyURLs: false to the config object.
Credit to anthonyfranc for the base64 decode fix π
Defaults to true.
timeframe
The results can be filtered to articles published within a given timeframe prior to the request.
The format of the timeframe is a string comprised of a number, followed by a letter prepresenting the time operator. For example 1y would signify 1 year. Full list of operators below:
- h = hours (eg:
12h)
- d = days (eg:
7d)
- m = months (eg:
6m)
- y = years (eg:
1y)
Defaults to 7d.
getArticleContent
By default, the scraper does not return the article content, as this would require Puppeteer to navigate to each individual article in the results (increasing execution time significantly). If you would like to enable this behaviour, and receive the content of each article, simply pass getArticleContent: true, in the config. This will add two fields to each article in the output: content and favicon.
[
{
"title": "Article title",
"link": "https://url-to-website.com/path/to/article",
"image":"https://url-to-website.com/path/to/image.jpg",
"source": "Name of publication",
"time": "Time/date published (human-readable)",
"content": "The full text content of the article...",
"favicon": "https://url-to-website.com/path/to/favicon.png",
}
]
This is the only feature that needs a headless browser. Puppeteer is an optional dependency since v3, so install it yourself to use this feature:
PLEASE NOTE: Due to the large amount of variable factors to take into account, this feature fails on many websites. All errors are handled gracefully and wil return an empty string as the content. Please ensure you handle such outcomes in your application.
Defaults to false
logLevel
You can customise the log level to any of the following:
none: No logs will be output at all.
error: Only errors will be outputted to the log.
warn: Errors and warnings will be output to the log.
info: Info, errors and warnings will be output to the log.
verbose: All of the above and potentially more. Currently there are no specifically verbose logs, but in future I may move some of the info logs to verbose and/or add some debugging info there.
Defaults to error.
queryVars
An object of additional query params to add to the Google News URL string, formatted as key value pairs. This can be useful if you want to search for articles in a specific language, for example:
const articles = await googleNewsScraper({
searchTerm: "Γltimas noticias en Madrid",
queryVars: {
gl:"ES",
ceid:"ES:es"
},
});
Defaults to null
puppeteerArgs
Only used with getArticleContent. An array of Chromium flags to pass to the browser instance. By default, this will be an empty array. A full list of available flags can be found here. NB: if you are launching this in a Heroku app, you will need to pass the --no-sandbox and --disable-setuid-sandbox flags, as explained in this SO answer.
Defaults to []