diff --git a/nodejs/amazon_bestsellers.js b/nodejs/amazon_bestsellers.js new file mode 100644 index 0000000..f8b6ae9 --- /dev/null +++ b/nodejs/amazon_bestsellers.js @@ -0,0 +1,26 @@ +async function fetchAmazonData() { + try { + const response = await fetch("https://scraper-api.smartproxy.com/v2/scrape", { + method: "POST", + body: JSON.stringify({ + "target": "amazon_bestsellers", + "query": "sports-collectibles", + "page_from": "1", + "num_pages": "10", + "parse": true, + }), + headers: { + "Content-Type": "application/json", + "Authorization": "Basic [your basic authentication token]" + } + }); + + const data = await response.json(); + console.log(JSON.stringify(data)); + + } catch (error) { + console.log(error); + } +} + +fetchAmazonData(); \ No newline at end of file