Skip to main content

Shop::Yandex::Market - Product parser from YANDEX.MARKET

img

Shop::Yandex::Market product parser overview

Using the Yandex market product parser, you can get data from the product card, collect a database of links to products, track the dynamics of prices for the product, changes in the number of sellers, collect the rating score and the number of reviews for the product, collect product images.

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 get the maximum possible number of results.

Collected data

img

  • Product name
  • Link to product
  • Product image
  • Price and old price
  • Currency
  • Rating and number of comments
  • Number of sellers
  • Additional information
  • Number of purchases and views of the product

Usage options

  • Collecting links to products
  • Evaluating the popularity of products
  • Tracking the dynamics of prices and popularity of products

Query examples

As queries, you need to specify keywords or a link to a category, for example:

xiaomi redmi note
https://market.yandex.ru/catalog/54726/list?local-offers-first=0&deliveryincluded=0&onstock=1ы

Result output options

Output to csv

You can use the Template-Toolkit template engine to output the result to csv, for example, we can write such columns to a csv file: Link to product, Product name, Minimum price, Rating, Number of comments

Result format:

[% FOREACH item IN products;   
tools.CSVline(item.cardlink, item.title, item.amountfrom, item.rating, item.commentscount );
END %]

Result example:

https://market.yandex.ru/product--smartfon-apple-iphone-11-64gb/558171067?nid=54726&show-uid=16206538929466307988916001&context=search&text=iphone&sku=101106266737,"Смартфон Apple iPhone 11 64GB","46 244",4.7,810
https://market.yandex.ru/product--smartfon-apple-iphone-xr-64gb/175941311?nid=54726&show-uid=16206538929466307988916002&context=search&text=iphone&sku=101103379766,"Смартфон Apple iPhone Xr 64GB","36 990",4.7,624
https://market.yandex.ru/product--smartfon-apple-iphone-12-64gb/722976004?nid=54726&show-uid=16206538929466307988916003&context=search&text=iphone&sku=101077347750,"Смартфон Apple iPhone 12 64GB","60 840",4.7,103
https://market.yandex.ru/product--smartfon-apple-iphone-se-2020-64gb/661221015?nid=54726&show-uid=16206538929466307988916004&context=search&text=iphone&sku=101099789863,"Смартфон Apple iPhone SE 2020 64GB","33 490",4.5,358

Output with variable names

Result format:

$products.format('Название: $title, Минимальная цена: $amountfrom, Рейтинг: $rating\n')

Result example:

Название: Смартфон Apple iPhone 11 64GB, Минимальная цена: 46 244,  Рейтинг: 4.7
Название: Смартфон Apple iPhone Xr 64GB, Минимальная цена: 36 990, Рейтинг: 4.7
Название: Смартфон Apple iPhone 12 64GB, Минимальная цена: 60 840, Рейтинг: 4.7
Название: Смартфон Apple iPhone SE 2020 64GB, Минимальная цена: 33 490, Рейтинг: 4.5
Название: Смартфон Apple iPhone Xr 128GB, Минимальная цена: 43 450, Рейтинг: 4.7

Saving in SQL format

Result format:

[% FOREACH item IN p1.products;
"INSERT INTO products VALUES('" _ item.title _ "', '"; item.cardlink _ "', '"; item.amountfrom _ "', '"; item.rating _ "')\n";
END %]

Result example:

INSERT INTO products VALUES('Смартфон Apple iPhone 11 64GB', 'https://market.yandex.ru/product--smartfon-apple-iphone-11-64gb/558171067?nid=54726&show-uid=16206542754162480526716001&context=search&text=iphone&sku=101106266737', '46 244', '4.7')
INSERT INTO products VALUES('Смартфон Apple iPhone Xr 64GB', 'https://market.yandex.ru/product--smartfon-apple-iphone-xr-64gb/175941311?nid=54726&show-uid=16206542754162480526716002&context=search&text=iphone&sku=101103379766', '36 990', '4.7')
INSERT INTO products VALUES('Смартфон Apple iPhone 12 64GB', 'https://market.yandex.ru/product--smartfon-apple-iphone-12-64gb/722976004?nid=54726&show-uid=16206542754162480526716003&context=search&text=iphone&sku=101077347750', '60 840', '4.7')
INSERT INTO products VALUES('Смартфон Apple iPhone SE 2020 64GB', 'https://market.yandex.ru/product--smartfon-apple-iphone-se-2020-64gb/661221015?nid=54726&show-uid=16206542754162480526716004&context=search&text=iphone&sku=101099789863', '33 490', '4.5')

Dumping results to JSON

Result format:

[% data = {};
data.query = query;
data.items = [];
FOREACH i IN p1.products;
item = {};
item.link = i.cardlink;
item.name = i.title;
item.price = i.amountfrom;
data.items.push(item);
END;

data.json %]
{
"query": "https://market.yandex.ru/catalog--mobilnye-telefony/54726/list?text=iphone&hid=91491&was_redir=1&rt=10&cpa=0&onstock=0&local-offers-first=0",
"items": [
{
"link": "https://market.yandex.ru/product--smartfon-apple-iphone-11-64gb/558171067?nid=54726&show-uid=16206548825917275667016001&context=search&text=iphone&sku=101106266737",
"amountfrom": "46 244",
"name": "Смартфон Apple iPhone 11 64GB"
},
{
"link": "https://market.yandex.ru/product--smartfon-apple-iphone-xr-64gb/175941311?nid=54726&show-uid=16206548825917275667016002&context=search&text=iphone&sku=101103379766",
"amountfrom": "36 990",
"name": "Смартфон Apple iPhone Xr 64GB"
},
{
"link": "https://market.yandex.ru/product--smartfon-apple-iphone-12-64gb/722976004?nid=54726&show-uid=16206548825917275667016003&context=search&text=iphone&sku=101077347750",
"amountfrom": "60 840",
"name": "Смартфон Apple iPhone 12 64GB"
},
{
"link": "https://market.yandex.ru/product--smartfon-apple-iphone-se-2020-64gb/661221015?nid=54726&show-uid=16206548825917275667016004&context=search&text=iphone&sku=101099789863",
"amountfrom": "33 490",
"name": "Смартфон Apple iPhone SE 2020 64GB"
}

]
}

Possible settings

ParameterDefault valueDescription
Pages count5Number of pages for parsing
Search region ID-Region for parsing
AntiGate presetdefaultUtil:AntiGate parser preset. You need to configure the Util::AntiGate parser in advance - specify your access key and other parameters, and then select the created preset here