# Google News Scraper & API · News Search & Headlines (`instagram-data-api/google-news-scraper`) Actor

Google News scraper & news API, no API key: 1,994 articles from 20 searches in 22 s. News search by keyword with Google's operators, topic, place or publisher; 83 editions; last N hours or dates, past the 100 cap. Headline, publisher, time, related coverage; ticks add the real link, article text.

- **URL**: https://apify.com/instagram-data-api/google-news-scraper.md
- **Developed by:** [Instagram Data API](https://apify.com/instagram-data-api) (community)
- **Categories:** News, AI, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 articles

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 & news API — search, topics, dates, publisher's real link

**Keyword, topic, place or publisher in → Google News articles out: headline, publisher, publish time, related coverage. No API key, no login. $3.10 per 1,000 articles on Starter; 1,994 articles from 20 searches in 22 s on Apify (17 Nov 2026).**

![Google News Scraper output: publish time, headline, publisher, the publisher's real link, author, word count and image for each article](https://media.fypspy.com/instagram-data-api/google-news-scraper/rows-v1.png)

**Real row, 17 Nov 2026:** «climate change» → The Hindu, 19:37 UTC, `thehindu.com/news/national/…`, by Yohaan Varghese, 593 words.

- 🔎 **Google's operators** — `"phrase"`, `OR`, `-word`, `intitle:`, `site:`; topics, places, publishers, links.
- 📅 **83 editions, any dates or last N hours** — past the ~100 cap: 1,578 articles of one keyword's month in 11 s.
- 🔗 **Publisher's real link** (+$1.00 / 1,000) — 1,629 of 1,629 given in our runs.
- 📰 **Article details** (+$1.00 / 1,000 pages) — description, image, author, text.
- 🔔 **Only new since the last run** — a scheduled news alert feed.
- 🔓 **Never charged:** repeats in a run, empty searches, unreadable input, refused pages, links Google does not give.

**Try it:** press **Start** — the prefilled «artificial intelligence» returns 50 articles and a summary row in about 4 s.

🆕 New in November 2026. Tried it? Tell us in a review.

### What data does the Google News scraper return?

One row per article, every search closed by a free summary row (how many Google showed, how many you got, why it stopped). Unknown is `null`, never a guess, and each `null` of a row is named in its `notCollected` list with the reason.

| Group | Fields |
|---|---|
| Article | `title`, `source`, `sourceUrl`, `sourceDomain`, `publishedAt`, `publishedTimestamp`, `googleNewsUrl`, `guid`, `link` |
| Story | `relatedArticles` (title, publisher, link of the other coverage Google groups with it), `relatedCount` |
| Search | `query`, `queryType`, `position`, `edition`, `country`, `language`, `isNew` |
| With «Publisher's real link» | `url`, `ampUrl` (`link` then holds the publisher's address) |
| With «Article details» | `articleTitle`, `description`, `image`, `author`, `authors`, `publisherPublishedAt`, `modifiedAt`, `section`, `keywords`, `siteName`, `pageLanguage`, `canonicalUrl`, `isAccessibleForFree`, `text`, `textLength`, `wordCount` |

### How much does the Google News scraper cost?

Pay per result:

| Event | Free | Starter | Scale | Business+ |
|---|---|---|---|---|
| Start of a run | $0.005 | $0.005 | $0.005 | $0.005 |
| Article, per 1,000 | $3.15 | $3.10 | $2.80 | $1.50 |
| Publisher's real link, per 1,000 | $1.00 | $1.00 | $0.80 | $0.65 |
| Article details, per 1,000 | $1.00 | $1.00 | $0.80 | $0.65 |

- 100 articles on Starter: **$0.315** (with the start of the run).
- 1,000 articles with the publisher's real link: **$4.10**.
- 1,000 articles with links and article details: at most **$5.10** — details are charged only for pages that gave them (82–84% in our runs).

A run never goes over the «Maximum cost per run» you set: the money for a search is set aside before its links and pages are read, the run stops when it is used, and the status and each unfinished search's summary row say so. Checked on Apify (17 Nov 2026): a $0.03 limit with links and details on stopped at $0.024.

### How many articles can I get for one keyword?

Google News answers about 100 articles per search. Ask for more and the Actor reads the period window by window — rolling hour windows for the last two days, then one window per day, newest first — and merges them without repeats. How deep it goes is Google's: for «artificial intelligence» on 17 Nov 2026 it held 57–139 articles on each of the last 9 days and 5–57 on each older day, so a month gave 1,578 articles (46 requests, 11 s). A topic, a place or a link is one feed of 30–70 articles with no archive.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `queries` | array | — | **Search keywords.** One search per line, written as in Google News. Google's operators work: "exact phrase", OR, -word, intitle:word, site:reuters.com. Each search returns up to «Maximum articles per search». |
| `topics` | array | — | **Topics.** Google News sections of the chosen edition. A topic feed holds 30–70 articles and has no dates. |
| `locations` | array | — | **Places (local news).** City, region or country names — Google News' local feed of each place, e.g. New York, Bavaria, Tokyo. |
| `publishers` | array | — | **Publishers (websites).** Domains like reuters.com, one per line. With keywords: each keyword is searched on each website (site:). Without keywords: the newest articles of each website. |
| `topicUrls` | array | — | **Google News links.** Any topic, section, location or search link copied from news.google.com. |
| `edition` | string | "US:en" | **Country and language (edition).** Google News has its own results for each country and language. Through the API you can also send `country` + `language`. |
| `maxItemsPerQuery` | integer | 100 | **Maximum articles per search.** Google News shows about 100 articles per search. Ask for more and the Actor reads the period day by day (about 100 a day), newest first, until it has them. |
| `period` | string | — | **Published in the last….** For example: 1 hour, 12 hours, 3 days, 2 weeks, 1 month, 1 year. Empty = any time. Works for keyword searches. |
| `dateFrom` | string | — | **Published from (date).** First day, YYYY-MM-DD. Used instead of «Published in the last…». Google counts days in US Pacific time. |
| `dateTo` | string | — | **Published to (date).** Last day, YYYY-MM-DD, included. Empty = until today. |
| `sort` | string | "relevance" | **Order.** Google News has no «sort by date» of its own: «Newest first» reads the most recent days first and orders the articles by publish time. |
| `resolvePublisherUrls` | boolean | false | **Publisher's real link (+$1.00 per 1,000 links on Starter).** Google News gives its own redirect link. Tick to get the article's real address on the publisher's site in `url` (and the AMP address when Google has one). Charged per link delivered. |
| `includeArticleDetails` | boolean | false | **Article details: description, image, author, text (+$1.00 per 1,000 pages on Starter).** Opens each article on the publisher's site and adds its description, image, author, publish and update time, section, keywords and the article text. Needs the publisher's link, so that add-on is switched on and charged too. A page that refuses a plain request is not charged. |
| `onlyNew` | boolean | false | **Only new since the last run.** The Actor remembers the articles it delivered (in the named key-value store «google-news-scraper-state») and the next run with the same monitor name delivers and charges only articles it has not delivered before. Schedule it to get a news alert feed. |
| `stateKey` | string | — | **Monitor name.** Runs with the same name share one memory. Empty = a name made from the searches and the edition, so the same input continues its own monitor. |
| `maxItems` | integer | — | **Maximum articles in total.** Stop the whole run after this many articles. Empty = no total limit. |
| `deduplicate` | boolean | true | **One row per article in a run.** An article found by several searches is delivered and charged once (for the first search in your list). Untick to get it under every search. |
| `maxConcurrency` | integer | 10 | **Requests at once.** How many requests run in parallel. |
| `proxyConfiguration` | object | {"useApifyProxy": true} | **Proxy.** Apify Proxy (datacenter) is enough and is the default. If it stops answering, feeds move to another route by themselves. |

Through the API the Actor also takes the field names of other Google News Actors — `keywords`, `query`, `searchTerms`, `startInputs`, `maxArticles`, `maxItems`, `timeframe`, `openEndedDateRange`, `region_language`, `country` + `language`, `publishedAfter` / `publishedBefore`, `dateFrom` / `dateTo`, `since` / `until`, `decodeUrls`, `resolveUrls`, `fetchArticlePage`, `extractFullText`, `enrichBody`, `sources`, `siteFilter`, `excludeTerms`, `sortBy`, `monitorMode` / `monitorKey` — so an existing integration can be pointed here as it is.

```json
{
  "queries": ["\"interest rates\" OR \"rate cut\"", "nvidia -stock"],
  "publishers": ["reuters.com", "apnews.com"],
  "topics": ["BUSINESS"],
  "edition": "GB:en",
  "period": "3 days",
  "sort": "newest",
  "maxItemsPerQuery": 300,
  "resolvePublisherUrls": true
}
```

### Output example

A real row of a run on 17 Nov 2026 (the article text is cut here; the dataset holds all of it):

```json
{
  "rowType": "article",
  "query": "climate change",
  "queryType": "search",
  "position": 108,
  "title": "Earthshot Prize: Climate action needs innovation, global cooperation, say leaders on green carpet in Mumbai",
  "source": "The Hindu",
  "sourceUrl": "https://www.thehindu.com",
  "sourceDomain": "thehindu.com",
  "publishedAt": "2026-11-17T19:37:56.000Z",
  "publishedTimestamp": 1794944276000,
  "url": "https://www.thehindu.com/news/national/earthshot-prize-climate-action-needs-innovation-global-cooperation-say-leaders-on-green-carpet-in-mumbai/article71713406.ece",
  "link": "https://www.thehindu.com/news/national/earthshot-prize-climate-action-needs-innovation-global-cooperation-say-leaders-on-green-carpet-in-mumbai/article71713406.ece",
  "googleNewsUrl": "https://news.google.com/rss/articles/CBMi9gFBVV95cUxQSmx5bnFpWVpMYXRGUkhQZ2hybXM0Q2lkM194eFZMd2ZPa1VOVG5rOE03VEJXOHJ6ZHdEYktuUXFFZ1F2My1HdlNVbDdYbTJXcUFhaEJUZjZDTEdlbzkzTTBCd0dkWExUUndVUG9HODhXM2tkOHN1T0RCUGJDNzYxOUt6MEtPRUU4R3BQRzAtWE52OHViS29oZFQxTlhfdFM0eVQySE5DaldUdXlmYU5zTmg0dWRjemk3LVBFWVphZmhqVTNzcS1INGxsbE5JR0o5SDk3a3VKemRGTG01T0ZCY3lTZ0V0cFRMN2ZUTlFKcWViX3FqakHSAfwBQVVfeXFMUHdLcGs2WGxmWmxIUDhEOTdiYWN1a1ZMbXRGSE5XWS1aNVhRSUFxa3hlTHBvWGR1OFJwQTE0ZjJBR2dwM2VUWlVsMU5HOHRtWDItTkdGdjJlN0JFMTN6Zmxjd1V2SXE3MW5LVzdxUFVaVWdKYmt4RGduRjlqNzJyV0VhcWR1T1NuRzhBNlJGYWlwLUs4cGlqTFJQd0lNdTZ6LVluRndtQTl0bllWZmktdE4tRzdTOGhXbU92YWVpSnBMa3VUaWYyRHFmYl8yVlR4R0d0QXVEXzdzUXV4Yjc0Q1RQWFFrbkNtU3RfLVBRa09CWkk2WnB4ZGZmc2ZJ?oc=5",
  "guid": "CBMi9gFBVV95cUxQSmx5bnFpWVpMYXRGUkhQZ2hybXM0Q2lkM194eFZMd2ZPa1VOVG5rOE03VEJXOHJ6ZHdEYktuUXFFZ1F2My1HdlNVbDdYbTJXcUFhaEJUZjZDTEdlbzkzTTBCd0dkWExUUndVUG9HODhXM2tkOHN1T0RCUGJDNzYxOUt6MEtPRUU4R3BQRzAtWE52OHViS29oZFQxTlhfdFM0eVQySE5DaldUdXlmYU5zTmg0dWRjemk3LVBFWVphZmhqVTNzcS1INGxsbE5JR0o5SDk3a3VKemRGTG01T0ZCY3lTZ0V0cFRMN2ZUTlFKcWViX3FqakHSAfwBQVVfeXFMUHdLcGs2WGxmWmxIUDhEOTdiYWN1a1ZMbXRGSE5XWS1aNVhRSUFxa3hlTHBvWGR1OFJwQTE0ZjJBR2dwM2VUWlVsMU5HOHRtWDItTkdGdjJlN0JFMTN6Zmxjd1V2SXE3MW5LVzdxUFVaVWdKYmt4RGduRjlqNzJyV0VhcWR1T1NuRzhBNlJGYWlwLUs4cGlqTFJQd0lNdTZ6LVluRndtQTl0bllWZmktdE4tRzdTOGhXbU92YWVpSnBMa3VUaWYyRHFmYl8yVlR4R0d0QXVEXzdzUXV4Yjc0Q1RQWFFrbkNtU3RfLVBRa09CWkk2WnB4ZGZmc2ZJ",
  "ampUrl": "https://www.thehindu.com/news/national/earthshot-prize-climate-action-needs-innovation-global-cooperation-say-leaders-on-green-carpet-in-mumbai/article71713406.ece/amp/",
  "relatedArticles": [],
  "relatedCount": 0,
  "edition": "US:en",
  "country": "US",
  "language": "en",
  "isNew": null,
  "articleTitle": "Earthshot Prize: Climate action needs innovation, global cooperation, say leaders on green carpet in Mumbai",
  "description": "Global leaders urge investment in environmental innovation and international cooperation to scale climate solutions at the Earthshot Prize in Mumbai.",
  "image": "https://th-i.thgim.com/public/incoming/kzqg7s/article71713445.ece/alternates/LANDSCAPE_1200/11908_17_11_2026_23_58_39_3_DSC_3345.JPEG",
  "author": "Yohaan Varghese",
  "authors": [
    "Yohaan Varghese"
  ],
  "publisherPublishedAt": "2026-11-18T01:07:56+05:30",
  "modifiedAt": "2026-11-18T01:19:26+05:30",
  "section": "India",
  "keywords": [
    "Earthshot Prize",
    "Mumbai Earthshot Prize ceremony",
    "prince william",
    "Earthshot Prize ceremony"
  ],
  "siteName": "The Hindu",
  "pageLanguage": "en",
  "canonicalUrl": "https://www.thehindu.com/news/national/earthshot-prize-climate-action-needs-innovation-global-cooperation-say-leaders-on-green-carpet-in-mumbai/article71713406.ece",
  "isAccessibleForFree": false,
  "text": "Mumbai Global leaders, business executives, and celebrities called for greater investment in environmental innovations and collective action against climate change as they gathered on the green carpet ahead of the Earthshot Prize Awards in Mumbai on Tuesday (November 17, 2026). Prince William says …",
  "textLength": 4257,
  "wordCount": 593,
  "notCollected": [],
  "charged": [
    "article",
    "publisher-link",
    "article-details"
  ],
  "scrapedAt": "2026-11-17T20:27:53.000Z"
}
```

Export the dataset as JSON, CSV, Excel, XML or HTML, or read it through the API.

### How fast is it?

Measured on Apify, 17 Nov 2026, 512 MB:

| Job | Articles | Run |
|---|---|---|
| The prefill: one keyword | 50 | 4 s |
| 20 keywords × 100 | 1,994 | 22 s |
| One keyword, last month | 1,578 | 11 s |
| One keyword, last week, with publisher's links | 829 | 62 s |
| One keyword, 200 articles with links and details | 200 | 31 s |

Rows appear in the dataset while the run goes.

### FAQ

**Do I need a Google account, an API key or a proxy?** No. Nothing to log in to; the Actor uses Apify Proxy, which every Apify plan has.

**Why is `url` empty in my rows?** Google News gives its own redirect link (`googleNewsUrl`, also in `link`). Tick «Publisher's real link» to get the article's address on the publisher's site; it is charged only for links Google gives.

**How much of «Article details» do I get?** In our runs 82–84% of articles got details and 77–78% got text. Some publishers refuse a plain request (HTTP 401 / 403) or need JavaScript — those rows say why in `notCollected` and are not charged. A paywalled article gives its opening; `isAccessibleForFree` is `false` when the publisher marks it.

**How does «Only new since the last run» work?** The Actor remembers the articles it delivered under the monitor's name (in your key-value store `google-news-scraper-state`) and the next run with that name delivers and charges only the others. Use the same name across scheduled runs; sort «Newest first» to get the freshest.

**Can I sort by date?** Google News has no date sort of its own. «Newest first» reads the most recent windows first and orders the rows by publish time; «Oldest first» walks a date range from its first day.

**Am I charged for duplicates?** No. An article found by several searches of a run is delivered and charged once, for the first search in your list (untick «One row per article in a run» to get it under each search).

**Which countries and languages?** The 83 editions Google News offers (all 83 checked on 17 Nov 2026). Local news of a place lives in its own country's edition: Berlin gave 70 articles in Germany (Deutsch) and none in the United States (English).

**Coming from another Google News Actor?** Send its input as it is — see the field names under Input.

**Can I try it for free?** Yes: Apify's free plan gives $5 of credit a month, about 1,500 articles at the Free-plan price.

### Limits

- About 100 articles per search and per window; older days hold fewer (see «How many articles…»). A date range is read for at most 1,000 days, «any time» for the last year.
- Google takes whole days in date searches, counted in US Pacific time.
- Topics, places and links are one feed each (30–70 articles), with no archive: a period only filters what they hold now.
- Article details come from what a publisher's page gives a plain request; no browser is used.

### Related scrapers

Prices on the Starter plan.

**Ads intelligence**

- [Meta Ads Library Scraper](https://apify.com/instagram-data-api/meta-ads-library-scraper) — the ads Meta's Ad Library shows for a keyword, page or link: text, media, dates, platforms, advertiser; EU reach, targeting and payer with one tick; 2,000 ads of 20 keywords in 58 s on Apify. From $0.75 / 1,000 ads.
- [Google Ads Transparency Center Scraper](https://apify.com/instagram-data-api/google-ads-transparency-scraper) — a website's or advertiser's Google ads with format, first and last shown, days shown and a preview; 2,000 ads in 24 s on Apify. From $1.65 / 1,000 ads.
- [LinkedIn Ad Library Scraper](https://apify.com/instagram-data-api/linkedin-ad-library-scraper) — a company's LinkedIn ads with format, headline, text, images and video; payer, run dates, EU impressions and targeting with one tick; 2,000 ads of 20 keywords in 19–28 s on Apify. From $2.40 / 1,000 ads.

**Video and social**

- [Threads Scraper](https://apify.com/instagram-data-api/threads-scraper) — Threads posts with view counts, the replies under a post, profiles and keyword or #hashtag search, no login; 300 replies of one post in 16 s. From $1.95 / 1,000 posts.
- [Instagram Reels Search Scraper](https://apify.com/instagram-data-api/instagram-reels-search-scraper) — reels by keyword from Instagram's public search with views, likes, comments, music and video link, no login; 84 reels for «skincare routine» in one search. From $1.25 / 1,000 reels.

# Changelog

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

# Actor input Schema

## `queries` (type: `array`):

One search per line, written as in Google News. Google's operators work: "exact phrase", OR, -word, intitle:word, site:reuters.com. Each search returns up to «Maximum articles per search».

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

Google News sections of the chosen edition. A topic feed holds 30–70 articles and has no dates.

## `locations` (type: `array`):

City, region or country names — Google News' local feed of each place, e.g. New York, Bavaria, Tokyo.

## `publishers` (type: `array`):

Domains like reuters.com, one per line. With keywords: each keyword is searched on each website (site:). Without keywords: the newest articles of each website.

## `topicUrls` (type: `array`):

Any topic, section, location or search link copied from news.google.com.

## `edition` (type: `string`):

Google News has its own results for each country and language. Through the API you can also send `country` + `language`.

## `maxItemsPerQuery` (type: `integer`):

Google News shows about 100 articles per search. Ask for more and the Actor reads the period day by day (about 100 a day), newest first, until it has them.

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

For example: 1 hour, 12 hours, 3 days, 2 weeks, 1 month, 1 year. Empty = any time. Works for keyword searches.

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

First day, YYYY-MM-DD. Used instead of «Published in the last…». Google counts days in US Pacific time.

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

Last day, YYYY-MM-DD, included. Empty = until today.

## `sort` (type: `string`):

Google News has no «sort by date» of its own: «Newest first» reads the most recent days first and orders the articles by publish time.

## `resolvePublisherUrls` (type: `boolean`):

Google News gives its own redirect link. Tick to get the article's real address on the publisher's site in `url` (and the AMP address when Google has one). Charged per link delivered.

## `includeArticleDetails` (type: `boolean`):

Opens each article on the publisher's site and adds its description, image, author, publish and update time, section, keywords and the article text. Needs the publisher's link, so that add-on is switched on and charged too. A page that refuses a plain request is not charged.

## `onlyNew` (type: `boolean`):

The Actor remembers the articles it delivered (in the named key-value store «google-news-scraper-state») and the next run with the same monitor name delivers and charges only articles it has not delivered before. Schedule it to get a news alert feed.

## `stateKey` (type: `string`):

Runs with the same name share one memory. Empty = a name made from the searches and the edition, so the same input continues its own monitor.

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

Stop the whole run after this many articles. Empty = no total limit.

## `deduplicate` (type: `boolean`):

An article found by several searches is delivered and charged once (for the first search in your list). Untick to get it under every search.

## `maxConcurrency` (type: `integer`):

How many requests run in parallel.

## `proxyConfiguration` (type: `object`):

Apify Proxy (datacenter) is enough and is the default. If it stops answering, feeds move to another route by themselves.

## Actor input object example

```json
{
  "queries": [
    "artificial intelligence"
  ],
  "edition": "US:en",
  "maxItemsPerQuery": 50,
  "sort": "relevance",
  "resolvePublisherUrls": false,
  "includeArticleDetails": false,
  "onlyNew": false,
  "deduplicate": true,
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All rows of this run (JSON, CSV, Excel).

# 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 = {
    "queries": [
        "artificial intelligence"
    ],
    "maxItemsPerQuery": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("instagram-data-api/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 = {
    "queries": ["artificial intelligence"],
    "maxItemsPerQuery": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("instagram-data-api/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 '{
  "queries": [
    "artificial intelligence"
  ],
  "maxItemsPerQuery": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call instagram-data-api/google-news-scraper --silent --output-dataset

```

## MCP server setup

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