# Macy's Scraper (`autofacts/macy-s-scraper`) Actor

Scrape Macy's product catalog and Macy's Inc. news in one actor. Extract prices, variants, SKUs/UPCs, color & size options, images, ratings and reviews from search, category, trending and product URLs. Fast, clean, normalized JSON.

- **URL**: https://apify.com/autofacts/macy-s-scraper.md
- **Developed by:** [Proooxy](https://apify.com/autofacts) (community)
- **Categories:** E-commerce, Developer tools, MCP servers
- **Features:** Limited permissions
- **Stats:** 7 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.90 / 1,000 product scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Macy's Product & News Scraper

Extract **full Macy's catalog data** — products, prices, variants, SKUs/UPCs, images, ratings, and reviews — plus **Macy's Inc. newsroom articles**, all as clean, normalized JSON. Search by keyword, scrape a category, pull trending products, or paste any `macys.com` product URL. No browser, no HTML parsing, no bot-challenge headaches.

### 📖 What does Macy's Scraper do?

**Macy's Scraper** pulls structured product and editorial data from Macy's and returns it in a single, consistent schema:

- 🔎 **Product search** — any keyword (`"dresses"`, `"nike men shoes"`, `"kitchen"`) → paginated product results.
- 🗂️ **Category / listing pages** — paste a `macys.com/shop/...` category URL.
- 🔥 **Trending & featured** — bestseller / trending / curated landing pages.
- 🧾 **Product detail** — full descriptions, every color & size, per-SKU UPC barcodes, pricing tiers, image galleries, star ratings & review counts.
- 📰 **Macy's Inc. news** — press releases and newsroom articles from `macysinc.com` (title, author, date, body, images).

Every record is normalized to the same top-level shape (`source / title / brand / price / options / variants / medias / stats`), so downstream code doesn't care whether an item came from search, a category, or a product page.

### 💡 Why use Macy's Scraper?

- **Fast, no browser.** **Seconds per page, not minutes**, and no browser farm to babysit.
- **Real SKUs, not guesses.** Each purchasable variant carries its own **UPC barcode**, color, size, availability, and price — recovered from Macy's `upcs` relationship data, not scraped off a swatch widget.
- **Prices as integer cents.** Sale, list, and previous prices are returned as integers (`5999` = `$59.99`) so you never fight floating-point rounding — with the localized formatted strings alongside (`"$59.99"`).
- **One SKU per product.** All shades/sizes are grouped under a single dataset item with a `variants[]` array — not one row per variant.
- **Clean, public URLs only.** Output `canonicalUrl` is always the real shopper-facing product page, with no tracking or query params.
- **Four surfaces, one actor.** Search, category, trending, and news in a single run — paste URLs of each kind side by side.
- **Export anywhere.** Download as JSON, CSV, Excel, or HTML, or pull straight from the dataset API.

### 🚀 How to use Macy's Scraper

1. Open the **Input** tab.
2. Under **What to scrape**, paste Macy's links into **Start URLs** — any mix of product, category, featured, and trending pages, plus Macy's Inc. news articles, the newsroom page, or the press-release feed — and/or type a **Search query** (e.g. `dresses`). Each link's type is recognized automatically.
3. Under **How much to collect**, set **Max result records** — each record is one billed result.
4. (Optional) Turn **Full product details** off for faster, listing-level records.
5. Keep the default **Proxy** — Apify **Residential, country US**.
6. Click **Start**, then download from the **Dataset** tab.

> **Tip:** Set **Max result records** to `10` for a quick smoke test before a full run.

### 📋 Input

| Field | Type | Description |
|---|---|---|
| `startUrls` | array | Any mix of Macy's product, category, featured, or trending URLs and Macy's Inc. news URLs (an article, the newsroom page, or the press-release feed). Each URL's type is detected automatically. |
| `query` | string | Keyword for product search, e.g. `women shoes`. Runs alongside any `startUrls`. |
| `maxResults` | integer | Max records saved — products and articles together. Each record is one billed result. Default `20`; `0` = no limit. |
| `includeProductDetails` | boolean | When `true` (default), each product carries its description, every color and size with its UPC barcode, the full image gallery, and complete review stats. Turn off for faster listing-level records. |
| `proxy` | object | **Required.** Apify Proxy or custom proxy URLs. Residential / country `US` recommended. |

**Advanced** — accepted in the JSON input, not shown in the form:

| Field | Type | Description |
|---|---|---|
| `maxPages` | integer | Listing pages per source. Default `0` = no page limit, so `maxResults` decides when to stop; set `1` to take the first page of each of many sources. |
| `maxRequestsPerCrawl` | integer | Hard cap on HTTP requests, as a safety net. Default `0` = no cap. |
| `minResults` | integer | Fail the run if fewer records are produced (handy for live smoke tests). |
| `maxConcurrency` | integer | Concurrent requests. Default `3`. |
| `debugSaveHtml` | boolean | Development only: save every fetched response to the key-value store. |

> **Legacy fields.** `scrapeType`, `categoryIds`, `trendingUrls`, and `newsUrls` are still accepted so existing tasks and API calls keep working, but they are no longer needed — put every URL in `startUrls`. When `scrapeType` is set, `startUrls` are still all used, but only the legacy input matching it is added (e.g. `search` adds `query` and ignores `trendingUrls` and `newsUrls`).

### 🔗 Supported URL types

Paste any of these into **Start URLs**:

| Type | Example |
|---|---|
| Product detail | `https://www.macys.com/shop/product/vince-camuto-womens-button-front-collared-shirt-dress?ID=27633829` |
| Category / listing (with its `?id=`) | `https://www.macys.com/shop/womens-clothing/womens-dresses?id=5449` |
| Featured / keyword landing | `https://www.macys.com/shop/featured/dresses` |
| Trending | `https://www.macys.com/shop/featured/trending-now` |
| News listing (RSS) | `https://www.macysinc.com/rss/pressrelease.aspx` |
| News listing (newsroom page) | `https://www.macysinc.com/newsroom/news/default.aspx` |
| News article | `https://www.macysinc.com/newsroom/news/news-details/2026/Macys-Unwraps-the-Magic-of-Holiday-Gifting/default.aspx` |

> A category URL needs its `?id=` parameter: Macy's refuses a category page without it, and the run fails with a message saying so. The Macy's Inc. newsroom page builds its article list in the browser, so it is read through the press-release feed: you get the latest press releases, not the newsroom's archive. Purely editorial featured pages (no product grid) may legitimately return no products.

### 📤 Output

Each dataset item follows the schema in `.actor/dataset_schema.json`. Both examples are real records from a run on 2026-11-10, shortened where marked `…`. Product example (abridged):

```json
{
    "type": "product",
    "source": {
        "id": "27633829",
        "canonicalUrl": "https://www.macys.com/shop/product/vince-camuto-womens-button-front-collared-shirt-dress?ID=27633829",
        "retailer": "macys",
        "language": "en-US",
        "currency": "USD"
    },
    "scrapeContext": { "type": "category", "listUrl": "browse:/shop/womens-clothing/womens-dresses:5449" },
    "title": "Women's Floral-Print Short-Sleeve Midi Shirt Dress",
    "brand": "Vince Camuto",
    "description": "This floral-print shirt dress from Macy's has a polished button-front shape with a point collar and hip…",
    "categories": ["Women's Fashion, Shoes & Accessories", "Dresses"],
    "price": {
        "sale": 6672,
        "list": 13900,
        "previous": 13900,
        "currentFormatted": "$66.72",
        "listFormatted": "$139.00",
        "previousFormatted": "$139.00",
        "stockStatus": "InStock"
    },
    "stats": {
        "rating": 4.4,
        "reviewCount": 34,
        "ratingRange": 5,
        "ratingPercentage": 88,
        "recommendedCount": 11,
        "notRecommendedCount": 0,
        "ratingDistribution": [ { "rating": 5, "count": 25 }, { "rating": 4, "count": 5 }, { "rating": 2, "count": 1 }, { "rating": 1, "count": 3 } ],
        "secondaryRatings": [
            { "id": "OverallSize", "label": "Runs Small/Runs Large", "value": 3.75, "valueLabel": "neutral", "minLabel": "Runs Small", "maxLabel": "Runs Large", "range": 7 },
            …
        ],
        "reviewSources": ["BV"]
    },
    "details": {
        "features": ["Imported", "Point collar", "Button closures at front", "Pockets at hips", "Lined"],
        "sizeAndFit": ["Approx. model height is 5'10\" and she is wearing a size small", "Approx. 52\" long"],
        "materialsAndCare": ["82% lyocell, 18% nylon; lining: 100% polyester", "Machine wash"],
        "specialSizes": ["Regular"],
        "bullets": ["Approx. model height is 5'10\" and she is wearing a size small", "Approx. 52\" long", …]
    },
    "options": [
        {
            "type": "Color",
            "values": [
                { "id": "11356735", "name": "Denim Navy", "swatchIcon": { "type": "Image", "url": "https://slimages.macysassets.com/is/image/MCY/products/1/optimized/38518361_fpx.tif" } }
            ]
        },
        { "type": "Size", "values": [ { "id": "0", "name": "XS" }, { "id": "1", "name": "S" }, { "id": "2", "name": "M" }, … ] }
    ],
    "variants": [
        {
            "id": "58636889",
            "sku": "199607656984",
            "options": ["Denim Navy", "XS"],
            "price": { "stockStatus": "InStock" },
            "extraInfo": { "upc": "199607656984" }
        },
        {
            "id": "58636891",
            "sku": "199607656960",
            "options": ["Denim Navy", "S"],
            "price": { "stockStatus": "InStock" },
            "extraInfo": { "upc": "199607656960" }
        },
        …
    ],
    "medias": [
        { "type": "Image", "url": "https://slimages.macysassets.com/is/image/MCY/products/9/optimized/39372089_fpx.tif", "alt": "39372089.fpx", "index": 0 },
        { "type": "Image", "url": "https://slimages.macysassets.com/is/image/MCY/products/4/optimized/38497144_fpx.tif", "alt": "38497144.fpx", "index": 1 },
        …
    ],
    "extraInfo": { "topLevelCategory": "Women's Fashion, Shoes & Accessories" }
}
```

News example (abridged):

```json
{
    "type": "article",
    "source": {
        "id": "https://www.macysinc.com/newsroom/news/news-details/2026/macys-unwraps-the-magic-of-holiday-gifting/default.aspx",
        "canonicalUrl": "https://www.macysinc.com/newsroom/news/news-details/2026/Macys-Unwraps-the-Magic-of-Holiday-Gifting/default.aspx",
        "retailer": "macys",
        "language": "en-US",
        "publishedUTC": 1793073600000
    },
    "scrapeContext": { "type": "news", "listUrl": "https://www.macysinc.com/rss/pressrelease.aspx" },
    "title": "Macy’s Unwraps the Magic of Holiday Gifting",
    "subtitle": "Macy’s brings the magic to every list with expertly curated gift ideas, beloved traditions and easy ways to shop all season long",
    "publishedAt": "October 27, 2026",
    "category": "Press Release",
    "summary": "Macy’s brings the magic to every list with expertly curated gift ideas, beloved traditions and easy ways to shop all…",
    "bodyText": "Macy’s brings the magic to every list with expertly curated gift ideas, beloved traditions and easy ways to shop all season long NEW YORK--(BUSINESS WIRE)--…",
    "images": [ { "type": "Image", "url": "https://mms.businesswire.com/media/20261027779685/en/2948690/4/Macy%E2%80%99s_112_ct._t.w._labgrown_diamond_earrings_in_14k_white_or_yellow_gol%2C_2%2C500.jpg", "alt": "Macy’s 112 ct. t.w. labgrown diamond earrings in 14k white or yellow gold, $2,500.", "index": 0 } ]
}
```

Download as JSON, CSV, XLSX, or HTML from the **Dataset** tab.

### 🗂️ Data fields

| Field | Type | Notes |
|---|---|---|
| `type` | enum | `product` or `article`. |
| `source.id` | string | Macy's product ID or article ID. |
| `source.canonicalUrl` | string | Public, shopper-facing page URL. |
| `source.retailer` | string | Always `macys`. |
| `source.currency` | string | `USD`. |
| `title` | string | Product name / article headline. |
| `brand` | string | Product brand. |
| `description` | string | Full product description. |
| `categories` | array | Taxonomy breadcrumb names. |
| `price.sale` / `list` / `previous` | integer | **Integer cents** (`6672` = `$66.72`). `list` is the regular price. On a markdown, `sale` is the marked-down price (the lowest one when only some colors or sizes are reduced) and `previous` the original; both are absent at full price. |
| `price.*Formatted` | string | Display strings (`"$66.72"`). `currentFormatted` is the price a shopper pays now; `previousFormatted` appears only with `previous`. |
| `price.stockStatus` | enum | `InStock` / `LowInStock` / `OutOfStock` / `Unknown`. |
| `stats.rating` / `reviewCount` | number | Average overall rating and total review count. |
| `stats.ratingPercentage` / `recommendedCount` / `notRecommendedCount` | number | Recommend %, and recommend / not-recommend counts. |
| `stats.ratingDistribution[]` | array | Star histogram: `{ rating, count }` per star value. |
| `stats.secondaryRatings[]` | array | PDP slider ratings (e.g. **Length**, **Coverage**, **Overall Size**): `id`, `label`, `value`, `minLabel`/`maxLabel`, `range`. |
| `details.features[]` | array | **Features / product details** bullets. |
| `details.sizeAndFit[]` | array | **Size & Fit** bullets (length, fit, silhouette). |
| `details.materialsAndCare[]` | array | **Materials & Care** bullets (fabric composition, wash/care). |
| `details.specialSizes[]` / `details.bullets[]` | array | Size types (e.g. Regular, Petite) and the full combined bullet list. |
| `options[]` | array | `Color` / `Size` option groups, each value with `id`, `name`, and (colors) a `swatchIcon`. |
| `variants[]` | array | One purchasable SKU per entry: `id`, **`sku` (UPC barcode)**, `options` (color/size), per-SKU `price`, `extraInfo.upc`. |
| `medias[]` | array | Product image gallery (`type`, `url`, `index`). |
| `author` / `publishedAt` / `summary` / `bodyText` / `images` | — | Article-only fields. |

### ⚙️ Tips & advanced options

- **Use residential US proxies.** Product details are intermittently rate-limited; `retryOnBlocked` + Apify residential session rotation gets through cleanly. Datacenter IPs are more likely to see 403s.
- **Keep concurrency modest.** The default `maxConcurrency` of `3` (JSON input only) is the sweet spot. Higher values raise rate-limit rates without improving throughput.
- **Smoke test first.** Set `maxResults: 10` (and `minResults: 1` in the JSON input) to confirm your input before a full crawl.
- **`maxResults` is shared by all sources.** Sources fill it in order, so the first ones can use it all up. To sample the first page of each of many categories instead, set `maxPages: 1` in the JSON input.
- **Turn off Full product details (`includeProductDetails`)** for a fast listing-level sweep (name, brand, listing price, image, rating) when you don't need variants/descriptions.

### ❓ FAQ

**Do I need a login, cookie, or API key?** No. No account and no token beyond your Apify proxy.

**Are the prices in dollars or cents?** Integer **cents** (`5999` = `$59.99`) to avoid floating-point rounding. Each price also carries a localized formatted string.

**Which URL does each record carry?** Output `canonicalUrl` is always the public product/article page a shopper would visit.

**Some trending/featured pages return no products — is that a bug?** No. Purely editorial landing pages (e.g. `trending-now`) may have no underlying product grid. Use a real category URL or a search query for guaranteed product results.

**Can I scrape multiple surfaces in one run?** Yes. Put any mix of product, category, trending, and news URLs in `startUrls`, optionally alongside a `query` — every one of them is used.

**Will re-running the same input re-scrape everything?** Yes. Each run starts with a fresh request queue, so hitting **Start** again re-scrapes every source. Split into batches for very large crawls.

**Legality / Terms of Service.** Web scraping legality depends on jurisdiction and intended use. Review Macy's Terms of Service and consult counsel before running at scale. This actor is provided as-is for research, price monitoring, competitive analysis, and other lawful use cases, and collects only publicly available data.

### 💬 Support

Questions, bugs, or feature requests (historical backfills, additional Macy's surfaces, custom fields) — open an issue on the Apify listing or contact the autofacts team.

***

### 🤖 Use with AI agents

This Actor is callable as a tool by any MCP-capable agent — Claude, Cursor, VS Code — or by your
own code, with no wrapper and nothing extra to deploy.

**Connect over MCP**

```
https://mcp.apify.com?tools=autofacts/macy-s-scraper
```

In a client that reads an `mcpServers` configuration block:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=autofacts/macy-s-scraper",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
```

The agent reads this Actor's parameters and their descriptions straight from the input
schema, and the hosted server infers the result field types from the dataset schema — so a
model knows what to send and what comes back before it ever calls anything.

**Or call the API directly**

```bash
curl -X POST "https://api.apify.com/v2/acts/autofacts~macy-s-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"startUrls": [{"url": "https://www.macys.com/shop/featured/dresses"}], "maxResults": 20}'
```

The response body is the dataset records described above.

### 🧰 Other Actors by autofacts

Apify only auto-recommends Actors in the same category, so here are the ones that actually pair with this scraper:

| Actor | What it's for |
| :--- | :--- |
| [Sephora Product Scraper](https://apify.com/autofacts/sephora) | Beauty across 29 countries |
| [Ulta Beauty Scraper](https://apify.com/autofacts/ulta-scraper) | US beauty retail — prices, every shade, reviews |
| [Boohoo Scraper](https://apify.com/autofacts/boohoo-scraper) | Fast fashion across 7 regions |
| [Farfetch Scraper](https://apify.com/autofacts/farfetch) | Luxury fashion, multi-currency |
| [Lululemon Scraper](https://apify.com/autofacts/lululemon-scraper) | Activewear catalog and pricing |

All of them: [apify.com/autofacts](https://apify.com/autofacts)

# Actor input Schema

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

Paste any Macy's link — each one is recognized automatically:<br>• a <b>product</b> page: <code>macys.com/shop/product/…?ID=…</code><br>• a <b>category</b> page with its <code>?id=</code>: <code>macys.com/shop/…?id=…</code><br>• a <b>featured</b> or <b>trending</b> page: <code>macys.com/shop/featured/…</code><br>• a Macy's Inc. <b>news</b> article, or the newsroom page or press-release feed for the latest news: <code>https://www.macysinc.com/rss/pressrelease.aspx</code><br><br>Mix any of them in one run, alongside a search query.

## `query` (type: `string`):

A keyword to search Macy's for, as you would type it on macys.com — e.g. <code>women shoes</code>. Runs alongside any Start URLs.

## `scrapeType` (type: `string`):

Legacy, not shown in the form: kept so tasks and API calls from before the form was simplified behave as they did. Leave it unset, and every Start URL and the Search query are used together. When set, Start URLs are still always used, but only the input matching the type is added — <code>search</code>: Search query; <code>category</code>: Category IDs; <code>trending</code>: Trending URLs, or Macy's trending page when there are none; <code>news</code>: News URLs, or the Macy's Inc. press-release feed when there are none; <code>all</code>: all of them.

## `categoryIds` (type: `array`):

Legacy, not shown in the form. Macy's category IDs such as <code>5449</code> — put the category's URL in Start URLs instead, e.g. <code>https://www.macys.com/shop/womens-clothing/womens-dresses?id=5449</code>.

## `trendingUrls` (type: `array`):

Legacy, not shown in the form. Put these in Start URLs instead: trending, bestseller and curated pages are recognized there.

## `newsUrls` (type: `array`):

Legacy, not shown in the form. Put these in Start URLs instead: Macy's Inc. news articles, the newsroom page and the press-release feed are recognized there.

## `maxResults` (type: `integer`):

The maximum number of records — products and news articles — saved to the dataset. Each record is one billed result, so this is also the run's cost cap. The scraper stops as soon as it has that many. <br><br>If set to <code>0</code>, there is no limit — use the run's <b>Max total charge</b> setting to bound spend instead.

## `maxPages` (type: `integer`):

Advanced, not shown in the form: how many listing pages to read for each start URL or search. <code>0</code> (the default) means no page limit — Max result records decides when to stop. Pass a number in the JSON input to spread a run across many sources, e.g. <code>1</code> to take only the first page of each.

## `maxRequestsPerCrawl` (type: `integer`):

Advanced, not shown in the form: a hard cap on HTTP requests, as a safety net. <code>0</code> (the default) means no cap — Max result records already bounds the run.

## `minResults` (type: `integer`):

Advanced, not shown in the form: fail the run when it produces fewer records than this. Useful for smoke tests.

## `includeProductDetails` (type: `boolean`):

Read each product's own page for its description, every color and size with its UPC barcode, the full image gallery, and the complete ratings & reviews breakdown. Costs one extra request per product, and is not billed separately. Turn it off for faster listing-level records: name, brand, price, main image and rating.

## `proxy` (type: `object`):

Every request goes through a proxy, so it can't be switched off. Apify residential proxies in the US (the default) work best; datacenter IPs are blocked more often.

## `maxConcurrency` (type: `integer`):

Advanced, not shown in the form: how many requests run at once. The default of 3 suits Macy's rate limits — higher values mostly add blocks, not speed.

## `debugSaveHtml` (type: `boolean`):

For development only, not shown in the form: saves every fetched response to the default key-value store.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.macys.com/shop/featured/dresses"
    }
  ],
  "maxResults": 20,
  "maxPages": 0,
  "maxRequestsPerCrawl": 0,
  "minResults": 0,
  "includeProductDetails": true,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  },
  "maxConcurrency": 3,
  "debugSaveHtml": false
}
```

# Actor output Schema

## `products` (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/dresses"
        }
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("autofacts/macy-s-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/dresses" }],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("autofacts/macy-s-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/dresses"
    }
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call autofacts/macy-s-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,autofacts/macy-s-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/hkPcpIw0Krr4BflO5/builds/Yg8H8MwPliGi4rw5S/openapi.json
