# Wayfair Product Search Scraper (`good-apis/wayfair-search`) Actor

- **URL**: https://apify.com/good-apis/wayfair-search.md
- **Developed by:** [Danny](https://apify.com/good-apis) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Wayfair Product Search Scraper

Search Wayfair by keyword and get clean, structured product listings — **name, price, list price, rating, review count, and image** — with no login and no browser to manage. Point it at a keyword, get back a dataset you can push straight into a spreadsheet, database, or price-tracking pipeline.

**Pricing: pay per result** — you only pay for products actually returned.

### What you get

Every product returns:

| Field | Description |
|---|---|
| `sku` | Wayfair SKU (stable product key, e.g. `W004334884`) |
| `name` | Product name |
| `price` | Current price (number) |
| `list_price` | Pre-sale / strikethrough price, if on sale |
| `on_sale` | Whether the product is discounted |
| `currency` | Currency code (`USD`) |
| `rating` | Average review rating (0–5) |
| `review_count` | Number of reviews |
| `image` | Primary product image URL |
| `url` | Direct link to the product page |

### Input

| Field | Required | Description |
|---|---|---|
| `query` | ✅ | Search keyword, e.g. `coffee table` |
| `max_results` | | How many products to return (default 48, up to ~96) |
| `sort` | | `relevance` (default), `price_asc`, `price_desc`, `rating_high`, `newest`, `bestselling` |

```json
{ "query": "coffee table", "max_results": 48, "sort": "relevance" }
```

### Example output

```json
{
  "sku": "W004334884",
  "name": "Bavani Round Drum Coffee Table",
  "price": 309.99,
  "list_price": 504.00,
  "on_sale": true,
  "currency": "USD",
  "rating": 4.7,
  "review_count": 351,
  "image": "https://assets.wfcdn.com/im/.../Bavani+Round+Drum+Coffee+Table.jpg",
  "url": "https://www.wayfair.com/furniture/pdp/wade-logan-bavani-round-drum-coffee-table-w004334884.html"
}
```

Use the `sku` (or `url`) with the **Wayfair Product Detail Scraper** to get full specs, all images, description, and review stats.

### Notes

- US catalog, prices in USD.
- Wayfair is bot-protected; results come from a real rendered page, so a run typically takes 20–90 seconds.

# Actor input Schema

## `query` (type: `string`):

What to search for on Wayfair, e.g. 'coffee table', 'sectional sofa', 'bed frame', 'desk lamp', 'area rug'.

## `max_results` (type: `integer`):

How many products to return (about 48 per page, up to 2 pages).

## `sort` (type: `string`):

How to sort the results (default: relevance).

## Actor input object example

```json
{
  "query": "coffee table",
  "max_results": 48,
  "sort": "relevance"
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped items in the default dataset.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "coffee table",
    "max_results": 48,
    "sort": "relevance"
};

// Run the Actor and wait for it to finish
const run = await client.actor("good-apis/wayfair-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "coffee table",
    "max_results": 48,
    "sort": "relevance",
}

# Run the Actor and wait for it to finish
run = client.actor("good-apis/wayfair-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "coffee table",
  "max_results": 48,
  "sort": "relevance"
}' |
apify call good-apis/wayfair-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=good-apis/wayfair-search",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/VFZPPrLWLabxbUx0J/builds/0f86O29H5tZcAQ2jd/openapi.json
