Google News Scraper
Extract news articles, headlines, publication sources, and trending stories from Google News. Powered by spider-browser .
news.google.com target
99.5% success rate
~4ms latency
Extract data in minutes
google-news-scraper.ts
import { SpiderBrowser } from "spider-browser";
const spider = new SpiderBrowser({
apiKey: process.env.SPIDER_API_KEY!,
stealth: 2,
});
await spider.connect();
const page = spider.page!;
await page.goto("https://news.google.com/topics/CAAqJggKIiBDQkFTRWdvSUwyMHZNRFZxYUdjU0FtVnVHZ0pWVXlnQVAB");
await page.content(10000);
const data = await page.evaluate(`(() => {
const articles = [];
document.querySelectorAll("article").forEach(el => {
const headline = el.querySelector("a.JtKRv")?.textContent?.trim()
|| el.querySelector("h3 a, h4 a")?.textContent?.trim();
const source = el.querySelector(".vr1PYe")?.textContent?.trim();
const time = el.querySelector("time")?.getAttribute("datetime");
if (headline) articles.push({ headline, source, time });
});
return JSON.stringify({ total: articles.length, articles: articles.slice(0, 10) });
})()`);
console.log(JSON.parse(data));
await spider.close(); ✓ ready to run | spider-browser | TypeScript
Data you can extract
HeadlineSourceArticle URLPublished dateCategorySnippetImage URLRelated articles
Freshness
Real-time headlines
Capture breaking news and trending stories as they publish.
Sources
Multi-publication
Aggregate articles from thousands of publications in a single scrape.
Parsing
Article extraction
Clean article text, images, and metadata from complex news layouts.
More News scrapers
Start scraping news.google.com
Get your API key and start extracting data in minutes.