Skip to main content

Maps::Google - Google Maps Scraper

img

Google 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), set a scraping schedule, and much more. You can use automatic query multiplication, substitution of subqueries from files, enumeration of alphanumeric combinations and lists to obtain the maximum possible number of results.

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

Scraper use cases

Collected data

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

Capabilities

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

Use cases

  • Collecting a list of organizations present in a given area
  • Obtaining organization contacts
  • Any other options involving searching for organizations on maps

Queries

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

pizza

Output results examples

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

Default output

Result format:

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

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

Vivat Pizza (4.7): Prospekt Marshala Zhukova, 19/1, Moscow, Russia, 123308
Premier Pizza (4.2): pr-kt Leningradskiy, 37, Moscow, Russia, 125167
City Pizza (5): Ordynka M. ul. 19, Moskva, 119017, Moscow, Russia, 115035
Dodo Pizza (4.4): Ulitsa Miklukho-Maklaya, 36A, Moscow, Russia, 117198
Pizza 22 cm (4.6): Ulitsa Solyanka, 1/2, Moscow, Russia, 109028
Zhar Pitstsa (4.7): Ulitsa Industrial'naya, 15, str. 2, Mytishchi, Moscow Oblast, Russia, 141006
Pizzeria Allo! Pizza | Cafe, dostavka edy Krymskaya (4.4): Sevastopol Ave, 15k1, 1 etazh, Moscow, Russia, 117447
City Pizza (2.3): 4-Y Syromyatnicheskiy Pereulok, 3/5, Moscow, Russia, 105120
Domino's Pizza (3.8): Beregovoy Proyezd, 5A korpus 1, Moscow, Russia, 121087
Domino's Pizza (4.5): Ulitsa Fonvizina, 17, Moscow, Russia, 127322
City Pizza (4.2): Malomoskovskaya Ulitsa, 22, Moscow, Russia, 129626
Allo! Pizza (4.5): Tkatskaya Ulitsa, 32A, Moscow, Russia, 105187
Pizza Pizza Time (4.3): SNT Zelenaya zona, 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
Allo! Pizza (4.5): Ulitsa Kostromskaya, 14B, Moscow, Russia, 127549
Allo! Pizza (4.5): Ulitsa Lyapidevskogo, 4 stroenie 2, Moscow, Russia, 125581
Dodo Pizza (4.6): Staraya Basmannaya Ulitsa, 14/2s4, Moscow, Russia, 105064

Outputting all contact data

Result format:

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

Result example:

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): pr-kt Leningradskiy, 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): Ordynka M. ul. 19, Moskva, 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

Outputting all contact data to a CSV table

Result format:

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

Result example:

"pizza","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"
"pizza","Premier Pizza",4.2,"pr-kt Leningradskiy, 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","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"
"pizza","Dodo Pizza",4.4,"Ulitsa Miklukho-Maklaya, 36A, 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"
"pizza","Zhar Pitstsa",4.7,"Ulitsa Industrial'naya, 15, str. 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"
"pizza","City 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"
"pizza","Pizzeria Allo! Pizza | Cafe, dostavka edy Krymskaya",4.4,"Sevastopol Ave, 15k1, 1 etazh, 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  %]

Result example:

INSERT INTO serp VALUES('pizza', '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('pizza', 'Premier Pizza', '4.2', 'pr-kt Leningradskiy,
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('pizza', 'City Pizza', '5', 'Ordynka M. ul. 19, Moskva,
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', '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('pizza', 'Dodo Pizza', '4.4', 'Ulitsa Miklukho-Maklaya,
36A, 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')

Dumping 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 %]

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

[

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

]

Result example:

[{
"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": "pr-kt Leningradskiy, 37, Moscow, Russia, 125167",
"price": ""
}

],
"query": "pizza"
}]
tip

To make the "Initial 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 performed
LanguageEnglishSelection of results language
Collect full regionAccepts a region ID (or list) as input, as well as the step in kilometers (Step in kilometers); for dense urban areas, you can specify, for example, 0.5 or 0.2 kilometers. More details. OSM Mode has values: Location code / Location string. More details
Max pages10Maximum number of pages per query