{
  "openapi": "3.0.1",
  "info": {
    "title": "Wayfair Scraper — Products, Prices & AI Reviews API",
    "description": "Scrape Wayfair into clean JSON: keyword and brand product search, full product details with prices and specs, and paginated customer reviews with an AI-generated summary and aspect sentiments. 3 operations, one dataset. For price monitoring, catalog mapping and review intelligence.",
    "version": "1.1",
    "x-build-id": "05C2dS3vHYHbWmMRh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~wayfair-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-wayfair-data-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/sian.agency~wayfair-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-wayfair-data-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/sian.agency~wayfair-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-wayfair-data-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "🎯 Operation — what do you want to scrape?",
            "enum": [
              "search",
              "productDetails",
              "productReviews"
            ],
            "type": "string",
            "description": "🎯 **PICK ONE OPERATION PER RUN.** Each run produces one clean dataset matching the chosen mode.\n\n- **Product Search** — keyword search or whole-brand browse, paginated (up to 96 results/page)\n- **Product Details** — one product by SKU: price, specs, images, rating, description\n- **Product Reviews** — paginated reviews plus Wayfair's AI review summary and aspect sentiments\n\n💡 **TIP:** Run Product Search to discover SKUs, then drill into Details and Reviews per product.",
            "default": "search"
          },
          "query": {
            "title": "🔍 Search Query (for Product Search)",
            "type": "string",
            "description": "🔍 **Required for `Product Search`** (unless you use Manufacturer ID instead).\n\nAny Wayfair product search query.\n- `sofa`\n- `office chair`\n- `outdoor rug 8x10`\n\n💡 **TIP:** Use the `sortBy` field to rank by price or customer rating. Leave blank only if you provide a Manufacturer ID for brand browsing.\n\n⚠️ **Ignored** for Details and Reviews operations.",
            "default": "sofa"
          },
          "manufacturerId": {
            "title": "🏷️ Manufacturer / Brand ID (browse a whole brand)",
            "type": "string",
            "description": "🏷️ **Optional alternative to Search Query for `Product Search`.**\n\nA Wayfair manufacturer/brand ID — browses every product from that brand (no keyword needed). Combine with `categoryId` to narrow a brand to one category.\n\n💡 **TIP:** Provide EITHER a Search Query OR a Manufacturer ID for the Search operation. Manufacturer IDs appear in Wayfair brand-page URLs.\n\n⚠️ **Ignored** for Details and Reviews operations.",
            "default": ""
          },
          "sku": {
            "title": "📦 Product SKU (for Details / Reviews)",
            "type": "string",
            "description": "📦 **Required for `Product Details` and `Product Reviews` operations.**\n\nThe Wayfair product SKU. Examples: `MBYC1062`, `W110469263`. SKUs appear in every Product Search result row (the `sku` field) and in product URLs.\n\n💡 **TIP:** Run `Product Search` first to discover SKUs, then loop through Details / Reviews per product.\n\n⚠️ **Ignored** for the Search operation.",
            "default": "W110469263"
          },
          "domain": {
            "title": "🌍 Domain (Wayfair marketplace)",
            "enum": [
              "com",
              "ca",
              "co.uk",
              "ie",
              "de"
            ],
            "type": "string",
            "description": "🌍 Which Wayfair marketplace to query. `com` = wayfair.com (US, default).",
            "default": "com"
          },
          "sortBy": {
            "title": "↕️ Sort Order (Product Search)",
            "enum": [
              "recommended",
              "customer_rating",
              "price_low_to_high",
              "price_high_to_low"
            ],
            "type": "string",
            "description": "Sort order for `Product Search`.\n\n- `recommended` (default)\n- `customer_rating` — highest rated first\n- `price_low_to_high`\n- `price_high_to_low`\n\nIgnored for Details and Reviews.",
            "default": "recommended"
          },
          "itemsPerPage": {
            "title": "🔢 Results per page (Product Search)",
            "enum": [
              "24",
              "48",
              "96"
            ],
            "type": "string",
            "description": "Number of products returned per page for `Product Search`. More per page = fewer upstream calls for the same coverage.\n\n- `24`\n- `48` (default)\n- `96`",
            "default": "48"
          },
          "categoryId": {
            "title": "🗂️ Category ID (optional filter)",
            "type": "string",
            "description": "Optional. For `Product Search` — narrow results to a specific Wayfair category ID. Pairs well with a Manufacturer ID to browse one brand within one category.",
            "default": ""
          },
          "color": {
            "title": "🎨 Color filter (optional)",
            "type": "string",
            "description": "Optional color filter for `Product Search`. Examples: `Black`, `White`, `Blue`, `Gray`, `Brown`, `Red`.",
            "default": ""
          },
          "minPrice": {
            "title": "💲 Min Price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional price filter for `Product Search`. Minimum product price (USD). Leave at 0 for no minimum. Must be lower than Max Price if both are set.",
            "default": 0
          },
          "maxPrice": {
            "title": "💲 Max Price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional price filter for `Product Search`. Maximum product price (USD). Leave at 0 for no maximum. Must be higher than Min Price if both are set.",
            "default": 0
          },
          "inStock": {
            "title": "✅ In-stock only",
            "type": "boolean",
            "description": "Optional. For `Product Search` — return only products that are currently in stock.",
            "default": false
          },
          "reviewSort": {
            "title": "↕️ Review Sort Order",
            "enum": [
              "relevance",
              "helpful",
              "date_descending",
              "date_ascending",
              "rating_descending",
              "rating_ascending"
            ],
            "type": "string",
            "description": "Sort order for `Product Reviews`.\n\n- `relevance` (default)\n- `helpful` — most helpful first\n- `date_descending` — newest first\n- `date_ascending` — oldest first\n- `rating_descending` — highest rating first\n- `rating_ascending` — lowest rating first\n\nIgnored for all other operations.",
            "default": "relevance"
          },
          "reviewStar": {
            "title": "⭐ Review Star Filter",
            "enum": [
              "",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Optional. For `Product Reviews` only — return only reviews with this star rating (1–5). Leave blank for all ratings.",
            "default": ""
          },
          "maxPages": {
            "title": "📄 Max pages to fetch",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "📄 **Applies to paginated operations** (Product Search, Product Reviews). Ignored for Product Details (single record).\n\n- **Search:** up to `itemsPerPage` products per page (24/48/96)\n- **Product Reviews:** 10 reviews per page\n\n💡 **TIP:** Start small (1–3 pages) to preview results before scaling up. Pagination stops automatically when the data source reports the last page.\n\n⚠️ Hard cap: 50 pages to prevent runaway runs.",
            "default": 5
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}