# Google News Scraper (`flashdata/google-news`) Actor

Scrape Google News by keyword and get headlines, publishers, dates, links and available snippets. Filter by country, language and time range. Requires a FlashData API key and Credits; Apify usage is billed separately.

- **URL**: https://apify.com/flashdata/google-news.md
- **Developed by:** [FlashData](https://apify.com/flashdata) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 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

## Google News Scraper

Search Google News for coverage of a brand, company or industry topic. Collect headlines and publisher links in a structured dataset for news monitoring, market research and media analysis.

### What you get

- **News results by keyword:** headlines, publishers, dates, links and snippets when available.
- **Search controls:** choose a country, language, location and time filter, then select a results page.
- **Exportable data:** one news result per dataset row, ready to download as JSON or CSV or retrieve through the Apify API.

Use it to track product announcements, review competitor coverage or build a reading list for an industry report.

### Example output

Open **Google News results** to view the dataset. The following row is illustrative, not a live news result:

```json
{
  "query": "battery recycling",
  "position": 1,
  "title": "Example company announces battery recycling facility",
  "link": "https://example.com/news/recycling-facility",
  "source": "Example News",
  "date": "1 day ago",
  "snippet": "An illustrative summary of the announcement.",
  "request_id": "req_example"
}
```

Fields depend on the search response. Dates may be relative or absent, and snippets are not guaranteed. **Complete response and status** contains the full JSON response and returned usage information.

### Quick start

1. Get a [FlashData API key](https://flashdata.dev/app/api-keys) with `google_news` access and available Credits.
2. Enter your **Search query** and key, then adjust optional filters.
3. Click **Start** and open **Google News results** to review or export the results.

Example: search for recent coverage in English, using the US country setting.

```json
{
  "flashdataApiKey": "YOUR_FLASHDATA_API_KEY",
  "query": "battery recycling",
  "num": 10,
  "gl": "us",
  "hl": "en",
  "tbs": "qdr:w"
}
```

### Input parameters

| Parameter | Required | Description |
| --- | --- | --- |
| `query` | Yes | One news search query, 1–2,000 characters. |
| `flashdataApiKey` | Yes | Your FlashData API key, stored as encrypted input. |
| `num` | No | Requested result count: 1–100. Default: 10. Actual count may be lower. |
| `page` | No | Results page: 1–100. Default: 1. |
| `gl` | No | Two-letter country code, e.g. `us`, `gb` or `sg`. |
| `hl` | No | Google interface language, e.g. `en` or `zh-cn`. |
| `location` | No | Search location, e.g. `Singapore` or `New York`. |
| `tbs` | No | Google search filter, e.g. `qdr:d` (past day), `qdr:w` (week) or `qdr:m` (month). |
| `autocorrect` | No | Allow spelling correction. Omit to use the provider's behavior. |

Each run searches one query and one page. Use separate runs for additional queries or pages. For recurring monitoring, save your input as an Apify Task and schedule it; each scheduled run makes a new request.

### Pricing

Searches use your FlashData Credits at your applicable [account rate](https://flashdata.dev/pricing). This Actor adds no service fee. Apify compute, storage and other platform usage are billed separately under your Apify plan.

### FAQ

**Does it return the full article?**

It returns news search metadata and available snippets. Full article text requires opening or fetching the linked page separately.

**Can I retrieve every article about a topic?**

Search results are a snapshot, not a complete news archive. Result counts, ordering and dates depend on the query and provider response; requesting 100 results does not guarantee 100 rows.

**Does a repeated search return only new articles?**

No. Each run is independent and does not deduplicate against previous runs. Compare saved links across runs if you need a list of newly discovered stories.

**What if a run fails?**

Check key permissions and Credits for authentication errors. After a timeout or interruption, inspect **Complete response and status** and FlashData Jobs/usage before starting again: the request may already have been charged. A new run can create another charge.

### Support

Open an issue on this Actor or email <support@flashdata.dev> with the run URL or request ID. Do not include API keys.

[API documentation](https://flashdata.dev/docs/sources/google_news) · [Terms](https://flashdata.dev/legal/terms) · [Privacy](https://flashdata.dev/legal/privacy)

This is an independent FlashData integration, not an official Google product.

# Actor input Schema

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

One search query, e.g. battery recycling.

## `flashdataApiKey` (type: `string`):

Requires google_news access. Get your key: https://flashdata.dev/app/api-keys

## `num` (type: `integer`):

Maximum results to request (1–100). Actual count may be lower.

## `page` (type: `integer`):

Results page number, starting at 1.

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

Two-letter country code, e.g. us, gb or sg.

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

Google interface language, e.g. en or zh-cn.

## `location` (type: `string`):

Search location, e.g. Singapore or New York.

## `tbs` (type: `string`):

Google filter, e.g. qdr:d (past day), qdr:w (week), qdr:m (month).

## `autocorrect` (type: `boolean`):

Allow Google to correct spelling.

## Actor input object example

```json
{
  "num": 10,
  "page": 1
}
```

# Actor output Schema

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

No description

## `response` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("flashdata/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 = {}

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

```

## MCP server setup

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