TL;DR
Google News data (title, source, date, snippet, link) can be scraped from the Google News search tab or
news.google.com.A basic scraper can be built in Python using requests and BeautifulSoup to extract news details.
The collected data can be stored and exported to
CSVusing pandas.DIY scraping works for small projects but often gets blocked by Google due to CAPTCHAs, IP blocks, and changing HTML classes.
For large-scale scraping, APIs like Scrapingdog Google News API return structured JSON and handle proxies and CAPTCHAs automatically.
When people talk about scraping Google News, theyāre usually referring to one of two things: the news tab in regular Google Search (google.com/search?tbm=nws) or the dedicated news aggregator atĀ news.google.com. These are two completely different pages with different structures, different data, and different scraping challenges and most tutorials only cover one of them.
In this guide, weāll show you how to scrape both using Python and Scrapingdogās Google News API, so you get structured data like headlines, sources, publication times, and article links, regardless of which source you need.
What are Google News results?
Google News results are news articles that Google surfaces from multiple publishers across the web based on a userās query, interests, and freshness of content. Unlike regular Google Search results, which mix blogs, product pages, and websites, Google News focuses specifically on journalistic and news-style content.
When you search a keyword in Google News, you typically see:
HeadlinesĀ from multiple publishers covering the same story
Source namesĀ (BBC, Reuters, niche blogs, local media, etc.)
PublicationĀ time (minutes ago, hours ago, days ago)
Article snippetsĀ summarizing the story
Images or thumbnailsĀ tied to the article
TopicĀ clusters, where related coverage is grouped together
Why Scrape Google News Results?
Media MonitoringĀ ā Track brand or competitor mentions across thousands of news sources in real time.
Sentiment AnalysisĀ ā Feed headlines into NLP models to measure how media coverage shifts over time.
Competitive IntelligenceĀ ā See which stories about your competitors are gaining traction in the press.
Market ResearchĀ ā Correlate breaking news with stock movements, industry trends, or consumer behavior.
AI Training DataĀ ā Google News surfaces authoritative, publisher-verified content ideal for LLM training datasets.
Academic ResearchĀ ā Analyze how stories evolve across outlets, detect misinformation, or study media bias at scale.
Methods For Scraping Google News
We will be discussing two ways of extracting news from Google:
Using Python and BeautifulSoup
Using ScrapingdogāsĀ Google News API
Letās start by creating a basic scraper using Python and BS4.
Method 1: Scrape Google News with Python
In this section, weāll build a Python script that extracts up to 10 Google News results, including theĀ title,Ā snippet,Ā link,Ā source, andĀ publicationĀ date,Ā and finally saves them to a CSV file.
Prerequisites
Make sure you have Python 3.7+ installed along with the following libraries:
1pip install requests beautifulsoup4 pandasOnce installed, create a new Python file and import them at the top:
1import requests2from bs4 import BeautifulSoup3import pandasNext, define the core scraping function. This function sends a request to Google News with a spoofed User-Agent header to avoid being immediately blocked, then parses the returned HTML with BeautifulSoup.
1def getNewsData(query="amazon", country="us"):2 headers = {3 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"4 }5 url = f"https://www.google.com/search?q={query}&gl={country}&tbm=nws&num=10"6 response = requests.get(url, headers=headers)7 soup = BeautifulSoup(response.content, "html.parser")8 news_results = []ā ļø A static User-Agent works for testing, but Google will block repeated requests at scale. For production use, rotate User-Agents or route requests through a proxy.
Now we need to identify the right HTML elements to target. If you open Chrome DevTools (right-click ā Inspect) on a Google News results page, youāll find that each individual news card is wrapped in aĀ divĀ with the classĀ SoaBEf. We loop over all of them to extract data from each result:
1for el in soup.select("div.SoaBEf"):2 news_results.append(3 {4 5 }6 )7 8 print(json.dumps(news_results, indent=2))9 10getNewsData()This loop iterates over every news card on the page and appends an empty dictionary for each one. Weāll fill in the actual fields title, source, link, snippet, and date in the next steps.
Scraping News Title
Letās find the headline of the news article by inspecting it.
As you can see in the above image, the title is under the div container with the classĀ MBeuO.
Add the following code in the append block to get the news title.
1"title": el.select_one("div.MBeuO").get_text(),Scraping News Source and Link
Similarly, we can extract the News source and link from the HTML.
Each news card contains an anchor tag whoseĀ hrefĀ attribute holds the article URL, and the publisher name sits inside aĀ spanĀ withinĀ .NUnG9d:
1"source": el.select_one(".NUnG9d span").get_text(),2"link": el.find("a")["href"],Scraping News Description and Date
The article snippet is insideĀ .GI74ReĀ and the publication date is insideĀ .LfVVr:
1"snippet": el.select_one(".GI74Re").get_text(),2"date": el.select_one(".LfVVr").get_text(),Complete Code
Hereās the complete scraper putting it all together:
1import json2import requests3from bs4 import BeautifulSoup4 5def getNewsData(query="us+stock+markets", country="us"):6 headers = {7 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"8 }9 url = f"https://www.google.com/search?q={query}&gl={country}&tbm=nws&num=100"10 response = requests.get(url, headers=headers)11 soup = BeautifulSoup(response.content, "html.parser")12 news_results = []13 14 for el in soup.select("div.SoaBEf"):15 news_results.append({16 "link": el.find("a")["href"],17 "title": el.select_one("div.MBeuO").get_text(),18 "snippet": el.select_one(".GI74Re").get_text(),19 "date": el.select_one(".LfVVr").get_text(),20 "source": el.select_one(".NUnG9d span").get_text()21 })22 23 print(json.dumps(news_results, indent=2))24 25getNewsData()Run this in your terminal and you should see a JSON array of news results. Hereās what the output looks like:
Saving Data to CSV
Instead of printing to the terminal, letās save the results directly to a CSV file. AddĀ pandasĀ to your imports at the top:
1import pandas as pdThen, you can replace the print line with the following code.
1df = pd.DataFrame(news_results)2df.to_csv("news_data.csv", index=False)3print("Data saved to news_data.csv")Running the script now will create aĀ news_data.csvĀ file in your project directory with one row per news result.
Hurray!!!
Method 2: Scraping Google News Using Scrapingdogās Google News API
The bareĀ requestsĀ +Ā beautifulSoupĀ approach works well for testing and small runs, but it has a hard ceiling; Google will block repeated requests, class names change without warning, and maintaining the scraper becomes a job in itself.
ScrapingdogāsĀ Google News APIĀ handles all of that behind the scenes: proxy rotation, CAPTCHA bypassing, and header management are taken care of automatically. Instead of raw HTML, you get back clean, structured JSON thatās ready to use without any parsing.
This approach makes sense when you need:
More than a few hundred requests per day
Reliable, uninterrupted data collection
Consistent JSON output without worrying about Googleās layout changes
To get started, youāll need a Scrapingdog API key.
Getting API Credentials From Scrapingdogās Google News API
Head toĀ Scrapingdogās registration pageĀ and create a free account. Youāll get 1,000 credits to test with, no credit card required.
Once registered, your API key will be waiting on the dashboard. Copy it somewhere handy as youāll need it in the next step.
Making Your First API Request
Since the API returns structured JSON, you only need theĀ requestsĀ library , no BeautifulSoup required:
1import requests2 3payload = {4 'api_key': 'YOUR_API_KEY',5 'query': 'stock market',6 'country': 'us'7}8 9resp = requests.get('https://api.scrapingdog.com/google_news', params=payload)10data = resp.json()11print(data["news_results"])Hereās what a single result looks like:
1{2 "title": "Dow tumbles 300 points as Fed decision looms",3 "snippet": "Sticky inflation data and poor earnings sent stock prices lower.",4 "source": "CNBC",5 "lastUpdated": "8 minutes ago",6 "url": "https://www.cnbc.com/2024/04/29/stock-market-today-live-updates.html"7}Each result contains five fields āĀ title,Ā snippet,Ā source,Ā lastUpdated, andĀ urlwhich map directly to what you see on the Google News page. The full list of supported parameters (language, country, date range, topic filtering) is covered in theĀ API documentation.
Scraping Multiple Pages
By default the API returns 10 results per request. To collect more, use theĀ pageĀ parameter to paginate through results:
1import requests2 3api_key = "your-api-key"4url = "https://api.scrapingdog.com/google_news"5all_results = []6 7for page in range(0, 20):8 params = {9 "api_key": api_key,10 "query": "elon musk",11 "country": "us",12 "page": page13 }14 15 response = requests.get(url, params=params)16 17 if response.status_code == 200:18 data = response.json()19 all_results.extend(data.get("news_results", []))20 else:21 print(f"Request failed on page {page} with status: {response.status_code}")22 break23 24print(f"Total results fetched: {len(all_results)}")This loops through 20 pages for the query āElon Muskā, appending each pageās results toĀ all_results. AdjustĀ range(0, 20)Ā to control how many pages you collect.
How to scrape the dedicated Google news portal
If you want to scrape data fromĀ news.google.comĀ using Scrapingdog, then you have to useĀ Google news Scraper API.
1import requests2 3api_key = "your-api-key"4url = "https://api.scrapingdog.com/google_news/v2"5 6params = {7 "api_key": api_key,8 "query": "elon musk",9 "country": "us"10}11 12response = requests.get(url, params=params)13 14if response.status_code == 200:15 data = response.json()16 print(data)17else:18 print(f"Request failed with status code: {response.status_code}")Once you run this code, you will get this data:
1{2 "menu_links": [3 {4 "title": "U.S.",5 "topic_token": "CAAqIggKIhxDQkFTRHdvSkwyMHZNRGxqTjNjd0VnSmxiaWdBUAE",6 "scrapingdog_link": "https://api.scrapingdog.com/google_news/v2?api_key=670d12181fecbac22c66d410&topic_token=CAAqIggKIhxDQkFTRHdvSkwyMHZNRGxqTjNjd0VnSmxiaWdBUAE"7 },8 {9 "title": "World",10 "topic_token": "CAAqJggKIiBDQkFTRWdvSUwyMHZNRGx1YlY4U0FtVnVHZ0pWVXlnQVAB",11 "scrapingdog_link": "https://api.scrapingdog.com/google_news/v2?api_key=670d12181fecbac22c66d410&topic_token=CAAqJggKIiBDQkFTRWdvSUwyMHZNRGx1YlY4U0FtVnVHZ0pWVXlnQVAB"12 },13 {14 "title": "Local",15 "topic_token": "CAAqHAgKIhZDQklTQ2pvSWJHOWpZV3hmZGpJb0FBUAE",16 "scrapingdog_link": "https://api.scrapingdog.com/google_news/v2?api_key=670d12181fecbac22c66d410&topic_token=CAAqHAgKIhZDQklTQ2pvSWJHOWpZV3hmZGpJb0FBUAE"17 }18 ],19 "news_results": [20 {21 "title": "Elon Musk's xAI wins permit to build power plant in Mississippi despite pollution concerns",22 "link": "https://www.cnbc.com/2026/03/10/elon-musk-xai-permit-for-mississippi-plant-despite-pollution-concerns.html",23 "thumbnail": "https://image.cnbcfm.com/api/v1/image/108170649-1752223567421-gettyimages-2199701064-HL_VFEURAY_2670140.jpeg?v=1773166328&w=1600&h=900",24 "source": "CNBC",25 "icon": "https://encrypted-tbn0.gstatic.com/faviconV2?url=https://www.cnbc.com&client=NEWS_360&size=96&type=FAVICON&fallback_opts=TYPE,SIZE,URL",26 "authors": [],27 "date": "2026-03-10T19:04:46.000Z",28 "rank": 129 },30 {31 "title": "Forbes 40th Annual World's Billionaires List: Elon Musk Is World's Richest Person Ever Recorded",32 "link": "https://www.forbes.com/sites/pr/2026/03/10/forbes-40th-annual-worlds-billionaires-list-elon-musk-is-worlds-richest-person-ever-recorded/",33 "thumbnail": "https://imageio.forbes.com/specials-images/imageserve/69af8af502d5a48e99a841a0/social-pr-16x9-billionaires-2026-illustration-by-neil-jamieson-for-forbes/0x0.jpg?format=jpg&width=480",34 "source": "Forbes",35 "icon": "https://encrypted-tbn2.gstatic.com/faviconV2?url=https://www.forbes.com&client=NEWS_360&size=96&type=FAVICON&fallback_opts=TYPE,SIZE,URL",36 "authors": [],37 "date": "2026-03-10T13:00:00.000Z",38 "rank": 239 }40 ],41 "related_topics": [42 {43 "title": "Elon Musk",44 "topic_token": "CAAqIggKIhxDQkFTRHdvSkwyMHZNRE51ZW1ZeEVnSmxiaWdBUAE",45 "scrapingdog_link": "https://api.scrapingdog.com/google_news/v2?api_key=670d12181fecbac22c66d410&topic_token=CAAqIggKIhxDQkFTRHdvSkwyMHZNRE51ZW1ZeEVnSmxiaWdBUAE"46 },47 {48 "title": "Spend Elon Musk' Money",49 "topic_token": "CAAqKAgKIiJDQkFTRXdvTkwyY3ZNVEZ0WW10dE4ySXplaElDWlc0b0FBUAE",50 "scrapingdog_link": "https://api.scrapingdog.com/google_news/v2?api_key=670d12181fecbac22c66d410&topic_token=CAAqKAgKIiJDQkFTRXdvTkwyY3ZNVEZ0WW10dE4ySXplaElDWlc0b0FBUAE"51 }52 ]53}Key Takeaways:
Google News exposes headlines, snippets, sources, publication dates, and URLs. All is scrapable for brand monitoring, market research, and competitive analysis.
AĀ
requestsĀ +ĀBeautifulSoupĀ setup is sufficient for learning and small-scale runs.DIY scrapers are fragile; Googleās class names change, CAPTCHAs trigger quickly, and IP blocks follow at scale.
Scaling the DIY approach means managing proxies, header rotation, retries, and pagination yourself, which adds significant engineering overhead.
Scrapingdogās Google News API handles all of that automatically, returning clean JSON with no HTML parsing required.
Conclusion
This article discussed two ways of scraping news from Google using Python. Data collectors looking to have an independent scraper and want to maintain a certain amount of flexibility while scraping data can use Python as an alternative to interacting with the web page.
Otherwise, Google News API is a simple solution that can quickly extract and clean the raw data obtained from the web page and present it in structured JSON format.
We also learned how this extracted data can be used for various purposes, including brand monitoring and competitor analysis.
If you like this article please do share it on your social media accounts. If you have any questions, please contact me atĀ [email protected].