Google Trends Scraper avatar

Google Trends Scraper

Try for free

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

Go to Store
Google Trends Scraper

Google Trends Scraper

emastra/google-trends-scraper
Try for free

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

Scrape data from Google Trends by search terms or URLs. Specify locations, define time ranges, select categories to get interest by subregion and over time, related queries and topics, and more. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.

You can access the Google Trends Scraper programmatically from your own applications by using the Apify API. You can choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1{
2  "openapi": "3.0.1",
3  "info": {
4    "version": "0.0",
5    "x-build-id": "BSSK53TaTlD39v6q9"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/emastra~google-trends-scraper/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-emastra-google-trends-scraper",
16        "x-openai-isConsequential": false,
17        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18        "tags": [
19          "Run Actor"
20        ],
21        "requestBody": {
22          "required": true,
23          "content": {
24            "application/json": {
25              "schema": {
26                "$ref": "#/components/schemas/inputSchema"
27              }
28            }
29          }
30        },
31        "parameters": [
32          {
33            "name": "token",
34            "in": "query",
35            "required": true,
36            "schema": {
37              "type": "string"
38            },
39            "description": "Enter your Apify token here"
40          }
41        ],
42        "responses": {
43          "200": {
44            "description": "OK"
45          }
46        }
47      }
48    },
49    "/acts/emastra~google-trends-scraper/runs": {
50      "post": {
51        "operationId": "runs-sync-emastra-google-trends-scraper",
52        "x-openai-isConsequential": false,
53        "summary": "Executes an Actor and returns information about the initiated run in response.",
54        "tags": [
55          "Run Actor"
56        ],
57        "requestBody": {
58          "required": true,
59          "content": {
60            "application/json": {
61              "schema": {
62                "$ref": "#/components/schemas/inputSchema"
63              }
64            }
65          }
66        },
67        "parameters": [
68          {
69            "name": "token",
70            "in": "query",
71            "required": true,
72            "schema": {
73              "type": "string"
74            },
75            "description": "Enter your Apify token here"
76          }
77        ],
78        "responses": {
79          "200": {
80            "description": "OK",
81            "content": {
82              "application/json": {
83                "schema": {
84                  "$ref": "#/components/schemas/runsResponseSchema"
85                }
86              }
87            }
88          }
89        }
90      }
91    },
92    "/acts/emastra~google-trends-scraper/run-sync": {
93      "post": {
94        "operationId": "run-sync-emastra-google-trends-scraper",
95        "x-openai-isConsequential": false,
96        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97        "tags": [
98          "Run Actor"
99        ],
100        "requestBody": {
101          "required": true,
102          "content": {
103            "application/json": {
104              "schema": {
105                "$ref": "#/components/schemas/inputSchema"
106              }
107            }
108          }
109        },
110        "parameters": [
111          {
112            "name": "token",
113            "in": "query",
114            "required": true,
115            "schema": {
116              "type": "string"
117            },
118            "description": "Enter your Apify token here"
119          }
120        ],
121        "responses": {
122          "200": {
123            "description": "OK"
124          }
125        }
126      }
127    }
128  },
129  "components": {
130    "schemas": {
131      "inputSchema": {
132        "type": "object",
133        "properties": {
134          "searchTerms": {
135            "title": "Search terms",
136            "type": "array",
137            "description": "(Required if 'spreadsheetId' is not provided) List of search terms to be scraped.",
138            "items": {
139              "type": "string"
140            }
141          },
142          "isMultiple": {
143            "title": "Multiple terms",
144            "type": "boolean",
145            "description": "If checked comma will be handled as search for multiple terms",
146            "default": false
147          },
148          "timeRange": {
149            "title": "Time range",
150            "enum": [
151              "",
152              "now 1-H",
153              "now 4-H",
154              "now 1-d",
155              "now 7-d",
156              "today 1-m",
157              "today 3-m",
158              "today 5-y",
159              "all"
160            ],
161            "type": "string",
162            "description": "Choose a predefined search's time range (defaults to 'Past 12 months')",
163            "default": ""
164          },
165          "geo": {
166            "title": "Geo area",
167            "enum": [
168              "",
169              "AF",
170              "AL",
171              "DZ",
172              "AS",
173              "AD",
174              "AO",
175              "AI",
176              "AQ",
177              "AG",
178              "AR",
179              "AM",
180              "AW",
181              "AU",
182              "AT",
183              "AZ",
184              "BS",
185              "BH",
186              "BD",
187              "BB",
188              "BY",
189              "BE",
190              "BZ",
191              "BJ",
192              "BM",
193              "BT",
194              "BO",
195              "BQ",
196              "BA",
197              "BW",
198              "BV",
199              "BR",
200              "IO",
201              "BN",
202              "BG",
203              "BF",
204              "BI",
205              "CV",
206              "KH",
207              "CM",
208              "CA",
209              "KY",
210              "CF",
211              "TD",
212              "CL",
213              "CN",
214              "CX",
215              "Keeling Islands ",
216              "CO",
217              "KM",
218              "CG",
219              "CD",
220              "CK",
221              "CR",
222              "CI",
223              "HR",
224              "CU",
225              "CW",
226              "CY",
227              "CZ",
228              "DK",
229              "DJ",
230              "DM",
231              "DO",
232              "EC",
233              "EG",
234              "SV",
235              "GQ",
236              "ER",
237              "EE",
238              "ET",
239              "Malvinas ",
240              "FO",
241              "FJ",
242              "FI",
243              "FR",
244              "GF",
245              "PF",
246              "TF",
247              "GA",
248              "GM",
249              "GE",
250              "DE",
251              "GH",
252              "GI",
253              "GR",
254              "GL",
255              "GD",
256              "GP",
257              "GU",
258              "GT",
259              "GG",
260              "GN",
261              "GW",
262              "GY",
263              "HT",
264              "HM",
265              "Vatican City State ",
266              "HN",
267              "HK",
268              "HU",
269              "IS",
270              "IN",
271              "ID",
272              "IR",
273              "IQ",
274              "IE",
275              "IM",
276              "IL",
277              "IT",
278              "JM",
279              "JP",
280              "JE",
281              "JO",
282              "KZ",
283              "KE",
284              "KI",
285              "the Democratic People's Republic of ",
286              "the Republic of ",
287              "KW",
288              "KG",
289              "LA",
290              "LV",
291              "LB",
292              "LS",
293              "LR",
294              "LY",
295              "LI",
296              "LT",
297              "LU",
298              "MO",
299              "MK",
300              "MG",
301              "MW",
302              "MY",
303              "MV",
304              "ML",
305              "MT",
306              "MH",
307              "MQ",
308              "MR",
309              "MU",
310              "YT",
311              "MX",
312              "FM",
313              "MD",
314              "MC",
315              "MN",
316              "ME",
317              "MS",
318              "MA",
319              "MZ",
320              "MM",
321              "NA",
322              "NR",
323              "NP",
324              "NL",
325              "NC",
326              "NZ",
327              "NI",
328              "NE",
329              "NG",
330              "NU",
331              "NF",
332              "MP",
333              "NO",
334              "OM",
335              "PK",
336              "PW",
337              "PS",
338              "PA",
339              "PG",
340              "PY",
341              "PE",
342              "PH",
343              "PN",
344              "PL",
345              "PT",
346              "PR",
347              "QA",
348              "RE",
349              "RO",
350              "RU",
351              "RW",
352              "BL",
353              "SH",
354              "KN",
355              "LC",
356              "French part ",
357              "PM",
358              "VC",
359              "WS",
360              "SM",
361              "ST",
362              "SA",
363              "SN",
364              "RS",
365              "SC",
366              "SL",
367              "SG",
368              "Dutch part ",
369              "SK",
370              "SI",
371              "SB",
372              "SO",
373              "ZA",
374              "GS",
375              "SS",
376              "ES",
377              "LK",
378              "SD",
379              "SR",
380              "SJ",
381              "SZ",
382              "SE",
383              "CH",
384              "SY",
385              "TW",
386              "TJ",
387              "TZ",
388              "TH",
389              "TL",
390              "TG",
391              "TK",
392              "TO",
393              "TT",
394              "TN",
395              "TR",
396              "TM",
397              "TC",
398              "TV",
399              "UG",
400              "UA",
401              "AE",
402              "GB",
403              "US",
404              "UM",
405              "UY",
406              "UZ",
407              "VU",
408              "VE",
409              "VN",
410              "VG",
411              "VI",
412              "WF",
413              "EH",
414              "YE",
415              "ZM",
416              "ZW"
417            ],
418            "type": "string",
419            "description": "Get results from a specific geo area (defaults to 'Worldwide')",
420            "default": ""
421          },
422          "viewedFrom": {
423            "title": "Country to view Trends from",
424            "enum": [
425              "",
426              "us",
427              "af",
428              "al",
429              "dz",
430              "as",
431              "ad",
432              "ao",
433              "ai",
434              "aq",
435              "ag",
436              "ar",
437              "am",
438              "aw",
439              "au",
440              "at",
441              "az",
442              "bs",
443              "bh",
444              "bd",
445              "bb",
446              "by",
447              "be",
448              "bz",
449              "bj",
450              "bm",
451              "bt",
452              "bo",
453              "ba",
454              "bw",
455              "bv",
456              "br",
457              "io",
458              "bn",
459              "bg",
460              "bf",
461              "bi",
462              "kh",
463              "cm",
464              "ca",
465              "cv",
466              "ky",
467              "cf",
468              "td",
469              "cl",
470              "cn",
471              "cx",
472              "cc",
473              "co",
474              "km",
475              "cg",
476              "cd",
477              "ck",
478              "cr",
479              "ci",
480              "hr",
481              "cu",
482              "cy",
483              "cz",
484              "dk",
485              "dj",
486              "dm",
487              "do",
488              "ec",
489              "eg",
490              "sv",
491              "gq",
492              "er",
493              "ee",
494              "et",
495              "fk",
496              "fo",
497              "fj",
498              "fi",
499              "fr",
500              "gf",
501              "pf",
502              "tf",
503              "ga",
504              "gm",
505              "ge",
506              "de",
507              "gh",
508              "gi",
509              "gr",
510              "gl",
511              "gd",
512              "gp",
513              "gu",
514              "gt",
515              "gn",
516              "gw",
517              "gy",
518              "ht",
519              "hm",
520              "va",
521              "hn",
522              "hk",
523              "hu",
524              "is",
525              "in",
526              "id",
527              "ir",
528              "iq",
529              "ie",
530              "il",
531              "it",
532              "jm",
533              "jp",
534              "jo",
535              "kz",
536              "ke",
537              "ki",
538              "kp",
539              "kr",
540              "kw",
541              "kg",
542              "la",
543              "lv",
544              "lb",
545              "ls",
546              "lr",
547              "ly",
548              "li",
549              "lt",
550              "lu",
551              "mo",
552              "mk",
553              "mg",
554              "mw",
555              "my",
556              "mv",
557              "ml",
558              "mt",
559              "mh",
560              "mq",
561              "mr",
562              "mu",
563              "yt",
564              "mx",
565              "fm",
566              "md",
567              "mc",
568              "mn",
569              "me",
570              "ms",
571              "ma",
572              "mz",
573              "mm",
574              "na",
575              "nr",
576              "np",
577              "nl",
578              "an",
579              "nc",
580              "nz",
581              "ni",
582              "ne",
583              "ng",
584              "nu",
585              "nf",
586              "mp",
587              "no",
588              "om",
589              "pk",
590              "pw",
591              "ps",
592              "pa",
593              "pg",
594              "py",
595              "pe",
596              "ph",
597              "pn",
598              "pl",
599              "pt",
600              "pr",
601              "qa",
602              "re",
603              "ro",
604              "ru",
605              "rw",
606              "sh",
607              "kn",
608              "lc",
609              "pm",
610              "vc",
611              "ws",
612              "sm",
613              "st",
614              "sa",
615              "sn",
616              "rs",
617              "sc",
618              "sl",
619              "sg",
620              "sk",
621              "si",
622              "sb",
623              "so",
624              "za",
625              "gs",
626              "ss",
627              "es",
628              "lk",
629              "sd",
630              "sr",
631              "sj",
632              "sz",
633              "se",
634              "ch",
635              "sy",
636              "tw",
637              "tj",
638              "tz",
639              "th",
640              "tl",
641              "tg",
642              "tk",
643              "to",
644              "tt",
645              "tn",
646              "tr",
647              "tm",
648              "tc",
649              "tv",
650              "ug",
651              "ua",
652              "ae",
653              "gb",
654              "um",
655              "uy",
656              "uz",
657              "vu",
658              "ve",
659              "vn",
660              "vg",
661              "vi",
662              "wf",
663              "eh",
664              "ye",
665              "zm",
666              "zw"
667            ],
668            "type": "string",
669            "description": "Country for residential proxies to ensure correct results"
670          },
671          "skipDebugScreen": {
672            "title": "Do not save snapshot",
673            "type": "boolean",
674            "description": "By default snapshot of each visited Google Trends page saved to KV Store",
675            "default": false
676          },
677          "startUrls": {
678            "title": "Google Trends URLs",
679            "type": "array",
680            "description": "Copy a Google Trends URL and paste it here.",
681            "items": {
682              "type": "object",
683              "required": [
684                "url"
685              ],
686              "properties": {
687                "url": {
688                  "type": "string",
689                  "title": "URL of a web page",
690                  "format": "uri"
691                }
692              }
693            }
694          },
695          "spreadsheetId": {
696            "title": "Google sheet ID (To get input data from Google sheet)",
697            "type": "string",
698            "description": "(Optional) Id of the google sheet from where search terms will be loaded.\n Spreadsheet must have only one column. Row 1 is considered the title of the column so it will not be loaded as a search term. Check the actor documentation for more info."
699          },
700          "isPublic": {
701            "title": "Is the Google sheet public",
702            "type": "boolean",
703            "description": "If checked you can import a public spreadsheet without need for authorization. For importing private sheets, please read about authorization in the actor documentation.",
704            "default": false
705          },
706          "category": {
707            "title": "Category of trends",
708            "enum": [
709              "",
710              "3",
711              "47",
712              "44",
713              "22",
714              "12",
715              "5",
716              "7",
717              "71",
718              "8",
719              "45",
720              "65",
721              "11",
722              "13",
723              "958",
724              "19",
725              "16",
726              "299",
727              "14",
728              "66",
729              "29",
730              "533",
731              "174",
732              "18",
733              "20",
734              "67"
735            ],
736            "type": "string",
737            "description": "Choose a category to filter the search for (defaults to 'All categories')",
738            "default": ""
739          },
740          "maxItems": {
741            "title": "Max items",
742            "minimum": 0,
743            "type": "integer",
744            "description": "Limit of product items to be scraped. Zero value means no limit.",
745            "default": 0
746          },
747          "customTimeRange": {
748            "title": "Custom time range",
749            "type": "string",
750            "description": "Provide custom time range. If present, it takes precedence over regular timeRange. Format is: `YYYY-MM-DD YYYY-MM-DD`. See examples in the documentation."
751          },
752          "maxConcurrency": {
753            "title": "Max concurrency",
754            "minimum": 1,
755            "type": "integer",
756            "description": "How many pages will be opened in parallel if enough CPU is available.",
757            "default": 10
758          },
759          "maxRequestRetries": {
760            "title": "Max request retries",
761            "minimum": 1,
762            "type": "integer",
763            "description": "How many times will the actor retry a request if it fails.",
764            "default": 7
765          },
766          "pageLoadTimeoutSecs": {
767            "title": "Page load timeout",
768            "minimum": 30,
769            "type": "integer",
770            "description": "How long it will wait for page loading before it abandons the loading and tries again.",
771            "default": 180
772          }
773        }
774      },
775      "runsResponseSchema": {
776        "type": "object",
777        "properties": {
778          "data": {
779            "type": "object",
780            "properties": {
781              "id": {
782                "type": "string"
783              },
784              "actId": {
785                "type": "string"
786              },
787              "userId": {
788                "type": "string"
789              },
790              "startedAt": {
791                "type": "string",
792                "format": "date-time",
793                "example": "2025-01-08T00:00:00.000Z"
794              },
795              "finishedAt": {
796                "type": "string",
797                "format": "date-time",
798                "example": "2025-01-08T00:00:00.000Z"
799              },
800              "status": {
801                "type": "string",
802                "example": "READY"
803              },
804              "meta": {
805                "type": "object",
806                "properties": {
807                  "origin": {
808                    "type": "string",
809                    "example": "API"
810                  },
811                  "userAgent": {
812                    "type": "string"
813                  }
814                }
815              },
816              "stats": {
817                "type": "object",
818                "properties": {
819                  "inputBodyLen": {
820                    "type": "integer",
821                    "example": 2000
822                  },
823                  "rebootCount": {
824                    "type": "integer",
825                    "example": 0
826                  },
827                  "restartCount": {
828                    "type": "integer",
829                    "example": 0
830                  },
831                  "resurrectCount": {
832                    "type": "integer",
833                    "example": 0
834                  },
835                  "computeUnits": {
836                    "type": "integer",
837                    "example": 0
838                  }
839                }
840              },
841              "options": {
842                "type": "object",
843                "properties": {
844                  "build": {
845                    "type": "string",
846                    "example": "latest"
847                  },
848                  "timeoutSecs": {
849                    "type": "integer",
850                    "example": 300
851                  },
852                  "memoryMbytes": {
853                    "type": "integer",
854                    "example": 1024
855                  },
856                  "diskMbytes": {
857                    "type": "integer",
858                    "example": 2048
859                  }
860                }
861              },
862              "buildId": {
863                "type": "string"
864              },
865              "defaultKeyValueStoreId": {
866                "type": "string"
867              },
868              "defaultDatasetId": {
869                "type": "string"
870              },
871              "defaultRequestQueueId": {
872                "type": "string"
873              },
874              "buildNumber": {
875                "type": "string",
876                "example": "1.0.0"
877              },
878              "containerUrl": {
879                "type": "string"
880              },
881              "usage": {
882                "type": "object",
883                "properties": {
884                  "ACTOR_COMPUTE_UNITS": {
885                    "type": "integer",
886                    "example": 0
887                  },
888                  "DATASET_READS": {
889                    "type": "integer",
890                    "example": 0
891                  },
892                  "DATASET_WRITES": {
893                    "type": "integer",
894                    "example": 0
895                  },
896                  "KEY_VALUE_STORE_READS": {
897                    "type": "integer",
898                    "example": 0
899                  },
900                  "KEY_VALUE_STORE_WRITES": {
901                    "type": "integer",
902                    "example": 1
903                  },
904                  "KEY_VALUE_STORE_LISTS": {
905                    "type": "integer",
906                    "example": 0
907                  },
908                  "REQUEST_QUEUE_READS": {
909                    "type": "integer",
910                    "example": 0
911                  },
912                  "REQUEST_QUEUE_WRITES": {
913                    "type": "integer",
914                    "example": 0
915                  },
916                  "DATA_TRANSFER_INTERNAL_GBYTES": {
917                    "type": "integer",
918                    "example": 0
919                  },
920                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
921                    "type": "integer",
922                    "example": 0
923                  },
924                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
925                    "type": "integer",
926                    "example": 0
927                  },
928                  "PROXY_SERPS": {
929                    "type": "integer",
930                    "example": 0
931                  }
932                }
933              },
934              "usageTotalUsd": {
935                "type": "number",
936                "example": 0.00005
937              },
938              "usageUsd": {
939                "type": "object",
940                "properties": {
941                  "ACTOR_COMPUTE_UNITS": {
942                    "type": "integer",
943                    "example": 0
944                  },
945                  "DATASET_READS": {
946                    "type": "integer",
947                    "example": 0
948                  },
949                  "DATASET_WRITES": {
950                    "type": "integer",
951                    "example": 0
952                  },
953                  "KEY_VALUE_STORE_READS": {
954                    "type": "integer",
955                    "example": 0
956                  },
957                  "KEY_VALUE_STORE_WRITES": {
958                    "type": "number",
959                    "example": 0.00005
960                  },
961                  "KEY_VALUE_STORE_LISTS": {
962                    "type": "integer",
963                    "example": 0
964                  },
965                  "REQUEST_QUEUE_READS": {
966                    "type": "integer",
967                    "example": 0
968                  },
969                  "REQUEST_QUEUE_WRITES": {
970                    "type": "integer",
971                    "example": 0
972                  },
973                  "DATA_TRANSFER_INTERNAL_GBYTES": {
974                    "type": "integer",
975                    "example": 0
976                  },
977                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
978                    "type": "integer",
979                    "example": 0
980                  },
981                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
982                    "type": "integer",
983                    "example": 0
984                  },
985                  "PROXY_SERPS": {
986                    "type": "integer",
987                    "example": 0
988                  }
989                }
990              }
991            }
992          }
993        }
994      }
995    }
996  }
997}

📈📉 Google Trends Scraper OpenAPI definition

OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.

OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.

By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.

You can download the OpenAPI definitions for Google Trends Scraper from the options below:

If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.

You can also check out our other API clients:

Developer
Maintained by Apify

Actor Metrics

  • 134 monthly users

  • 46 stars

  • 98% runs succeeded

  • 1.6 days response time

  • Created in Jan 2020

  • Modified 2 months ago

Categories