# 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:** 25 total users, 4 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/actors/running/actors-in-store.md#pay-per-usage

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

## 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(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lexis-solutions/macys-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gFcORWf5BXopx5Qxf/builds/VBiTZ7qPUASYe9RfN/openapi.json
