Skip to content

Instantly share code, notes, and snippets.

@buneme
Last active August 17, 2020 07:56
Show Gist options
  • Save buneme/2e05f15ef3c0e956693cd354c2b7847f to your computer and use it in GitHub Desktop.
Save buneme/2e05f15ef3c0e956693cd354c2b7847f to your computer and use it in GitHub Desktop.
var request = require("request");
var options = {
method: 'GET',
url: 'https://mlscrape-beta.p.rapidapi.com/v1/product',
qs: {
url: 'https://www.ebay.co.uk/itm/Shark-Anti-Hair-Wrap-Cordless-Stick-Vacuum-Cleaner-IZ251UKT-Refurbished/184321572622',
proxy: 'enabled'
},
headers: {
'x-rapidapi-host': 'mlscrape-beta.p.rapidapi.com',
'x-rapidapi-key': 'XXX',
useQueryString: true
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log("Product name: " + body.name);
console.log("Product price: " + body.price);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment