Shop::Amazon - Amazon product scraper

Overview of the scraper
Using the Amazon product scraper, you can get all data from a product card, collect a database of product links, track price dynamics and delivery costs, collect rating assessments and the number of reviews for a product, gather product images, and get a list of stores.
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 of alphanumeric combinations and lists to get the maximum possible number of results.

Collected data

- Product name
- Product link
- Product image
- Price and price without discount
- Rating, number of comments
- Number of sales and sellers
- Seller
- Additional information (Bestseller, Sponsored)
Use cases
- Collecting product links
- Assessing product popularity
- Tracking price dynamics
Queries
The queries should be product names, just as if they were entered directly into the Amazon search form, for example:
iphone 11pro max
Wireless Bluetooth mouse, home gaming mouse
Micro Sd Sandisk memory card, Micro Sd Class10 TF card
AMD Ryzen R3 2200U
Query substitutions
You can use built-in macros to multiply queries, for example, if we want to get a very large database of products by brands,
philips
sony
xiaomi
samsung
In the query format, we will specify character iteration from a to zzzz, this method allows maximum rotation of the search results and yields many new unique results:
$query {az:a:zzzz}
This macro will create 475254 additional queries for each original search query, which in total will give 4 x 475254 = 1901016 search queries. The number is impressive, but it's not a problem at all for A-Parser. At a speed of 2000 requests per minute, such a task will be processed in just 16 hours.
Output results examples
A-Parser supports flexible results formatting thanks to the built-in templating engine Template Toolkit, which allows it to output results in any arbitrary form, as well as in structured forms, such as CSV or JSON
Outputting name, new and old price, currency
Result format:
$products.format('$title, $price, $oldprice, $currency\n');
Result example:
Vertical Stand with Dual Cooling Fans for Sony PS5 Digital Edition & PS5 UHD with 2 DualSense PS5 Controller Chargers and 3 USB Ports for Sony Playstation 5 DE & UHD Edition, 39.99, $46.99, $
Marvel's Spider-Man: Miles Morales Ultimate Launch Edition – PlayStation 5, 69.99, , $
Ps5 skin protective wrap customizable cover vinyl sticker decals for sony playstation 5 disk version console and two dual sense 5 sticker skins cyber net yellow black blue, 21.99, , $
Werewolf: The Apocalypse - Earthblood (PS5) - PlayStation 5, 49.99, , $
Sackboy: A Big Adventure – PlayStation 5, 59.99, , $
Charger Stand for PS5 DualSense Controller, MENEEA Controller Type-C Fast Dual Charging Station Dock with LED Indicator for Sony Playstation 5 with Dual Detachable USB C Ports, 14.99, $17.99, $
HEYSTOP PS5 Controller Charger, PS5 Wireless Charger DualSense Fast Charging Station Compatible with Sony Playstation 5 Controller, 15.99, , $
Marvel’s Spider-Man: Miles Morales Launch Edition – PlayStation 5, 49.44, , $
CYTXSWARDWELL PS5 Controller Charger, Dual USB PS5 Controller Charging Station, for Playstation 5 Console DualSense PS5 Controllers. (Pearl White), 18.99, , $
Seltureone Compatible for Playstation 5 Media Remote Cover, Silicone Protective Case Sleeve for PS5 Remote Control, Shock Absorption Washable, White, 9.95, , $
PS5 Controller Cover Case, Anti-Slip Silicone Skin Protective Cover Case for Playstation 5 DualSense Wireless Controller with 8 Thumb Grip Caps(Comics Dynamic), 11.99, , $
Outputting name, price, and currency
Result format:
$products.format('Name: $title, Price: $price, Currency: $currency\\n');
Result example:
Name: Resident Evil Village Deluxe Edition - PlayStation 5 Deluxe Edition, Price: 69.99, Currency: $
Name: DualSense Wireless Controller, Price: 69.98, Currency: $
Name: Persona 5 Strikers - PlayStation 4, Price: 59.99, Currency: $
Name: Assassin’s Creed Valhalla PlayStation 5 Standard Edition, Price: 34.99, Currency: $
Name: Demon’s Souls – PlayStation 5, Price: 69.99, Currency: $
Name: NexiGo Dobe PS5 Controller Charger, Upgraded Playstation 5 Charging Station Dock with LED Indicator, Safety Chip Protection, Dual USB Type C Fast Charging, for Sony DualSense Controller, White, Price: 19.99, Currency: $
Name: PS5 Controller Charger, Charging Dock for Playstation 5 / PS5/ Controller, OIVO PS5 Controller Charging Dock Station with 2 USB-C Adapter with LED Indicator, Price: 17.99, Currency: $
Name: PlayStation 5 DualSense Wireless Controller, Price: 79.95, Currency: $
Outputting result and price with delivery cost to CSV table
Let's output the result with the variable total_price, which is equal to the sum of the product + delivery cost, the delivery price is conditional (50$)
Result format:
[% FOREACH item IN products;
total_price = item.price + 50;
tools.CSVline(item.title, item.price, total_price );
END %]
Result example:
Charger Stand for PS5 DualSense Controller, MENEEA Controller Type-C Fast Dual Charging Station Dock with LED Indicator for Sony Playstation 5 with Dual Detachable USB C Ports",14.99,64.99
"Marvel's Spider-Man: Miles Morales Ultimate Launch Edition – PlayStation 5",69.99,119.99
"PlayStation 5 DualSense Wireless Controller",79.95,129.95
"HEYSTOP PS5 Controller Charger, PS5 Wireless Charger DualSense Fast Charging Station Compatible with Sony Playstation 5 Controller",15.99,65.99
"PS5 Controller Charger, Charging Dock for Playstation 5 / PS5/ Controller, OIVO PS5 Controller Charging Dock Station with 2 USB-C Adapter with LED Indicator",17.99,67.99
"PS5 Controller Cover Case, Anti-Slip Silicone Skin Protective Cover Case for Playstation 5 DualSense Wireless Controller with 8 Thumb Grip Caps(Comics Dynamic)",11.99,61.99
"PomisGam Vertical Stand for Playstation 5 with Cooling Fan Charing Station for PS5 Digital Edition/PS5 Ultra HD,Multi-Function Charger Station with 2 Controller Charging Docks",35.99,85.99
"Vertical Stand with Dual Cooling Fans for Sony PS5 Digital Edition & PS5 UHD with 2 DualSense PS5 Controller Chargers and 3 USB Ports for Sony Playstation 5 DE & UHD Edition",39.99,89.99
"Persona 5 Strikers - PlayStation 4",59.99,109.99
"FYOUNG Controller Charging Station for PS5, Charging Dock Compatible for Playstation 5 DualSense Wireless Controller with LED Light Indicators and USB C Cable",16.99,66.99
"PlayStation 5 Console",,50
"Resident Evil Village - PlayStation 5 Standard Edition",59.99,109.99
Outputting result with scraping date to CSV table
Let's output the result with the variable total_price, which is equal to the sum of the product + max delivery cost
Result format:
[% USE date;
d = date.format(mytime, format = "%Y %d %H:%M");
FOREACH item IN products;
total_price = item.price + 50;
tools.CSVline(d, item.title, item.price, item.link, total_price );
END %]
Result example:
"2021 29 18:31","PlayStation 5 Console",,https://www.amazon.com/PlayStation-5-Console/dp/B08FC5L3RG/ref=sr_1_1?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-1,50
"2021 29 18:31","PlayStation 4 Console - 1TB Slim Edition",384.99,https://www.amazon.com/PlayStation-4-Console-1TB-Slim/dp/B074LRF639/ref=sr_1_2?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-2,434.99
"2021 29 18:31","PlayStation VR Marvel's Iron Man VR Bundle",349.99,https://www.amazon.com/PlayStation-Marvels-Iron-Man-Bundle-4/dp/B08NRGF2DL/ref=sr_1_3?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-3,399.99
"2021 29 18:31","Turtle Beach Stealth 600 White Gen 2 Wireless Gaming Headset for PlayStation 5 and PlayStation 4",99.95,https://www.amazon.com/Stealth-Wireless-Gaming-Headset-PlayStation-Console/dp/B08D44WZTS/ref=sr_1_4?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-4,149.95
"2021 29 18:31","$100 PlayStation Store Gift Card [Digital Code]",100.00,https://www.amazon.com/PlayStation-Store-Gift-Card-Digital/dp/B00K59HKIQ/ref=sr_1_5?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-5,150
"2021 29 18:31","Oculus Quest 2 — Advanced All-In-One Virtual Reality Headset — 256 GB",399.00,https://www.amazon.com/Oculus-Quest-Advanced-All-One-2/dp/B08F7PTF54/ref=sr_1_6?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-6,449
"2021 29 18:31","DualSense Wireless Controller",69.98,https://www.amazon.com/DualSense-Wireless-Controller-PlayStation-5/dp/B08FC6C75Y/ref=sr_1_7?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-7,119.98
"2021 29 18:31","Resident Evil Village Deluxe Edition - PlayStation 5 Deluxe Edition",69.99,https://www.amazon.com/Resident-Evil-Village-Deluxe-PlayStation-5/dp/B08TR5R8S4/ref=sr_1_8?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-8,119.99
"2021 29 18:31","Demon’s Souls – PlayStation 5",68.95,https://www.amazon.com/Demons-Souls-PlayStation-5/dp/B08FC5TTBF/ref=sr_1_10?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-10,118.95
"2021 29 18:31","Marvel's Spider-Man: Miles Morales Ultimate Launch Edition – PlayStation 5",69.99,https://www.amazon.com/Marvels-Spider-Man-Morales-Ultimate-Launch-PlayStation/dp/B08FC66ZV4/ref=sr_1_11?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-11,119.99
"2021 29 18:31","Persona 5 Strikers - PlayStation 4",59.99,https://www.amazon.com/Persona-5-Strikers-PlayStation-4/dp/B08Q6YYLN5/ref=sr_1_12?dchild=1&keywords=playstation+5&qid=1611934312&sr=8-12,109.99
Output to CSV table
Result format:
[% FOREACH item IN products;
tools.CSVline(item.link, item.title, item.price, item.oldprice, item.rating, item.commentscount);
END %]
Filename:
$datefile.format().csv
Initial text:
Product Link, Product Name, Price, Old Price, Rating, Number of Comments
Result example:
Product Link, Product Name, Price, Old Price, Rating, Number of Comments
https://www.amazon.com/Oculus-Quest-Advanced-All-One-2/dp/B08F7PTF54/ref=sr_1_5?dchild=1&keywords=playstation+5&qid=1611928056&sr=8-5,"Oculus Quest 2 — Advanced All-In-One Virtual Reality Headset — 256 GB",399.00,,"19,203
https://www.amazon.com/DualSense-Wireless-Controller-PlayStation-5/dp/B08FC6C75Y/ref=sr_1_6?dchild=1&keywords=playstation+5&qid=1611928056&sr=8-6,"DualSense Wireless Controller",69.93,,"11,451
https://www.amazon.com/Resident-Evil-Village-Deluxe-PlayStation-5/dp/B08TR5R8S4/ref=sr_1_7?dchild=1&keywords=playstation+5&qid=1611928056&sr=8-7,"Resident Evil Village Deluxe Edition - PlayStation 5 Deluxe Edition",69.99,,
https://www.amazon.com/Demons-Souls-PlayStation-5/dp/B08FC5TTBF/ref=sr_1_8?dchild=1&keywords=playstation+5&qid=1611928056&sr=8-8,"Demon’s Souls – PlayStation 5",69.89,,"1,963
https://www.amazon.com/gp/slredirect/picassoRedirect.html/ref=pa_sp_mtf_aps_sr_pg1_1?ie=UTF8&adId=A0678777UQU133BE10NC&url=%2FController-Charging-Playstation-Indicator-Game-Boy%2Fdp%2FB08QNJNXNF%2Fref%3Dsr_1_9_sspa%3Fdchild%3D1%26keywords%3Dplaystation%2B5%26qid%3D1611928056%26sr%3D8-9-spons%26psc%3D1&qualifier=1611928056&id=1074325077257761&widgetName=sp_mtf,"PS5 Controller Charger, Charging Dock for Playstation 5 / PS5/ Controller, OIVO PS5 Controller Charging Dock Station with 2 USB-C Adapter with LED Indicator",17.99,,2
https://www.amazon.com/gp/slredirect/picassoRedirect.html/ref=pa_sp_mtf_aps_sr_pg1_1?ie=UTF8&adId=A056102415216X4GXFBHL&url=%2FController-DualSense-Orgaization-Accessories-playstation-5%2Fdp%2FB08R8DVJ8K%2Fref%3Dsr_1_10_sspa%3Fdchild%3D1%26keywords%3Dplaystation%2B5%26qid%3D1611928056%26sr%3D8-10-spons%26psc%3D1&qualifier=1611928056&id=1074325077257761&widgetName=sp_mtf,"PS5 Controller Charger Station,Double Charging Dock for DualSense Wireless Controller with Type-C USB Cable Play Station 5 Consle Orgaization Accessories Station",17.39,,
https://www.amazon.com/Persona-5-Strikers-PlayStation-4/dp/B08Q6YYLN5/ref=sr_1_11?dchild=1&keywords=playstation+5&qid=1611928056&sr=8-11,"Persona 5 Strikers - PlayStation 4",59.99,,
https://www.amazon.com/Marvels-Spider-Man-Morales-Ultimate-Launch-PlayStation/dp/B08FC66ZV4/ref=sr_1_12?dchild=1&keywords=playstation+5&qid=1611928056&sr=8-12,"Marvel's Spider-Man: Miles Morales Ultimate Launch Edition – PlayStation 5",69.97,,"3,468
https://www.amazon.com/PlayStation-5-DualSense-Wireless-Controller/dp/B08H99BPJN/ref=sr_1_13?dchild=1&keywords=playstation+5&qid=1611928056&sr=8-13,"PlayStation 5 DualSense Wireless Controller",79.95,,"9,685
https://www.amazon.com/Sackboy-Big-Adventure-PlayStation-5/dp/B08FC64CNF/ref=sr_1_14?dchild=1&keywords=playstation+5&qid=1611928056&sr=8-14,"Sackboy: A Big Adventure – PlayStation 5",,,911
In the Results Format, the Template Toolkit templating engine is used to output the $products array in a FOREACH loop.
For the Task Editor, you need to activate In
Saving in SQL format
Result format:
[% FOREACH item IN products;
"INSERT INTO products VALUES('" _ item.title _ "', '"; item.link _ "', '"; item.price _ "', '"; item.currency _ "')\n";
END %]
Result example:
INSERT INTO products VALUES('Resident Evil Village Deluxe Edition - PlayStation 5 Deluxe Edition', 'https://www.amazon.com/Resident-Evil-Village-Deluxe-PlayStation-5/dp/B08TR5R8S4/ref=sr_1_1?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-1', '69.99', '$')
INSERT INTO products VALUES('DualSense Wireless Controller', 'https://www.amazon.com/DualSense-Wireless-Controller-PlayStation-5/dp/B08FC6C75Y/ref=sr_1_2?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-2', '69.98', '$')
INSERT INTO products VALUES('Assassin’s Creed Valhalla PlayStation 5 Standard Edition', 'https://www.amazon.com/Assassins-Creed-Valhalla-PlayStation-5-Standard/dp/B08FS5HKTR/ref=sr_1_3?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-3', '34.99', '$')
INSERT INTO products VALUES('Demon’s Souls – PlayStation 5', 'https://www.amazon.com/Demons-Souls-PlayStation-5/dp/B08FC5TTBF/ref=sr_1_4?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-4', '68.95', '$')
INSERT INTO products VALUES('Charger Stand for PS5 DualSense Controller, MENEEA Controller Type-C Fast Dual Charging Station Dock with LED Indicator for Sony Playstation 5 with Dual Detachable USB C Ports', 'https://www.amazon.com/DualSense-Controller-MENEEA-Playstation-Detachable/dp/B08L7N3MF1/ref=sr_1_5?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-5', '14.99', '$')
INSERT INTO products VALUES('Marvel's Spider-Man: Miles Morales Ultimate Launch Edition – PlayStation 5', 'https://www.amazon.com/Marvels-Spider-Man-Morales-Ultimate-Launch-PlayStation/dp/B08FC66ZV4/ref=sr_1_6?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-6', '69.99', '$')
INSERT INTO products VALUES('PlayStation 5 DualSense Wireless Controller', 'https://www.amazon.com/PlayStation-5-DualSense-Wireless-Controller/dp/B08H99BPJN/ref=sr_1_7?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-7', '79.95', '$')
INSERT INTO products VALUES('Vertical Stand with Dual Cooling Fans for Sony PS5 Digital Edition & PS5 UHD with 2 DualSense PS5 Controller Chargers and 3 USB Ports for Sony Playstation 5 DE & UHD Edition', 'https://www.amazon.com/Vertical-DualSense-Controller-Chargers-Playstation-5/dp/B08NL49YJ3/ref=sr_1_8?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-8', '39.99', '$')
INSERT INTO products VALUES('PomisGam Vertical Stand for Playstation 5 with Cooling Fan Charing Station for PS5 Digital Edition/PS5 Ultra HD,Multi-Function Charger Station with 2 Controller Charging Docks', 'https://www.amazon.com/PomisGam-Vertical-Playstation-Multi-Function-Controller/dp/B08PNZXGMY/ref=sr_1_11?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-11', '35.99', '$')
INSERT INTO products VALUES('Persona 5 Strikers - PlayStation 4', 'https://www.amazon.com/Persona-5-Strikers-PlayStation-4/dp/B08Q6YYLN5/ref=sr_1_12?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-12', '59.99', '$')
INSERT INTO products VALUES('HEYSTOP PS5 Controller Charger, PS5 Wireless Charger DualSense Fast Charging Station Compatible with Sony Playstation 5 Controller', 'https://www.amazon.com/HEYSTOP-Controller-DualSense-Compatible-Playstation/dp/B08R3K1977/ref=sr_1_13?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-13', '15.99', '$')
INSERT INTO products VALUES('PlayStation 5 Console', 'https://www.amazon.com/PlayStation-5-Console/dp/B08FC5L3RG/ref=sr_1_14?dchild=1&keywords=playstation+5&qid=1611934195&sr=8-14', '', '')
Dump results to JSON
Общий формат результата:
[% IF notFirst;
",\n";
ELSE;
notFirst = 1;
END;
obj = {};
obj.query = query;
obj.items = [];
FOREACH item IN p1.products;
obj.items.push({
link = item.link
title = item.title
price = item.price
});
END;
obj.json %]
Начальный текст:
[
Конечный текст:
]
Result example:
[
{
"items": [
{
"link": "https://www.amazon.com/Controller-Protector-Playstation-Anti-Slip-Christmas/dp/B08CVRCFK3/ref=sr_1_18?dchild=1&keywords=playstation+5&qid=1611933831&sr=8-18",
"title": "2 Pack PS5 Controller Skin Covers Xmas Gifts for Men Women Hubby Wife Friends Grip Protector with 16 pcs Thumb Grip Caps for Sony Playstation 5 Anti-Slip Silicone",
"price": "10.90"
},
{
"link": "https://www.amazon.com/Controller-Protector-Playstation-Anti-Slip-Christmas/dp/B08CVRCFK3/ref=sr_1_18?dchild=1&keywords=playstation+5&qid=1611933831&sr=8-18",
"title": "2 Pack PS5 Controller Skin Covers Xmas Gifts for Men Women Hubby Wife Friends Grip Protector with 16 pcs Thumb Grip Caps for Sony Playstation 5 Anti-Slip Silicone",
"price": "10.90"
},
{
"link": "https://www.amazon.com/Controller-Protector-Playstation-Anti-Slip-Christmas/dp/B08CVRCFK3/ref=sr_1_18?dchild=1&keywords=playstation+5&qid=1611933831&sr=8-18",
"title": "2 Pack PS5 Controller Skin Covers Xmas Gifts for Men Women Hubby Wife Friends Grip Protector with 16 pcs Thumb Grip Caps for Sony Playstation 5 Anti-Slip Silicone",
"price": "10.90"
},
{
"link": "https://www.amazon.com/Controller-Protector-Playstation-Anti-Slip-Christmas/dp/B08CVRCFK3/ref=sr_1_18?dchild=1&keywords=playstation+5&qid=1611933831&sr=8-18",
"title": "2 Pack PS5 Controller Skin Covers Xmas Gifts for Men Women Hubby Wife Friends Grip Protector with 16 pcs Thumb Grip Caps for Sony Playstation 5 Anti-Slip Silicone",
"price": "10.90"
},
{
"link": "https://www.amazon.com/Controller-Protector-Playstation-Anti-Slip-Christmas/dp/B08CVRCFK3/ref=sr_1_18?dchild=1&keywords=playstation+5&qid=1611933831&sr=8-18",
"title": "2 Pack PS5 Controller Skin Covers Xmas Gifts for Men Women Hubby Wife Friends Grip Protector with 16 pcs Thumb Grip Caps for Sony Playstation 5 Anti-Slip Silicone",
"price": "10.90"
}
]
}
]
For the Task Editor, you need to activate
Available settings
| Parameter | Default value | Description |
|---|---|---|
| Pages count | 5 | Number of pages to scrape |
| Amazon domain | United States | Amazon domains across different TLDs |
| AntiGate preset | default | Anti-Gate preset to enable captcha solving |