# Macys  Product Search (`pintostudio/macys-product-search`) Actor

The Macy's Product Search Scraper is a reliable tool to extract product data directly from Macy's search results. Whether you're conducting market research, tracking pricing trends, or building a product database, this actor provides comprehensive product information in an easy-to-use format.

- **URL**: https://apify.com/pintostudio/macys-product-search.md
- **Developed by:** [Pinto Studio](https://apify.com/pintostudio) (community)
- **Categories:** E-commerce, Automation, Integrations
- **Features:** Limited permissions
- **Stats:** 24 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.90 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Search Scraper Actor Documentation

### Overview

The **Macy's Product Search Scraper** is a reliable tool to extract product data directly from Macy's search results. Whether you're conducting market research, tracking pricing trends, or building a product database, this actor provides comprehensive product information in an easy-to-use format.

***

### Features

- **Flexible Search Queries**: Search for products using any keyword or term.
- **Paginated Results**: Retrieve data across multiple pages with adjustable limits per page.
- **Region and Currency Support**: Customize results for specific regions and currencies.
- **Comprehensive Data Extraction**: Get details like product names, prices, descriptions, and more.

***

### Use Cases

- **Market Research**: Analyze Macy's product offerings for insights and trends.
- **Price Monitoring**: Track product prices and promotions in real time.
- **Competitor Analysis**: Compare Macy's product catalog with other retailers.
- **E-commerce Development**: Populate your store or tool with Macy's product data.

***

### Input Parameters

The actor accepts the following input parameters:

| Parameter Name | Type   | Default Value | Description                                                                                     |
|----------------|--------|---------------|-------------------------------------------------------------------------------------------------|
| `query`        | String | `hat`         | The search term to query Macy's product catalog.                                                |
| `currencyCode` | String | `USD`         | The currency code for product prices (e.g., `USD`, `EUR`).                                      |
| `regionCode`   | String | `US`          | The region code for localized results.                                                          |
| `page`         | String | `1`           | The page number of the search results to scrape.                                                |
| `perPage`      | String | `20`          | The number of products to retrieve per page (e.g., `20`, `50`).                                 |

##### Example Input

```javascript
const {
  query = 'hat',
  currencyCode = 'USD',
  regionCode = 'US',
  page = '1',
  perPage = '20'
} = input;
```

***

### Output

The actor outputs product search results in JSON format.

#### Example Output

```json
{
  "result": [
    {
      "product": {
        "id": 995170,
        "identifier": {
          "productUrl": "/shop/product/country-gentleman-hats-wilton-wool-fedora?ID=995170&isDlp=true",
          "productId": 995170
        },
        "detail": {
          "name": "Country Gentleman Hats, Wilton Wool Fedora",
          "brand": "Country Gentlemen",
          "flags": {
            "registrable": true,
            "isStoreOnlyProductOnline": true,
            "hasColors": true,
            "PDPColorized": true
          },
          "reviewStatistics": {
            "aggregate": {
              "rating": 4.5872,
              "count": 109
            }
          },
          "typeName": "HAT"
        },
        "relationships": {
          "taxonomy": {
            "defaultCategoryId": 176642
          }
        },
        "imagery": {
          "additionalImageSource": [
            {
              "filePath": "8/optimized/2992088_fpx.tif"
            }
          ],
          "primaryImage": {
            "filePath": "8/optimized/2992088_fpx.tif"
          }
        },
        "availability": {
          "active": true,
          "available": true
        },
        "traits": {
          "colors": {
            "selectedColor": {
              "id": 1002299,
              "name": "Brown",
              "normalName": "Brown",
              "swatchImage": {
                "filePath": "4/optimized/1215114_fpx.tif"
              },
              "imagery": {
                "additionalImageSource": [
                  {
                    "filePath": "8/optimized/2992088_fpx.tif"
                  }
                ],
                "primaryImage": {
                  "filePath": "8/optimized/2992088_fpx.tif"
                }
              }
            },
            "colorMap": [
              {
                "id": 1002264,
                "name": "Black",
                "normalName": "Black",
                "swatchImage": {
                  "filePath": "7/optimized/3193337_fpx.tif"
                },
                "imagery": {
                  "additionalImageSource": [
                    {
                      "filePath": "8/optimized/2975658_fpx.tif"
                    }
                  ],
                  "primaryImage": {
                    "filePath": "8/optimized/2975658_fpx.tif"
                  }
                }
              },
              {
                "id": 1002299,
                "name": "Brown",
                "normalName": "Brown",
                "swatchImage": {
                  "filePath": "4/optimized/1215114_fpx.tif"
                },
                "imagery": {
                  "additionalImageSource": [
                    {
                      "filePath": "8/optimized/2992088_fpx.tif"
                    }
                  ],
                  "primaryImage": {
                    "filePath": "8/optimized/2992088_fpx.tif"
                  }
                }
              }
            ]
          },
          "types": {}
        },
        "pricing": {
          "price": {
            "priceType": {
              "applicableToAllUpcs": true
            },
            "tieredPrice": [
              {
                "label": "[PRICE]",
                "values": [
                  {
                    "value": 79,
                    "formattedValue": "$79.00",
                    "type": "regular"
                  }
                ]
              }
            ],
            "priceTypeId": 11
          }
        },
        "mltUrlPath": "/shop/similar-products?&CategoryID=176642&imageId=2992088&productId=995170&cm_sp=MLT_RESP-_-pros-_-2992088-995170&modelId=pros&lid=more_like_this-pros-2992088-995170&productType=HAT",
        "assetAnalytics": "MLT_RESP-_-pros-_-2992088-995170"
      }
    },
    // others products
      ]
}

```

##### Key Fields

- **`query`**: The input search term.
- **`currencyCode`**: The currency used in the prices.
- **`regionCode`**: The region for localized results.
- **`page`**: The current page number of the results.
- **`products`**: An array of product details, including:
  - `name`: Product name.
  - `price`: Product price in the specified currency.
  - `currency`: The currency code for the price.
  - `imageUrl`: URL of the product image.
  - `productUrl`: URL of the product page on Macy's.
  - `brand`: Brand name of the product.
  - `availability`: Stock availability status.

***

### How to Use

1. **Set Up the Input**:\
   Customize the parameters (`query`, `currencyCode`, `regionCode`, `page`, and `perPage`) as needed.

2. **Run the Actor**:\
   Start the actor to retrieve search results for the specified parameters.

3. **Retrieve the Output**:\
   Access the JSON output for detailed product data.

***

### SEO Benefits

Using the Macy's Product Search Scraper can boost your e-commerce or affiliate strategy by:

- **Content Enrichment**: Add product details and images to enhance your site’s offerings.
- **Trend Tracking**: Monitor popular products and optimize for relevant keywords.
- **Affiliate Marketing**: Populate product catalogs with Macy's data to drive traffic and conversions.

***

### Limitations

- **Region-Specific Results**: Ensure the `regionCode` matches Macy's supported regions for accurate data.
- **Pagination Limits**: Excessive pagination may impact scraping speed; optimize `perPage` values accordingly.

***

### Pricing

The Macy's Product Search Scraper is available on Apify with flexible pricing plans. Try it now with the **1-day free trial** to experience its capabilities.

***

### FAQs

**Q1: Can I scrape products in bulk?**\
A: Yes, you can adjust the `page` and `perPage` parameters to retrieve multiple products.

**Q2: Does the actor work for international regions?**\
A: Yes, you can set the `regionCode` and `currencyCode` to retrieve region-specific data.

**Q3: Can I scrape promotions and discounts?**\
A: The actor captures the product prices as displayed, including discounts if available.

***

Start leveraging the **Macy's Product Search Scraper** to explore products, analyze trends, and grow your business! 🚀

# Actor input Schema

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

The query to search

## `currencyCode` (type: `string`):

The currency code that will be used.

## `regionCode` (type: `string`):

The region code that will be used.

## `page` (type: `string`):

The page Index

## `perPage` (type: `string`):

Limit per Page

## Actor input object example

```json
{
  "query": "hat",
  "currencyCode": "USD",
  "regionCode": "US",
  "page": "1",
  "perPage": "20"
}
```

# 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 = {
    "query": "hat",
    "currencyCode": "USD",
    "regionCode": "US",
    "page": "1",
    "perPage": "20"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pintostudio/macys-product-search").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 = {
    "query": "hat",
    "currencyCode": "USD",
    "regionCode": "US",
    "page": "1",
    "perPage": "20",
}

# Run the Actor and wait for it to finish
run = client.actor("pintostudio/macys-product-search").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 '{
  "query": "hat",
  "currencyCode": "USD",
  "regionCode": "US",
  "page": "1",
  "perPage": "20"
}' |
apify call pintostudio/macys-product-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pintostudio/macys-product-search"
        }
    }
}
```

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/GuWxG36htJAdfxRyL/builds/FAvq0zGm8UA40cLt5/openapi.json
