Maps::Yandex - Yandex Maps Scraper

Overview of the Yandex Maps Scraper
The Yandex Maps scraper collects contact information for organizations.
A-Parser's 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, iteration over alphanumeric combinations and lists to get the maximum possible number of results.
The results can be saved in the form and structure you need, thanks to the built-in powerful templater Template Toolkit which allows applying additional logic to the results and outputting data in various formats, including JSON, SQL and CSV.
Data Collected
- Organization Name
- Address and coordinates
- Rating, number of reviews, and pricing policy
- Categories and tags
- Website, social networks, and phones
- Link to photos and logo
- Description
- Link to the organization's page on Yandex Maps
- Information about the business hours
Capabilities
- It is mandatory to specify the coordinates and zoom of the area in which the search is performed
- Ability to set the number of pages for data retrieval
- Ability to specify the results language
- Ability to use Antigate for CAPTCHA bypass
Use Cases
- Collection of a list of organizations present in a specified area
- Obtaining organization contacts
- Any other scenarios involving searching for organizations on maps
Queries
As queries, you must specify keywords, just as you would enter them directly into the Yandex Maps search form, for example:
pizza
Examples of Output Results
A-Parser supports flexible result formatting thanks to the built-in templater Template Toolkit, which allows it to output results in any desired 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:
Pirogi № 1 (4.9): Russia, Moscow, Bolshiye Kamenshchiki Street, 9, str. B
Einstein lounge (4.8): Russia, Moscow, Taganskaya Street, 29, str. 1
Gusto (4.1): Russia, Moscow, Bolshaya Dmitrovka street, 7/5s1
Friends (4.4): Russia, Moscow, Krasnobogatyrskaya Street, 90, str. 2
Shisha City (4.4): Russia, Moscow, Vorontsovskaya street, 6, str. 7
Jacks (4.4): Russia, Moscow, 1-ya Frezernaya street, 2/1s10
Restaurant Guilty Pleasure (4.3): Russia, Moscow, Oruzheyny lane, 15A
White Fox (4.3): Russia, Moscow, Bolshoy Drovyany Lane, 6
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:
Pirogi № 1 (4.9): Russia, Moscow, Bolshiye Kamenshchiki Street, 9, str. B, 256, , Food Delivery, Pizza places, Bakeries, free delivery, card payment, grocery delivery, food delivery, 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): Russia, Moscow, Taganskaya Street, 29, str. 1, 153, 900–1500 ₽, Hookah Bars, Bars, pubs, Intellectual Games, board games, summer veranda, card payment, business lunch, projector, Wi-Fi, sports broadcasts, , +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): Russia, Moscow, Bolshaya Dmitrovka street, 7/5s1, 133, 1500–1700 ₽, Restaurants, Pizza places, business lunch, Wi-Fi, coffee to go, food takeaway, summer veranda, card payment, sports broadcasts, 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): Russia, Moscow, Vorontsovskaya street, 6, str. 7, 68, 900–1200 ₽, Hookah Bars, Bars, pubs, Anti-cafes, board games, disabled parking, card payment, craft beer, Online Pre-order, Wi-Fi, sports broadcasts, 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 to CSV Table
Result format:
[% FOREACH serp;
tools.CSVline(name, rating, address, reviews, price);
END %]
Example result:
"Pirogi № 1",4.9,"Russia, Moscow, Bolshiye Kamenshchiki Street, 9, str. B",256,
"Einstein lounge",4.8,"Russia, Moscow, Taganskaya Street, 29, str. 1",153,"900–1500 ₽"
Gusto,4.1,"Russia, Moscow, Bolshaya Dmitrovka street, 7/5s1",134,"1500–1700 ₽"
"Shisha City",4.4,"Russia, Moscow, Vorontsovskaya street, 6, str. 7",68,"900–1200 ₽"
"Hookah Cult Game",4.5,"Russia, Moscow, Shabolovka street, 2",66,"1200–1500 ₽"
Dump Results to JSON
Общий формат результата:
[% IF notFirst;
",\n";
ELSE;
notFirst = 1;
END;
obj = {};
obj.query = query;
obj.serp = [];
FOREACH item IN p1.serp;
obj.serp.push({
name = item.name
rating = item.rating
address = item.address
phones = item.phones
});
END;
obj.json %]
Начальный текст:
[
Конечный текст:
]
Example result:
[{
"query": "pizza",
"serp": [
{
"name": "Pirogi № 1",
"address": "Russia, Moscow, Bolshiye Kamenshchiki Street, 9, str. B",
"phones": "+7 (499) 642-32-71, +7 (495) 127-78-47",
"rating": "4.9"
},
{
"name": "Einstein lounge",
"address": "Russia, Moscow, Taganskaya Street, 29, str. 1",
"phones": "+7 (968) 068-99-09",
"rating": "4.8"
},
{
"name": "Gusto",
"address": "Russia, Moscow, Bolshaya Dmitrovka street, 7/5s1",
"phones": "+7 (495) 650-69-22",
"rating": "4.1"
},
]
}]
For the "Initial text" and "Final text" options to be available in the Job Editor, you need to activate "More options."
Possible Settings
| Parameter | Default Value | Description |
|---|---|---|
| Coordinates | 55.780844,37.6572693 | Coordinates of the search area, required parameter |
| Zoom | 11 | Zoom, required parameter |
| Pages count | 5 | Number of pages |
| Language | English | Selection of results language |
| AntiGate preset | default | Pre-configured scraper preset Util::AntiGate |
