# Google News Scraper — Clean Article Rows Fast (`grokbob/google-news-batch-ppe`) Actor

Batch Google News queries into flat article rows (title, URL, source, date) for SEO monitoring & content research. From $0.50 per 1,000 successful articles — failed/empty queries cost $0.

- **URL**: https://apify.com/grokbob/google-news-batch-ppe.md
- **Developed by:** [Bob](https://apify.com/grokbob) (community)
- **Categories:** News, SEO tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 successful article results

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google News Scraper — Clean Article Rows Fast

**Slug:** `google-news-batch-ppe`\
**Job:** Submit 1–N news queries (+ language / country) and receive flat, agent-ready article rows (title, URL, source, date, snippet).

**Pay per event:** **$0.0005** per successful `article-result` (**$0.50 per 1,000** successful articles). Platform also bills a standard `apify-actor-start` fee (typically **$0.01** per run).

**No empty charge:** `EMPTY`, `BLOCKED`, and `FAILED` queries still return status rows, but never create a billable `article-result` event. `billed=true` only when the charge succeeds.

> Live on Apify Store: https://apify.com/grokbob/google-news-batch-ppe

***

### Why this Actor

Run batch news research without paying for blank answers. This Actor pulls Google News search results and returns a predictable flat row for every useful article.

- **Batch-first:** submit 1–N queries with shared language / country settings.
- **Clean article fields:** title, URL, source, published date, snippet — ready for Sheets, n8n, Make, and SEO workflows.
- **Honest statuses:** `OK` vs `EMPTY` / `BLOCKED` / `FAILED` so you can tell signal from miss.
- **Pay for delivered articles only:** failed or empty queries cost $0 on the custom PPE event.
- **Undercut market sticker:** from **$0.50 / 1,000** successful articles.

Pair with [Google Trends Scraper — Batch Interest Over Time](https://apify.com/grokbob/google-trends-batch-ppe) for keyword → news workflow loops.

***

### Pricing (live Store)

| Item | Price | Billing rule |
| --- | ---: | --- |
| `article-result` | **$0.0005** (**$0.50 / 1,000**) | Charged only when the row has a real title + URL (status OK) **and** the charge API accepts the event. |
| `apify-actor-start` | **~$0.01 per run** (platform) | Billed by Apify automatically. |
| `EMPTY`, `BLOCKED`, or `FAILED` | **$0** | Status row only — no `article-result` charge. |

***

### Inputs

| Field | Type | Default | Notes |
| --- | --- | --- | --- |
| `queries` | `string[]` | required | 1–N news search queries |
| `hl` | `string` | `en` | Interface language |
| `gl` | `string` | `US` | Country |
| `ceid` | `string` | — | Google News ceid when needed |
| `maxArticlesPerQuery` | `integer` | `10` | Cap per query |
| `maxQueries` | `integer` | `50` | Hard cap |
| `dryRunMock` | `boolean` | `false` | Local/CI only |

***

### Outputs (dataset)

- `rowType=article` + `status=OK` → billable candidate (`article-result`)
- `rowType=status` + `EMPTY` / `BLOCKED` / `FAILED` → unbilled

#### Example OK row (static)

```json
{
  "rowType": "article",
  "status": "OK",
  "billed": true,
  "query": "artificial intelligence regulation",
  "title": "Example headline about AI policy",
  "url": "https://news.example.com/ai-policy",
  "source": "Example News",
  "publishedAt": "2026-09-20T12:00:00.000Z",
  "snippet": "Lawmakers debated new rules for foundation models…"
}
```

***

### Fetch path

Google News **RSS** (`news.google.com/rss/search`) via `got-scraping`. No Playwright. No residential proxy by default.

***

### Local

```bash
npm install && npm test
ACTOR_TEST_MODE=mock npm start
```

UNLICENSED — GrokBob / Bob Helt.

# Actor input Schema

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

1–N news search queries. Each query is fetched separately so empty/blocked results do not poison the batch.

## `hl` (type: `string`):

Google News hl language code, e.g. en, en-US, es, de.

## `gl` (type: `string`):

Google News country / region code, e.g. US, GB, DE.

## `ceid` (type: `string`):

Google News ceid (country:lang). Default derived as GL:hl when empty.

## `maxArticlesPerQuery` (type: `integer`):

Cap articles pushed (and billable) per query.

## `maxQueries` (type: `integer`):

Hard cap. Excess queries skipped with status FAILED reason=maxQueries.

## `dryRunMock` (type: `boolean`):

When true, do not call Google News. Use built-in mock fixtures. Never use in production Store runs.

## Actor input object example

```json
{
  "queries": [
    "openai",
    "federal reserve",
    "empty"
  ],
  "hl": "en",
  "gl": "US",
  "ceid": "",
  "maxArticlesPerQuery": 10,
  "maxQueries": 50,
  "dryRunMock": false
}
```

# Actor output Schema

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

Flat agent-ready rows (query, title, url, source, status, billed).

# 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 = {
    "queries": [
        "openai",
        "federal reserve",
        "empty"
    ],
    "hl": "en",
    "gl": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("grokbob/google-news-batch-ppe").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 = {
    "queries": [
        "openai",
        "federal reserve",
        "empty",
    ],
    "hl": "en",
    "gl": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("grokbob/google-news-batch-ppe").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 '{
  "queries": [
    "openai",
    "federal reserve",
    "empty"
  ],
  "hl": "en",
  "gl": "US"
}' |
apify call grokbob/google-news-batch-ppe --silent --output-dataset

```

## MCP server setup

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

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/uEaSIFXLbK8WFJdyI/builds/TxHB5d4p9M93VKYuW/openapi.json
