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
Metadata
Release files for google-news-scraper-api 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| google_news_scraper_api-0.1.0.tar.gz | 6.6 kB | Without provenance | Details for google_news_scraper_api-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| google_news_scraper_api-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for google_news_scraper_api-0.1.0-py3-none-any.whl |
Total release size: 13.5 kB
Release files / google_news_scraper_api-0.1.0.tar.gz
| Download URL | google_news_scraper_api-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2fbf2f42526bacd5a2f11cf5cae7b3cf050e0c7e4cb4360a8e5f9dd41db2420
|
|
BLAKE2b-256 checksum How to use checksums |
34f30566d1357cc8df42a6a37ca2b19f301ee51e965d46a82e1318a56e277e81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / google_news_scraper_api-0.1.0-py3-none-any.whl
| Download URL | google_news_scraper_api-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fcefc8872e2f60f31328cee3fefdc10e6de5ea66e46e9a5b965715932341fd9
|
|
BLAKE2b-256 checksum How to use checksums |
791fb5e2e11f6599fbed995fc3d9fa7e726b2d9f0e888bce39b19f0e15670450
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for google-news-scraper-api 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.