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

Scrape Google News by keyword, topic or date range, past the 100-result limit. Get headlines, sources, dates, real publisher URLs and images as JSON, CSV or Excel, or via API, MCP or n8n. For news monitoring and alerts, brand tracking, market research, stock trading and AI agents.

- **URL**: https://apify.com/lhotanova/google-news-scraper.md
- **Developed by:** [Kristýna Lhoťanová](https://apify.com/lhotanova) (community)
- **Categories:** News
- **Features:** Limited permissions
- **Stats:** 3,672 total users, 402 monthly users, 100.0% runs succeeded, 79 bookmarks
- **User rating**: 4.59 out of 5 stars

## Pricing

from $1.30 / 1,000 news results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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?

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

### What data does Google News Scraper collect?

Google News Scraper allows you to extract news metadata such as title, link, source, publication datetime and image.

### How much does it cost?

You pay for the results you get. Every result has a base price, and up to two add-ons, both on by default:

- **Resolved article URL** (`fetchArticleDetails`): the Google News link resolved to the article on the publisher's site.
- **Article page** (`fetchArticlePage`): the article page loaded, which gives the image. It needs the resolved article URL.

Each run also has a small start fee, charged per GB of memory. Runs start with 4 GB when they load article pages, 2 GB with resolved article URLs only, and 1 GB without either add-on, so turning add-ons off also lowers the start fee. The prices for your plan are on the Pricing tab. If you set a maximum cost per run in the run options, the scraper stops before it would go over it.

### Example tasks

Ready-made tasks you can copy and run, each set up for one use case:

- [Track daily news about a company](https://apify.com/lhotanova/google-news-scraper/examples/company-news-last-24-hours): Tesla news from the last 24 hours.
- [Get today's Nvidia (NVDA) stock news for trading](https://apify.com/lhotanova/google-news-scraper/examples/nvidia-stock-news-today): the company name `OR` its ticker.
- [Get today's Dow Jones, S\&P 500 and Nasdaq headlines](https://apify.com/lhotanova/google-news-scraper/examples/stock-index-headlines): headlines only, with `fetchArticleDetails` off.
- [Track crypto news: bitcoin, ethereum, solana and XRP](https://apify.com/lhotanova/google-news-scraper/examples/crypto-news): several coins in one search, last 12 hours.
- [Collect a week of AI news: OpenAI, Anthropic and more](https://apify.com/lhotanova/google-news-scraper/examples/ai-news-digest): a long `OR` query, last 7 days.
- [Earthquake today: get news from the last hour](https://apify.com/lhotanova/google-news-scraper/examples/earthquake-news-last-hour): an excluded phrase, last hour.
- [Sports news: NFL, NBA, MLB, college sports and more](https://apify.com/lhotanova/google-news-scraper/examples/sports-news): the `SPORTS` topic.
- [Get local news for New York City](https://apify.com/lhotanova/google-news-scraper/examples/new-york-local-news): a hashed topic.
- [Get world news from the last 12 hours](https://apify.com/lhotanova/google-news-scraper/examples/world-news-last-12-hours): the `WORLD` topic with a date filter.
- [Collect iPhone 18 launch news by date range](https://apify.com/lhotanova/google-news-scraper/examples/iphone-launch-news-by-date): a past `dateFrom` and `dateTo` range.

### Query-based search

The Actor provides a simple interface where you can define your search query, language, region, and date range. Unlike manually browsing Google News, which limits you to approximately 100 results per search, Google News Scraper allows you to retrieve significantly more results without restrictions.

To bypass the usual result limits, the scraper can search news day by day. If you set `maxItems` to more than `90`, it searches the days newest first until it reaches the limit. With `dateFrom` set, it searches every day of your date range, or its last 1,000 days for a longer range.

For more precise control over the date range, you can use the `dateFrom` and `dateTo` fields in the `YYYY-MM-DD` format. Alternatively, you can specify an open-ended date range using the `openEndedDateRange` field with values such as:

- `1h` – retrieves news from the past hour
- `7d` – retrieves news from the past week
- `1y` – retrieves news from the past year

Use a whole number followed by `h`, `d` or `y`, such as `12h` or `30d`.

![](https://i.imgur.com/LXQn2wS.png)

#### Advanced search filters

You can also use advanced search operators in your queries, such as `intitle`, `site`, exclude operator `-`, exact match with double-quotes `""`, `AND`, `OR` and more. Example queries with advanced operators:

| Query                                                  | Explained                                                    |
| ------------------------------------------------------ | ------------------------------------------------------------ |
| `intitle:"AI" AND site:bbc.com`                        | Finds articles with `"AI"` in the title from BBC.            |
| `site:reuters.com "stock market" -crypto`              | Finds stock market articles on Reuters, excluding crypto-related ones. |
| `"Samsung Galaxy S25" AND (review OR comparison)`      | Searches for reviews or comparisons of Samsung Galaxy S25.   |
| `site:nytimes.com intitle:"election" after:2025-01-01` | Retrieves recent NY Times articles with `"election"` keyword in the title. |
| `(site:theguardian.com OR site:bbc.com) "climate change"` | Finds climate change news from The Guardian or BBC.       |

Google News doesn't support `inurl`, `allinurl` and `allintitle` from Google search. They return few or no news, so use `site` and `intitle` instead.

You may already know some of the operators from Google search or Apify's [Google Search Scraper](https://apify.com/apify/google-search-scraper). For more information, see [Google Guide on Search Operators](https://www.googleguide.com/advanced_operators_reference.html).

> TIP: Keep your query short. Google only reads about the first 32 words, and operators like `OR` and words in quotes count too (see [Google Guide](https://www.googleguide.com/interpreting_queries.html)). Put filters like `site:` at the start so they aren't cut off, for example: `site:theverge.com OR site:techcrunch.com ("electric vehicles" OR "battery recycling" OR "charging network")`.

### Topic-based search

Google News Scraper also supports topic-based search. You can search for news from one of the topics predefined in `topics` input field:

- `WORLD` 🌎
- `NATION` 🚩
- `BUSINESS` 🪙
- `TECHNOLOGY` 💻
- `ENTERTAINMENT` 🎸
- `SPORTS` 🏒
- `SCIENCE` 🧪
- `HEALTH` 🧑‍⚕️

![Science Topic](https://i.imgur.com/0n2fPqw.png)

Google News can't filter topics by date. If you set `openEndedDateRange`, `dateFrom` or `dateTo`, the scraper downloads each topic's news and keeps only those published within the range. A topic only lists its latest news, so you may get fewer results than `maxItems`, or none for an older date range. The same applies to hashed topics and topic sections.

#### Hashed Topics

The scraper also supports hashed topics, allowing you to extract news based on specific topic IDs from Google News. Simply copy the topic ID from the Google News URL and paste it into the `topicsHashed` input field.

For example, if you want to find news about your home country but published by foreign sources or in different languages, you can:

1. Click on your country in Google News.
2. Copy the topic ID from the URL.
3. Paste it into the `topicsHashed` array.
4. Set the `language` field to your preferred language and region (e.g., `DE:de`).

This way, you can for example retrieve the latest news from the US but published by German sources like `zdf.de` or `spiegel.de`. Similarly, you can search for news about a non-English-speaking country and get results from international sources such as `reuters.com`, `bbc.co.uk`, `independent.co.uk`, or `variety.com`.

![US Country Topic ID](https://i.imgur.com/4JuFoWj.png)

#### Topic Sections

The scraper also allows you to refine your search by targeting specific sections within broader topics. For example, you can extract news from the `NHL` section under `Sports` or `Artificial Intelligence` within the `Technology` category.

Imagine you need to scrape AI-related news from the section `Technology > Artificial Intelligence`, which is available at the following URL:

https://news.google.com/topics/CAAqJggKIiBDQkFTRWdvSUwyMHZNRGRqTVhZU0FtVnVHZ0pWVXlnQVAB/sections/CAQiQ0NCQVNMQW9JTDIwdk1EZGpNWFlTQW1WdUdnSlZVeUlOQ0FRYUNRb0hMMjB2TUcxcmVpb0pFZ2N2YlM4d2JXdDZLQUEqKggAKiYICiIgQ0JBU0Vnb0lMMjB2TURkak1YWVNBbVZ1R2dKVlV5Z0FQAVAB?hl=en-US\&gl=US\&ceid=US%3Aen

Simply copy the `{TOPIC_ID}/section/{SECTION_ID}` part of the URL and paste it into the `topicsHashed` array to target that specific section:

```json
{
  "topicsHashed": [
        "CAAqJggKIiBDQkFTRWdvSUwyMHZNRGRqTVhZU0FtVnVHZ0pWVXlnQVAB/sections/CAQiQ0NCQVNMQW9JTDIwdk1EZGpNWFlTQW1WdUdnSlZVeUlOQ0FRYUNRb0hMMjB2TUcxcmVpb0pFZ2N2YlM4d2JXdDZLQUEqKggAKiYICiIgQ0JBU0Vnb0lMMjB2TURkak1YWVNBbVZ1R2dKVlV5Z0FQAVAB"
  ]
}
```

![Technology Artificial Intelligence](https://i.imgur.com/OHyKI21.png)

### Example output

With both add-ons on (the default), the output has the decoded article links and image URLs. Extracted news are then stored in a following format:

```json
[
  {
    "title": "A win at last: Big blow to AI world in training data copyright scrap",
    "link": "https://www.theregister.com/2025/02/12/thomson_reuters_wins_ai_copyright/",
    "guid": "CBMifkFVX3lxTFByV0JDX09JaDR4bmNfX3AzWVFRbjMwdWNKcmtWQ255MEVGa2lCTHBpTE5JbFFWMG5nVFE1T2M0alVfY0N2N3ZFdFJDV3FrUjhVeDZ2dkQxQUNwb1FPcm9kMV9KYXk0ZUNnN1BDNDlZUXZtY3ktemgwWkpNU3Nxd9IBgwFBVV95cUxPc2tobXlKUmcwR0wyR0podklDS2MzMDhpQTd6N2NVbnRqYndPSVVmckV1Tk82TkNDck1JbmFuUU0yUjByTDE4VFRGVC1jTUc2M0VPOE1wX1RUZWpfOG9DamVmX21lWERuU0JGcHJyVDZQdEFDTHNNZjFQV1BQNkN0SjhaSQ",
    "source": "The Register",
    "sourceUrl": "https://www.theregister.com",
    "publishedAt": "2025-02-12T01:45:00.000Z",
    "loadedUrl": "https://www.theregister.com/2025/02/12/thomson_reuters_wins_ai_copyright/",
    "rssLink": "https://news.google.com/rss/articles/CBMifkFVX3lxTFByV0JDX09JaDR4bmNfX3AzWVFRbjMwdWNKcmtWQ255MEVGa2lCTHBpTE5JbFFWMG5nVFE1T2M0alVfY0N2N3ZFdFJDV3FrUjhVeDZ2dkQxQUNwb1FPcm9kMV9KYXk0ZUNnN1BDNDlZUXZtY3ktemgwWkpNU3Nxd9IBgwFBVV95cUxPc2tobXlKUmcwR0wyR0podklDS2MzMDhpQTd6N2NVbnRqYndPSVVmckV1Tk82TkNDck1JbmFuUU0yUjByTDE4VFRGVC1jTUc2M0VPOE1wX1RUZWpfOG9DamVmX21lWERuU0JGcHJyVDZQdEFDTHNNZjFQV1BQNkN0SjhaSQ?oc=5",
    "image": "https://regmedia.co.uk/2021/08/02/shutterstock_robot_justice.jpg"
  },
  {
    "title": "Web Scraping Optimization: Tips for Faster, Smarter Scrapers",
    "link": "https://hackernoon.com/web-scraping-optimization-tips-for-faster-smarter-scrapers",
    "guid": "CBMiiAFBVV95cUxQUXh5WVZ2RkNpNG9ndjF6V3hMRHBRTGRSVnNkelpwZDY2TWJzejBSMGZrRC1rSm5DZ1BxanpoeFFGdDRjWGpZR0tOUG9FY0kyeWFXOE9MSzBobTg1ajRiZzVhSWhtbm5nSVNJVWExSDBSaEFjUUJkT1JRRDJHSDBrMU9jU2ZZN3RN",
    "source": "hackernoon.com",
    "sourceUrl": "https://hackernoon.com",
    "publishedAt": "2024-11-15T08:00:00.000Z",
    "loadedUrl": "https://hackernoon.com/web-scraping-optimization-tips-for-faster-smarter-scrapers",
    "rssLink": "https://news.google.com/rss/articles/CBMiiAFBVV95cUxQUXh5WVZ2RkNpNG9ndjF6V3hMRHBRTGRSVnNkelpwZDY2TWJzejBSMGZrRC1rSm5DZ1BxanpoeFFGdDRjWGpZR0tOUG9FY0kyeWFXOE9MSzBobTg1ajRiZzVhSWhtbm5nSVNJVWExSDBSaEFjUUJkT1JRRDJHSDBrMU9jU2ZZN3RN?oc=5",
    "image": "https://hackernoon.imgix.net/images/0FC9YtxD4fbD3T7mPipOt4HSxY42-7y034nb.png"
  }
]
```

> NOTE: Image URLs are retrieved directly from the article websites and may differ from those displayed on the Google News website.

If you set `fetchArticlePage` to `false`, the scraper skips the article pages, so it runs faster and skips the article page add-on. `link` still holds the article URL, while `loadedUrl` and `image` are `null`.

If you set `fetchArticleDetails` to `false`, the scraper runs faster and costs less, because it skips the two add-ons. The output then includes Google News links instead of the article URLs, such as:

https://news.google.com/rss/articles/CBMiiAFBVV95cUxQUXh5WVZ2RkNpNG9ndjF6V3hMRHBRTGRSVnNkelpwZDY2TWJzejBSMGZrRC1rSm5DZ1BxanpoeFFGdDRjWGpZR0tOUG9FY0kyeWFXOE9MSzBobTg1ajRiZzVhSWhtbm5nSVNJVWExSDBSaEFjUUJkT1JRRDJHSDBrMU9jU2ZZN3RN?oc=5

The output then has no images:

```json
[
  {
    "title": "How I used Scrapy and Scrapy Playwright to take screenshot",
    "link": "https://news.google.com/rss/articles/CBMigAFBVV95cUxQRDJDNW1ONklDTlhJN3lsWlIwdTEzV050d284bnZ4YWo2TnQ3MU1XcUZkdHNZTTMxSTZ4NjkwRnh0UFloa0ZsZ0d5Qmx0NjRFd25qMXdBTmN6TVBmcHdKdXhGWnRCSDVMdjVJZlJkTlRTMjZSZXZwdGNYM28xbE9uTA?oc=5",
    "guid": "CBMigAFBVV95cUxQRDJDNW1ONklDTlhJN3lsWlIwdTEzV050d284bnZ4YWo2TnQ3MU1XcUZkdHNZTTMxSTZ4NjkwRnh0UFloa0ZsZ0d5Qmx0NjRFd25qMXdBTmN6TVBmcHdKdXhGWnRCSDVMdjVJZlJkTlRTMjZSZXZwdGNYM28xbE9uTA",
    "source": "substack.com",
    "sourceUrl": "https://substack.com",
    "publishedAt": "2024-06-09T07:00:00.000Z"
  },
  {
    "title": "Beyond the Buzz: Making AI Work for Large-Scale Web Data Collection",
    "link": "https://news.google.com/rss/articles/CBMisgFBVV95cUxPVXVJeGNPTWI0bXVmOWdSc1B5MVpDRWVnX1R3QV8wdzRmb2VNU1hneU9wNEZrMGdOT2Fqc1Rremg1R0lmM1NBdjZJa3llOXc2bDVzN3RwNVppZnJ3Q1FTS1NsRUVxOTlwWl9QNlJYMUpPYUxKeFVRSWpCYXNaOVU2aFZ0RWNzd200cmRRQlJoUE8tcnU2bXNIQkZNOXUxRDBzTXAxSEMtMG5lLTRsdlVWZFRB?oc=5",
    "guid": "CBMisgFBVV95cUxPVXVJeGNPTWI0bXVmOWdSc1B5MVpDRWVnX1R3QV8wdzRmb2VNU1hneU9wNEZrMGdOT2Fqc1Rremg1R0lmM1NBdjZJa3llOXc2bDVzN3RwNVppZnJ3Q1FTS1NsRUVxOTlwWl9QNlJYMUpPYUxKeFVRSWpCYXNaOVU2aFZ0RWNzd200cmRRQlJoUE8tcnU2bXNIQkZNOXUxRDBzTXAxSEMtMG5lLTRsdlVWZFRB",
    "source": "GeekWire",
    "sourceUrl": "https://www.geekwire.com",
    "publishedAt": "2024-11-26T08:00:00.000Z"
  }
]
```

# Changelog

This Actor's version history is a separate document: https://apify.com/lhotanova/google-news-scraper/changelog.md

# Actor input Schema

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

Enter search query as you would write it to Google News search bar. You can also use advanced search operators in your queries, such as 'intitle', 'site', exclude operator '-', exact match with double-quotes, 'AND', 'OR' and more. Example queries with advanced operators: 'site:forbes.com intitle:samsung', '"samsung galaxy s25" -ultra'. 'inurl' doesn't work on Google News, use 'site' instead. You may already know some of the operators from Google search or Apify's [Google Search Scraper](https://apify.com/apify/google-search-scraper). For more information, see [Google Guide on Search Operators](https://www.googleguide.com/advanced_operators_reference.html). Keep your query short. Google only reads about the first 32 words, and operators like 'OR' and words in quotes count too. Put filters like 'site:' at the start so they aren't cut off.

## `topics` (type: `array`):

Select topics you want to search for using 'https://news.google.com/topics/' search. Note that your search query will not be combined with the selected topics but will be used as a standalone search. If you want to search for news only in the selected topics, leave the 'Search query' field empty. Date filters are applied after the topic news are downloaded, because Google News can't filter topics by date. A topic only lists its latest news, so you may get fewer results, or none for an older date range.

## `topicsHashed` (type: `array`):

Specify topics you want to search for using hashed topic URLs. This field is useful when you want to search for topics that are not available in the 'Topics' field. You can find hashed topic URLs in the URL of the topic page on 'https://news.google.com/topics/{TOPIC_HASH}'. The Actor also supports hashed sections URLs in the format 'https://news.google.com/topics/{TOPIC_HASH}/sections/{SECTION_HASH}'. For example, if you'd like to scrape the news from 'Technology' topic, section 'Artificial intelligence', you can use the following value (extracted from the section's URL): 'CAAqJggKIiBDQkFTRWdvSUwyMHZNRGRqTVhZU0FtVnVHZ0pWVXlnQVAB/sections/CAQiQ0NCQVNMQW9JTDIwdk1EZGpNWFlTQW1WdUdnSlZVeUlOQ0FRYUNRb0hMMjB2TUcxcmVpb0pFZ2N2YlM4d2JXdDZLQUEqKggAKiYICiIgQ0JBU0Vnb0lMMjB2TURkak1YWVNBbVZ1R2dKVlV5Z0FQAVAB'. Note that your search query will not be combined with the topics but will be used as a standalone search. If you want to search for news only in the specified topics, leave the 'Search query' field empty. Date filters are applied after the topic news are downloaded, because Google News can't filter topics by date. A topic only lists its latest news, so you may get fewer results, or none for an older date range.

## `language` (type: `string`):

Select your language and region pair.

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

Set the maximum number of items you want to scrape. If you leave this field unset, the actor will extract all news available for your search criteria. With 90 or fewer, the scraper loads one search page of up to 100 news. With more, it also searches news day by day, newest first. With `Date from` set, it searches every day of your date range, or its last 1,000 days for a longer range. The run also stops early if it reaches the maximum cost per run set in the run options.

## `fetchArticleDetails` (type: `boolean`):

Resolve each Google News link to the article's URL on the publisher's site. Each result with a resolved URL is charged this add-on on top of the base price (see <a href="https://apify.com/lhotanova/google-news-scraper/pricing" target="_blank">Pricing</a>), and the run takes longer. Uncheck it if Google News links are enough, and the run will be faster and cheaper. Without it, the run also starts with 1 GB of memory instead of 4 GB, which cuts the start fee to a quarter.

## `fetchArticlePage` (type: `boolean`):

Load each article page on the publisher's site to get its image. Each result whose page loads is charged this add-on on top of the base price (see <a href="https://apify.com/lhotanova/google-news-scraper/pricing" target="_blank">Pricing</a>). It needs Resolved article URL and is skipped without it. Uncheck it if the resolved article URLs are enough, and the run will be faster and cheaper. Without article pages, the run also starts with 2 GB of memory instead of 4 GB, which halves the start fee.

## `dateFrom` (type: `string`):

Set the starting date. Only the news published on this or newer date will be scraped. If `Open-ended date range` field is set, `Date from` and `Date to` fields will be ignored.

## `dateTo` (type: `string`):

Set the finish date. Only the news published on this date or before will be scraped. If `Open-ended date range` field is set, `Date from` and `Date to` fields will be ignored.

## `openEndedDateRange` (type: `string`):

Set the open-ended date range such as '1h' to scrape news published in the last hour, '2d' for the last two days, or '1y' for the last year. Use a whole number followed by 'h', 'd' or 'y' to specify the time range. If you set this field, the `Date from` and `Date to` fields will be ignored.

## Actor input object example

```json
{
  "query": "anthropic OR openai",
  "topics": [],
  "topicsHashed": [],
  "language": "US:en",
  "maxItems": 50,
  "fetchArticleDetails": true,
  "fetchArticlePage": true,
  "openEndedDateRange": "7d"
}
```

# Actor output Schema

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

News articles found for the query or topics, one item per article.

# 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": "anthropic OR openai",
    "language": "US:en",
    "maxItems": 50,
    "fetchArticlePage": true,
    "openEndedDateRange": "7d"
};

// Run the Actor and wait for it to finish
const run = await client.actor("lhotanova/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": "anthropic OR openai",
    "language": "US:en",
    "maxItems": 50,
    "fetchArticlePage": True,
    "openEndedDateRange": "7d",
}

# Run the Actor and wait for it to finish
run = client.actor("lhotanova/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": "anthropic OR openai",
  "language": "US:en",
  "maxItems": 50,
  "fetchArticlePage": true,
  "openEndedDateRange": "7d"
}' |
apify call lhotanova/google-news-scraper --silent --output-dataset

```

## MCP server setup

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