# Google News Scraper (`yasmany.casanova/google-news-scraper`) Actor

Search Google News in 18 countries and get each article with title, link, source, snippet and publication time as a real timestamp, even when Google shows "2 hours ago". Filter by past hour, day, week, month or year. Up to 100 articles per search.

- **URL**: https://apify.com/yasmany.casanova/google-news-scraper.md
- **Developed by:** [Yasmany Grijalba Casanova](https://apify.com/yasmany.casanova) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.50 / 1,000 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

Search **any topic on Google News** across 18 markets and get every article as data: **title, link, source, snippet** and the **publication time as a real timestamp**, even when Google only shows "2 hours ago" or a local date. Filter by the past hour, day, week, month or year.

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue?logo=apify)](https://apify.com)
[![Markets](https://img.shields.io/badge/Markets-18%20Countries-green)](https://news.google.com)

***

> ℹ️ **Zero configuration**
> Provide a topic and run it: results are ready in seconds.

***

### Quick Start

```json
{
  "query": "inteligência artificial",
  "country": "br",
  "maxResults": 20
}
```

> **Tip**: Google News serves about 10 articles per page and every page is one request. Use `dateRange` to keep only fresh stories, for example `past_day` for a daily digest.

#### More examples

<details>
<summary>Today's news about a company in the US</summary>

```json
{
  "query": "Nvidia",
  "country": "us",
  "maxResults": 30,
  "dateRange": "past_day"
}
```

</details>

<details>
<summary>A week of coverage in Germany</summary>

```json
{
  "query": "Elektroautos",
  "country": "de",
  "maxResults": 50,
  "dateRange": "past_week"
}
```

</details>

***

### Supported Markets

| Country | `country` | Country | `country` |
|---------|-----------|---------|-----------|
| Brazil (default) | `br` | Germany | `de` |
| Portugal | `pt` | Austria | `at` |
| United States | `us` | France | `fr` |
| United Kingdom | `gb` | Spain | `es` |
| Canada | `ca` | Mexico | `mx` |
| Australia | `au` | Argentina | `ar` |
| India | `in` | Colombia | `co` |
| Ireland | `ie` | Chile | `cl` |
| Italy | `it` | Netherlands | `nl` |

The market decides which outlets Google ranks, as a reader in that country would see them.

***

### Features

| Feature | Description |
|---------|-------------|
| **18 Markets** | Search the news as a reader in Brazil, the US, the UK, Germany, France, Spain, Mexico and more |
| **Real Publication Time** | "há 5 horas", "vor 2 Tagen" or "19 de jul. de 2026" become one UTC timestamp you can sort and filter |
| **Date Filter** | Keep only articles from the past hour, day, week, month or year |
| **Source and Domain** | The outlet name and its domain on every article |
| **Up to 100 Articles** | Page through the results, deduplicated and numbered in order |

***

### Use Cases

- **Media Monitoring**: Track every story about your brand, your competitors or your market
- **PR Measurement**: See which outlets picked up an announcement, and when
- **Market Research**: Follow a topic across countries and languages over time
- **Newsletters and Digests**: Collect the day's articles on a topic in one run
- **AI Pipelines**: Feed fresh, dated headlines into an LLM, a RAG index or an alerting workflow

***

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `query` | string | none | What to look for in the news (**required**) |
| `country` | string | `br` | Market to search (see the table above) |
| `maxResults` | integer | `20` | Articles to return (1 to 100). About 10 per page, one request per page |
| `dateRange` | string | `any` | `any`, `past_hour`, `past_day`, `past_week`, `past_month` or `past_year` |

***

### Output Example

Each article is a row, followed by a summary row with the totals:

```json
[
  {
    "record_type": "article",
    "query": "inteligência artificial",
    "country": "br",
    "page": 1,
    "position": 1,
    "title": "EUA anunciam acordo no Paraguai para usar energia Itaipu em projeto de IA",
    "url": "https://www.cnnbrasil.com.br/internacional/eua-anunciam-acordo-no-paraguai-para-usar-energia-itaipu-em-projeto-de-ia/",
    "domain": "www.cnnbrasil.com.br",
    "source": "CNN Brasil",
    "description": "Entendimento entre as companhias Crusoe e Araico foi anunciado...",
    "published_at": "2026-10-21T22:43:00Z",
    "date_text": "há 58 minutos",
    "scraped_at": "2026-10-21T23:41:00.000Z"
  },
  {
    "record_type": "summary",
    "query": "inteligência artificial",
    "country": "br",
    "date_range": "any",
    "pages_fetched": 2,
    "articles_found": 19,
    "articles_returned": 19,
    "reference_url": "https://www.google.com/search?q=intelig%C3%AAncia+artificial&hl=pt-br&gl=br&tbm=nws",
    "scraped_at": "2026-10-21T23:41:00.000Z"
  }
]
```

***

### Data Fields

| Field | Type | Description |
|-------|------|-------------|
| `record_type` | string | `article` for an article, `summary` for the totals. The summary row carries no article columns, so sorting by `published_at` needs no filtering |
| `query` | string | The search query |
| `country` | string | Market the articles were collected from |
| `page` | number | Results page the article came from |
| `position` | number | Rank of the article in Google's list, numbered in order across pages |
| `title` | string | Headline |
| `url` | string | Link to the article on the publisher's site |
| `domain` | string | Domain of the publisher |
| `source` | string | Name of the outlet as Google shows it |
| `description` | string | Snippet Google shows under the headline |
| `published_at` | string | Publication time, ISO 8601 in UTC. See the FAQ on how it is read |
| `date_text` | string | The date exactly as Google shows it, in the market's language |
| `date_range` | string | Date filter used for the search. Summary row |
| `pages_fetched` | number | Pages the run requested. Summary row |
| `articles_found` | number | Articles found across the pages fetched, after removing repeats. Summary row |
| `articles_returned` | number | Article rows pushed (limited by `maxResults`). Summary row |
| `reference_url` | string | Google News URL of the search. Summary row |
| `scraped_at` | string | ISO 8601 timestamp (UTC) |

***

### Integrations

Use the **API** tab on the Actor page to get ready-to-use code examples in **Python**, **JavaScript**, and **cURL**, generated with the correct parameters for immediate integration.

***

### Example Searches

| Market | `query` | `dateRange` |
|--------|---------|-------------|
| Brazil | `inteligência artificial` | `any` |
| United States | `Nvidia` | `past_day` |
| Germany | `Elektroautos` | `past_week` |

***

### FAQ

<details>
<summary><strong>How is published_at worked out?</strong></summary>

Google shows recent stories with a relative date ("há 5 horas", "2 days ago", "vor 3 Tagen") and older ones with a calendar date ("19 de jul. de 2026", "Aug 21, 2026", "13.07.2026"), always in the market's language. The Actor reads both into one UTC timestamp. A relative date is counted back from the moment the page was read, so it is as precise as Google's wording: minutes for "5 minutes ago", days for "2 days ago". A calendar date is given at 00:00 UTC of that day. The original wording stays in `date_text`.

</details>

<details>
<summary><strong>Why did I get fewer articles than maxResults?</strong></summary>

Google News serves about 10 articles per page. Articles that repeat across pages are kept once, and when a page brings nothing new the run stops rather than paying for empty pages. A narrow `dateRange` or a rare topic can also have fewer articles than you asked for.

</details>

<details>
<summary><strong>How many requests does a run make?</strong></summary>

One per page: `maxResults` of 1 to 10 is one request, 11 to 20 is two, and so on, up to 10 pages. The summary row says how many pages were fetched.

</details>

<details>
<summary><strong>Does it return the full text of the article?</strong></summary>

No. Each row carries the headline, the snippet, the source and the link. Open `url` to read the full article on the publisher's site.

</details>

<details>
<summary><strong>Do the results match what I see in my browser?</strong></summary>

Closely, but not always exactly. Google personalizes results by location, history and session, and the news list changes through the day. The run searches as an anonymous reader in the selected market.

</details>

***

### Support

1. **Check the FAQ** above for common questions
2. **Test with the prefilled example** to confirm expected output
3. **Contact support** through [Apify](https://apify.com) for additional assistance

# Actor input Schema

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

What to look for in the news: a topic, a company, a person or a product.

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

Google News market to search. It decides which outlets Google ranks and the language of the dates it shows.

## `maxResults` (type: `integer`):

Articles to return (1-100). Google News serves about 10 per page and every page is one request, so 30 articles fetch 3 pages. The run stops early when Google has no more articles for the query.

## `dateRange` (type: `string`):

Only articles published in this window. "Any time" applies no filter.

## Actor input object example

```json
{
  "query": "inteligência artificial",
  "country": "br",
  "maxResults": 20,
  "dateRange": "any"
}
```

# Actor output Schema

## `articles` (type: `string`):

One row per article found for the query, with title, link, source, snippet and publication time. One summary row carries the totals and the pages fetched, and holds no article columns, so sorting or counting the articles needs no filtering.

# 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": "inteligência artificial",
    "country": "br"
};

// Run the Actor and wait for it to finish
const run = await client.actor("yasmany.casanova/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": "inteligência artificial",
    "country": "br",
}

# Run the Actor and wait for it to finish
run = client.actor("yasmany.casanova/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": "inteligência artificial",
  "country": "br"
}' |
apify call yasmany.casanova/google-news-scraper --silent --output-dataset

```

## MCP server setup

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