Skip to main content

SE::Google - Google search results scraper


Overview of the scraper

The Google search results scraper is one of the most in-demand, with it you can obtain huge databases of links ready for further use. You can use queries in the same way you enter them in Google, including search operators (inurl, intitle, etc.).

The Google scraper supports automatic query multiplication, you can be sure that you will get the maximum number of results from the output. Also, A-Parser can automatically navigate through related queries to a specified depth. Thanks to the multithreading work of A-Parser, the speed of processing requests can reach 3000-7000 requests per minute, which on average allows obtaining up to 500000 links per minute.

A-Parser's functionality allows you to save parsing settings for further use (presets), set a parsing schedule, and much more. You can use automatic query multiplication, substitution of subqueries from files, permutation of alphanumeric combinations and lists to obtain the maximum possible number of results.

Saving results is possible in the form and structure that you need, thanks to the built-in powerful templating engine Template Toolkit which allows you to apply additional logic to the results and output data in various formats, including JSON, SQL, and CSV.

Use cases for the scraper

Collected data

Collected data
  • Links, anchors, and snippets from the search results, as well as the date from the snippet (if available)
    • Information about flags for each result is also collected, currently supported flags include: Date, AMP, Image Preview, Video, Rich snippet, Featured snippet
  • Presence and content of advertising blocks, as well as their position on the page
  • Number of results for the query (competition)
  • List of related keywords (Related keywords)
  • Presence of additional blocks on the page: product carousel, videos, etc.
  • The scraper also collects such additional data:
    • Presence of a typo in the query and the corrected query
    • Geolocation determined by Google
    • Presence of AMP pages
    • List of People also ask: questions, answers, links to sources, their anchors, and links to media (enabled by the separate option Parse People also ask)
Collected data


The Google search engine scraper has many features and settings:

  • support for all Google search operators (site:, inurl:, etc.)
  • specifying the size of the search results (10, 20, 30, 50, or 100 results) and the number of pages (from 1 to 10), with maximum settings Google provides from 300 to 500 results per query, thanks to A-Parser's request splitting, it easily bypasses this limitation
  • ability to automatically follow related keywords
  • specifying the language and country of the search results, the ability to choose the local Google domain, as well as the language of the search interface
  • ability to specify geolocation, which allows obtaining accurate local search results for any place on the globe
  • choice between desktop or mobile display
  • ability to choose the type of search results, in addition to the main organic search results, the Google scraper can collect news, book, or video search results
  • if necessary, you can connect automatic recognition of ReCaptcha2 through recognition services or via XEvil/CapMonster
  • supports specifying the time of the search results (all time or for a specific interval from 24 hours to a year)
  • ability to disable Google's filter for hiding similar results (filter=)
  • ability to specify whether to scrape the search results if Google reports that nothing was found for the specified query and suggests results for a similar query
  • ability to set the number of People also ask that the scraper should collect, clicking in-depth into each question

The following scrapers are based on the Google scraper:

Use Cases

  • Collecting a database of links - for XRumer, AllSubmitter, GSA Ranker, etc.
  • Full SERP dump, including links, anchors, snippets, advertising blocks, and other information allows for in-depth analysis for SEO specialists and marketers
  • Assessing competition for keywords
  • Assessing competition in PPC (advertising) search results
  • Searching for backlinks and mentions of sites
  • Checking site indexing
  • Searching for vulnerable sites
  • Any other scenarios that involve obtaining search results for an unlimited number of queries


As queries, you need to specify search phrases, just as if they were entered directly into the Google search form, for example:

покупка авто
окна в москве

Query Substitutions

You can use built-in macros for query splitting, for example, if we want to get a very large database of forums, we will specify several basic queries in different languages:


In the request format, we specify the iteration of characters from a to zzzz, this method allows us to maximally rotate the search results and obtain a multitude of new unique results:

$query {az:a:zzzz}

This macro will create 475254 additional requests for each original search query, which in total will give 4 x 475254 = 1901016 search queries, an impressive figure, but this is not a problem for A-Parser. At a speed of 2000 requests per minute, such a task will be processed in just 16 hours.

Using operators

You can use search operators in the request format, so it will be automatically added to each query from your list:


Output options examples

A-Parser supports flexible result formatting thanks to the built-in Template Toolkit, which allows it to output results in any form, as well as in structured formats, such as CSV or JSON

Exporting a list of links

Result format:


Example of result:

Result format:

[% FOREACH item IN serp;    loop.count _ ' - ' _ _ ' - ' _ item.anchor _ ' - ' _ item.snippet _ "\n"; END %]

Example of result:

1 - - Форум — Википедия - <em>Фо́рум</em> (лат. forum — арх. преддверие гробницы; площадка в давильне для подлежащего обработке винограда; рыночная площадь, городской рынок;&nbsp;...
2 - - Форум (мероприятие) — Википедия - <em>Форум</em> — мероприятие, проводимое для обозначения или решения каких-<wbr>либо в достаточной степени глобальных проблем. Это понятие встречается в&nbsp;...
3 - - Добро пожаловать на справочный форум сообщества ... - Добро пожаловать на справочный <em>форум</em> сообщества Google Play. Избранные записи. Просмотреть все интересные записи &middot; Нужна помощь с игрой?
4 - - Gmail Community - Google Support - Welcome to the Gmail Help Community &middot; Featured posts &middot; Categories.
5 - - The World Economic Forum - The World Economic Forum is an independent international organization committed to improving the state of the world by engaging business, political, academic&nbsp;...
6 - - Home - Kunena - To Speak! Next Generation Forum ... - Kunena! - To Speak! Next Generation Forum Component for Joomla.
7 - - AdGuard Forum - <em>Форум</em> бета тестеров. Пишем сюда отчеты о багах бета-версий. Threads: 355. Messages: 11.6K. Sub-forums: Комментарии к релизам бета-версий&nbsp;...
8 - - Софийски Форум за Сигурност: Платформа за обсъждане ... - Софийски <em>Форум</em> за Сигурност / Sofia Security Forum.
9 - - Forums - Keenetic Community - Keenetic fan club. A place to meet software developers, get the latest updates, and share experience.
10 - - Perfect quality European private server of Aion - - Perfect quality European private server of Aion!

The built-in utility $tools.CSVLine allows creating correct table documents, ready for import into Excel or Google Sheets.

General result format:

[%  FOREACH i IN p1.serp;    tools.CSVline(, i.anchor, i.snippet); END  %]

File name:


Initial text:


Example of result:

Ссылка,Анкор,Сниппет,"Форум — Википедия",,"Forum - Wikipedia","<em>Forum</em> (plural forums or fora) may refer to: Contents. 1 Common uses; 2 Places. 2.1 Natural features; 2.2 Populated places. 3 Arts and entertainment; 4 Media.","The World Economic Forum","The World Economic <em>Forum</em> is an independent international organization committed to improving the state of the world by engaging business, political, academic&nbsp;...","Добро пожаловать на справочный форум сообщества ...","Добро пожаловать на справочный <em>форум</em> сообщества Центр Google Поиска. Избранные записи. Просмотреть все интересные записи &middot; Ответы на&nbsp;...","Добро пожаловать на справочный форум сообщества ...","Добро пожаловать на справочный <em>форум</em> сообщества Google Chrome. Избранные&nbsp;..."

In the General result format, Template Toolkit is used to output the $serp array in a FOREACH loop.

In the file name of the results, you just need to change the file extension to csv.

To make the "Initial text" option available in the Task Editor, you need to activate "More options". In the "Initial text," we write the names of the columns separated by commas, and make the second line empty.

Outputting ad blocks

Result format:

$ads.format('$link - $anchor - $snippet\n')

Example of result: - Rent a Car Worldwide - Best Prices Online Guaranteed - Secure Your <em>Car Hire</em> Today. The Best Price Guaranteed. Book at Over 53,000 Locations. Search, Compare and Save Using the World's Biggest Online <em>Car Rental</em> Service. - United States from $9/day - Search for Rental Cars on Kayak - Find and Compare Great <em>Car</em> Deals in USA. Book with Confidence on KAYAK®! - -70% Worldwide Car Rental - Rent Your Car in 5 Minutes‎ - <em>Car rental</em> prices are rising, but if you act fast, you can get a good deal. Don’t stress! We... - Rent a Car for Summer Holidays - Car Rentals for the Best Price - Theft protection and Third Party liability part of a great deal. Free Mileage included.

Result format:


Example of result:

test <b>speed</b>
<b>net speed</b> test
<b>google speed</b> test
<b>fast speed</b> test
<b>ping</b> test
<b>xfinity speed</b> test
<b>speed</b> test <b>mobile</b>
test <b>my</b>

To automatically remove HTML tags in the result, use the Results Builder, select the $related array and apply Remove HTML tags.

Keyword competition

Result format:

$query - $totalcount\n

Example of result:

speed test mobile - 1080000000
test score - 4020000000
net speed test - 1210000000
fast speed test - 2150000000
speed test - 2500000000
test match - 4160000000
ping test - 425000000
google speed test - 1870000000

Identifying misspelled keywords

Result format:

$query - $misspell\n

Example of result:

spead test - 1
test match - 0
speed test - 0
temst match - 1

Checking link indexing

Query format:


Result format:

$query.orig - $totalcount\n

Example of result: - 2 - 4 - 883 - none - 371

To check the indexing of links, insert the corresponding operator into the Query format: site:.

The result format is displayed as "original url - number of pages in the index".

As a result, we get the address of the pages and their number in the search engine index.

If the page is absent, then the result will be: none.

Saving in SQL format

Result format:

[%  FOREACH serp;   "INSERT INTO serp VALUES('" _ query _ "', '";   link _ "', '";  anchor _ "')\n"; END  %]

Example of result:

INSERT INTO serp VALUES('test', '', 'Speedtest by Ookla - The Global Broadband Speed Test')
INSERT INTO serp VALUES('test', '', ' Internet Speed Test')
INSERT INTO serp VALUES('test', '', 'IND vs AUS 4th Test highlights: India creates history, wins ...')
INSERT INTO serp VALUES('test', '', 'Find online tests, practice test, and test creation software | Test ...')
INSERT INTO serp VALUES('test', '', 'Recent Match Report - Australia vs India 4th Test 2020 ...')
INSERT INTO serp VALUES('test', '', 'World Test Championship (2019-2021) Points Table - Live ...')
INSERT INTO serp VALUES('test', '', 'ICC Test Match Team Rankings International Cricket Council')
INSERT INTO serp VALUES('test', '', 'Speedtest - Google')
INSERT INTO serp VALUES('test', '', '')

Dumping results to JSON

Общий формат результата:

[% IF notFirst;
notFirst = 1;

obj = {};
obj.totalcount = p1.totalcount;
obj.links = [];

FOREACH item IN p1.serp;

obj.json %]

Начальный текст:


Конечный текст:


Example of result:


To make the "Initial text" and "Final text" options available in the Task Editor, you need to activate "More options".

Results processing

A-Parser allows processing results directly during scraping, in this section we have presented the most popular cases for the Google scraper

Add deduplication and from the dropdown list select $serp.$ - Link.

Download example

How to import an example into A-Parser


Add deduplication and from the dropdown menu select $serp.$ - Link. Choose deduplication type: Domain.

Download example

How to import an example into A-Parser


Extracting domains

Add Results Builder and from the dropdown menu select source: $p1.serp.$ - Link. Choose type: Extract Domain.

Download example

How to import an example into A-Parser


See also: Results Builder

Removing tags from anchors and snippets

Add Results Builder and from the dropdown menu select source: $p1.serp.$i.anchor - Anchor. Choose type: Remove HTML tags.

Add Results Builder again and from the dropdown menu select source: $p1.serp.$i.snippet - Snippet. Choose type: Remove HTML tags.

Download example

How to import an example into A-Parser


You can add Results Builder as many times as you need.

See also: Results Builder

Add a filter and from the dropdown menu select: $serp.$ - Link. Choose type: Contains string. Then, in String write the filtering feature.

Download example

How to import an example into A-Parser


See also: Results filters

Possible settings

Regional settings

  • Google domain - the Google domain used, by default

  • Results language - search for pages in the selected language, in the browser this corresponds to the option Advanced Search -> Additional settings -> Search in (URL parameter lr). By default, it is not set, which means automatic determination based on IP

    Spoiler: Screenshot
    Results language
  • Interface language - the language of Google products, in the browser this is Languages -> Interface language (URL parameter hl). By default, English is selected

    Spoiler: Screenshot
    Interface language
  • Search from country - selection of the search region, in the browser this is Languages -> Search region (URL parameter gl). By default, it is not set, which means automatic determination based on IP

    Spoiler: Screenshot
    Search from country
  • Narrow results by region - search for pages created in a specific country, in the browser this is Advanced Search -> Additional settings -> Country (URL parameter cr). By default, it is not set, which means this option is turned off

    Spoiler: Screenshot
    Narrow results by region
  • Location (city) - the exact search location, automatically determined in the browser based on the user's location (url parameter uule). By default, it is not set, which means automatic determination based on the IP of the request

    Spoiler: Screenshot
    Location (city)

All regional parameters to some extent affect the search results.

Parameter NameDefault ValueDescription
DeviceDesktop (Chrome 76)Choice between desktop or mobile search results: Desktop (Chrome 76) / Mobile (iPhone iOS 10.2.1)
Pages count5Number of pages to scrape (from 1 to 100)
Links per page100Number of links in the search results per page (from 10 to 100)
Serp typeDefault (All)Determines whether to scrape from the main page, news, or blogs (Books, News, Videos)
Hide omitted resultsDetermines whether to hide omitted results (filter= parameter)
Serp timeAnytimeSerp time (time-dependent search, tbs= parameter, possible values: Past 1 hour, Past 24 hours, Past week, Past month, Past year)
Parse not foundDetermines whether to scrape search results if Google reported that nothing was found for the specified query and suggested results for a different query
Disable autocorrectAllows disabling Google's autocorrect and scrape results exactly for the specified query
Exact matchCorresponds to the search engine option "Exact match". Attention, this option overrides the value of the Serp time parameter (similar to how these options work in the browser).
Safe searchBlurOption to enable "Safe Search"
Google domain for scraping, all domains are supported (,,, etc.)
Narrow results by regionAny region Ability to narrow the search to a specific country
Results languageAuto (Based on IP)Choice of results language (lr= parameter)
Search from countryAuto (Based on IP)Choice of country from which the search is conducted (geo-dependent search, gl= parameter)
Interface languageEnglishAbility to choose the language of the Google interface, for maximum consistency of results in the scraper and in the browser
Location (city)Search by city, region. Cities can be specified as novosibirsk, russia; a full list of locations can be found at Geotargets (copy - use the value from the Canonical Name column). It is also necessary to set the correct Google domain
Util::ReCaptcha2 presetdefaultDetermines whether to use Util::ReCaptcha2Util::ReCaptcha2 to bypass ReCaptcha
Util::AntiGate presetdefaultDetermines whether to use Util::AntiGateUtil::AntiGate to bypass graphic captchas
ReCaptcha2 retries3Number of attempts to submit a ReCaptcha response the specified number of times, without changing the proxy
ReCaptcha2 pass proxyAllows passing the proxy (used in the request to Google) and cookies (received in response from Google) to the ReCaptcha recognition service
Use sessionsSaves good sessions, which allows for faster scraping, receiving fewer errors.
Don't take sessionOption not to use saved good sessions
Additional headersAllows specifying any custom headers