# Google News Scraper - Headlines, Sources & Dates by Keyword (`eliai/google-news-scraper`) Actor

Search Google News by keyword and get one row per article: clean headline, publisher, link and publish date. Any language/country, recency filter from the last hour to the last year, bulk queries. $0.005 per article; empty searches are free.

- **URL**: https://apify.com/eliai/google-news-scraper.md
- **Developed by:** [Broke to Built](https://apify.com/eliai) (community)
- **Categories:** News, Social media, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 scraped articles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google News Scraper — Headlines, Sources & Dates by Keyword

Search **Google News** by keyword and get **one row per article**: the clean headline, the
publisher, a link and an ISO publish date. Any country and language, a recency filter from the
last hour to the last year, and bulk searches in a single run.

No API key, no account, no scraping setup. **$0.005 per article** — a search that returns nothing
is recorded and **not charged**.

### Input

```json
{ "query": "artificial intelligence", "maxArticles": 25, "when": "day" }
```

Bulk, with a country edition:

```json
{
  "queries": ["tesla", "rivian", "lucid motors"],
  "maxArticles": 50,
  "when": "week",
  "country": "GB",
  "language": "en-GB"
}
```

| Field | Type | Notes |
|---|---|---|
| `query` | string | Supports Google operators — `"tesla" OR "rivian"`, `site:reuters.com`, `intitle:`. |
| `queries` | string\[] | Up to 20 searches per run. |
| `maxArticles` | integer | 1–100 per search, default 25. **You are charged per article returned.** |
| `when` | enum | `any`, `hour`, `day`, `week`, `month`, `year`. Applied by Google itself. |
| `country` | string | Edition country code — `US`, `GB`, `DE`, `IN`. Default `US`. |
| `language` | string | Edition locale — `en-US`, `en-GB`, `de`, `fr`. Default `en-US`. |

### Output

One row per article:

```json
{
  "ok": true,
  "query": "artificial intelligence",
  "title": "Viral AI researcher's warning 'scary as hell,' Cruz says",
  "source": "Politico",
  "link": "https://news.google.com/rss/articles/CBMik...",
  "publishedAt": "2026-09-10T14:23:13.000Z",
  "publishedRaw": "Thu, 10 Sep 2026 14:23:13 GMT",
  "when": "any",
  "language": "en-US",
  "country": "US"
}
```

A row per article is what a spreadsheet, a filter and an integration all expect — no unpacking a
nested array.

### What it gets right

- **The headline is clean.** Google appends `" - Publisher"` to every title. That suffix is
  removed, and the publisher is returned in its own `source` field — but only when it genuinely is
  the publisher, never by blindly cutting at the last dash, because plenty of headlines contain
  dashes of their own.
- **`publishedAt` is a real ISO-8601 timestamp**, not the raw RFC-822 string. `publishedRaw` is
  kept alongside it if you want exactly what Google said.
- **Recency is applied by Google**, not filtered afterwards, so "last 24 hours" returns a full page
  of recent articles rather than a page of mixed results cut down to three.
- ⚠ **`month` is sent as `30d` on purpose.** Google accepts `when:1m`, answers **HTTP 200, and
  returns zero items** — measured against every other bucket in one sweep (`30d` → 100 items,
  `7d` → 100, `1d` → 100, `1h` → 25, `1y` → 100, `1m` → **0**). A "last month" search built the
  obvious way silently returns nothing and looks like a quiet news cycle.
- **XML entities are decoded** in the right order, so `&amp;quot;` becomes `"` rather than `&quot;`.

### Pricing

**$0.005 per article returned.** No start fee. A search that returns no articles produces an
`articleCount: 0` record and **is not charged**, so probing a thin keyword is free.

Set `maxArticles` to control spend: 10 articles across 5 searches is 50 rows, $0.25.

### Limits

- 20 searches per run, up to 100 articles each (Google's own ceiling per feed).
- **Links point at Google News, not the publisher.** Resolving them is deliberately not done:
  following one returns Google's `/sorry` interstitial with HTTP 429, so an Actor that tried would
  be fast on the first call and blocked on the rest.
- Returns article metadata, not article text. For full text, pass the resolved URL to a page
  extractor such as [Webpage Text Extractor](https://apify.com/eliai/webpage-text-extractor).
- Google News coverage varies by edition; a `country`/`language` pair with no edition returns few
  or no results.

### FAQ

**Do I need a Google API key?** No. This reads Google News' own public RSS.

**Can I get the publisher's direct URL?** Not reliably — see Limits.

**Why did my search return nothing?** Either the keyword genuinely has no coverage in that edition,
or the recency window is too tight. Empty searches are free, so widen `when` and retry.

### Changelog

- **0.1 (2026-09-10)** — first release. One row per article, clean headlines, ISO dates, Google-side
  recency, bulk queries, per-edition country and language.

# Actor input Schema

## `query` (type: `string`):

What to search Google News for. Supports Google operators, e.g. "tesla" OR "rivian", or site:reuters.com.

## `queries` (type: `array`):

Run several searches in one go. Up to 20 per run.

## `maxArticles` (type: `integer`):

Google News returns up to ~100 per search. You are charged per article returned.

## `when` (type: `string`):

Limit to recent news. Applied by Google itself, so you get a full page of recent items rather than a filtered handful.

## `country` (type: `string`):

Two-letter country code for the edition, e.g. US, GB, DE, IN.

## `language` (type: `string`):

Locale for the edition, e.g. en-US, en-GB, de, fr.

## Actor input object example

```json
{
  "query": "artificial intelligence",
  "queries": [],
  "maxArticles": 25,
  "when": "any",
  "country": "US",
  "language": "en-US"
}
```

# Actor output Schema

## `results` (type: `string`):

Every item this run produced, as JSON.

## `resultsCsv` (type: `string`):

The same items as a spreadsheet-ready CSV.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "artificial intelligence",
    "queries": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("eliai/google-news-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "artificial intelligence",
    "queries": [],
}

# Run the Actor and wait for it to finish
run = client.actor("eliai/google-news-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "artificial intelligence",
  "queries": []
}' |
apify call eliai/google-news-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eliai/google-news-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/d9dZKBGQkslDl4sKo/builds/qi7RY0RjlLWUBvLEn/openapi.json
