Wayfair Product
Retrieve structured Wayfair product details, pricing, images, reviews, specifications, and related products.
Use Wayfair Product when you need product-level data for a single Wayfair item. The API submits the scrape asynchronously and immediately returns a snapshot_id. Snapshot IDs are opaque; use the returned value unchanged when polling.
Set engine=wayfair_spreetail and type=product. Provide exactly one product_id or Wayfair product url; batch arrays are not accepted by this endpoint.
Integration examples
Each example submits one product, reads the returned snapshot_id, and polls /v1 with only api_key and snapshot_id. If the poll response has status: "Running", wait briefly and repeat the polling request.
submission=$(curl --silent --get "https://ecom.webscrapingapi.com/v1" \
--data-urlencode "api_key=YOUR_API_KEY" \
--data-urlencode "engine=wayfair_spreetail" \
--data-urlencode "type=product" \
--data-urlencode "product_id=W110940681")
snapshot_id=$(printf '%s' "$submission" | jq --raw-output '.snapshot_id')
curl --get "https://ecom.webscrapingapi.com/v1" \
--data-urlencode "api_key=YOUR_API_KEY" \
--data-urlencode "snapshot_id=$snapshot_id"const endpoint = "https://ecom.webscrapingapi.com/v1";
const apiKey = "YOUR_API_KEY";
const submitUrl = new URL(endpoint);
submitUrl.search = new URLSearchParams({
api_key: apiKey,
engine: "wayfair_spreetail",
type: "product",
product_id: "W110940681",
}).toString();
const submission = await fetch(submitUrl).then((response) => response.json());
const pollUrl = new URL(endpoint);
pollUrl.search = new URLSearchParams({
api_key: apiKey,
snapshot_id: submission.snapshot_id,
}).toString();
const result = await fetch(pollUrl).then((response) => response.json());
console.log(result);import requests
endpoint = "https://ecom.webscrapingapi.com/v1"
api_key = "YOUR_API_KEY"
submission = requests.get(endpoint, params={
"api_key": api_key,
"engine": "wayfair_spreetail",
"type": "product",
"product_id": "W110940681",
})
submission.raise_for_status()
snapshot_id = submission.json()["snapshot_id"]
result = requests.get(endpoint, params={
"api_key": api_key,
"snapshot_id": snapshot_id,
})
result.raise_for_status()
print(result.json())<?php
$endpoint = "https://ecom.webscrapingapi.com/v1";
$apiKey = "YOUR_API_KEY";
function getJson(string $endpoint, array $params): array
{
$curl = curl_init($endpoint . "?" . http_build_query($params));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$body = curl_exec($curl);
if ($body === false) {
throw new RuntimeException(curl_error($curl));
}
curl_close($curl);
return json_decode($body, true, 512, JSON_THROW_ON_ERROR);
}
$submission = getJson($endpoint, [
"api_key" => $apiKey,
"engine" => "wayfair_spreetail",
"type" => "product",
"product_id" => "W110940681",
]);
$result = getJson($endpoint, [
"api_key" => $apiKey,
"snapshot_id" => $submission["snapshot_id"],
]);
echo json_encode($result, JSON_PRETTY_PRINT);package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
const endpoint = "https://ecom.webscrapingapi.com/v1"
const apiKey = "YOUR_API_KEY"
func getJSON(params url.Values, target any) error {
response, err := http.Get(endpoint + "?" + params.Encode())
if err != nil {
return err
}
defer response.Body.Close()
if response.StatusCode < 200 || response.StatusCode >= 300 {
return fmt.Errorf("request failed: %s", response.Status)
}
return json.NewDecoder(response.Body).Decode(target)
}
func main() {
var submission struct {
SnapshotID string `json:"snapshot_id"`
}
err := getJSON(url.Values{
"api_key": {apiKey},
"engine": {"wayfair_spreetail"},
"type": {"product"},
"product_id": {"W110940681"},
}, &submission)
if err != nil {
panic(err)
}
var result any
err = getJSON(url.Values{
"api_key": {apiKey},
"snapshot_id": {submission.SnapshotID},
}, &result)
if err != nil {
panic(err)
}
fmt.Printf("%#v\n", result)
}import java.net.URI;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
public class WayfairProduct {
private static final String ENDPOINT = "https://ecom.webscrapingapi.com/v1";
private static final String API_KEY = "YOUR_API_KEY";
private static String encode(String value) {
return URLEncoder.encode(value, StandardCharsets.UTF_8);
}
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
ObjectMapper mapper = new ObjectMapper();
String submitUrl = ENDPOINT
+ "?api_key=" + encode(API_KEY)
+ "&engine=wayfair_spreetail"
+ "&type=product"
+ "&product_id=W110940681";
HttpResponse<String> submission = client.send(
HttpRequest.newBuilder(URI.create(submitUrl)).GET().build(),
HttpResponse.BodyHandlers.ofString()
);
JsonNode submitted = mapper.readTree(submission.body());
String pollUrl = ENDPOINT
+ "?api_key=" + encode(API_KEY)
+ "&snapshot_id=" + encode(submitted.get("snapshot_id").asText());
HttpResponse<String> result = client.send(
HttpRequest.newBuilder(URI.create(pollUrl)).GET().build(),
HttpResponse.BodyHandlers.ofString()
);
System.out.println(result.body());
}
}using System.Net.Http;
using System.Text.Json;
const string endpoint = "https://ecom.webscrapingapi.com/v1";
const string apiKey = "YOUR_API_KEY";
using var client = new HttpClient();
var submitUrl = endpoint
+ $"?api_key={Uri.EscapeDataString(apiKey)}"
+ "&engine=wayfair_spreetail"
+ "&type=product"
+ "&product_id=W110940681";
var submissionJson = await client.GetStringAsync(submitUrl);
using var submission = JsonDocument.Parse(submissionJson);
var snapshotId = submission.RootElement
.GetProperty("snapshot_id")
.GetString();
var pollUrl = endpoint
+ $"?api_key={Uri.EscapeDataString(apiKey)}"
+ $"&snapshot_id={Uri.EscapeDataString(snapshotId!)}";
var result = await client.GetStringAsync(pollUrl);
Console.WriteLine(result);require "json"
require "net/http"
require "uri"
endpoint = "https://ecom.webscrapingapi.com/v1"
api_key = "YOUR_API_KEY"
submit_uri = URI(endpoint)
submit_uri.query = URI.encode_www_form(
api_key: api_key,
engine: "wayfair_spreetail",
type: "product",
product_id: "W110940681"
)
submission = JSON.parse(Net::HTTP.get(submit_uri))
poll_uri = URI(endpoint)
poll_uri.query = URI.encode_www_form(
api_key: api_key,
snapshot_id: submission.fetch("snapshot_id")
)
puts Net::HTTP.get(poll_uri)| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | ✅ | Your WebScrapingAPI key. |
engine | string | ✅ | Use wayfair_spreetail. |
type | string | ✅ | Use product. |
product_id | string | Conditional | Wayfair product identifier. Required when url is omitted. |
url | string | Conditional | HTTPS Wayfair product URL. Required when product_id is omitted. |
Finding a Wayfair Product ID
Wayfair product URLs usually include the item identifier near the end of the path:
https://www.wayfair.com/home/pdp/latitude-run-inse-modern-rounded-rectangle-bathroom-vanity-mirror-w110940681.htmlUse the product code from the URL, for example W110940681, as product_id.
Retrieving the result
Poll /v1 with your api_key and the returned snapshot_id; omit engine and type from polling requests. While the job is processing, the response contains status: "Running" and a message. Polling does not consume another credit.
When the job is complete, the response uses the numeric-keyed raw product record shape. Product-level failures are returned as records containing input, error, and error_code.
Result fields
| Field | Type | Description |
|---|---|---|
input | object | Original input and submitted Wayfair URL. |
product_id | string | Wayfair product identifier. |
title | string | Product name. |
brand | string | Product brand or manufacturer. |
initial_price | string | Regular price when Wayfair exposes it. |
final_price | string | Current price, including a SALE price when applicable. |
currency | string | Price currency code. |
is_price_discounted | boolean | Whether the current price is below the regular price. |
is_out_of_stock | boolean | Whether the selected product is unavailable. |
images | array | Product image URLs. |
rating | number | Aggregate rating. |
reviews_count | number | Number of reviews. |
product_specifications | array | Product specification name/value pairs. |
variants | array or null | Product variation groups when available. |
Response example
{
"snapshot_id": "YOUR_SNAPSHOT_ID"
}Completed snapshot example:
{
"0": {
"input": {
"raw_input": "W110940681",
"url": "https://www.wayfair.com/-/pdp/-W110940681.html"
},
"product_id": "W110940681",
"title": "Inse Modern Rounded Rectangle Bathroom Vanity Mirror",
"brand": "Latitude Run",
"initial_price": "$213.99",
"final_price": "$203.99",
"currency": "USD",
"is_price_discounted": true,
"is_out_of_stock": false,
"rating": 4.5,
"reviews_count": 320
}
}Notes
Wayfair response modules vary by product category, availability, selected options, and marketplace presentation. Treat physical properties, reviews, specifications, variants, and extra metadata as optional. Completed results remain available for a limited period, so retrieve them promptly and save them in your own storage.