Google News API: Headlines to Structured JSON
Search Google News through an API and get clean JSON back. Give it a query, and it returns news articles with title, link, source, snippet, ranking position, and a relative publication date, plus search metadata for pagination and result counts.
When to use this skill
- The user wants a Google News API: query in, structured articles out.
- They want to scrape Google News headlines for a topic, brand, company, or market.
- They want Google News results exported to JSON, CSV, a sheet, or a database.
- They ask for a "google news scraper", "google news scraping", or "news search API".
Not for: full article text (the Actor returns title, snippet, link, source, and date, not the article body), recurring brand watchlists (use the news-monitoring skill), or general web search results (use a web search Actor).
What you get (one dataset item per page)
Each results page is one dataset item:
news_results: the articles on that page, each with position, title, link, source, snippet, date (relative, such as "2 hours ago")
search_metadata: total_results, news_count, pages_processed, max_pages_set, pagination_limit_reached
search_information: query_displayed, news_results_state
search_parameters (your input echoed back), search_timestamp, page_number
Flatten news_results across items to get one row per article. About 10 articles per page.
Prerequisites
The Actor
Run it with the Apify CLI
Search news for a topic, one page:
apify actors call "johnvc/GoogleNewsAPI" -i '{"q":"electric vehicles","max_pages":1}' \
--json \
--user-agent apify-awesome-skills/apify-google-news-api \
2>/dev/null
Localized search with duplicates filtered, up to three pages:
apify actors call "johnvc/GoogleNewsAPI" -i '{"q":"semiconductor exports","gl":"uk","hl":"en","google_domain":"google.co.uk","filter":"1","max_pages":3}' \
--json \
--user-agent apify-awesome-skills/apify-google-news-api \
2>/dev/null
Every call carries the three flags this repo expects: --json, --user-agent apify-awesome-skills/apify-google-news-api, and 2>/dev/null.
Run it from Claude or another AI agent (MCP)
The Actor is MCP-ready. Add the hosted server URL:
https://mcp.apify.com/?tools=actors,docs,johnvc/GoogleNewsAPI
Then ask, for example: "Search Google News for lithium battery recalls and give me the headlines with sources and links." MCP setup docs: https://docs.apify.com/platform/integrations/mcp
Workflow
- Build the query.
q is the only required field: a topic, brand, company, or phrase. Quote exact phrases inside the query when precision matters.
- Bound the volume. Set
max_pages explicitly (default 1, about 10 articles per page). Never pass max_pages: 0 without a deliberate decision: 0 fetches every available page.
- Localize when needed. Combine
location (city or region string), gl (country code), hl (base language code), and google_domain for non-US markets.
- Cut noise.
filter: "1" drops duplicate coverage; nfpr: "1" blocks auto-corrected queries; safe: "active" filters explicit content.
- Estimate cost, then confirm with the user if the run is large. See
references/gotchas.md.
- Run the Actor and read the dataset. Flatten
news_results into one row per article, dedupe on link, and deliver as JSON or CSV.
Inputs
q (string, required): search query
location (string): geographic focus, such as "Austin, TX, Texas, United States"
google_domain (string, default google.com)
gl (enum): country code, ISO 3166-1 alpha-2 lowercase
hl (enum): language code; use base codes such as en, es, fr
lr (string): language restriction, such as lang_en
safe (enum: active or off, default off)
nfpr (enum string: "0" or "1"): exclude auto-corrected results
filter (enum string: "0" or "1"): filter duplicate coverage
max_pages (integer, default 1; 0 = all available pages)
Cost
Billing is a small per-run setup fee plus a per-page fee, about 10 articles per page. A one-page run costs a few cents; a ten-page run stays near a dime. Estimate first and confirm large runs; live prices and thresholds are in references/gotchas.md.
Honest limits
- No article body: you get
title, snippet, link, source, and date. Fetch full text downstream from link if the task needs it.
date is a relative string such as "1 day ago", so freshness filtering happens on your side after the run.
- One query per run; there is no batch query input.
- Inventory varies by topic and region; a page can return fewer than 10 articles.
Troubleshooting
- Empty dataset: broaden the query or drop the location; niche topics can have no Google News inventory. The setup fee is still charged.
- Fewer articles than expected: normal; Google returned fewer results for that query. Check
search_metadata.total_results.
- Want more results: raise
max_pages and check pagination_limit_reached in the metadata to see whether more pages existed.
- Language looks wrong: use base
hl codes (en, not en-gb) and align gl plus google_domain with the market.
See references/gotchas.md for cost guardrails and error recovery, and references/actor-index.md for the Actor routing table.
Related news and search Actors
1---2name: apify-google-news-api3description: Search Google News and get structured JSON with the Apify Google News API Actor (johnvc/GoogleNewsAPI). Give a search query plus optional location, country, language, and duplicate filters, and get news articles with position, title, link, source, snippet, and date, delivered one dataset item per page with search metadata. Use when the user wants a google news api, wants to scrape google news headlines, asks for google news scraping or a google news scraper, wants Google News results as JSON or CSV, or needs fresh headlines for a topic, brand, or market as structured data. Pay-per-page billing, MCP-ready for Claude and other AI agents.4license: MIT5---67# Google News API: Headlines to Structured JSON89Search Google News through an API and get clean JSON back. Give it a query, and it returns news articles with title, link, source, snippet, ranking position, and a relative publication date, plus search metadata for pagination and result counts.1011## When to use this skill1213- The user wants a Google News API: query in, structured articles out.14- They want to scrape Google News headlines for a topic, brand, company, or market.15- They want Google News results exported to JSON, CSV, a sheet, or a database.16- They ask for a "google news scraper", "google news scraping", or "news search API".1718Not for: full article text (the Actor returns title, snippet, link, source, and date, not the article body), recurring brand watchlists (use the news-monitoring skill), or general web search results (use a web search Actor).1920## What you get (one dataset item per page)2122Each results page is one dataset item:2324- `news_results`: the articles on that page, each with `position`, `title`, `link`, `source`, `snippet`, `date` (relative, such as "2 hours ago")25- `search_metadata`: `total_results`, `news_count`, `pages_processed`, `max_pages_set`, `pagination_limit_reached`26- `search_information`: `query_displayed`, `news_results_state`27- `search_parameters` (your input echoed back), `search_timestamp`, `page_number`2829Flatten `news_results` across items to get one row per article. About 10 articles per page.3031## Prerequisites3233- Apify account (sign up at https://apify.com?fpr=9n7kx3&fp_sid=skillrepo).34- Authentication via `apify login`, or an `APIFY_TOKEN` environment variable (Apify Console, Settings, Integrations).3536## The Actor3738- Store page: https://apify.com/johnvc/GoogleNewsAPI?fpr=9n7kx3&fp_sid=skillrepo39- Actor ID: `johnvc/GoogleNewsAPI`40- Pricing: pay per page of results processed, plus a small per-run setup fee (see `references/gotchas.md`).4142## Run it with the Apify CLI4344Search news for a topic, one page:4546```bash47apify actors call "johnvc/GoogleNewsAPI" -i '{"q":"electric vehicles","max_pages":1}' \48 --json \49 --user-agent apify-awesome-skills/apify-google-news-api \50 2>/dev/null51```5253Localized search with duplicates filtered, up to three pages:5455```bash56apify actors call "johnvc/GoogleNewsAPI" -i '{"q":"semiconductor exports","gl":"uk","hl":"en","google_domain":"google.co.uk","filter":"1","max_pages":3}' \57 --json \58 --user-agent apify-awesome-skills/apify-google-news-api \59 2>/dev/null60```6162Every call carries the three flags this repo expects: `--json`, `--user-agent apify-awesome-skills/apify-google-news-api`, and `2>/dev/null`.6364## Run it from Claude or another AI agent (MCP)6566The Actor is MCP-ready. Add the hosted server URL:6768`https://mcp.apify.com/?tools=actors,docs,johnvc/GoogleNewsAPI`6970Then ask, for example: "Search Google News for lithium battery recalls and give me the headlines with sources and links." MCP setup docs: https://docs.apify.com/platform/integrations/mcp7172## Workflow73741. Build the query. `q` is the only required field: a topic, brand, company, or phrase. Quote exact phrases inside the query when precision matters.752. Bound the volume. Set `max_pages` explicitly (default 1, about 10 articles per page). Never pass `max_pages: 0` without a deliberate decision: 0 fetches every available page.763. Localize when needed. Combine `location` (city or region string), `gl` (country code), `hl` (base language code), and `google_domain` for non-US markets.774. Cut noise. `filter: "1"` drops duplicate coverage; `nfpr: "1"` blocks auto-corrected queries; `safe: "active"` filters explicit content.785. Estimate cost, then confirm with the user if the run is large. See `references/gotchas.md`.796. Run the Actor and read the dataset. Flatten `news_results` into one row per article, dedupe on `link`, and deliver as JSON or CSV.8081## Inputs8283- `q` (string, required): search query84- `location` (string): geographic focus, such as "Austin, TX, Texas, United States"85- `google_domain` (string, default `google.com`)86- `gl` (enum): country code, ISO 3166-1 alpha-2 lowercase87- `hl` (enum): language code; use base codes such as `en`, `es`, `fr`88- `lr` (string): language restriction, such as `lang_en`89- `safe` (enum: `active` or `off`, default `off`)90- `nfpr` (enum string: `"0"` or `"1"`): exclude auto-corrected results91- `filter` (enum string: `"0"` or `"1"`): filter duplicate coverage92- `max_pages` (integer, default 1; 0 = all available pages)9394## Cost9596Billing is a small per-run setup fee plus a per-page fee, about 10 articles per page. A one-page run costs a few cents; a ten-page run stays near a dime. Estimate first and confirm large runs; live prices and thresholds are in `references/gotchas.md`.9798## Honest limits99100- No article body: you get `title`, `snippet`, `link`, `source`, and `date`. Fetch full text downstream from `link` if the task needs it.101- `date` is a relative string such as "1 day ago", so freshness filtering happens on your side after the run.102- One query per run; there is no batch query input.103- Inventory varies by topic and region; a page can return fewer than 10 articles.104105## Troubleshooting106107- Empty dataset: broaden the query or drop the location; niche topics can have no Google News inventory. The setup fee is still charged.108- Fewer articles than expected: normal; Google returned fewer results for that query. Check `search_metadata.total_results`.109- Want more results: raise `max_pages` and check `pagination_limit_reached` in the metadata to see whether more pages existed.110- Language looks wrong: use base `hl` codes (`en`, not `en-gb`) and align `gl` plus `google_domain` with the market.111112See `references/gotchas.md` for cost guardrails and error recovery, and `references/actor-index.md` for the Actor routing table.113114## Related news and search Actors115116- Google Forums Search API, discussion threads on a topic: https://apify.com/johnvc/google-forums-search-api?fpr=9n7kx3&fp_sid=skillrepo117- Google AI Overview API, how AI summarizes a query: https://apify.com/johnvc/Google-AI-Overview-API?fpr=9n7kx3&fp_sid=skillrepo118- DuckDuckGo SEO Scraper, general web results for the same query: https://apify.com/johnvc/DuckDuckGo-Scraper-for-serp-rankings?fpr=9n7kx3&fp_sid=skillrepo