# Macy's Product Search API Documentation

<p><strong>Macy's Product Search API Documentation</strong> Search Macy's products. Each result has the product id, title, brand, url, full-size image, original price, sale price, discount, currency, availability and rating. Filter by category id, brand and price range, and sort price or rating within the returned page. The id from a result is accepted unchanged by the product endpoint. A price filter is checked on every row: no product outside the range is returned. Only page 1 is available because the site does not expose a stable second page. An empty result and every error cost nothing. Cost: 1 credit when results are returned.</p>

- **Documentation:** [https://scrappa.co/docs/macys-api/macys_search](https://scrappa.co/docs/macys-api/macys_search)
- **API group:** Macy's API
- **Endpoint:** `GET https://scrappa.co/api/macys/search`

## 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 |
| --- | --- | --- | --- |
| `query` | string | No | Search text, 1 to 200 characters. Example: dress. |
| `category` | string | No | Numeric id from the categories endpoint, e.g. 5449. |
| `brand` | string | No | Brand name to match. |
| `sort` | string | No | relevance, price_low, price_high or rating_high. |
| `min_price` | number | No | Lowest USD price. Send with max_price. |
| `max_price` | number | No | Highest USD price. Send with min_price. |
| `page` | integer | No | Only page 1 is available. |

## Example response

```json
{
    "data": {
        "query": "dress",
        "results": [
            {
                "id": "28353651",
                "brand": "Brand",
                "price": {
                    "sale": 49.99,
                    "currency": "USD",
                    "original": 79.99,
                    "discount_percent": 38
                },
                "title": "Dress",
                "rating": {
                    "count": 120,
                    "average": 4.5
                }
            }
        ],
        "pagination": {
            "current_page": 1
        }
    },
    "meta": {
        "credits": 1,
        "billable": true
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required or invalid parameter was sent. |
| 503 | Upstream Unavailable | The source did not answer. Nothing was charged. |

## 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)
