Skip to main content

Shop::Ozon::ProductsList - Ozon product list scraper

Ozon Product List

Scraper Overview​

Shop::Ozon::ProductsList collects products from Ozon search results: the link, name, price, old price, rating, number of reviews, image, badge, and category. It also collects tags for the search phrase. The search phrase is used as the query.

A-Parser lets you save scraping settings for later use (presets), schedule scraping, and much more. You can use automatic query expansion, insert subqueries from files, and iterate through alphanumeric combinations and lists to get as many results as possible.

You can save results in the format and structure you need using the powerful built-in Template Toolkit templating engine, which lets you apply additional logic to results and output data in various formats, including JSON, SQL, and CSV.

Collected Data​

  • Number of products ($totalcount)

Product list array ($items):

  • Link ($items.$i.link)
  • Name ($items.$i.name)
  • Rating ($items.$i.rating)
  • Number of reviews ($items.$i.reviews)
  • Price ($items.$i.price)
  • Old price ($items.$i.oldPrice)
  • Image ($items.$i.image)
  • Badge ($items.$i.badge)
  • Category ($items.$i.cat)

Tags array ($tags):

  • Tag ($tags.$i.tag)

Use Cases​

  • Collect links, prices, and ratings from search results
  • Collect tags for a search phrase
  • Pass links to Shop::Ozon::ProductInfoShop::Ozon::ProductInfo

Queries​

Enter a search phrase as a query, just as you would in Ozon search, for example:

socks
sneakers
tank tops and T-shirts

Query Substitutions​

You can use built-in macros to automatically insert subqueries from files. For example, you may want to add a list of words to each query. In the Keywords.txt file:

discount
promotion
sale

In the query format, specify a macro to insert additional words from the Keywords.txt file. This method can multiply the variety of queries:

$query {subs:Keywords}

This macro creates as many additional queries for each original search query as there are entries in the file. In total, the macro produces [number of original queries] x [number of queries in the Keywords file] = [total number of queries].

For example, if the original queries are socks, sneakers, and tank tops and T-shirts, and the Keywords.txt file contains the substitutions listed above, the result will be 9 queries:

socks discount
sneakers discount
tank tops and T-shirts discount
socks promotion
sneakers promotion
tank tops and T-shirts promotion
socks sale
sneakers sale
tank tops and T-shirts sale

Result Output Options​

A-Parser supports flexible result formatting with its built-in Template Toolkit templating engine, which lets you output results in any format, including structured formats such as CSV or JSON.

Default Format​

Result format:

$items.format('$link\n')

Example result:

https://www.ozon.ru/product/noski-muzhskie-10-par-3236858564/
https://www.ozon.ru/product/noski-zhenskie-10-par-5563637175/
https://www.ozon.ru/product/noski-omsa-muzhskie-eco-10-par-230688890/
https://www.ozon.ru/product/noski-muzhskie-3-pary-3479217023/
https://www.ozon.ru/product/noski-minimi-zhenskie-3-pary-3033924327/
https://www.ozon.ru/product/noski-muzhskie-10-par-1867522622/
https://www.ozon.ru/product/noski-muzhskie-10-par-1654915121/
https://www.ozon.ru/product/noski-muzhskie-noski-10-par-2623996698/

Name, Price, and Rating​

Result format:

$items.format('$name; $price; $oldPrice; $rating; $reviews\n')

Example result:

Men's socks, 10 pairs; 540; 2800; 4.9; 110959
Women's socks, 10 pairs; 779; 5000; 4.9; 4894
Men's Omsa Eco socks, 10 pairs; 921; 1776; 4.9; 328006
Men's socks, 3 pairs; 1269; ; 4.9; 4329
Women's Minimi socks, 3 pairs; 383; 719; 4.9; 19000
Men's socks, 10 pairs; 614; 1289; 4.9; 27701
Men's socks, 10 pairs; 669; 1459; 4.9; 27701
Men's socks socks, 10 pairs; 572; 2900; 4.9; 54609

Tags​

Result format:

$totalcount
$tags.format('$tag\n')

Example result:

8
men's
women's
white
New Year's
warm

Output to a CSV Table​

The built-in $tools.CSVLine utility creates valid tabular documents ready to import into Excel or Google Sheets.

Result format:

[% FOREACH i IN items;
tools.CSVline(i.link, i.name, i.price, i.oldPrice, i.rating, i.reviews, i.cat, i.badge, i.image);
END %]

File name:

$datefile.format().csv

Initial text:

Link,Name,Price,Old price,Rating,Reviews,Category,Badge,Image

Example result:

Link,Name,Price,Old price,Rating,Reviews,Category,Badge,Image
https://www.ozon.ru/product/noski-muzhskie-10-par-3236858564/,"Men's socks, 10 pairs",540,2800,4.9,110959,Clothing,Wow prices,https://ir.ozone.ru/s3/multimedia-1-u/20827456410.jpg
https://www.ozon.ru/product/noski-zhenskie-10-par-5563637175/,"Women's socks, 10 pairs",779,5000,4.9,4894,Clothing,Sale,https://ir.ozone.ru/s3/multimedia-1-2/14813238206.jpg
https://www.ozon.ru/product/noski-omsa-muzhskie-eco-10-par-230688890/,"Men's Omsa Eco socks, 10 pairs",921,1776,4.9,328006,Clothing,Wow prices,https://ir.ozone.ru/s3/multimedia-f/6845028747.jpg
https://www.ozon.ru/product/noski-muzhskie-3-pary-3479217023/,"Men's socks, 3 pairs",1269,,4.9,4329,Clothing,,https://ir.ozone.ru/s3/multimedia-1-a/9081656074.jpg
https://www.ozon.ru/product/noski-minimi-zhenskie-3-pary-3033924327/,"Women's Minimi socks, 3 pairs",383,719,4.9,19000,Clothing,Wow prices,https://ir.ozone.ru/s3/multimedia-1-w/8230916048.jpg
https://www.ozon.ru/product/noski-muzhskie-10-par-1867522622/,"Men's socks, 10 pairs",614,1289,4.9,27701,Clothing,Wow prices,https://ir.ozone.ru/s3/multimedia-1-q/7329242582.jpg
https://www.ozon.ru/product/noski-muzhskie-10-par-1654915121/,"Men's socks, 10 pairs",669,1459,4.9,27701,Clothing,Wow prices,https://ir.ozone.ru/s3/multimedia-1-h/8807323697.jpg
https://www.ozon.ru/product/noski-muzhskie-noski-10-par-2623996698/,"Men's socks socks, 10 pairs",572,2900,4.9,54609,Clothing,Sale,https://ir.ozone.ru/s3/multimedia-1-0/14350731408.jpg
tip

To set the results file name, simply change the file extension to csv.

To make the "Prepend text" option available in the Task Editor, enable "More options". Enter the column names separated by commas in "Prepend text", then leave the second line blank.

Saving in SQL Format​

Result format:

[% FOREACH item IN items;
"INSERT INTO products VALUES('" _ item.name _ "', '" _ item.link _ "', '" _ item.price _ "', '" _ item.oldPrice _ "', '" _ item.rating _ "', '" _ item.reviews _ "')\n";
END %]

Example result:

INSERT INTO products VALUES('Men’s socks, 10 pairs', 'https://www.ozon.ru/product/noski-muzhskie-10-par-3236858564/', '540', '2800', '4.9', '110959')
INSERT INTO products VALUES('Women’s socks, 10 pairs', 'https://www.ozon.ru/product/noski-zhenskie-10-par-5563637175/', '779', '5000', '4.9', '4894')
INSERT INTO products VALUES('Omsa men’s Eco socks, 10 pairs', 'https://www.ozon.ru/product/noski-omsa-muzhskie-eco-10-par-230688890/', '921', '1776', '4.9', '328006')
INSERT INTO products VALUES('Men’s socks, 3 pairs', 'https://www.ozon.ru/product/noski-muzhskie-3-pary-3479217023/', '1269', '', '4.9', '4329')
INSERT INTO products VALUES('Minimi women’s socks, 3 pairs', 'https://www.ozon.ru/product/noski-minimi-zhenskie-3-pary-3033924327/', '383', '719', '4.9', '19000')
INSERT INTO products VALUES('Men’s socks, 10 pairs', 'https://www.ozon.ru/product/noski-muzhskie-10-par-1867522622/', '614', '1289', '4.9', '27701')
INSERT INTO products VALUES('Men’s socks, 10 pairs', 'https://www.ozon.ru/product/noski-muzhskie-10-par-1654915121/', '669', '1459', '4.9', '27701')
INSERT INTO products VALUES('Men’s socks socks, 10 pairs', 'https://www.ozon.ru/product/noski-muzhskie-noski-10-par-2623996698/', '572', '2900', '4.9', '54609')

Dumping Results to JSON​

General result format:

[% result.${query} = {
totalcount = p1.totalcount
tags = []
items = []
};

FOREACH i IN p1.tags;
result.${query}.tags.push(i.tag);
END;

FOREACH i IN p1.items;
item = {};
item.link = i.link;
item.name = i.name;
item.rating = i.rating;
item.reviews = i.reviews;
item.price = i.price;
item.oldPrice = i.oldPrice;
item.image = i.image;
item.badge = i.badge;
item.cat = i.cat;
result.${query}.items.push(item);
END %]

Initial text:

[% result = {} %]

Final text:

[% result.json %]

Example result:

{
"socks": {
"totalcount": 8,
"tags": [
"men's",
"women's",
"white",
"New Year's",
"warm"
],
"items": [
{
"link": "https://www.ozon.ru/product/noski-muzhskie-10-par-3236858564/",
"name": "Men's socks, 10 pairs",
"rating": "4.9",
"reviews": "110959",
"price": "540",
"oldPrice": "2800",
"image": "https://ir.ozone.ru/s3/multimedia-1-u/20827456410.jpg",
"badge": "Wow prices",
"cat": "Clothing"
},
{
"link": "https://www.ozon.ru/product/noski-zhenskie-10-par-5563637175/",
"name": "Women's socks, 10 pairs",
"rating": "4.9",
"reviews": "4894",
"price": "779",
"oldPrice": "5000",
"image": "https://ir.ozone.ru/s3/multimedia-1-2/14813238206.jpg",
"badge": "Sale",
"cat": "Clothing"
},
{
"link": "https://www.ozon.ru/product/noski-omsa-muzhskie-eco-10-par-230688890/",
"name": "Men's Omsa Eco socks, 10 pairs",
"rating": "4.9",
"reviews": "328006",
"price": "921",
"oldPrice": "1776",
"image": "https://ir.ozone.ru/s3/multimedia-f/6845028747.jpg",
"badge": "Wow prices",
"cat": "Clothing"
},
{
"link": "https://www.ozon.ru/product/noski-muzhskie-3-pary-3479217023/",
"name": "Men's socks, 3 pairs",
"rating": "4.9",
"reviews": "4329",
"price": "1269",
"oldPrice": "",
"image": "https://ir.ozone.ru/s3/multimedia-1-a/9081656074.jpg",
"badge": "",
"cat": "Clothing"
},
{
"link": "https://www.ozon.ru/product/noski-minimi-zhenskie-3-pary-3033924327/",
"name": "Women's Minimi socks, 3 pairs",
"rating": "4.9",
"reviews": "19000",
"price": "383",
"oldPrice": "719",
"image": "https://ir.ozone.ru/s3/multimedia-1-w/8230916048.jpg",
"badge": "Wow prices",
"cat": "Clothing"
},
{
"link": "https://www.ozon.ru/product/noski-muzhskie-10-par-1867522622/",
"name": "Men's socks, 10 pairs",
"rating": "4.9",
"reviews": "27701",
"price": "614",
"oldPrice": "1289",
"image": "https://ir.ozone.ru/s3/multimedia-1-q/7329242582.jpg",
"badge": "Wow prices",
"cat": "Clothing"
},
{
"link": "https://www.ozon.ru/product/noski-muzhskie-10-par-1654915121/",
"name": "Men's socks, 10 pairs",
"rating": "4.9",
"reviews": "27701",
"price": "669",
"oldPrice": "1459",
"image": "https://ir.ozone.ru/s3/multimedia-1-h/8807323697.jpg",
"badge": "Wow prices",
"cat": "Clothing"
},
{
"link": "https://www.ozon.ru/product/noski-muzhskie-noski-10-par-2623996698/",
"name": "Men's socks socks, 10 pairs",
"rating": "4.9",
"reviews": "54609",
"price": "572",
"oldPrice": "2900",
"image": "https://ir.ozone.ru/s3/multimedia-1-0/14350731408.jpg",
"badge": "Sale",
"cat": "Clothing"
}
]
}
}
tip

To make the "Prepend text" and "Append text" options available in the Task Editor, enable "More options".

Available Settings​

ParameterDefault valueDescription
Pages count5How many result pages to collect
Sort byPopularityProduct order: Popularity, Rating, Price ascending, Price descending, Discount, Newly
Max concurrent browser pages10How many Chrome pages the scraper can keep open at once. A higher value increases memory and CPU load
Chrome Headless☑If enabled, the Chrome window is hidden
Use session☑Saves the session and uses it in subsequent queries