Google Trending Searches
Try for free
No credit card required
View all Actors
Google Trending Searches
hooli/google-trending-searches
Try for free
No credit card required
Scrape Trending Searches on Google Trends and extract data on daily search trends and related queries. Set country, time frame, and max number of results. No limits or quotas.
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 more
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 "geo": "US",
11 "outputMode": "complete",
12 "fromDate": "today",
13 "toDate": "3 days",
14 "maxItems": 100,
15 "proxy": {
16 "useApifyProxy": true
17 },
18 "extendOutputFunction": async ({ data, item, request, customData, fromDate, toDate, Apify }) => {
19 return item;
20 },
21 "extendScraperFunction": async ({ data, item, request, addUrl, customData, fromDate, toDate, extendOutputFunction, Apify }) => {
22
23 },
24 "customData": {}
25};
26
27(async () => {
28 // Run the Actor and wait for it to finish
29 const run = await client.actor("hooli/google-trending-searches").call(input);
30
31 // Fetch and print Actor results from the run's dataset (if any)
32 console.log('Results from dataset');
33 console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
34 const { items } = await client.dataset(run.defaultDatasetId).listItems();
35 items.forEach((item) => {
36 console.dir(item);
37 });
38})();
39
40// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs