# Apify Google News API

> 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.

- Skill: `johnisanerd/apify-google-news-api` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add johnisanerd/apify-google-news-api`
- Raw SKILL.md: https://api.skillmd.com/api/skills/johnisanerd/apify-google-news-api/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- License: MIT
- Author: johnisanerd (https://skillmd.com/u/johnisanerd)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/johnisanerd/apify-google-news-api

---


# 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

- Apify account (sign up at https://apify.com?fpr=9n7kx3&fp_sid=skillrepo).
- Authentication via `apify login`, or an `APIFY_TOKEN` environment variable (Apify Console, Settings, Integrations).

## The Actor

- Store page: https://apify.com/johnvc/GoogleNewsAPI?fpr=9n7kx3&fp_sid=skillrepo
- Actor ID: `johnvc/GoogleNewsAPI`
- Pricing: pay per page of results processed, plus a small per-run setup fee (see `references/gotchas.md`).

## Run it with the Apify CLI

Search news for a topic, one page:

```bash
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:

```bash
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

1. Build the query. `q` is the only required field: a topic, brand, company, or phrase. Quote exact phrases inside the query when precision matters.
2. 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.
3. Localize when needed. Combine `location` (city or region string), `gl` (country code), `hl` (base language code), and `google_domain` for non-US markets.
4. Cut noise. `filter: "1"` drops duplicate coverage; `nfpr: "1"` blocks auto-corrected queries; `safe: "active"` filters explicit content.
5. Estimate cost, then confirm with the user if the run is large. See `references/gotchas.md`.
6. 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

- Google Forums Search API, discussion threads on a topic: https://apify.com/johnvc/google-forums-search-api?fpr=9n7kx3&fp_sid=skillrepo
- Google AI Overview API, how AI summarizes a query: https://apify.com/johnvc/Google-AI-Overview-API?fpr=9n7kx3&fp_sid=skillrepo
- DuckDuckGo SEO Scraper, general web results for the same query: https://apify.com/johnvc/DuckDuckGo-Scraper-for-serp-rankings?fpr=9n7kx3&fp_sid=skillrepo

