# Google News (`canadesk/google-news`) Actor

Find the latest news with direct source links from Google News. It's fast and costs little!

- **URL**: https://apify.com/canadesk/google-news.md
- **Developed by:** [Canadesk Support](https://apify.com/canadesk) (community)
- **Categories:** News, Social media, SEO tools
- **Stats:** 18 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

⏰ Want to schedule this actor to run on a regular basis? Check <https://docs.apify.com/platform/schedules>!

### Input

- Topics (select)

  - All: Runs all below topics.

  - Top Stories: Headlines, equivalent to "Home".

  - Country & World: Country is based on the selected user region.

  - Others: Equivalent to the default categories on Google News, such as Business, Technology, Entertainment, etc.

- Custom Topic (string)

  ➡ **Overrides** "Topics". Equivalent to the search bar (free text).

  "Include related articles" and "Search Text" are not supported here.

- Pagination (select)

  - Latest: First articles displayed before pagination.

  - All: Equivalent to "Load more".

- Include related articles (select)

  Will find relevant news associated with each article.

- Region (select)

  💡 Simulates the user geolocation. Most of the results are based on this input.

- Search text (string)

  Filter applied AFTER data collection. Only returns news containing the search text.

- Period (select)

  Filter applied AFTER data collection. Only returns news within the timeframe (UTC!).

### Example

```
{
	"others": [
		{
			"id": "CAAqJggKIiBDQkFTRWdvSUwyMHZNRGRqTVhZU0FtVnVHZ0pWVXlnQVAB",
			"name": "Technology",
			"articles": [
				{
					"title": "Sketchy Nintendo Switch 2 listing reveals the gaming handheld's pre-order price",
					"short": "While the Nintendo Switch 2 was fully showcased, its official price still remains a mystery. Ahead of any official words from the company, a lesser-known...",
					"source": "Notebookcheck.net",
					"timestamp": 1737803700000,
					"datetime": "2025-01-25T08:15:00.000Z",
					"url": "https://www.notebookcheck.net/Sketchy-Nintendo-Switch-2-listing-reveals-the-gaming-handheld-s-pre-order-price.952304.0.html",
					"image": "https://news.google.com/api/attachments/CC8iK0NnNW1URmMyVEVKRGJqZEtWVGR4VFJEZkF4aUFCU2dLTWdZUmtwUXFNUWM=s0-w100-h100-p-rw-df",
					"related": [
						{
							"title": "This ‘Light Mode’ Switch 2 Is Stunning, But There’s A Catch",
							"short": "They say software sells hardware. But there's a secondary motivator that will make the Switch 2 fly off the shelves, and that's the perfect splash of color.",
							"source": "Forbes",
							"timestamp": 1737818504000,
							"datetime": "2025-01-25T13:15:04.000Z",
							"url": "https://www.forbes.com/sites/jasonevangelho/2025/01/25/this-light-mode-switch-2-is-stunning-but-theres-a-catch/",
							"image": "https://news.google.com/api/attachments/CC8iI0NnNXBOblJrYVdFNVFXeFdXSFJPVFJDZkF4ampCU2dLTWdB=s0-w100-h100-p-rw-df"
						},
						{
							"title": "Some Mario Kart 9 fans are less concerned about whether or not the racer will be Nintendo Switch 2's launch title than they are about its name",
							"short": "Mario Kart 2? Mario Kart X? Mario Kart 8 Deluxe 2? The possibilities are (somewhat) endless.",
							"source": "Yahoo! Voices",
							"timestamp": 1737559857000,
							"datetime": "2025-01-22T13:10:57.000Z",
							"url": "https://www.yahoo.com/tech/mario-kart-9-fans-less-153057163.html",
							"image": "https://news.google.com/api/attachments/CC8iK0NnNXBXRTFsZDJSVFZtRklhM0ZZVFJDZkF4ampCU2dLTWdZbGdvNnR0UVU=s0-w100-h100-p-rw-df"
						},
						...
					]
				},
			],
		},
		...
	]
}
```

### Support

Always use a strong proxy!

Open a new issue for bugs, please share your Run URL and Input 🎈

# Actor input Schema

## `topics` (type: `string`):

No description

## `custom` (type: `string`):

Overrides Topics. Free text.

## `more` (type: `string`):

No description

## `withRelated` (type: `string`):

No description

## `region` (type: `string`):

Simulates User location and Country-specific news.

## `keyword` (type: `string`):

Applied after collection. Only returns articles containing the specified text.

## `period` (type: `string`):

Applied after collection. Only returns articles published within the timeframe.

## `delay` (type: `integer`):

Waiting time between requests.

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "topics": "all",
  "custom": "",
  "more": "all",
  "withRelated": "yes",
  "region": "US:en",
  "keyword": "",
  "period": "default",
  "delay": 2,
  "proxy": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("canadesk/google-news").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 = { "proxy": { "useApifyProxy": True } }

# Run the Actor and wait for it to finish
run = client.actor("canadesk/google-news").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 '{
  "proxy": {
    "useApifyProxy": true
  }
}' |
apify call canadesk/google-news --silent --output-dataset

```

## MCP server setup

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

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/bwS68CKEKmGSUt5Aq/builds/nXqpcjFL5V5BDQkwf/openapi.json
