├── python ├── amazonsearch.py ├── wayfairsearch.py ├── amazonpricing.py ├── amazonproduct.py ├── amazonreviews.py ├── amazonquestions.py ├── amazon.py ├── wayfair.py ├── amazonbestsellers.py └── ecommerce.py ├── nodejs ├── amazonreviews.js ├── amazonsearch.js ├── wayfairsearch.js ├── amazonpricing.js ├── amazonproduct.js ├── amazon.js ├── amazonquestions.js ├── wayfair.js ├── amazonbestsellers.js └── ecommerce.js ├── php ├── amazonpricing.php ├── amazonproduct.php ├── amazonreviews.php ├── amazonsearch.php ├── wayfairsearch.php ├── amazonquestions.php ├── amazon.php ├── wayfair.php ├── amazonbestsellers.php └── ecommerce.php ├── LICENSE └── README.md /python/amazonsearch.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'amazon_search', 5 | 'query': 'B09H74FXNW', 6 | 'parse': True, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/wayfairsearch.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'wayfair_search', 5 | 'query': 'doormat', 6 | 'parse': False, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/amazonpricing.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'amazon_pricing', 5 | 'query': 'B09H74FXNW', 6 | 'parse': True, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/amazonproduct.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'amazon_product', 5 | 'query': 'B09H74FXNW', 6 | 'parse': True, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/amazonreviews.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'amazon_reviews', 5 | 'query': 'B09H74FXNW', 6 | 'parse': True, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/amazonquestions.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'amazon_questions', 5 | 'query': 'B09H74FXNW', 6 | 'parse': True, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/amazon.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'amazon', 5 | 'url': 'https://www.amazon.com/dp/B09H74FXNW', 6 | 'parse': True, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /python/wayfair.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'wayfair', 5 | 'url': 'https://www.wayfair.com/rugs/pdp/highland-dunes-gunnell-30-x-18-non-slip-outdoor-door-mat-w005481595.html', 6 | 'parse': False, 7 | } 8 | 9 | username = 'SPusername' 10 | password = 'SPpassword' 11 | 12 | response = requests.post( 13 | 'https://scraper-api.smartproxy.com/v2/scrape', 14 | json = task_params, 15 | auth = (username, password) 16 | ) 17 | 18 | print(response.text) 19 | -------------------------------------------------------------------------------- /nodejs/amazonreviews.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'amazon_reviews', 6 | parse: true, 7 | query: 'B09H74FXNW' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/amazonsearch.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'amazon_search', 6 | parse: true, 7 | query: 'B09H74FXNW' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/wayfairsearch.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'wayfair_search', 6 | parse: false, 7 | query: 'doormat' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/amazonpricing.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'amazon_pricing', 6 | parse: true, 7 | query: 'B09H74FXNW' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | 18 | -------------------------------------------------------------------------------- /nodejs/amazonproduct.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'amazon_product', 6 | parse: true, 7 | query: 'B09H74FXNW' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | 18 | -------------------------------------------------------------------------------- /python/amazonbestsellers.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 'target': 'amazon_bestsellers', 5 | 'query': '2407760011', 6 | 'domain': 'com', 7 | 'locale':'en-us', 8 | 'device_type':'desktop', 9 | 'parse':'true' 10 | } 11 | 12 | username = 'SPusername' 13 | password = 'SPpassword' 14 | 15 | response = requests.post( 16 | 'https://scraper-api.smartproxy.com/v2/scrape', 17 | json = task_params, 18 | auth = (username, password) 19 | ) 20 | 21 | print(response.text) 22 | -------------------------------------------------------------------------------- /nodejs/amazon.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'amazon', 6 | parse: true, 7 | url: 'https://www.amazon.com/dp/B09H74FXNW' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | 18 | -------------------------------------------------------------------------------- /nodejs/amazonquestions.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'amazon_questions', 6 | parse: true, 7 | query: 'B09H74FXNW' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | 18 | 19 | -------------------------------------------------------------------------------- /nodejs/wayfair.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'wayfair', 6 | parse: false, 7 | url: 'https://www.wayfair.com/rugs/pdp/highland-dunes-gunnell-30-x-18-non-slip-outdoor-door-mat-w005481595.html' 8 | }, 9 | headers: { 10 | 'Content-Type': 'application/json', 11 | 'Authorization': 'Basic AUTH' 12 | }, 13 | } 14 | ).catch(error => console.log(error)); 15 | 16 | console.log(response) 17 | -------------------------------------------------------------------------------- /nodejs/amazonbestsellers.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'amazon_bestsellers', 6 | parse: true, 7 | query: '2407760011', 8 | domain: 'com', 9 | locale: 'en_us', 10 | device_type: 'desktop' 11 | }, 12 | headers: { 13 | 'Content-Type': 'application/json', 14 | 'Authorization': 'Basic AUTH' 15 | }, 16 | } 17 | ).catch(error => console.log(error)); 18 | 19 | console.log(response) 20 | -------------------------------------------------------------------------------- /python/ecommerce.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | task_params = { 4 | 5 | 'target': 'ecommerce', 6 | 'url': 'https://www.walmart.com/ip/Marketside-Pepperoni-Pizza-Traditional-Crust-Extra-Large-44-6-oz-Fresh/579824441?athbdg=L1600&from=searchResults', 7 | 'device_type': 'desktop', 8 | 'parser_type': 'ecommerce_product', 9 | 'geo':'United States', 10 | 'headless':'html', 11 | 'locale':'en-us', 12 | 'parse': 'true' 13 | 14 | } 15 | 16 | username = 'SPusername' 17 | password = 'SPpassword' 18 | 19 | response = requests.post( 20 | 'https://scraper-api.smartproxy.com/v2/scrape', 21 | json = task_params, 22 | auth = (username, password) 23 | ) 24 | 25 | print(response.text) 26 | -------------------------------------------------------------------------------- /php/amazonpricing.php: -------------------------------------------------------------------------------- 1 | 'amazon_pricing', 5 | 'query' => 'B09H74FXNW', 6 | 'parse' => True 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/amazonproduct.php: -------------------------------------------------------------------------------- 1 | 'amazon_product', 5 | 'query' => 'B09H74FXNW', 6 | 'parse' => True 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/amazonreviews.php: -------------------------------------------------------------------------------- 1 | 'amazon_reviews', 5 | 'query' => 'B09H74FXNW', 6 | 'parse' => True 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/amazonsearch.php: -------------------------------------------------------------------------------- 1 | 'amazon_search', 5 | 'query' => 'B09H74FXNW', 6 | 'parse' => True 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/wayfairsearch.php: -------------------------------------------------------------------------------- 1 | 'wayfair_search', 5 | 'query' => 'doormat', 6 | 'parse' => False 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/amazonquestions.php: -------------------------------------------------------------------------------- 1 | 'amazon_questions', 5 | 'query' => 'B09H74FXNW', 6 | 'parse' => True 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/amazon.php: -------------------------------------------------------------------------------- 1 | 'amazon', 5 | 'url' => 'https://www.amazon.com/dp/B09H74FXNW', 6 | 'parse' => True 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /nodejs/ecommerce.js: -------------------------------------------------------------------------------- 1 | const response = await fetch( 2 | 'https://scraper-api.smartproxy.com/v2/scrape', { 3 | method: 'POST', 4 | body: { 5 | target: 'ecommerce', 6 | url: 'https://www.walmart.com/ip/Marketside-Pepperoni-Pizza-Traditional-Crust-Extra-Large-44-6-oz-Fresh/579824441?athbdg=L1600&from=searchResults', 7 | device_type: 'desktop', 8 | parser_type: 'ecommerce_product', 9 | geo: 'United States', 10 | headless: 'html', 11 | locale: 'en_us', 12 | parse: 'true' 13 | }, 14 | headers: { 15 | 'Content-Type': 'application/json', 16 | 'Authorization': 'Basic AUTH' 17 | }, 18 | } 19 | ).catch(error => console.log(error)); 20 | 21 | console.log(response) 22 | -------------------------------------------------------------------------------- /php/wayfair.php: -------------------------------------------------------------------------------- 1 | 'wayfair', 5 | 'url' => 'https://www.wayfair.com/rugs/pdp/highland-dunes-gunnell-30-x-18-non-slip-outdoor-door-mat-w005481595.html', 6 | 'parse' => False 7 | ); 8 | 9 | $ch = curl_init(); 10 | 11 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 12 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 13 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 14 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 15 | curl_setopt($ch, CURLOPT_POST, 1); 16 | 17 | $headers = array(); 18 | $headers[] = 'Content-Type: application/json'; 19 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 20 | 21 | $result = curl_exec($ch); 22 | echo $result; 23 | 24 | if (curl_errno($ch)) { 25 | echo 'Error:' . curl_error($ch); 26 | } 27 | curl_close ($ch); 28 | ?> 29 | -------------------------------------------------------------------------------- /php/amazonbestsellers.php: -------------------------------------------------------------------------------- 1 | 'amazon_bestsellers', 5 | 'query' => '2407760011', 6 | 'domain' => 'com', 7 | 'locale' => 'en_us', 8 | 'device_type' => 'desktop', 9 | 'parse' => True 10 | ); 11 | 12 | $ch = curl_init(); 13 | 14 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 15 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 16 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 17 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 18 | curl_setopt($ch, CURLOPT_POST, 1); 19 | 20 | $headers = array(); 21 | $headers[] = 'Content-Type: application/json'; 22 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 23 | 24 | $result = curl_exec($ch); 25 | echo $result; 26 | 27 | if (curl_errno($ch)) { 28 | echo 'Error:' . curl_error($ch); 29 | } 30 | curl_close ($ch); 31 | ?> 32 | -------------------------------------------------------------------------------- /php/ecommerce.php: -------------------------------------------------------------------------------- 1 | 'ecommerce', 5 | 'url' => 'https://www.walmart.com/ip/Marketside-Pepperoni-Pizza-Traditional-Crust-Extra-Large-44-6-oz-Fresh/579824441?athbdg=L1600&from=searchResults', 6 | 'device_type' => 'desktop', 7 | 'parser_type' => 'ecommerce_product', 8 | 'geo' => 'United States', 9 | 'headless' => 'html', 10 | 'locale' => 'en_us', 11 | 'parse' => True 12 | ); 13 | 14 | $ch = curl_init(); 15 | 16 | curl_setopt($ch, CURLOPT_URL, 'https://scraper-api.smartproxy.com/v2/scrape'); 17 | curl_setopt($ch, CURLOPT_USERPWD, 'SPusername' . ':' . 'SPpassword'); 18 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 19 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); 20 | curl_setopt($ch, CURLOPT_POST, 1); 21 | 22 | $headers = array(); 23 | $headers[] = 'Content-Type: application/json'; 24 | curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 25 | 26 | $result = curl_exec($ch); 27 | echo $result; 28 | 29 | if (curl_errno($ch)) { 30 | echo 'Error:' . curl_error($ch); 31 | } 32 | curl_close ($ch); 33 | ?> 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Smartproxy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # eCommerce Scraping API 2 | 3 |

4 | 5 | Smartproxy eCommerce Scraping API 6 | 7 |

8 | 9 |

10 | 11 | Discord 12 | 13 | API Version 14 | License 15 |

16 | 17 | ## 🚀 Overview 18 | 19 | The **eCommerce Scraping API** by Smartproxy enables developers to extract comprehensive product data from major eCommerce platforms including Amazon and Wayfair. Our API provides structured, reliable data extraction with high success rates and built-in parsing capabilities. 20 | 21 | ### ✨ Key Features 22 | 23 | - **Multi-platform Support**: Amazon, Wayfair, and generic eCommerce sites 24 | - **Comprehensive Data**: Products, reviews, pricing, Q&A, and search results 25 | - **AI-Powered Parsing**: Intelligent data extraction for any eCommerce site 26 | - **Global Coverage**: Support for multiple locales and geographical locations 27 | - **High Performance**: Fast response times with reliable uptime 28 | - **Developer Friendly**: RESTful API with extensive documentation and examples 29 | 30 | ## 📋 Table of Contents 31 | 32 | - [Quick Start](#-quick-start) 33 | - [Authentication](#-authentication) 34 | - [Supported Platforms](#-supported-platforms) 35 | - [Amazon](#amazon) 36 | - [Wayfair](#wayfair) 37 | - [Generic eCommerce](#generic-ecommerce) 38 | - [API Reference](#-api-reference) 39 | - [Code Examples](#-code-examples) 40 | - [Response Codes](#-response-codes) 41 | - [Support](#-support) 42 | 43 | ## 🚀 Quick Start 44 | 45 | ### Prerequisites 46 | 47 | - Active eCommerce Scraping API subscription 48 | - Valid API credentials (username/password) 49 | 50 | ### Basic Request 51 | 52 | ```bash 53 | curl -X POST https://scraper-api.smartproxy.com/v2/scrape \ 54 | -H "Content-Type: application/json" \ 55 | -u "username:password" \ 56 | -d '{ 57 | "target": "amazon", 58 | "url": "https://www.amazon.com/dp/B09H74FXNW" 59 | }' 60 | ``` 61 | 62 | ## 🔐 Authentication 63 | 64 | Authentication is handled via HTTP Basic Auth using your Smartproxy credentials. 65 | 66 | 1. Navigate to your [Smartproxy Dashboard](https://dashboard.smartproxy.com) 67 | 2. Go to **eCommerce > Authentication** 68 | 3. Enter your username and password 69 | 4. Generate and test your API request 70 | 71 | > **Note**: The dashboard provides example requests with preset values. Customize parameters in your actual implementation. 72 | 73 | ## 🛍️ Supported Platforms 74 | 75 | ### Amazon 76 | 77 | Extract comprehensive data from Amazon including products, reviews, pricing, and search results. 78 | 79 | #### Available Targets 80 | 81 | | Target | Description | Parseable | Required Parameter | 82 | |--------|-------------|-----------|-------------------| 83 | | `amazon` | Product page via URL | ✅ | `url` | 84 | | `amazon_product` | Product via ASIN | ✅ | `query` | 85 | | `amazon_pricing` | Pricing information | ✅ | `query` | 86 | | `amazon_reviews` | Product reviews | ✅ | `query` | 87 | | `amazon_questions` | Q&A section | ✅ | `query` | 88 | | `amazon_search` | Search results | ✅ | `query` | 89 | | `amazon_bestsellers` | Bestseller lists | ✅ | `query` | 90 | 91 | #### Example Response Structure 92 | 93 |
94 | Click to expand Amazon product response 95 | 96 | ```json 97 | { 98 | "results": [ 99 | { 100 | "content": { 101 | "url": "https://www.amazon.com/dp/B09H74FXNW", 102 | "asin": "B09H74FXNW", 103 | "title": "Gaming Headset with Microphone...", 104 | "price": 20.98, 105 | "currency": "USD", 106 | "rating": 4.4, 107 | "reviews_count": 2239, 108 | "images": ["https://m.media-amazon.com/images/..."], 109 | "description": "Product description...", 110 | "bullet_points": "Key features...", 111 | "category": [...], 112 | "variations": [...], 113 | "ads": [...] 114 | }, 115 | "status_code": 200, 116 | "created_at": "2022-09-01 11:03:48" 117 | } 118 | ] 119 | } 120 | ``` 121 | 122 |
123 | 124 | ### Wayfair 125 | 126 | Access Wayfair product data and search results. 127 | 128 | #### Available Targets 129 | 130 | | Target | Description | Parseable | Required Parameter | 131 | |--------|-------------|-----------|-------------------| 132 | | `wayfair` | Product page via URL | ❌ | `url` | 133 | | `wayfair_search` | Search results | ❌ | `query` | 134 | 135 | ### Generic eCommerce 136 | 137 | Extract data from any eCommerce website using our AI-powered parser. 138 | 139 | #### Target Configuration 140 | 141 | | Target | Description | Parseable | Required Parameter | 142 | |--------|-------------|-----------|-------------------| 143 | | `ecommerce` | Any eCommerce site | ✅ (AI) | `url` | 144 | 145 | > **Note**: For AI parsing, set `parse: true` and `parser_type: "ecommerce_product"` 146 | 147 | ## 📖 API Reference 148 | 149 | ### Base URL 150 | ``` 151 | https://scraper-api.smartproxy.com/v2/scrape 152 | ``` 153 | 154 | ### Request Parameters 155 | 156 | | Parameter | Type | Required | Description | 157 | |-----------|------|----------|-------------| 158 | | `target` | string | ✅ | Scraping target (see [supported targets](#supported-platforms)) | 159 | | `url` | string | * | Direct URL to scrape | 160 | | `query` | string | * | Search query or product ID | 161 | | `locale` | string | ❌ | Interface language (e.g., `en-US`, `en-GB`) | 162 | | `geo` | string | ❌ | Geographical location | 163 | | `device_type` | string | ❌ | Device type: `desktop`, `mobile`, `tablet` | 164 | | `headless` | string | ❌ | JavaScript rendering: `html`, `png` | 165 | | `parser_type` | string | ❌ | Parser type for eCommerce target | 166 | 167 | *Required parameter depends on the target 168 | 169 | ### Device Types 170 | 171 | - `desktop` (default) 172 | - `desktop_chrome` 173 | - `desktop_firefox` 174 | - `mobile` 175 | - `mobile_android` 176 | - `mobile_ios` 177 | 178 | ## 💻 Code Examples 179 | 180 | ### Python 181 | 182 | ```bash 183 | curl https://raw.githubusercontent.com/Smartproxy/eCommerce-Scraping-API/main/python/amazon.py > amazon.py 184 | ``` 185 | 186 | ### PHP 187 | 188 | ```bash 189 | curl https://raw.githubusercontent.com/Smartproxy/eCommerce-Scraping-API/main/php/amazon.php > amazon.php 190 | ``` 191 | 192 | ### Node.js 193 | 194 | ```bash 195 | curl https://raw.githubusercontent.com/Smartproxy/eCommerce-Scraping-API/main/nodejs/amazon.js > amazon.js 196 | ``` 197 | 198 | ### Complete Example Collection 199 | 200 | | Platform | Python | PHP | Node.js | 201 | |----------|--------|-----|---------| 202 | | Amazon Product | [amazon.py](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/python/amazon.py) | [amazon.php](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/php/amazon.php) | [amazon.js](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/nodejs/amazon.js) | 203 | | Amazon Search | [amazonsearch.py](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/python/amazonsearch.py) | [amazonsearch.php](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/php/amazonsearch.php) | [amazonsearch.js](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/nodejs/amazonsearch.js) | 204 | | Amazon Reviews | [amazonreviews.py](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/python/amazonreviews.py) | [amazonreviews.php](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/php/amazonreviews.php) | [amazonreviews.js](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/nodejs/amazonreviews.js) | 205 | | Wayfair | [wayfair.py](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/python/wayfair.py) | [wayfair.php](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/php/wayfair.php) | [wayfair.js](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/nodejs/wayfair.js) | 206 | | Generic eCommerce | [ecommerce.py](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/python/ecommerce.py) | [ecommerce.php](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/php/ecommerce.php) | [ecommerce.js](https://github.com/Smartproxy/eCommerce-Scraping-API/blob/main/nodejs/ecommerce.js) | 207 | 208 | ## 📊 Response Codes 209 | 210 | ### HTTP Status Codes 211 | 212 | | Code | Status | Description | Action Required | 213 | |------|--------|-------------|-----------------| 214 | | **200** | ✅ Success | Request completed successfully | Continue processing | 215 | | **204** | ⏳ Processing | Job still in progress | Wait and retry | 216 | | **400** | ❌ Bad Request | Invalid request format | Check request structure | 217 | | **401** | 🔒 Unauthorized | Invalid credentials | Verify authentication | 218 | | **403** | 🚫 Forbidden | Access denied | Check subscription/permissions | 219 | | **404** | 🔍 Not Found | Target not found | Verify URL/parameters | 220 | | **429** | ⚡ Rate Limited | Too many requests | Wait before retrying | 221 | | **500** | 🔧 Server Error | Internal server error | Contact support | 222 | | **524** | ⏰ Timeout | Request timeout | Retry after delay | 223 | 224 | ### Parser Status Codes 225 | 226 | | Code | Status | Description | 227 | |------|--------|-------------| 228 | | **12000** | ✅ Success | Data parsed successfully | 229 | | **12002** | ❌ Parse Failed | Complete parsing failure | 230 | | **12003** | 🚫 Not Supported | Target not supported | 231 | | **12004** | ⚠️ Incomplete | Some fields missing | 232 | | **12005** | ⚠️ Partial | Some fields unparsed | 233 | | **12006** | 🔧 Error | Unexpected error occurred | 234 | | **12007** | ❓ Unknown | Parse status unclear | 235 | | **12008** | ❌ Failed | Failed to parse data | 236 | | **12009** | 🔍 Not Found | Target parameters invalid | 237 | 238 | ## 🧪 Testing 239 | 240 | ### Postman Collection 241 | 242 | [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/23304112-92a123e7-171c-497e-8ca1-57eff04361f3?action=collection%2Ffork&collection-url=entityId%3D23304112-92a123e7-171c-497e-8ca1-57eff04361f3%26entityType%3Dcollection%26workspaceId%3D52705bab-433c-4fbf-afce-ccbfc97430fe) 243 | 244 | Import our comprehensive Postman collection to test all API endpoints with pre-configured examples. 245 | 246 | ## 🆘 Support 247 | 248 | ### Documentation & Resources 249 | 250 | - 📚 [Full API Documentation](https://smartproxy.com/scraping/ecommerce) 251 | - 🎯 [Dashboard](https://dashboard.smartproxy.com) 252 | 253 | ### Getting Help 254 | 255 | 1. **Check Documentation**: Review this README and our full documentation 256 | 2. **Community Support**: Join our Discord for community help 257 | 3. **Technical Issues**: Contact our support team with your task ID 258 | 4. **Feature Requests**: Submit via GitHub issues 259 | 260 | ### Rate Limits & Best Practices 261 | 262 | - Monitor your request quota in the dashboard 263 | - Implement exponential backoff for retries 264 | - Cache responses when appropriate 265 | - Use appropriate `device_type` for your use case 266 | 267 | ## 📄 License 268 | 269 | This project is licensed under the [MIT License](./LICENSE). 270 | 271 | --- 272 | --------------------------------------------------------------------------------