# Google News All-In-One Api (`romy/google-news-all-in-one-api`) Actor

Real-time, unofficial Google News data as a REST API — personalized feeds, full-text search, regional editions, autocomplete, and category browsing. No scraping, no HTML parsing: this talks directly to the same private API the official Google News Android app uses, and returns clean JSON

- **URL**: https://apify.com/romy/google-news-all-in-one-api.md
- **Developed by:** [Romy](https://apify.com/romy) (community)
- **Categories:** News, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.80 / 1,000 searches

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 API

Real-time, unofficial Google News data as a REST API — personalized feeds,
full-text search, regional editions, autocomplete, and category browsing.
No scraping, no HTML parsing: this talks directly to the same private API
the official Google News Android app uses, and returns clean JSON.

### Quick start

Once deployed on Apify, the actor runs in [Standby mode](https://docs.apify.com/platform/actors/running/standby) —
call it like any REST API, no run/wait-for-finish cycle needed:

```bash
curl "https://romy--google-news-all-in-one-api.apify.actor/search?q=indonesia+election&ceid=US:en&token=<YOUR_APIFY_TOKEN>"
```

(get your token from the **Integrations** tab in Apify Console — `Authorization: Bearer <token>` header works too, instead of `?token=`)

### Pricing

Pay-per-event — you're only charged for successful calls, once per request,
regardless of how many articles come back:

| Endpoint | Event | Price |
|---|---|---|
| `GET /feed` | `feed` | $0.01 |
| `GET /search` | `search` | $0.01 |
| `GET /sections/:id` | `section` | $0.012 |
| `GET /discover` | `discover` | $0.003 |
| `GET /editions/:id` | `edition` | $0.002 |
| `GET /suggest` | `suggest` | $0.001 |
| `GET /config` | `config` | $0.001 |

### Endpoints

#### `GET /feed` — personalized "Read Now" home feed

```bash
curl --get 'https://romy--google-news-all-in-one-api.apify.actor/feed' \
  --data-urlencode 'ceid=US:en' \
  --data-urlencode 'token=<YOUR_APIFY_TOKEN>'
```

```json
{
  "success": true,
  "articles": [
    {
      "title": "Magnitude-7.7 quake hits off coast of Indonesia, killing at least 38",
      "snippet": "A magnitude-7.7 earthquake hit off the coast of Indonesia in the eastern Flores region...",
      "sourceName": "NBC News",
      "publishedMs": "1786794420000",
      "url": "https://www.nbcnews.com/world/indonesia/earthquake-indonesia-rcna592638"
    }
  ],
  "count": 3,
  "next": "GidDQnhpR1FvUU9HTTROV015WlRFd1ltTmlaR05rTWhDc2hxS3RnRFEg..."
}
```

#### `GET /search` — full-text search

```bash
query='indonesia election'
curl --get 'https://romy--google-news-all-in-one-api.apify.actor/search' \
  --data-urlencode "q=$query" \
  --data-urlencode 'ceid=US:en' \
  --data-urlencode 'token=<YOUR_APIFY_TOKEN>'
```

Same response shape as `/feed`, filtered to the query. `q` is required.

#### `GET /editions/:id` — a regional/language edition + its tab bar

Start here to discover an edition's section ids (For You / Headlines /
World / Business / Technology / etc.):

```bash
curl --get 'https://romy--google-news-all-in-one-api.apify.actor/editions/CAAqHAgKIhZDQkFTQ2dvSUwyMHZNRE5uWkRVb0FBUAE' \
  --data-urlencode 'token=<YOUR_APIFY_TOKEN>'
```

```json
{
  "success": true,
  "sections": [
    { "id": "CAQqEggAKg4ICiIIQ0FrU0FDZ0FQAQ...", "title": "For you" },
    { "id": "CAQiSkNCQVNNUW9JTDIwdk1ETm5aRFVTQW1WdUdnSlZVeUlPQ0FR...", "title": "Headlines" },
    { "id": "CAQiRENCQVNMUW9JTDIwdk1ETm5aRFVTQW1WdUdnSlZVeUlNQ0FF...", "title": "U.S." },
    { "id": "CAQiRENCQVNMUW9JTDIwdk1ETm5aRFVTQW1WdUdnSlZVeUlOQ0FF...", "title": "World" },
    { "id": "CAQiSENCQVNNQW9JTDIwdk1ETm5aRFVTQW1WdUdnSlZVeUlQQ0FF...", "title": "Business" },
    { "id": "CAQiS0NCQVNNZ29JTDIwdk1ETm5aRFVTQW1WdUdnSlZVeUlSQ0FF...", "title": "Technology" }
  ]
}
```

`CAAqHAgKIhZDQkFTQ2dvSUwyMHZNRE5uWkRVb0FBUAE` is the default US edition —
that's a good starting point for any region.

#### `GET /sections/:id` — articles from one tab

Feed a `sections[].id` from `/editions/:id` (or `/discover`) back in:

```bash
curl --get 'https://romy--google-news-all-in-one-api.apify.actor/sections/CAQiSkNCQVNNUW9JTDIwdk1ETm5aRFVTQW1WdUdnSlZVeUlPQ0FR...' \
  --data-urlencode 'token=<YOUR_APIFY_TOKEN>'
```

Returns articles for that tab (e.g. 40 U.S. headlines), same shape as `/feed`.

#### `GET /discover` — browsable category/source directory

```bash
curl --get 'https://romy--google-news-all-in-one-api.apify.actor/discover' \
  --data-urlencode 'ceid=US:en' \
  --data-urlencode 'token=<YOUR_APIFY_TOKEN>'
```

```json
{ "success": true, "sections": [{ "id": "...", "title": "Popular" }] }
```

Each result's `id` also feeds into `/sections/:id` or `/editions/:id`.

#### `GET /suggest` — search-as-you-type autocomplete

```bash
curl --get 'https://romy--google-news-all-in-one-api.apify.actor/suggest' \
  --data-urlencode 'q=indo' \
  --data-urlencode 'token=<YOUR_APIFY_TOKEN>'
```

```json
{
  "success": true,
  "suggestions": [
    { "text": "indonesia earthquake" },
    { "text": "Indonesia" },
    { "text": "indonesia earthquake today" },
    { "text": "indonesia earthquake tsunami warning" },
    { "text": "indonesia news" }
  ]
}
```

#### `GET /config` — feature-flag/experiment blob

```bash
curl --get 'https://romy--google-news-all-in-one-api.apify.actor/config' \
  --data-urlencode 'country=US' \
  --data-urlencode 'token=<YOUR_APIFY_TOKEN>'
```

Not article data — internal A/B flags, kept for completeness.

### Pagination & region

Every article endpoint returns a `next` cursor when more results exist —
pass it back as `?next=` to get the next page (`nextUrl` is upstream's own
next-page URL, informational only; use `next` with this API).

Region is `ceid=COUNTRY:lang` (e.g. `US:en`, `ID:id`) — same convention as
the public `news.google.com/rss?ceid=...` URLs. `sceids` adds secondary
regions as a comma-separated list of the same format. `hl` sets UI language
independently (defaults to `en-US`).

### Known limitations

- **"Full Coverage of this story" clusters** (`storylineGroups[]` on
  `/search`/`/sections`/`/feed` responses) carry a `fullCoverageId`, but
  there's currently no known endpoint that resolves it into an article
  list — every guessed path (`/storyline/`, `/coverage/`, `/cluster/`, ...)
  404s. Extraction of the id itself is correct; just nothing to fetch it
  with yet.
- `/discover`'s results only include plain `{id, title}` entries — richer
  "source card" entries (with logo/description) are skipped.
- No write actions (upvote/blacklist a topic, etc.) — read-only API.

# Actor input Schema

## Actor input object example

```json
{}
```

# Actor output Schema

## `api` (type: `string`):

This Actor doesn't write to a dataset — every response is returned directly over HTTP by its Standby web server. See the README / web server OpenAPI schema (webServerSchema) for the full endpoint list and response shapes (GET /feed, /sections/:id, /editions/:id, /search, /discover, /suggest, /config).

# 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("romy/google-news-all-in-one-api").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("romy/google-news-all-in-one-api").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 romy/google-news-all-in-one-api --silent --output-dataset

```

## MCP server setup

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

```

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/6rqfnfHe0o2LrRAqP/builds/wkOuppAB3EhnxFY8I/openapi.json
