Maps::Google - Google Maps Parser
Google Maps Parser Overview
The Google Maps parser collects contact information about organizations from the first search results page.
A-Parser functionality allows you to save parsing settings for further use (presets), set a parsing schedule, and much more. You can use automatic query replication, 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 that you need, thanks to the built-in powerful Template Toolkit template engine that allows you to apply additional logic to the results and output data in various formats, including JSON, SQL, and CSV.
Use cases for Google Maps parser
Parsing organizations
Collecting all organizations in a certain area
Data collected
- Organization name
- Address and coordinates
- Rating, number of reviews, and pricing policy
- Categories and tags
- Website and phone
- Link to photo
- Link to company card
- Link to "Claim this business"
Capabilities
- It is necessary to specify the coordinates and zoom of the area in which the search is carried out
- Currently, data is collected only from the 1st page
- The ability to specify the country from which the search is carried out and the language of the results
- Automatic bypass of coordinates in the specified region
- The
Collect full region
option takes the region ID and the step in kilometers as input. For dense development, you can specify, for example, 0.5 or 0.2 kilometers - more details
- The
Use cases
- Collecting a list of organizations present in a given area
- Obtaining contact information for organizations
- Any other options that involve searching for organizations on maps
Queries
- As queries, you need to specify keywords, just like if you were entering them directly into the Google Maps search form, for example:
пицца
Results
- As a result, a list of organizations, their ratings, and addresses is displayed:
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
Result output options
A-Parser supports flexible formatting of results thanks to the built-in Template Toolkit template engine, which allows it to output results in an arbitrary form, as well as in a structured form, such as CSV or JSON.
Output of all contact data
Result format:
$serp.format('$name ($rating): $address, $reviews, $price, $categories, $tags, $site, $phones, $photo, $coordinates\n')
Example 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 CSV
Result format:
[% FOREACH serp;
tools.CSVline(query, name, rating, address, reviews, price, categories, tags, site, phones, photo, coordinates);
END; %]
Example 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
Output of all contact data in JSON
Initial text
[% data = {} %]
Final text
[% data.json %]
Result format:
[%
data.query = query;
data.contacts = [];
FOREACH serp;
item = {};
item.name = name;
item.rating = rating;
item.address = address;
item.reviews = reviews;
item.price = price;
item.categories = categories;
item.tags = tags;
item.site = site;
item.phones = phones;
item.photo = photo;
item.coordinates = coordinates;
data.contacts.push(item);
END;
result = {};
result = data;
%]
Example 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": "пицца"
}
To make the "Initial text" and "Final text" options available in the Task Editor, you need to activate "More options".
Output of all contact data in SQL
Result format:
[% FOREACH p1.serp; "INSERT INTO serp VALUES('" _ query _ "', '"; name _ "', '"; rating _ "', '"; address _ "', '"; reviews _ "', '"; price _ "', '"; categories _ "', '"; tags _ "', '"; site _ "', '"; phones _ "', '"; photo _ "', '"; coordinates _ "')\n"; END %]
Example 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')
Possible settings
Parameter | Default value | Description |
---|---|---|
Coordinates | 55.780844,37.6572693 | Coordinates of the search area, required parameter |
Zoom | 11 | Zoom, required parameter |
Country | Auto (Based on IP) | The country from which the search is carried out |
Language | English | Choice of language for the results |