Skip to main content

Maps::Google - Google Maps Scraper

img

Scraper Overview

The Google Maps scraper collects contact data of organizations from the first page of search results.

A-Parser functionality allows you to save scraping settings for future use (presets), schedule scraping, and much more. You can use automatic query multiplication, substitution of subqueries from files, iteration of alphanumeric combinations and lists to get the maximum possible number of results.

Saving results is possible in the form and structure 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

Data Collected

  • Organization name
  • Address and coordinates
  • Rating, number of reviews, and pricing policy
  • Categories and tags
  • Website and phone
  • Link to the photo
  • Link to the company card
  • Link to "Claim this business"
  • Operating status

Capabilities

  • It is necessary to specify the coordinates and zoom of the area where the search is conducted
  • Currently, data is collected only from the 1st page
  • Ability to specify the country from which the search is conducted and the language of the results
  • Automatic bypass of coordinates in a given region using the Collect full region option
  • Ability to filter results by Temporarily closed or Permanently closed

Use Cases

  • Collecting a list of organizations present in a given area
  • Obtaining contacts of organizations
  • Any other scenarios that involve searching for organizations on maps

Queries

As queries, you need to specify keywords, just as if you were entering them directly into the Google Maps search form, for example:

пицца

Output Results Examples

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

Default Output

Result format:

$serp.format('$name ($rating): $address\n')

The result shows a list of organizations, their ratings, and addresses:

Vivat Pizza (4.7): Prospekt Marshala Zhukova, 19/1, Moscow, Russia, 123308
Premier Pizza (4.2): пр-кт Ленинградский, 37, Moscow, Russia, 125167
City Pizza (5): Ордынка М. ул. 19, Москва, 119017, Moscow, Russia, 115035
Dodo Pizza (4.4): Ulitsa Miklukho-Maklaya, 36А, Moscow, Russia, 117198
Pizza 22 cm (4.6): Ulitsa Solyanka, 1/2, Moscow, Russia, 109028
Zhar Pitstsa (4.7): Ulitsa Industrial'naya, 15, стр. 2, Mytishchi, Moscow Oblast, Russia, 141006
Пиццерия Алло! Пицца | Кафе, доставка еды Крымская (4.4): Sevastopol Ave, 15к1, 1 этаж, Moscow, Russia, 117447
Сity Pizza (2.3): 4-Y Syromyatnicheskiy Pereulok, 3/5, Moscow, Russia, 105120
Domino's Pizza (3.8): Beregovoy Proyezd, 5А корпус 1, Moscow, Russia, 121087
Domino's Pizza (4.5): Ulitsa Fonvizina, 17, Moscow, Russia, 127322
Сity Pizza (4.2): Malomoskovskaya Ulitsa, 22, Moscow, Russia, 129626
Алло! Пицца (4.5): Tkatskaya Ulitsa, 32А, Moscow, Russia, 105187
Pizza Pizza Time (4.3): СНТ Зеленая зона, Lyubertsy, Moscow, Russia, 111674
Vivat Pizza (4.7): Sirenevyy Bul'var, 15a, Moscow, Russia, 105425
Allo! Pizza (4.4): Shcholkovskoye Shosse, 72, Moscow, Russia, 107497
Dodo Pizza (4.5): Ulitsa Initsiativnaya, 13, Lyubertsy, Moscow Oblast, Russia, 140009
Domino's Pizza (4.5): Ulitsa Panferova, 4, Moscow, Russia, 119261
Алло! Пицца (4.5): Ulitsa Kostromskaya, 14Б, Moscow, Russia, 127549
Алло! Пицца (4.5): Ulitsa Lyapidevskogo, 4 строение 2, Moscow, Russia, 125581
Dodo Pizza (4.6): Staraya Basmannaya Ulitsa, 14/2с4, Moscow, Russia, 105064

Output of All Contact Data

Result format:

$serp.format('$name ($rating): $address, $reviews, $price,  $categories, $tags, $site, $phones, $photo, $coordinates\n')

Example of result:

Vivat Pizza (4.7): Prospekt Marshala Zhukova, 19/1, Moscow, Russia, 123308, 558, $$,  Pizza restaurant, Italian restaurant, Restaurant, Sushi restaurant, No-contact delivery, Delivery, Takeaway, Great cocktails, Wheelchair-accessible car park, Wheelchair-accessible entrance, Beer, Late-night food, Wine, Dessert, Bar on site, Good for kids, High chairs, Casual, Cosy, Groups, http://www.vivatpizza.ru/, +74957808090, https://lh5.googleusercontent.com/p/AF1QipN7H4fucI4JR1xGP6bdXorluhq9eq4l85QvCKXx=w426-h240-k-no, 55.7753678,37.4888493
Premier Pizza (4.2): пр-кт Ленинградский, 37, Moscow, Russia, 125167, 5, , Pizza restaurant, Pizza takeaway, Delivery, Takeaway, Dine-in, Good for kids, Casual, Groups, http://premierpizza.ru/, +74952210717, , 55.7727005,37.5315456
City Pizza (5): Ордынка М. ул. 19, Москва, 119017, Moscow, Russia, 115035, 1, $$, Pizza restaurant, Pizza delivery, Delivery, Dine-in, https://www.citypizza.ru/, , https://streetviewpixels-pa.googleapis.com/v1/thumbnail?panoid=dowqjCRyBVGFlZWPNAKQeg&cb_client=search.gws-prod.gps&w=408&h=240&yaw=87.83791&pitch=0&thumbfov=100, 55.741704999999996,37.6258066
Pizza 22 cm (4.6): Ulitsa Solyanka, 1/2, Moscow, Russia, 109028, 1309, $$, Pizza restaurant, Italian restaurant, Takeaway, Dine-in, Delivery, Wheelchair-accessible entrance, Dessert, Good for kids, Casual, Cosy, Groups, http://pizza22cm.ru/#msk, +79264297222, https://lh5.googleusercontent.com/p/AF1QipOYxiI0ITxnRGGltyFFW1Y8MmcPZMoJMz9dd77u=w408-h272-k-no, 55.754531799999995,37.6380833

Output of All Contact Data in a CSV Table

Result format:

[% FOREACH serp;
tools.CSVline(query, name, rating, address, reviews, price, categories, tags, site, phones, photo, coordinates);
END %]

Example of result:

"пицца","Vivat Pizza",4.7,"Prospekt Marshala Zhukova, 19/1, Moscow, Russia, 123308",558,$$,"Pizza restaurant, Italian restaurant, Restaurant, Sushi restaurant","No-contact delivery, Delivery, Takeout, Great cocktails, Wheelchair-accessible entrance, Wheelchair-accessible parking lot, Beer, Late-night food, Wine, Dessert, Bar on-site, Good for kids, High chairs, Casual, Cozy, Groups",http://www.vivatpizza.ru/,+74957808090,https://lh5.googleusercontent.com/p/AF1QipN7H4fucI4JR1xGP6bdXorluhq9eq4l85QvCKXx=w426-h240-k-no,"55.7753678,37.4888493"
"пицца","Premier Pizza",4.2,"пр-кт Ленинградский, 37, Moscow, Russia, 125167",5,,"Pizza restaurant, Pizza takeaway","Delivery, Takeout, Dine-in, Good for kids, Casual, Groups",http://premierpizza.ru/,+74952210717,,"55.7727005,37.5315456"
"пицца","Pizza 22 cm",4.6,"Ulitsa Solyanka, 1/2, Moscow, Russia, 109028",1309,$$,"Pizza restaurant, Italian restaurant","Takeout, Dine-in, Delivery, Wheelchair-accessible entrance, Dessert, Good for kids, Casual, Cozy, Groups",http://pizza22cm.ru/#msk,+79264297222,https://lh5.googleusercontent.com/p/AF1QipOYxiI0ITxnRGGltyFFW1Y8MmcPZMoJMz9dd77u=w408-h272-k-no,"55.754531799999995,37.6380833"
"пицца","Dodo Pizza",4.4,"Ulitsa Miklukho-Maklaya, 36А, Moscow, Russia, 117198",116,$$,"Pizza restaurant, Coffee stand, Pizza delivery, Pizza takeaway","No-contact delivery, Delivery, Takeout, Dine-in, Vegetarian options, Breakfast, Lunch, Dessert, Seating, Good for kids, Casual, Cozy, Family-friendly, Groups, Debit cards, NFC mobile payments",https://dodopizza.ru/Moscow/belyaevo,+78003330060,https://lh5.googleusercontent.com/p/AF1QipOJ7jbAJEA8imRs58tf2roiESzzkLCyTsVUk2Zk=w408-h272-k-no,"55.6401172,37.533220299999996"
"пицца","Zhar Pitstsa",4.7,"Ulitsa Industrial'naya, 15, стр. 2, Mytishchi, Moscow Oblast, Russia, 141006",262,,"Pizza restaurant, Pizza delivery","Delivery, Takeout",http://www.pizza-jar.ru/,+79055070171,https://lh5.googleusercontent.com/p/AF1QipMMrXJkExDf3bQphAfGYTd26LfqaZwDTPvjMQkx=w408-h544-k-no,"55.9251735,37.7667529"
"пицца","Сity Pizza",2.3,"4-Y Syromyatnicheskiy Pereulok, 3/5, Moscow, Russia, 105120",6,$$,"Pizza restaurant, Pizza delivery","Delivery, Dine-in",http://www.citypizza.ru/,+74959818198,https://streetviewpixels-pa.googleapis.com/v1/thumbnail?panoid=57nDhT-w0Qgu7WfJNUW60Q&cb_client=search.gws-prod.gps&w=408&h=240&yaw=28.351305&pitch=0&thumbfov=100,"55.755070599999996,37.6673556"
"пицца","Пиццерия Алло! Пицца | Кафе, доставка еды Крымская",4.4,"Sevastopol Ave, 15к1, 1 этаж, Moscow, Russia, 117447",30

Saving All Contact Data in SQL Format

Result format:

[%  FOREACH serp;   "INSERT INTO serp VALUES('" _ query _ "', '"; name _ "', '"; rating _ "', '"; address _ "', '"; reviews _ "', '"; price _ "', '"; categories _ "', '"; tags _ "', '"; site _ "', '";  phones _ "', '"; photo _ "', '";  coordinates _ "')\n"; END  %]

Example of result:

INSERT INTO serp VALUES('пицца', 'Vivat Pizza', '4.7', 'Prospekt Marshala Zhukova,
19/1, Moscow, Russia,
123308', '558', '$', 'Pizza restaurant, Italian restaurant, Restaurant, Sushi restaurant', 'No-contact delivery, Delivery, Takeaway, Great cocktails, Wheelchair-accessible car park, Wheelchair-accessible entrance, Beer, Late-night food, Wine, Dessert, Bar on site, Good for kids, High chairs, Casual, Cosy, Groups', 'http: //www.vivatpizza.ru/', '+74957808090', 'https://lh5.googleusercontent.com/p/AF1QipN7H4fucI4JR1xGP6bdXorluhq9eq4l85QvCKXx=w426-h240-k-no', '55.7753678,37.4888493')
INSERT INTO serp VALUES('пицца', 'Premier Pizza', '4.2', 'пр-кт Ленинградский,
37, Moscow, Russia,
125167', '5', '', 'Pizza restaurant, Pizza takeaway', 'Delivery, Takeaway, Dine-in, Good for kids, Casual, Groups', 'http: //premierpizza.ru/', '+74952210717', '', '55.7727005,37.5315456')
INSERT INTO serp VALUES('пицца', 'City Pizza', '5', 'Ордынка М. ул. 19, Москва,
119017, Moscow, Russia,
115035', '1', '$', 'Pizza restaurant, Pizza delivery', 'Delivery, Dine-in', 'https: //www.citypizza.ru/', '', 'https://streetviewpixels-pa.googleapis.com/v1/thumbnail?panoid=dowqjCRyBVGFlZWPNAKQeg&cb_client=search.gws-prod.gps&w=408&h=240&yaw=87.83791&pitch=0&thumbfov=100', '55.741704999999996,37.6258066')
INSERT INTO serp VALUES('пицца', 'Pizza 22 cm', '4.6', 'Ulitsa Solyanka,
1/2, Moscow, Russia,
109028', '1309', '$', 'Pizza restaurant, Italian restaurant', 'Takeaway, Dine-in, Delivery, Wheelchair-accessible entrance, Dessert, Good for kids, Casual, Cosy, Groups', 'http: //pizza22cm.ru/#msk', '+79264297222', 'https://lh5.googleusercontent.com/p/AF1QipOYxiI0ITxnRGGltyFFW1Y8MmcPZMoJMz9dd77u=w408-h272-k-no', '55.754531799999995,37.6380833')
INSERT INTO serp VALUES('пицца', 'Dodo Pizza', '4.4', 'Ulitsa Miklukho-Maklaya,
36А, Moscow, Russia,
117198', '116', '$', 'Pizza restaurant, Coffee stand, Pizza delivery, Pizza takeaway', 'No-contact delivery, Delivery, Takeaway, Dine-in, Vegetarian options, Breakfast, Lunch, Dessert, Seating, Good for kids, Casual, Cosy, Family friendly, Groups, Debit cards, NFC mobile payments', 'https: //dodopizza.ru/Moscow/belyaevo', '+78003330060', 'https://lh5.googleusercontent.com/p/AF1QipOJ7jbAJEA8imRs58tf2roiESzzkLCyTsVUk2Zk=w408-h272-k-no', '55.6401172,37.533220299999996')

Dump All Contact Data to JSON

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

[% IF notFirst;
",\n";
ELSE;
notFirst = 1;
END;

obj = {};
obj.query = query;
obj.contacts = [];

FOREACH item IN p1.serp;
obj.contacts.push({
name = item.name
rating = item.rating
address = item.address
reviews = item.reviews
price = item.price
categories = item.categories
tags = item.tags
site = item.site
phones = item.phones
photo = item.photo
coordinates = item.coordinates
});
END;

obj.json %]

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

[

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

]

Example of result:

[{
"contacts": [
{
"coordinates": "55.7753678,37.4888493",
"photo": "https://lh5.googleusercontent.com/p/AF1QipN7H4fucI4JR1xGP6bdXorluhq9eq4l85QvCKXx=w426-h240-k-no",
"reviews": 558,
"name": "Vivat Pizza",
"categories": "Pizza restaurant, Italian restaurant, Restaurant, Sushi restaurant",
"phones": "+74957808090",
"tags": "No-contact delivery, Delivery, Takeaway, Great cocktails, Wheelchair-accessible car park, Wheelchair-accessible entrance, Beer, Late-night food, Wine, Dessert, Bar on site, Good for kids, High chairs, Casual, Cosy, Groups",
"rating": 4.7,
"site": "http://www.vivatpizza.ru/",
"address": "Prospekt Marshala Zhukova, 19/1, Moscow, Russia, 123308",
"price": "$$"
},
{
"coordinates": "55.7727005,37.5315456",
"photo": "",
"reviews": 5,
"name": "Premier Pizza",
"categories": "Pizza restaurant, Pizza takeaway",
"phones": "+74952210717",
"tags": "Delivery, Takeaway, Dine-in, Good for kids, Casual, Groups",
"rating": 4.2,
"site": "http://premierpizza.ru/",
"address": "пр-кт Ленинградский, 37, Moscow, Russia, 125167",
"price": ""
}

],
"query": "пицца"
}]
tip

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

Possible Settings

ParameterDefault ValueDescription
Coordinates55.780844,37.6572693Coordinates of the search area, mandatory parameter
Zoom11Zoom, mandatory parameter
CountryAuto (Based on IP)Country from which the search is conducted
LanguageEnglishChoice of language for the results
Collect full regionTakes as input the ID of a region (or list), as well as the step in kilometers (Step in kilometers), for dense construction you can specify for example 0.5 or 0.2 kilometers. More details. OSM Mode has values: Location code / Location string. More details