google-news-scraper-api
A news scraper API for Python, built on ScrapingBee's Google News scraper. It turns a query into structured articles with title, source, domain, snippet and timestamp, so you never touch Google's markup.
Verified live on 2026-08-25 against GET /api/v1/google with search_type=news. Calls in testing
charged 10 credits.
Install
pip install google-news-scraper-api
Scrape Google News results
from google_news_scraper_api import GoogleNewsScraper
scraper = GoogleNewsScraper("YOUR-API-KEY")
for article in scraper.search("openai", country_code="us"):
print(article.date, article.source, article.title)
Get a key at app.scrapingbee.com; new accounts include 1,000 free credits.
Article fields
Every result carries the nine keys the API actually returns:
| Field | Example |
|---|---|
title |
"OpenAI Claims Its New Chips Can Outperform Nvidia" |
source |
"Bloomberg" |
domain |
the publisher domain, useful for allow-lists |
link |
the article URL |
snippet |
the summary line under the headline |
date |
ISO 8601 timestamp |
relative_date |
"3 hours ago" style string |
position |
rank within the page |
page |
which result page it came from |
article.as_dict() gives you all nine at once, which is what you want before writing to a
database or a dataframe.
Paging without waste
paginate walks result pages and stops the moment one comes back empty, so an optimistic page
count does not spend credits on nothing:
articles = list(scraper.paginate("climate policy", pages=5, country_code="us"))
print(len(articles))
Deduplicating a monitor
Syndicated stories repeat across pages and across queries. Counting them twice makes a media monitor useless, so dedupe by link before you store anything:
raw = []
for query in ["openai", "anthropic", "mistral ai"]:
raw.extend(scraper.paginate(query, pages=2, country_code="us"))
unique = GoogleNewsScraper.deduplicate(raw)
print(len(raw), "->", len(unique))
Query controls worth knowing
scraper.search("acme corp", country_code="gb", date_range="d") # recent window
scraper.search("scrapingbee", nfpr=True) # no spelling "correction"
nfpr=True matters more than it looks. Google rewrites unfamiliar brand names to something it
considers correct, which quietly turns a brand monitor into a monitor for a different word.
One documented limit: search_type=news is not available with device="mobile".
Raw payload
When you want meta_data as well as the articles:
payload = scraper.search_raw("openai", country_code="us")
print(payload["meta_data"])
# {'url': 'https://www.google.com/search?q=openai&hl=en&gl=us&tbm=nws', 'number_of_page': 10, ...}
Cost
| Call | Credits |
|---|---|
| One news query | 10 in testing, 15 documented standard, 10 with light_request=true |
usage() |
0 |
| HTTP 500 | 0 |
Retrying a 500 is free. Check the balance with scraper.usage() before a scheduled sweep. Tiers
on the pricing page.
Other Google surfaces
The same endpoint switches surface with search_type, so the same key also reaches
Google search,
Shopping,
Images,
Lens,
AI Mode and
Ads. For a lighter alternative there is
Fast Search, and for an RSS-shaped feed see
the Google News RSS API.
Scope
Public, pre-login content only. Scraping behind login credentials is prohibited by the ScrapingBee terms. Keep API keys out of AI coding assistants.
MIT licensed. Repository . API reference
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file google_news_scraper_api-0.1.0.tar.gz.
File metadata
- Download URL: google_news_scraper_api-0.1.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2fbf2f42526bacd5a2f11cf5cae7b3cf050e0c7e4cb4360a8e5f9dd41db2420
|
|
| MD5 |
7ed7b41fad42af2a454cfda7598dfa91
|
|
| BLAKE2b-256 |
34f30566d1357cc8df42a6a37ca2b19f301ee51e965d46a82e1318a56e277e81
|
File details
Details for the file google_news_scraper_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: google_news_scraper_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fcefc8872e2f60f31328cee3fefdc10e6de5ea66e46e9a5b965715932341fd9
|
|
| MD5 |
6580625ddd7ae3977b9849ec7812a637
|
|
| BLAKE2b-256 |
791fb5e2e11f6599fbed995fc3d9fa7e726b2d9f0e888bce39b19f0e15670450
|