# Macys Scraper (`lexis-solutions/macys-scraper`) Actor

Macys.com scraper for US ecommerce: extract product prices, brands, sizes, colors, variants, availability and categories from Macys listings and product URLs for market research, catalog monitoring and pricing analytics.

- **URL**: https://apify.com/lexis-solutions/macys-scraper.md
- **Developed by:** [Lexis Solutions](https://apify.com/lexis-solutions) (community)
- **Categories:** E-commerce, AI, Agents
- **Stats:** 14 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Macys Scraper

![banner](https://i.imgur.com/4pQkuIc.png)

Macys (macys.com) is a US department store and marketplace platform. This actor collects structured product data from Macys listing/search pages and product detail endpoints.

### Introduction

The Macys scraper starts from listing/search URLs or product detail URLs, goes through result pages, and extracts structured product data such as product ID, name, brand, pricing, categories, availability, variants, colors, sizes, shipping messages, and more.

### Use Cases

- **Market research**: Track product pricing, assortment, and brand distribution for selected categories or keywords.
- **Catalog monitoring**: Watch changes in product listings and metadata over time.
- **Lead generation**: Build structured product datasets for enrichment and outreach workflows.
- **Analytics pipelines**: Feed BI tools, dashboards, and internal warehousing.

### Input

Provide the following fields:

- `startUrls` (array, required): Macys listing/search/category URLs (or product URLs).
- `maxItems` (integer, optional): Maximum number of products to extract per original URL.
- `proxyConfiguration` (object, optional): Apify proxy settings.

Notes:

- If a `startUrl` is a listing/search/category URL, the actor paginates and collects product details.
- If a `startUrl` is a product detail URL (contains `/product/` and ID query), the actor collects that product directly.
- URLs outside macys.com are skipped.
- US proxy is highly recommended, especially US residential proxy, for stability and region-restricted content access.
- Crawling stops per source URL when `maxItems` is reached.

### Input Examples

**1) Start URLs**

```json
{
  "startUrls": [
    {
      "url": "https://www.macys.com/shop/featured/slip/Pageindex/1?ss=true"
    },
    {
      "url": "https://www.macys.com/shop/product/lands-end-womens-cooling-knee-length-slip-nightgown?ID=22739602"
    }
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
````

### Output

Each dataset item contains fields like:

```json
{
  "sourceUrl": "https://www.macys.com/shop/product/the-north-face-mens-fastpack-mid-wp-lace-up-boots?ID=26116956",
  "apiUrl": "https://www.macys.com/xapi/digital/v1/product/26116956?clientId=PROS&currencyCode=USD&_regionCode=US&size=small",
  "id": 26116956,
  "productId": 26116956,
  "canonicalUrl": "https://www.macys.com/shop/product/the-north-face-mens-fastpack-mid-wp-lace-up-boots?ID=26116956",
  "productUrl": "https://www.macys.com/shop/product/the-north-face-mens-fastpack-mid-wp-lace-up-boots?ID=26116956",
  "name": "Men's Fastpack Mid WP Lace-Up Boots",
  "completeName": "The North Face Men's Fastpack Mid WP Lace-Up Boots",
  "brand": "The North Face",
  "topLevelCategoryName": "Men's Shoes",
  "departmentName": "CASUAL SHOES - MENS",
  "isOnSale": false,
  "regularPriceText": "$190.00",
  "salePriceText": null,
  "percentOff": null,
  "available": true,
  "selectedColorId": 10895927,
  "totalColors": 3,
  "colors": [
    {
      "id": 10895927,
      "name": "Black/Summit Gold",
      "normalName": "Black"
    }
  ],
  "sizes": [
    {
      "id": 0,
      "name": "7.5",
      "displayName": "7.5"
    }
  ],
  "imageUrls": [
    "https://slimages.macysassets.com/is/image/MCY/products/4/optimized/35859694_fpx.tif"
  ],
  "variants": [
    {
      "id": 57464981,
      "upcNumber": "198266838571",
      "colorId": 10895927,
      "sizeId": 0,
      "size": "7.5",
      "available": true,
      "availabilityMessage": "Direct from vendor"
    }
  ],
  "variantsCount": 23,
  "reviewRating": null,
  "reviewCount": null
}
```

The scraper paginates through listing results and stops when `maxItems` is reached per start URL or when no more result items are found.

### Why use the Macys Scraper?

- **Focused**: Built specifically for Macys listing/detail API flows.
- **Structured output**: Ready-to-use JSON records for automation and analysis.
- **Per-URL limits**: `maxItems` is enforced per original URL.
- **Flexible input**: Supports both listing/search URLs and product detail URLs.
- **Apify-native**: Works with Apify datasets, request queue, and proxy config.

### FAQ

- **How many products can it extract?**\
  Controlled by `maxItems` per source URL.

- **Do I need proxies?**\
  Not always, but proxies are recommended for larger runs and stability.

- **Can I start from a product detail URL?**\
  Yes. Product detail URLs are supported if product ID is present in query params.

- **What if Macys changes their website/API structure?**\
  The actor may require updates to keep extraction stable.

### Need to scrape other retail platforms?

Check out our other scrapers:

- [Bath & Body Works](https://apify.com/lexis-solutions/bath-and-body-works).
- [Michaels](https://apify.com/lexis-solutions/michaels-scraper).
- [Coolblue](https://apify.com/lexis-solutions/coolblue-scraper).
- [Notino](https://apify.com/lexis-solutions/notino-scraper).
- [Otto](https://apify.com/lexis-solutions/otto-de-scraper).

***

**Need help or want a custom solution?**

Lexis Solutions is a certified Apify Partner. We can help with custom data extraction projects.

Contact us over [Email](mailto:scraping@lexis.solutions) or [LinkedIn](https://www.linkedin.com/company/lexis-solutions).

### Support Our Work

If you're happy with our work and scrapers, you're welcome to leave us a company review [here](https://apify.com/partners/find/lexis-solutions/review) and leave a review for the scrapers you're subscribed to.

### Image Credit

Image credit: [macys.com](https://www.macys.com/).

# Actor input Schema

## `startUrls` (type: `array`):

Macys category URLs to start with.

## `maxItems` (type: `integer`):

Maximum number of products per original URL.

## `proxyConfiguration` (type: `object`):

Proxy configuration used for requests.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.macys.com/shop/featured/slip/Pageindex/1?ss=true"
    }
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://www.macys.com/shop/featured/slip/Pageindex/1?ss=true"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lexis-solutions/macys-scraper").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 = { "startUrls": [{ "url": "https://www.macys.com/shop/featured/slip/Pageindex/1?ss=true" }] }

# Run the Actor and wait for it to finish
run = client.actor("lexis-solutions/macys-scraper").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 '{
  "startUrls": [
    {
      "url": "https://www.macys.com/shop/featured/slip/Pageindex/1?ss=true"
    }
  ]
}' |
apify call lexis-solutions/macys-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lexis-solutions/macys-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Macys Scraper",
        "description": "Macys.com scraper for US ecommerce: extract product prices, brands, sizes, colors, variants, availability and categories from Macys listings and product URLs for market research, catalog monitoring and pricing analytics.",
        "version": "1.0",
        "x-build-id": "VBiTZ7qPUASYe9RfN"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lexis-solutions~macys-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lexis-solutions-macys-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/lexis-solutions~macys-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lexis-solutions-macys-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/lexis-solutions~macys-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lexis-solutions-macys-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": [
                    "startUrls",
                    "maxItems"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Macys category URLs to start with.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Maximum number of items",
                        "type": "integer",
                        "description": "Maximum number of products per original URL.",
                        "default": 10
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy configuration used for requests.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
