# Wayfair Category API Documentation

<p><strong>Wayfair Category API</strong> lists the products of one category, 48 per page, with price, sale price, rating, delivery promise, stock message and images. Filter with <code>filters</code> (option filters) and <code>price_min</code> and <code>price_max</code>, sort with <code>sort</code>, page with <code>page</code>. Every answer carries the full filter tree of the category: use the <code>id</code> of a filter and of an option as <code>filters=filterId:optionId</code>. Filter ids are specific to a category.</p><p>A filter is always honoured: a page that does not confirm every requested filter is never returned. An id that does not belong to the category is a 422 error. A page is only returned when it is the requested page, in the requested sort and fully loaded; otherwise the request fails with 503 and is not billed.</p><p><strong>Sort and sponsored cards:</strong> the sort applies to the organic products. Cards with <code>sponsored: true</code> are paid placements; they are not reordered and can break a strict price order on a page.</p><p><strong>Credits:</strong> 1 credit per successful request. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/wayfair-api/wayfair_category](https://scrappa.co/docs/wayfair-api/wayfair_category)
- **API group:** Wayfair API
- **Endpoint:** `GET https://scrappa.co/api/wayfair/category`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | integer | No | Category id, for example 413892 for sofas. Send category_id or url. |
| `url` | string | No | Full category page URL of the chosen storefront. Send url or category_id. |
| `page` | integer | No | One-based page number, 1 to 100 (default 1). |
| `sort` | string | No | recommended (default), price_asc, price_desc, rating, most_purchased, biggest_savings, popularity, total_price_asc or total_price_desc. |
| `filters` | string | No | Option filters as filterId:optionId pairs from the filter tree of an earlier answer, comma separated. Example: 2480:37152,2470:464654. |
| `price_min` | integer | No | Minimum price in whole currency units. |
| `price_max` | integer | No | Maximum price in whole currency units. |
| `domain` | string | No | Storefront: com (default), ca or co.uk. SKUs, slugs and category ids differ per storefront: use ids from the same storefront. |

## Example response

```json
{
    "data": {
        "sort": "price_asc",
        "filters": [
            {
                "id": "2479",
                "max": 1000000,
                "min": 0,
                "name": "Price Per Item",
                "type": "range",
                "unit": "$",
                "ranges": [
                    {
                        "max": 500,
                        "min": 0,
                        "name": "Under $500",
                        "selected": false
                    },
                    {
                        "max": 1000,
                        "min": 500,
                        "name": "$500 to $1,000",
                        "selected": false
                    },
                    {
                        "max": 2000,
                        "min": 1000,
                        "name": "$1,000 to $2,000",
                        "selected": false
                    }
                ],
                "options": []
            },
            {
                "id": "161199",
                "max": null,
                "min": null,
                "name": "Custom Product",
                "type": "options",
                "unit": null,
                "ranges": [],
                "options": [
                    {
                        "id": "592771",
                        "name": "Yes",
                        "enabled": true,
                        "selected": false
                    },
                    {
                        "id": "592772",
                        "name": "No",
                        "enabled": true,
                        "selected": false
                    }
                ]
            }
        ],
        "products": [
            {
                "sku": "W113009307",
                "url": "https://www.wayfair.com/furniture/pdp/lark-manor-57-upholstered-loveseat-classic-aloejasper-linen-w900000.html",
                "flag": null,
                "brand": "Lark Manor\u2122",
                "price": {
                    "amount": 599.99,
                    "currency": "USD"
                },
                "title": "57\" Upholstered Loveseat - Classic Aloe/Jasper Linen",
                "rating": 0,
                "on_sale": true,
                "delivery": {
                    "promise": "FREE Delivery",
                    "estimated_arrival": null
                },
                "position": 1,
                "sponsored": true,
                "image_urls": [
                    "https://assets.wfcdn.com/im/00000000/resize-h800-w800%5Ecompr-r85/3886/388615376/image.jpg",
                    "https://assets.wfcdn.com/im/00000000/resize-h800-w800%5Ecompr-r85/3886/388615368/image.jpg"
                ],
                "variant_id": "AZ37092405",
                "review_count": 0,
                "is_best_value": false,
                "savings_label": null,
                "stock_message": "414 Left in Stock",
                "original_price": {
                    "amount": 629.99,
                    "currency": "USD"
                },
                "savings_percent": 5,
                "selected_options": []
            }
        ],
        "pagination": {
            "page": 2,
            "total": 876,
            "per_page": 48,
            "total_pages": 19,
            "has_next_page": true
        },
        "category_id": 413892,
        "category_url": "https://www.wayfair.com/furniture/sb1/lark-manor-sofas-c413892-a2480~37152.html",
        "applied_filters": {
            "filters": [
                "2480:37152"
            ]
        }
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "category"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid, or an id does not belong to the request. This response is not billable. |
| 503 | Upstream Unavailable | Wayfair could not be reached, blocked the request or returned data that does not match the request (another page, another sort, a partly loaded grid). This response is not billable and is retryable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
