Google Search Scraper avatar

Google Search Scraper

Try for free

No credit card required

Go to Store
Google Search Scraper

Google Search Scraper

apify/google-search-scraper
Try for free

No credit card required

Developer
Maintained by Community

Actor Metrics

  • 2 monthly users

  • 10 bookmarks

  • >99% runs succeeded

  • Created in Apr 2019

  • Modified 3 years ago

Categories

You can access the Google Search 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": "g85oR4VbgYP2man5c"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/apify~google-search-scraper/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-apify-google-search-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/apify~google-search-scraper/runs": {
50      "post": {
51        "operationId": "runs-sync-apify-google-search-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/apify~google-search-scraper/run-sync": {
93      "post": {
94        "operationId": "run-sync-apify-google-search-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        "required": [
134          "queries"
135        ],
136        "properties": {
137          "queries": {
138            "title": "Search queries or URLs",
139            "pattern": "[^\\s]+",
140            "type": "string",
141            "description": "Google Search queries (e.g. <code>food in NYC</code>) and/or full URLs (e.g. <code>https://www.google.com/search?q=food+NYC</code>).<br><br>Enter one item per line."
142          },
143          "resultsPerPage": {
144            "title": "Results per page",
145            "minimum": 1,
146            "maximum": 100,
147            "type": "integer",
148            "description": "Number of search results per page. By default, Google Search returns 10 results. The allowed values are: <code>10</code>, <code>20</code>, <code>30</code>, <code>40</code>, <code>50</code> and <code>100</code>.<br><br>This setting only applies to <strong>Search queries</strong>, but not to <strong>URLs</strong>."
149          },
150          "maxPagesPerQuery": {
151            "title": "Max pages per query",
152            "minimum": 1,
153            "type": "integer",
154            "description": "The maximum number of search result pages crawled for each search query or URL. Note that a value greater than one might significantly slow down the actor."
155          },
156          "mobileResults": {
157            "title": "Mobile results",
158            "type": "boolean",
159            "description": "If checked, the crawler will return results for the mobile version of the Google Search. By default, desktop results are returned.",
160            "default": false
161          },
162          "csvFriendlyOutput": {
163            "title": "CSV friendly output (1 result on 1 row)",
164            "type": "boolean",
165            "description": "If checked, the crawler will return results in a structure suitable for CSV format. Only organic and paid results are included.",
166            "default": false
167          },
168          "countryCode": {
169            "title": "Country",
170            "enum": [
171              "",
172              "af",
173              "al",
174              "dz",
175              "as",
176              "ad",
177              "ao",
178              "ai",
179              "aq",
180              "ag",
181              "ar",
182              "am",
183              "aw",
184              "au",
185              "at",
186              "az",
187              "bs",
188              "bh",
189              "bd",
190              "bb",
191              "by",
192              "be",
193              "bz",
194              "bj",
195              "bm",
196              "bt",
197              "bo",
198              "ba",
199              "bw",
200              "bv",
201              "br",
202              "io",
203              "bn",
204              "bg",
205              "bf",
206              "bi",
207              "kh",
208              "cm",
209              "ca",
210              "cv",
211              "ky",
212              "cf",
213              "td",
214              "cl",
215              "cn",
216              "cx",
217              "cc",
218              "co",
219              "km",
220              "cg",
221              "cd",
222              "ck",
223              "cr",
224              "ci",
225              "hr",
226              "cu",
227              "cy",
228              "cz",
229              "dk",
230              "dj",
231              "dm",
232              "do",
233              "ec",
234              "eg",
235              "sv",
236              "gq",
237              "er",
238              "ee",
239              "et",
240              "fk",
241              "fo",
242              "fj",
243              "fi",
244              "fr",
245              "gf",
246              "pf",
247              "tf",
248              "ga",
249              "gm",
250              "ge",
251              "de",
252              "gh",
253              "gi",
254              "gr",
255              "gl",
256              "gd",
257              "gp",
258              "gu",
259              "gt",
260              "gn",
261              "gw",
262              "gy",
263              "ht",
264              "hm",
265              "va",
266              "hn",
267              "hk",
268              "hu",
269              "is",
270              "in",
271              "id",
272              "ir",
273              "iq",
274              "ie",
275              "il",
276              "it",
277              "jm",
278              "jp",
279              "jo",
280              "kz",
281              "ke",
282              "ki",
283              "kp",
284              "kr",
285              "kw",
286              "kg",
287              "la",
288              "lv",
289              "lb",
290              "ls",
291              "lr",
292              "ly",
293              "li",
294              "lt",
295              "lu",
296              "mo",
297              "mk",
298              "mg",
299              "mw",
300              "my",
301              "mv",
302              "ml",
303              "mt",
304              "mh",
305              "mq",
306              "mr",
307              "mu",
308              "yt",
309              "mx",
310              "fm",
311              "md",
312              "mc",
313              "mn",
314              "ms",
315              "ma",
316              "mz",
317              "mm",
318              "na",
319              "nr",
320              "np",
321              "nl",
322              "an",
323              "nc",
324              "nz",
325              "ni",
326              "ne",
327              "ng",
328              "nu",
329              "nf",
330              "mp",
331              "no",
332              "om",
333              "pk",
334              "pw",
335              "ps",
336              "pa",
337              "pg",
338              "py",
339              "pe",
340              "ph",
341              "pn",
342              "pl",
343              "pt",
344              "pr",
345              "qa",
346              "re",
347              "ro",
348              "ru",
349              "rw",
350              "sh",
351              "kn",
352              "lc",
353              "pm",
354              "vc",
355              "ws",
356              "sm",
357              "st",
358              "sa",
359              "sn",
360              "cs",
361              "sc",
362              "sl",
363              "sg",
364              "sk",
365              "si",
366              "sb",
367              "so",
368              "za",
369              "gs",
370              "es",
371              "lk",
372              "sd",
373              "sr",
374              "sj",
375              "sz",
376              "se",
377              "ch",
378              "sy",
379              "tw",
380              "tj",
381              "tz",
382              "th",
383              "tl",
384              "tg",
385              "tk",
386              "to",
387              "tt",
388              "tn",
389              "tr",
390              "tm",
391              "tc",
392              "tv",
393              "ug",
394              "ua",
395              "ae",
396              "gb",
397              "us",
398              "um",
399              "uy",
400              "uz",
401              "vu",
402              "ve",
403              "vn",
404              "vg",
405              "vi",
406              "wf",
407              "eh",
408              "ye",
409              "zm",
410              "zw"
411            ],
412            "type": "string",
413            "description": "Country determines the IP address of the proxy used for the query and the Google Search domain (e.g. <code>google.es</code> for Spain). The values must be lower-cased <a href=\"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\" target=\"_blank\">ISO 3166</a> country codes supported by Google. By default, the actor uses United States (<code>google.com</code>).<br><br>This setting only applies to <strong>Search queries</strong>, but not to <strong>URLs</strong>."
414          },
415          "languageCode": {
416            "title": "Language",
417            "enum": [
418              "",
419              "af",
420              "sq",
421              "sm",
422              "ar",
423              "az",
424              "eu",
425              "be",
426              "bn",
427              "bh",
428              "bs",
429              "bg",
430              "ca",
431              "zh-CN",
432              "zh-TW",
433              "hr",
434              "cs",
435              "da",
436              "nl",
437              "en",
438              "eo",
439              "et",
440              "fo",
441              "fi",
442              "fr",
443              "fy",
444              "gl",
445              "ka",
446              "de",
447              "el",
448              "gu",
449              "iw",
450              "hi",
451              "hu",
452              "is",
453              "id",
454              "ia",
455              "ga",
456              "it",
457              "ja",
458              "jw",
459              "kn",
460              "ko",
461              "la",
462              "lv",
463              "lt",
464              "mk",
465              "ms",
466              "ml",
467              "mt",
468              "mr",
469              "ne",
470              "no",
471              "nn",
472              "oc",
473              "fa",
474              "pl",
475              "pt-BR",
476              "pt-PT",
477              "pa",
478              "ro",
479              "ru",
480              "gd",
481              "sr",
482              "si",
483              "sk",
484              "sl",
485              "es",
486              "su",
487              "sw",
488              "sv",
489              "tl",
490              "ta",
491              "te",
492              "th",
493              "ti",
494              "tr",
495              "uk",
496              "ur",
497              "uz",
498              "vi",
499              "cy",
500              "xh",
501              "zu"
502            ],
503            "type": "string",
504            "description": "Language for the search results, which is passed to Google Search as the <code>hl</code> URL query parameter. Only set this if you want to use a non-default language for the selected country. The values must be lower-cased <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\" target=\"_blank\">ISO 639</a> language codes supported by Google.<br><br>This setting only applies to <strong>Search queries</strong>, but not to <strong>URLs</strong>.",
505            "default": ""
506          },
507          "locationUule": {
508            "title": "UULE location code",
509            "type": "string",
510            "description": "The code for geolocation of search results. It's passed to Google Search as the <code>uule</code> URL query parameter. You can use the <a href='https://padavvan.github.io/' target='_blank'>UULE code generator</a>. Learn more about <a href='https://moz.com/ugc/geolocation-the-ultimate-tip-to-emulate-local-search' target='_blank'>emulating local search</a>. <br><br>This setting only applies to <strong>Search queries</strong>, but not to <strong>URLs</strong>."
511          },
512          "maxConcurrency": {
513            "title": "Max concurrency",
514            "minimum": 1,
515            "maximum": 100,
516            "type": "integer",
517            "description": "The maximum number of search results pages the crawler will load in parallel. A higher number means you will get your results faster, but also it will burn through your available proxies quicker.",
518            "default": 10
519          },
520          "saveHtml": {
521            "title": "Save HTML to dataset",
522            "type": "boolean",
523            "description": "If checked, the HTML of Google Search results pages will be stored to the default dataset, under the <code>html</code> property. This is useful if you need to process the HTML, but it makes the dataset large and reduces performance.",
524            "default": false
525          },
526          "saveHtmlToKeyValueStore": {
527            "title": "Save HTML to key-value store",
528            "type": "boolean",
529            "description": "If checked, the HTML of the Google Search results pages will be stored to the default key-value store and links to the files stored to the dataset under the <code>htmlSnapshotUrl</code> property. This is useful for debugging, since you can easily view the the pages in browser, but use of this feature has some performance penalty.",
530            "default": false
531          },
532          "includeUnfilteredResults": {
533            "title": "Include unfiltered results",
534            "type": "boolean",
535            "description": "If checked, the lower quality results that Google normally filters out will be included. Usually it is few hundred extra results.",
536            "default": false
537          },
538          "customDataFunction": {
539            "title": "Custom data function",
540            "type": "string",
541            "description": "Custom JavaScript function to extract additional attributes from the HTML of the result pages. The function accepts the same parameters as the <code>handlePageFunction</code> of the <a href='https://sdk.apify.com/docs/typedefs/cheerio-crawler-options'>CheerioCrawler</a> in Apify SDK. The return value of the function is saved to the results as the <code>customData</code> property."
542          }
543        }
544      },
545      "runsResponseSchema": {
546        "type": "object",
547        "properties": {
548          "data": {
549            "type": "object",
550            "properties": {
551              "id": {
552                "type": "string"
553              },
554              "actId": {
555                "type": "string"
556              },
557              "userId": {
558                "type": "string"
559              },
560              "startedAt": {
561                "type": "string",
562                "format": "date-time",
563                "example": "2025-01-08T00:00:00.000Z"
564              },
565              "finishedAt": {
566                "type": "string",
567                "format": "date-time",
568                "example": "2025-01-08T00:00:00.000Z"
569              },
570              "status": {
571                "type": "string",
572                "example": "READY"
573              },
574              "meta": {
575                "type": "object",
576                "properties": {
577                  "origin": {
578                    "type": "string",
579                    "example": "API"
580                  },
581                  "userAgent": {
582                    "type": "string"
583                  }
584                }
585              },
586              "stats": {
587                "type": "object",
588                "properties": {
589                  "inputBodyLen": {
590                    "type": "integer",
591                    "example": 2000
592                  },
593                  "rebootCount": {
594                    "type": "integer",
595                    "example": 0
596                  },
597                  "restartCount": {
598                    "type": "integer",
599                    "example": 0
600                  },
601                  "resurrectCount": {
602                    "type": "integer",
603                    "example": 0
604                  },
605                  "computeUnits": {
606                    "type": "integer",
607                    "example": 0
608                  }
609                }
610              },
611              "options": {
612                "type": "object",
613                "properties": {
614                  "build": {
615                    "type": "string",
616                    "example": "latest"
617                  },
618                  "timeoutSecs": {
619                    "type": "integer",
620                    "example": 300
621                  },
622                  "memoryMbytes": {
623                    "type": "integer",
624                    "example": 1024
625                  },
626                  "diskMbytes": {
627                    "type": "integer",
628                    "example": 2048
629                  }
630                }
631              },
632              "buildId": {
633                "type": "string"
634              },
635              "defaultKeyValueStoreId": {
636                "type": "string"
637              },
638              "defaultDatasetId": {
639                "type": "string"
640              },
641              "defaultRequestQueueId": {
642                "type": "string"
643              },
644              "buildNumber": {
645                "type": "string",
646                "example": "1.0.0"
647              },
648              "containerUrl": {
649                "type": "string"
650              },
651              "usage": {
652                "type": "object",
653                "properties": {
654                  "ACTOR_COMPUTE_UNITS": {
655                    "type": "integer",
656                    "example": 0
657                  },
658                  "DATASET_READS": {
659                    "type": "integer",
660                    "example": 0
661                  },
662                  "DATASET_WRITES": {
663                    "type": "integer",
664                    "example": 0
665                  },
666                  "KEY_VALUE_STORE_READS": {
667                    "type": "integer",
668                    "example": 0
669                  },
670                  "KEY_VALUE_STORE_WRITES": {
671                    "type": "integer",
672                    "example": 1
673                  },
674                  "KEY_VALUE_STORE_LISTS": {
675                    "type": "integer",
676                    "example": 0
677                  },
678                  "REQUEST_QUEUE_READS": {
679                    "type": "integer",
680                    "example": 0
681                  },
682                  "REQUEST_QUEUE_WRITES": {
683                    "type": "integer",
684                    "example": 0
685                  },
686                  "DATA_TRANSFER_INTERNAL_GBYTES": {
687                    "type": "integer",
688                    "example": 0
689                  },
690                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
691                    "type": "integer",
692                    "example": 0
693                  },
694                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
695                    "type": "integer",
696                    "example": 0
697                  },
698                  "PROXY_SERPS": {
699                    "type": "integer",
700                    "example": 0
701                  }
702                }
703              },
704              "usageTotalUsd": {
705                "type": "number",
706                "example": 0.00005
707              },
708              "usageUsd": {
709                "type": "object",
710                "properties": {
711                  "ACTOR_COMPUTE_UNITS": {
712                    "type": "integer",
713                    "example": 0
714                  },
715                  "DATASET_READS": {
716                    "type": "integer",
717                    "example": 0
718                  },
719                  "DATASET_WRITES": {
720                    "type": "integer",
721                    "example": 0
722                  },
723                  "KEY_VALUE_STORE_READS": {
724                    "type": "integer",
725                    "example": 0
726                  },
727                  "KEY_VALUE_STORE_WRITES": {
728                    "type": "number",
729                    "example": 0.00005
730                  },
731                  "KEY_VALUE_STORE_LISTS": {
732                    "type": "integer",
733                    "example": 0
734                  },
735                  "REQUEST_QUEUE_READS": {
736                    "type": "integer",
737                    "example": 0
738                  },
739                  "REQUEST_QUEUE_WRITES": {
740                    "type": "integer",
741                    "example": 0
742                  },
743                  "DATA_TRANSFER_INTERNAL_GBYTES": {
744                    "type": "integer",
745                    "example": 0
746                  },
747                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
748                    "type": "integer",
749                    "example": 0
750                  },
751                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
752                    "type": "integer",
753                    "example": 0
754                  },
755                  "PROXY_SERPS": {
756                    "type": "integer",
757                    "example": 0
758                  }
759                }
760              }
761            }
762          }
763        }
764      }
765    }
766  }
767}

Google Search 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 Search 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: