# Sam S Club Product Scraper (`kawsar/sam-s-club-product-scraper`) Actor

Sam's Club product scraper that pulls prices, ratings, and availability from search results, so you can track products and compare pricing without doing it by hand.

- **URL**: https://apify.com/kawsar/sam-s-club-product-scraper.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Categories:** Automation, E-commerce, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

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

<p align="center">
  <img src="https://i.imgur.com/qWKHb3y.png" alt="Sam's Club Product Scraper Banner" width="1000">
</p>
## Sam's Club Product Scraper

Sam's Club Product Scraper collects product data from Sam's Club search results and category pages. Enter a keyword or paste a URL and you get product names, prices, member prices, ratings, review counts, availability, and images in a clean dataset. Pagination is handled automatically, so you don't stop at page one. Useful for price tracking, catalog pulls, and spotting what is or is not in stock. Download as JSON, CSV, or Excel.

---

### What you can do with it

- Price tracking: check how prices shift across products or categories over time
- Catalog research: pull product metadata in bulk for an internal database or feed
- Stock monitoring: see what is in stock and what is not across a category
- SEO research: find top-rated products, identify popular search terms, spot gaps in listings
- Competitor comparison: see how Sam's Club pricing stacks up against other retailers

---

### How to use

#### Option 1: Search by keyword

Enter one or more keywords in the **Search keywords** field. The actor runs a separate search for each keyword and collects results across all pages automatically.

**Examples:**
- `vegetables`
- `organic milk`
- `baby wipes`
- `paper towels`

#### Option 2: Scrape a URL directly

Paste any Sam's Club search or category URL into **Sam's Club URLs**.

**Supported URL types:**
- Search results: `https://www.samsclub.com/search?q=vegetables`
- Category pages: `https://www.samsclub.com/c/fresh-produce/1535`

You can combine both options in the same run.

---

### Input options

| Field | Type | Description | Default |
|---|---|---|---|
| Search keywords | Array of strings | Keywords to search on Sam's Club | — |
| Sam's Club URLs | Array of URLs | Direct Sam's Club search or category URLs | — |
| Max items | Integer | Maximum products to collect per run | 100 |
| Request timeout | Integer (seconds) | Per-request timeout | 30 |

---

### Output fields

Each product returns the following data:

| Field | Type | Description |
|---|---|---|
| `product_url` | String | Full link to the product page |
| `product_name` | String | Full product title |
| `brand` | String | Brand or manufacturer |
| `item_number` | String | Sam's Club item ID |
| `sku` | String | Internal product SKU |
| `price` | Number | Current selling price (USD) |
| `original_price` | Number | Pre-sale price if discounted |
| `unit_price` | String | Price per unit or weight (e.g. $2.31/lb) |
| `currency` | String | Always `USD` |
| `rating` | Number | Average star rating (0–5) |
| `review_count` | Integer | Number of customer reviews |
| `availability` | String | Stock status (e.g. In stock) |
| `is_out_of_stock` | Boolean | `true` if currently unavailable |
| `short_description` | String | Product feature bullets in plain text |
| `image_url` | String | Primary product image URL |
| `search_query` | String | The keyword or URL that produced this result |
| `scraped_at` | String | ISO 8601 timestamp of the scrape |

---

### Example output

```json
{
  "product_url": "https://www.samsclub.com/ip/Mini-Cucumbers-2-lbs/13621857059",
  "product_name": "Mini Cucumbers, 2 lbs.",
  "brand": null,
  "item_number": "13621857059",
  "sku": "3YTS0FFN8H45",
  "price": 4.62,
  "original_price": null,
  "unit_price": "$2.31/lb",
  "currency": "USD",
  "rating": 4.41,
  "review_count": 13846,
  "availability": "In stock",
  "is_out_of_stock": false,
  "short_description": "Crunchy seedless mini cucumbers with edible unwaxed skin. Excellent source of vitamin C. Perfect snack alone, with your favorite dip or sliced in a salad.",
  "image_url": "https://i5.samsclubimages.com/asr/85146c64-aec3-4c6f-af1f-37add528265b.jpeg",
  "search_query": "vegetables",
  "scraped_at": "2026-04-28T10:00:00.000000+00:00"
}
````

***

### Export formats

Results land in the Apify Dataset. Download as JSON, CSV, or XLSX.

***

### Pagination

The actor follows pagination automatically. A search returning 86 products across 2 pages collects everything without any extra setup. Use **Max items** to cap how many products you want.

***

### Error handling

- Failed pages are skipped with a warning; the run keeps going
- Retries are built in for network hiccups
- One bad product does not kill the whole run

***

### Tips

- Set **Max items = 50** for a quick sanity check before running a full scrape
- Schedule daily runs to track price changes over time
- Combine multiple keywords in one run to collect across categories in a single export
- Filter by `availability` or `rating` in your spreadsheet after export

***

### Legal

This actor collects publicly available product listing data from Sam's Club. Always review Sam's Club Terms of Service before using scraped data in commercial contexts. Respect rate limits and avoid running at very high concurrency.

# Actor input Schema

## `searchQueries` (type: `array`):

One or more keywords to search on Sam's Club. Each keyword runs a separate search. Example: \["organic milk", "baby wipes", "paper towels"]

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

Direct Sam's Club search or category page URLs to scrape. Use this instead of (or alongside) search keywords. Example: https://www.samsclub.com/c/fresh-produce/1535

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

Maximum number of products to collect per run. Applies across all queries and URLs combined.

## `requestTimeoutSecs` (type: `integer`):

How long to wait for each page request before giving up.

## Actor input object example

```json
{
  "searchQueries": [
    "organic milk",
    "baby wipes",
    "paper towels"
  ],
  "startUrls": [
    {
      "url": "https://www.samsclub.com/search?q=organic+milk"
    },
    {
      "url": "https://www.samsclub.com/c/fresh-produce/1535"
    }
  ],
  "maxItems": 100,
  "requestTimeoutSecs": 30
}
```

# 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 = {
    "searchQueries": [
        "vegetables"
    ],
    "startUrls": [
        {
            "url": "https://www.samsclub.com/search?q=vegetables"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/sam-s-club-product-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 = {
    "searchQueries": ["vegetables"],
    "startUrls": [{ "url": "https://www.samsclub.com/search?q=vegetables" }],
}

# Run the Actor and wait for it to finish
run = client.actor("kawsar/sam-s-club-product-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 '{
  "searchQueries": [
    "vegetables"
  ],
  "startUrls": [
    {
      "url": "https://www.samsclub.com/search?q=vegetables"
    }
  ]
}' |
apify call kawsar/sam-s-club-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=kawsar/sam-s-club-product-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Sam S Club Product Scraper",
        "description": "Sam's Club product scraper that pulls prices, ratings, and availability from search results, so you can track products and compare pricing without doing it by hand.",
        "version": "0.0",
        "x-build-id": "6YQMyMMMmrw4kiRcA"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/kawsar~sam-s-club-product-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-kawsar-sam-s-club-product-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/kawsar~sam-s-club-product-scraper/runs": {
            "post": {
                "operationId": "runs-sync-kawsar-sam-s-club-product-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/kawsar~sam-s-club-product-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-kawsar-sam-s-club-product-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",
                "properties": {
                    "searchQueries": {
                        "title": "Search keywords",
                        "type": "array",
                        "description": "One or more keywords to search on Sam's Club. Each keyword runs a separate search. Example: [\"organic milk\", \"baby wipes\", \"paper towels\"]",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Sam's Club URLs",
                        "type": "array",
                        "description": "Direct Sam's Club search or category page URLs to scrape. Use this instead of (or alongside) search keywords. Example: https://www.samsclub.com/c/fresh-produce/1535",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of products to collect per run. Applies across all queries and URLs combined.",
                        "default": 100
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout (seconds)",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "How long to wait for each page request before giving up.",
                        "default": 30
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
