Google News Scraper avatar
Google News Scraper
Try for free

3 days trial then $20.00/month - No credit card required now

View all Actors
Google News Scraper

Google News Scraper

epctex/google-news-scraper
Try for free

3 days trial then $20.00/month - No credit card required now

Unlock timely news insights with our Google News data retrieval tool. Get the latest news on any news at any time, and more. Effortless and powerful. 馃摪馃攳 #NewsData

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn mode

Node.js

Python

curl

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5    token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10    "startUrls": [
11        "https://news.google.com/topics/CAAqIggKIhxDQkFTRHdvSkwyMHZNR054ZERrd0VnSmxiaWdBUAE?hl=en-US&gl=US&ceid=US%3Aen",
12        "https://news.google.com/topics/CAAqJggKIiBDQkFTRWdvSUwyMHZNRGx6TVdZU0FtVnVHZ0pWVXlnQVAB?hl=en-US&gl=US&ceid=US%3Aen",
13        "https://news.google.com/search?q=banana&hl=en-US&gl=US&ceid=US%3Aen"
14    ],
15    "query": [
16        "art"
17    ],
18    "maxItems": 20,
19    "maxNewsPerEachItem": 20,
20    "extendOutputFunction": ($) => { return {} },
21    "customMapFunction": (object) => { return {...object} },
22    "proxy": {
23        "useApifyProxy": true
24    }
25};
26
27(async () => {
28    // Run the Actor and wait for it to finish
29    const run = await client.actor("epctex/google-news-scraper").call(input);
30
31    // Fetch and print Actor results from the run's dataset (if any)
32    console.log('Results from dataset');
33    const { items } = await client.dataset(run.defaultDatasetId).listItems();
34    items.forEach((item) => {
35        console.dir(item);
36    });
37})();
Developer
Maintained by Community
Actor metrics
  • 24 monthly users
  • 100.0% runs succeeded
  • 0.2 days response time
  • Created in Sep 2023
  • Modified about 19 hours ago