Maps::Yandex - Yandex Maps Parser
Yandex Maps Parser Overview
The Yandex Maps parser collects contact information about organizations.
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 format and structure that you need, thanks to the built-in powerful Template Toolkit template engine that allows you to apply additional logic to results and output data in various formats, including JSON, SQL, and CSV.
Collected data
- Organization name
- Address and coordinates
- Rating, number of reviews, and pricing policy
- Categories and tags
- Website, social networks, and phones
- Link to photo and logo
- Description
- Link to the organization's page on Yandex Maps
Possibilities
- It is necessary to specify the coordinates and zoom of the area in which the search is carried out
- Ability to set the number of pages for data collection
- Ability to specify the language of the results
- Ability to use AntiGate to bypass captcha
Use cases
- Collecting a list of organizations present in a given area
- Obtaining contacts of organizations
- Any other options that involve searching for organizations on maps
Queries
- Queries must be specified as keywords, just as if they were entered directly into the Yandex Maps search form, for example:
пицца
Results
- As a result, a list of organizations, their ratings, and addresses are displayed:
Пироги № 1 (4.9): Россия, Москва, улица Большие Каменщики, 9, стр. Б
Einstein lounge (4.8): Россия, Москва, Таганская улица, 29, стр. 1
Gusto (4.1): Россия, Москва, улица Большая Дмитровка, 7/5с1
Френдс (4.4): Россия, Москва, Краснобогатырская улица, 90, стр. 2
Shisha City (4.4): Россия, Москва, Воронцовская улица, 6, стр. 7
Джекс (4.4): Россия, Москва, 1-я Фрезерная улица, 2/1с10
Ресторан Guilty Pleasure (4.3): Россия, Москва, Оружейный переулок, 15А
White Fox (4.3): Россия, Москва, Большой Дровяной переулок, 6
Result output options
A-Parser supports flexible result formatting thanks to the built-in Template Toolkit template engine, which allows it to output results in any 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, $social, $logo, $description, $link\n')
Example result:
Пироги № 1 (4.9): Россия, Москва, улица Большие Каменщики, 9, стр. Б, 256, , Доставка еды, Пиццерии, Пекарни, бесплатная доставка, оплата картой, доставка продуктов, доставка еды, https://piroginomerodin.ru/, +7 (499) 642-32-71, +7 (495) 127-78-47, https://avatars.mds.yandex.net/get-altay/4489303/2a000001787d1771aebf8b4b849d986caea1/XXXL, 37.65577,55.738421, https://vk.com/piroginomerodin, https://www.instagram.com/piroginomerodin/, https://avatars.mds.yandex.net/get-tycoon/474201/2a0000016dd037b101f0cd4ad3968416440e/priority-headline-logo, , https://yandex.ru/maps/org/105121172016/
Einstein lounge (4.8): Россия, Москва, Таганская улица, 29, стр. 1, 153, 900–1500 ₽, Кальян-бары, Бары, пабы, Интеллектуальные игры, настольные игры, летняя веранда, оплата картой, бизнес-ланч, проектор, Wi-Fi, спортивные трансляции, , +7 (968) 068-99-09, https://avatars.mds.yandex.net/get-altay/2419289/2a000001748889d4246610a4f452790b8eee/XXXL, 37.668036,55.739651, https://www.instagram.com/einstein_lounge/, https://avatars.mds.yandex.net/get-tycoon/1635364/2a00000170a408e3bda96d25bf44857eed75/priority-headline-logo, , https://yandex.ru/maps/org/127811263445/
Gusto (4.1): Россия, Москва, улица Большая Дмитровка, 7/5с1, 133, 1500–1700 ₽, Рестораны, Пиццерии, бизнес-ланч, Wi-Fi, кофе с собой, еда навынос, летняя веранда, оплата картой, спортивные трансляции, http://www.gusto-moscow.ru/, +7 (495) 650-69-22, https://avatars.mds.yandex.net/get-altay/2887807/2a0000017357f4fe86d86cd5d3e300855b86/XXXL, 37.614142,55.760285, https://www.facebook.com/pages/gusto-итальянская-кухня/300193353486996, https://www.instagram.com/gusto.rest/, , , https://yandex.ru/maps/org/1080982853/
Shisha City (4.4): Россия, Москва, Воронцовская улица, 6, стр. 7, 68, 900–1200 ₽, Кальян-бары, Бары, пабы, Антикафе, настольные игры, парковка для инвалидов, оплата картой, крафтовое пиво, Предзаказ онлайн, Wi-Fi, спортивные трансляции, http://www.shishataganka.ru/, +7 (958) 100-62-71, https://avatars.mds.yandex.net/get-altay/212783/2a0000015d991abf6d89fa812daac5491c4f/XXXL, 37.654414,55.739423, https://vk.com/shishacitytaganka, https://www.facebook.com/shishacitytaganka, https://www.instagram.com/shishacitytaganka, https://avatars.mds.yandex.net/get-tycoon/479792/2a000001746e2044d0177e25adeba8e943ac/priority-headline-logo, , https://yandex.ru/maps/org/1695943598/
Output of data in CSV
Result format:
[% FOREACH serp;
tools.CSVline(name, rating, address, reviews, price);
END;
%]
Example result:
"Пироги № 1",4.9,"Россия, Москва, улица Большие Каменщики, 9, стр. Б",256,
"Einstein lounge",4.8,"Россия, Москва, Таганская улица, 29, стр. 1",153,"900–1500 ₽"
Gusto,4.1,"Россия, Москва, улица Большая Дмитровка, 7/5с1",134,"1500–1700 ₽"
"Shisha City",4.4,"Россия, Москва, Воронцовская улица, 6, стр. 7",68,"900–1200 ₽"
"Кальянная Культ Game",4.5,"Россия, Москва, улица Шаболовка, 2",66,"1200–1500 ₽"
Output of data in JSON
Initial text:
[% data = {} %]
Final text:
[% data.json %]
Result format:
[%
data.query = query;
data.serp = [];
FOREACH serp;
item = {};
item.name = name;
item.rating = rating;
item.address = address;
item.phones = phones;
data.serp.push(item);
END;
result = {};
result = data;
%]
Example result:
{
"query": "пицца",
"serp": [
{
"name": "Пироги № 1",
"address": "Россия, Москва, улица Большие Каменщики, 9, стр. Б",
"phones": "+7 (499) 642-32-71, +7 (495) 127-78-47",
"rating": "4.9"
},
{
"name": "Einstein lounge",
"address": "Россия, Москва, Таганская улица, 29, стр. 1",
"phones": "+7 (968) 068-99-09",
"rating": "4.8"
},
{
"name": "Gusto",
"address": "Россия, Москва, улица Большая Дмитровка, 7/5с1",
"phones": "+7 (495) 650-69-22",
"rating": "4.1"
},
]
}
To make the "Initial text" and "Final text" options available in the Task Editor, you need to activate "More options".
Possible settings
Parameter | Default value | Description |
---|---|---|
Coordinates | 55.780844,37.6572693 | Search area coordinates, required parameter |
Zoom | 11 | Zoom, required parameter |
Pages count | 5 | Number of pages |
Language | English | Select language of results |
AntiGate preset | default | Pre-configured preset of the ![]() |