# Google News Date-Window Export (`sapph1re/google-news-date-window-export`) Actor

Export Google News RSS metadata inside an exact UTC date window with bounded output and explicit exclusion receipts.

- **URL**: https://apify.com/sapph1re/google-news-date-window-export.md
- **Developed by:** [Roman V](https://apify.com/sapph1re) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 news metadata rows

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?

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 Date-Window Export

Export Google News RSS metadata inside an exact UTC date interval. This Actor is designed for small, auditable exports where date boundaries and predictable row counts matter more than article-body extraction.

### What it does

- Sends one request to the public Google News RSS search endpoint.
- Applies an inclusive start and exclusive end after parsing every publication timestamp.
- Writes no more than 100 rows to the default dataset.
- Records outside-window, duplicate, malformed, ambiguous-timezone, output-cap, and billing-limit exclusions in `OUTPUT`.
- Returns the Google News link and source metadata without resolving redirects or opening publisher pages.

The source is a bounded feed with an unknown total. A successful run means every item in that response was evaluated. It does not mean every matching Google News item was available in the feed.

### Input

The quickest useful run is an empty object:

```json
{}
```

That searches for `artificial intelligence`, uses the previous seven complete UTC days, and returns at most 5 rows.

For an exact interval:

```json
{
  "query": "artificial intelligence",
  "startDate": "2026-09-01",
  "endDate": "2026-09-07",
  "maxItems": 5,
  "hl": "en-US",
  "gl": "US",
  "ceid": "US:en"
}
```

`startDate` is inclusive at UTC midnight. `endDate` is exclusive at UTC midnight. Supply both dates or omit both. An explicit interval can span at most 31 days. Empty, malformed, partial, or reversed dates fail before any source request.

### Dataset rows

Each delivered row contains:

- `title`
- `publishedAt` normalized to UTC
- `googleNewsUrl` from the feed
- `sourceName` and a valid `sourceUrl` when supplied
- `guid`
- `query`
- deterministic `recordId`

The Actor fetches no linked article, so it does not return article bodies or a resolved publisher URL.

### Run receipt

Open the `OUTPUT` record to inspect:

- the resolved query and UTC interval;
- source request, retry, proxy, and linked-fetch counts;
- compressed and decoded response sizes;
- source, eligible, written, charged, and billing-excluded row counts;
- whether dataset delivery is confirmed, not attempted, or unknown after an ambiguous write;
- exclusion and failure receipts;
- the effective pricing mode for the run.

Statuses distinguish clean completion, genuine empty output, source item faults, output capping, billing capping, invalid input, source failure, pricing mismatch, and output failure. A run cannot stay `COMPLETE` when a spending limit prevents an eligible row from reaching the dataset.

### Pricing

The configured Store price is `$0.001` for each row written to the default dataset, using Apify's automatic `apify-default-dataset-item` event. There is no separate start event, custom result event, or platform-usage surcharge. Exclusions and receipts are not dataset items and are not charged as results.

Platform usage and event charges are separate concepts. Check the run receipt and Console cost details for the effective pricing on a particular run.

### Safety and operational limits

- One source request, zero retries, zero redirects, and zero proxies. Environment proxy discovery is disabled.
- 20-second source timeout.
- 2,000,000-byte compressed response cap.
- 2,000,000-byte aggregate decoded response cap for identity, gzip, deflate, and Brotli.
- The full compressed stream is validated. Bounded concatenated gzip members are supported; corrupt, truncated, or unexpected trailing data is rejected.
- 1,000 source-item parse cap and 100 result-row cap.
- UTF-8 XML only. DTDs and entity declarations are rejected.
- Unknown publication timezones are excluded rather than guessed.

Before transport, the Actor stores a request-scoped run boundary. A completed run can restore its saved result without another source request or dataset push. An incomplete or ambiguous run fails closed on resurrection instead of making a second chargeable push. Confirmed write and charge counts survive later bookkeeping failures; genuinely ambiguous writes report unknown delivery and charge counts instead of asserting zero.

# Actor input Schema

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

Google News search terms. The Actor appends the resolved date operators after validation.

## `startDate` (type: `string`):

Optional UTC date in YYYY-MM-DD form. Supply both dates or omit both for the previous seven complete UTC days.

## `endDate` (type: `string`):

Optional UTC date in YYYY-MM-DD form. Items exactly at this midnight are excluded.

## `maxItems` (type: `integer`):

Hard dataset-row ceiling after validation, window filtering, and deduplication.

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

Google News language and optional region, for example en-US.

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

Two-letter uppercase country code used by Google News, for example US.

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

Google News country and language edition in COUNTRY:language form, for example US:en.

## Actor input object example

```json
{
  "query": "artificial intelligence",
  "maxItems": 5,
  "hl": "en-US",
  "gl": "US",
  "ceid": "US:en"
}
```

# Actor output Schema

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

No description

## `runReceipt` (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("sapph1re/google-news-date-window-export").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("sapph1re/google-news-date-window-export").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 sapph1re/google-news-date-window-export --silent --output-dataset

```

## MCP server setup

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

```

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/Cog3x9Xv9ykBmFGSZ/builds/DhpMxfbde8HTAyQIv/openapi.json
