Wayfair Product
Scrape Wayfair products in real time with the Wayfair API.
To enable this feature, set the type=product
parameter.
The Wayfair Product feature returns a JSON object containing data related to the scraped Wayfair product. Among others, you will get an overview of:
brand
description_full
description_short
extras
images
physical_properties
rating
related_products_also_viewed
reviews_summary
specification
Wayfair Product Parameters
The Wayfair Product feature only takes one specific parameter:
Parameter | Type | Description |
---|---|---|
|
| The ID of the Wayfair product you want to scrape. |
Your full GET request should then be sent to the following address:
https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=wayfair&type=product&product_id=<PRODUCT_ID>
How to get Wayfair Product ID
Wayfair identifies products by their ID. Our API uses the same identifier to scrape a Wayfair product.
To get the ID of an Wayfair product, first navigate to its page. The ID of a product can be extracted straight from the URL. The structure of an Wayfair product's URL is:
https://<WAYFAIR_DOMAIN>/pdp/<PRODUCT_ID>
Wayfair Product Integration Examples
curl --request GET --url "https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=wayfair&type=product&product_id=UNW10320"
const http = require("https");
const options = {
"method": "GET",
"hostname": "ecom.webscrapingapi.com",
"port": null,
"path": "/v1?api_key=<YOUR_API_KEY>&engine=wayfair&type=product&product_id=UNW10320",
"headers": {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
import requests
API_KEY = '<YOUR_API_KEY>'
SCRAPER_URL = 'https://ecom.webscrapingapi.com/v1'
PARAMS = {
"api_key": API_KEY,
"engine": "wayfair",
"type": "product",
"product_id": "UNW10320"
}
response = requests.get(SCRAPER_URL, params=PARAMS)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=wayfair&type=product&product_id=UNW10320",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=wayfair&type=product&product_id=UNW10320"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.get("https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=wayfair&type=product&product_id=UNW10320")
.asString();
var client = new RestClient("https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=wayfair&type=product&product_id=UNW10320");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://ecom.webscrapingapi.com/v1?api_key=<YOUR_API_KEY>&engine=wayfair&type=product&product_id=UNW10320")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
Response Example
{
"product_results": {
"brand": "Lasko",
"delivery_speed": null,
"description_full": "If you need to cool down your home, but aren't in love with the idea of a window air conditioner, you need the Lasko 36-inch tower fan. The fan has a widespread oscillation, delivering cool air to large spaces. It has 3 speeds which you can adjust by pushing a button on the command center on the back of the fan or with the included remote control. When you're not using the remote, there's a storage spot for it mounted on the back of the fan. Enjoy your home during the summers when you plug in your Lasko 36-inch tower fan.",
"description_short": "The maximum amount of power from the compact fan | Wide area oscillation to cover the whole room | Programmable timer for auto shut off between 1 to 7 hours | Electronic touch control pad",
"extras": {
"manufacturer": "Lasko",
"product_overview": [
"Remote Controlled",
"Quiet Setting",
"Oscillating",
"Automatic Shutoff",
"Power Source: Wall Plug-In"
]
},
"fulfiled_by_retailer": null,
"image_primary": "https://assets.wfcdn.com/im/44332142/compr-r85/2380/238005660/lasko-36-inch-3-speed-quiet-programmable-oscillation-tower-fan-w-remote-white.jpg",
"images": [
"https://assets.wfcdn.com/im/69529929/resize-h56-w56%5Ecompr-r50/2380/238005660/Lasko+36+Inch+3+Speed+Quiet+Programmable+Oscillation+Tower+Fan+w%2F+Remote%2C+White.jpg",
"https://assets.wfcdn.com/im/48876029/resize-h56-w56%5Ecompr-r50/2380/238005721/Lasko+36+Inch+3+Speed+Quiet+Programmable+Oscillation+Tower+Fan+w%2F+Remote%2C+White.jpg",
"https://assets.wfcdn.com/im/16778914/resize-h56-w56%5Ecompr-r50/2380/238005678/Lasko+36+Inch+3+Speed+Quiet+Programmable+Oscillation+Tower+Fan+w%2F+Remote%2C+White.jpg",
"https://assets.wfcdn.com/im/24282719/resize-h56-w56%5Ecompr-r50/2380/238005659/Lasko+36+Inch+3+Speed+Quiet+Programmable+Oscillation+Tower+Fan+w%2F+Remote%2C+White.jpg",
"https://assets.wfcdn.com/im/87381078/resize-h56-w56%5Ecompr-r50/2380/238005670/Lasko+36+Inch+3+Speed+Quiet+Programmable+Oscillation+Tower+Fan+w%2F+Remote%2C+White.jpg"
],
"item_condition": null,
"model_number": "LKO-2510",
"name": "Lasko 36 Inch 3 Speed Quiet Programmable Oscillation Tower Fan w/ Remote, White",
"offers": [],
"physical_properties": {},
"pickup_address": null,
"pickup_available": null,
"pickup_extras": {},
"pickup_store_id": null,
"pickup_zipcode": "",
"price": 78.4,
"price_currency": "USD",
"price_discount_percent": 26,
"price_discounted": 27.59,
"price_is_discounted": true,
"price_regular": 105.99,
"product_identifiers": {
"retailer_product_id": "UNW10320",
"sku": "UNW10320"
},
"rating": 4.5,
"rating_count": 2,
"related_products_also_viewed": [
{
"title": "Costway 48\" Oscillating Tower Fan",
"price": "$84.14",
"discounted_price": "$99.99",
"rating": "3",
"rating_count": 3
},
{
"title": "Indoor High Velocity Wall Mounted Fan With 3 Fan Speeds",
"price": "$106.99",
"rating": "0"
},
{
"title": "NewAir 54.33'' Oscillating Pedestal/Standing Fan Fan",
"price": "$153.53",
"discounted_price": "$179.99",
"rating": "0"
},
{
"title": "693DC Energy Smart Mid-Size Adjustable Height Air Circulator Fan",
"price": "$169.99",
"discounted_price": "$189.99",
"rating": "4",
"rating_count": 33
},
{
"title": "Eternal Living Rechargeable Camping Fan With Led Light",
"price": "$39.99",
"rating": "4",
"rating_count": 3
},
{
"title": "Lasko Xtraair 48 Inch 3 Speed Electric Oscillating Tower Fan With Remote Control",
"price": "$88.62",
"discounted_price": "$122.99",
"rating": "4",
"rating_count": 12
},
{
"title": "Homcom 46.5'' Oscillating Tower Fan",
"price": "$86.99",
"rating": "4",
"rating_count": 15
},
{
"title": "Lifesmart 47 Fan",
"price": "$99.99",
"discounted_price": "$149.99",
"rating": "4",
"rating_count": 7
},
{
"title": "RISE 40 Oscillating Tower Fan",
"flag": "Sale",
"price": "$79.09",
"discounted_price": "$99.99",
"rating": "5",
"rating_count": 38
},
{
"title": "Lasko 36 In 3 Speed Oscillating Tower Fan with Remote Control and Ionizer, Black",
"price": "$69.70",
"discounted_price": "$83.99",
"rating": "5",
"rating_count": 2
}
],
"related_products_bought_together": [],
"related_products_similar": [],
"related_products_sponsored": [],
"retailer_product_id": "UNW10320",
"retailer_ranks": {},
"retailer_store_id": null,
"return_extras": {},
"returnable": true,
"returnable_in": 30,
"reviews_count": 2,
"reviews_summary": {
"five_star": 1,
"four_star": 1,
"three_star": 0,
"two_star": 0,
"one_star": 0
},
"seller": null,
"shipping_cost": null,
"shipping_delivery_address": "",
"shipping_delivery_zipcode": "",
"shipping_expected_delivery_date": "",
"shipping_extras": {},
"shipping_type": null,
"specification": {
"Product Type ": "Tower Fan",
"Finish & Color ": "White",
"Material ": "Plastic",
"Number of Fan Speeds ": "3",
"Remote Controlled ": "Yes",
"Remote Control Included ": "Yes",
"Handle(s) Included ": "Yes",
"Number of Handles ": "1",
"Timer ": "Yes",
"Automatic Shutoff ": "Yes",
"Quiet Operation ": "Yes",
"Oscillating ": "Yes",
"Power Source ": "Plug-in",
"Wattage ": "36 Watt",
"Plug-In ": "Yes",
"Removable Grille / Grate ": "Yes",
"Non-Skid ": "Yes",
"Supplier Intended and Approved Use ": "Non Residential Use; Residential Use",
"Assembly Required ": "Yes",
"Commercial Warranty ": "No",
"Product Warranty ": "Yes",
"Warranty Length ": "1 Year",
"Full or Limited Warranty ": "Limited"
},
"stock_availability": false,
"stock_quantity": 0,
"url": "https://www.wayfair.com/-/pdp/-UNW10320.html",
"variant_configuration": {},
"zipcode": ""
},
"search_parameters": {
"wayfair_domain": "wayfair.com",
"engine": "wayfair",
"wayfair_url": "https://www.wayfair.com/-/pdp/-UNW10320.html",
"wayfair_url_redirected": "https://www.wayfair.com/home-improvement/pdp/lasko-36-inch-3-speed-quiet-programmable-oscillation-tower-fan-w-remote-white-unw10320.html",
"type": "product",
"product_id": "UNW10320",
"device": "desktop"
}
}
Last updated