# Google News Scraper — Headlines + Full Article Text (`x402opklaar/google-news-scraper`) Actor

Search terms in, news articles out: headline, source, publish time, snippet, the resolved publisher URL, and the full article body extracted from the page. Uses Google News RSS (no key). Charged per article returned.

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

## Pricing

$2.00 / 1,000 article returneds

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/platform/actors/running/actors-in-store#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 + Full Article Text

Search terms in, news articles out. Most Google News scrapers give you headlines and a `news.google.com` redirect link. This one also **resolves the real publisher URL** and **extracts the full, clean article body** — so you get ready-to-use text, not just a title.

- **Search by query** — one or many terms; Google News operators supported (`site:`, quotes, `OR`)
- **Real article URLs** — follows Google's redirect to the actual publisher
- **Full article text** — clean body extracted with trafilatura, boilerplate stripped
- **Fresh only** — `sinceHours` restricts to the last N hours
- **Any edition** — `language` + `country` for localized results
- **Honest pricing** — one charge per article returned; full text included free when available

### Input

```json
{
    "queries": ["artificial intelligence", "site:reuters.com markets"],
    "maxItemsPerQuery": 25,
    "sinceHours": 24,
    "fetchArticleText": true,
    "language": "en",
    "country": "US"
}
```

### Output (one dataset item per article)

```json
{
    "query": "artificial intelligence",
    "title": "…",
    "source": "Reuters",
    "published_at": 1755300000,
    "google_news_url": "https://news.google.com/rss/articles/…",
    "article_url": "https://www.reuters.com/technology/…",
    "snippet": "…",
    "text": "Full clean article body…",
    "text_status": "ok",
    "word_count": 812
}
```

`text_status` tells you exactly what happened per article: `ok`, `no-content`, `unresolved-redirect`, `skipped`, or an error tag — no silent gaps.

### Pricing

One event: `article` — charged per article returned. Headline, source, publish time, snippet and the Google News link are always delivered; the resolved URL and full text are added **free** whenever extraction succeeds.

### Typical uses

- **Media monitoring** — track a brand, person, or topic across outlets
- **LLM/RAG pipelines** — feed full article text to summarize or answer questions
- **Newsletters & briefings** — pull the last 24h on a beat with `sinceHours: 24`
- **Datasets** — build labeled news corpora by query

### Works with AI agents

Exposed via Apify's MCP server — an agent can call *"get today's news on <topic> with full text"* in one step.

### FAQ

**Why do some articles have no `text`?** Some publishers hard-block automated fetches or require JS. Those come back with `text_status` explaining why — and the headline, source, and link are still delivered. Turn on `useApifyProxy` to improve success on blocked sites.

**How fresh is it?** As fresh as Google News. Use `sinceHours` to bound it.

**Bulk / many topics?** Pass many queries; each article is one dataset row and one charge.

# Actor input Schema

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

One or more search terms. Google News search operators work too (e.g. "tesla", "site:reuters.com AI").

## `maxItemsPerQuery` (type: `integer`):

Cap on results returned per query (Google News RSS returns up to ~100).

## `sinceHours` (type: `integer`):

0 = no time filter. Otherwise restricts to articles published within this many hours.

## `fetchArticleText` (type: `boolean`):

Follow each result to the publisher and extract the clean article body. Turn off for headlines-only (faster).

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

Two-letter language code (e.g. en, es, de, fr).

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

Two-letter country/edition code (e.g. US, GB, DE, IN).

## `useApifyProxy` (type: `boolean`):

Routes requests through Apify residential proxy. Required to resolve real article URLs and fetch full text (Google blocks datacenter IPs). Leave on unless you only want headlines.

## Actor input object example

```json
{
  "queries": [
    "artificial intelligence"
  ],
  "maxItemsPerQuery": 25,
  "sinceHours": 0,
  "fetchArticleText": true,
  "language": "en",
  "country": "US",
  "useApifyProxy": true
}
```

# Actor output Schema

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

No description

# 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": [
        "artificial intelligence"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("x402opklaar/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 = { "queries": ["artificial intelligence"] }

# Run the Actor and wait for it to finish
run = client.actor("x402opklaar/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 '{
  "queries": [
    "artificial intelligence"
  ]
}' |
apify call x402opklaar/google-news-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,x402opklaar/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/zl6gxqEI7xXoLKNJU/builds/Z6yi3MMr90PgJmk2A/openapi.json
