# Warehouse Club Prices: Costco, Sam's Club & BJ's Scraper (`vant47/warehouse-club-prices-scraper`) Actor

Compare Costco vs Sam's Club vs BJ's wholesale club prices for coffee and milk: club and online prices, member savings, dates, stock and item IDs. Costco US, Canada, UK and Australia. $0.004 per product: 1,000 cost $4, plus $0.003 setup and platform start. No login.

- **URL**: https://apify.com/vant47/warehouse-club-prices-scraper.md
- **Developed by:** [fortbrand](https://apify.com/vant47) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.20 / 1,000 products

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

## Warehouse Club Prices: Costco, Sam's Club & BJ's Scraper

For price analysts, brands, purchasing teams and comparison services watching warehouse club prices. Collect Costco, Sam's Club and BJ's Wholesale in one run, with consistent product fields and clear warehouse, pickup and online price scopes.

About **$0.004 per delivered product**: 30 products cost **$0.12**, and 1,000 cost **$4**, plus one **$0.003 setup charge** on the first useful product and the small platform start charge. No retailer login, membership credentials or account cookies are needed. An empty run has no product or setup charge.

The default coffee example near ZIP 44094 delivered thirty unique, numerically priced products on 15 November 2026: ten per retailer, nine dated promotions, no source failures, 78.888 seconds.

### What you get

| Data | Fields | Interpretation |
| --- | --- | --- |
| Plain answer | `verdict` | Product name, observed price and availability in readable language. |
| Source identity | `retailer`, `retailerKey`, `country`, `currency` | Retailer, country storefront and original currency. |
| Club context | `storeId`, `storeName`, `location`, `requestedLocations` | Verified source club or warehouse and requested postcode context. |
| Product identity | `productId`, `sku`, `title`, `brand`, `size` | Source identifiers and published product metadata. |
| Barcode | `gtin` | A labelled source UPC/EAN/GTIN with a valid format and check digit. Item numbers are never substituted. |
| Price | `price`, `regularPrice`, `priceScope` | Selected warehouse, pickup or online price and source reference price. |
| Online observation | `onlinePrice`, `onlineRegularPrice` | Separately reported online price where available. |
| Savings | `onSale`, `promoText`, `promoType`, `promoStart`, `promoEnd` | Source savings text and supplied dates. Missing dates remain null. |
| Membership | `memberPrice`, `memberProgram`, `memberOnly` | Published membership condition and price, when supplied. |
| Unit pricing | `unitPrice`, `unitOfMeasure` | Published unit pricing or a source quantity factor. |
| Stock | `inStock`, `stockLevel` | Explicit availability; unknown availability remains null. |
| Reviews | `rating`, `reviewCount` | Aggregate source rating and count, without individual reviews. |
| Discovery | `searchTerm`, `category`, `sourceJobId` | Keyword or source context of the first delivered observation. |
| Traceability | `url`, `sourceUrl`, `imageUrl`, `scrapedAt` | Public product and source links, image and observation timestamp. |
| Extended data | Retailer-specific fields after the common fields | Coupons, inventory channels, parent/variant IDs, specifications and shipping notes. |

Only products with a numeric selected-scope price or a dated promotion are delivered. Missing warehouse prices are not replaced with online prices. Exclusions are counted in the run summary and do not consume your delivered-product allowance.

### Choose your retailers

| Selection | Source and price coverage |
| --- | --- |
| `costco-us` | Costco US public item data, warehouse/online prices, dated savings and independent inventory signals. |
| `sams-club` | Sam's Club US product and club data, exact club pickup prices, shipping prices and source savings wording. |
| `bjs` | BJ's US club-keyed shopping catalog, stock, Instant Savings and guest coupons. |
| `costco-ca` | Costco Canada public item data, selected Canadian warehouse prices and separate online prices. |
| `costco-uk` | Costco UK native catalog search, categories and product/variant records; prices and stock are online observations. |
| `costco-au` | Costco Australia native catalog search, categories and product/variant records; prices and stock are online observations. |

The three US retailers are the default. `costco` is an alias for `costco-us`, and `bjs-wholesale` is an alias for `bjs`. Repeating a selection does not repeat its products or charges. Select international Costco storefronts explicitly and supply postcodes appropriate to those countries.

### Start a run

1. Select retailers and enter keywords, product IDs, category links or savings pages.
2. Enter ZIP/postal codes or exact club IDs. Use the settings-by-retailer field for different countries or item baskets.
3. Set the per-retailer and overall limits, start the run and export the product table, savings export or sorted comparison dataset.

A shared US keyword:

```json
{
  "retailers": ["costco-us", "sams-club", "bjs"],
  "searchTerms": ["coffee"],
  "postalCodes": ["44094"],
  "maxItemsPerRetailer": 10,
  "maxItems": 30
}
```

Independent known-item baskets:

```json
{
  "retailers": ["costco-us", "bjs"],
  "retailerInputs": {
    "costco-us": {
      "productIds": ["512599", "1898552"],
      "storeIds": ["1"],
      "postalCodes": ["98101"]
    },
    "bjs": {
      "productIds": ["906", "914"],
      "storeIds": ["0096"]
    }
  },
  "maxItemsPerRetailer": 10,
  "maxItems": 20
}
```

For mixed countries, select the Costco country keys and set separate `postalCodes` under `retailerInputs`: `M5V 3L9` in Canada, `SW1A 1AA` in the UK, and `2000` in Australia.

### Inputs

| Input | Meaning |
| --- | --- |
| `retailers` | Array of selections from the table above. Defaults to Costco US, Sam's Club and BJ's. |
| `searchTerms` | Keywords. When no source basket is supplied, the default is coffee. |
| `categoryUrls` | Public category links, routed to their matching retailer domain. |
| `startUrls` | Product, search, category or savings links, also routed by domain. |
| `productIds` | Source product/item IDs. Use one retailer or scope these under `retailerInputs`. |
| `postalCodes` | Appropriate ZIP/postcodes. Empty means online or the site's verified default club. |
| `locations` | Alias combined with `postalCodes`; neither silently overrides the other. |
| `storeIds` | Exact warehouse/club IDs. These take priority over nearest-postcode selection. |
| `maxItemsPerRetailer` | Delivered row ceiling for each selected retailer, default ten. |
| `maxItems` | Overall delivered row ceiling, default thirty. Earlier selections consume this first. |
| `maxItemsPerSearch` | New products per source and store, within the retailer/global ceilings. |
| `dealsOnly` | Keep products with source savings or coupon offers. |
| `includeDetails` | Add supported public-page details; no separate details charge. |
| `retailerInputs` | An object keyed by retailer selection, containing source, location and detail settings for that retailer. |
| `proxyConfiguration` | Automatic datacenter-first routing and country residential retry where needed. Explicit buyer choices are respected. |

A local source basket replaces global source fields, including prefilled coffee. Local location fields override the corresponding global fields; clear both `postalCodes` and `locations` for online scope. Local `maxItems` can only lower the per-retailer ceiling. The overall cap still applies.

Scope numeric IDs under `retailerInputs`; URLs route by domain. Canonical retailer settings take precedence over alias settings. Invalid inputs produce free notes.

### Price comparison and exports

The **Product prices** view keeps the common fields first. **Full product data** adds the retailer-specific evidence. The savings table includes deal flags; the `DEALS` key-value record contains only delivered savings/coupon products.

The `COMPARISON` JSON export and separate comparison dataset are ordered by search term, then currency, then numeric price, cheapest first. `COMPARISON-VIEW` contains the dataset ID and API link. The default COMPARISON table retains delivery order; use the sorted export for ordering.

Compare pack size, brand, unit price, scope and membership condition. No currency conversion, automatic pack matching or calculated coupon redemption price is applied.

Every run writes `SUMMARY` to its key-value store and dataset. It includes total products, stores, deals, free notes, source failures, charged products, spending-limit status and `byRetailer` coverage. Each retailer entry contains row counts, numeric-price counts, dated-promotion counts, unpriced exclusions, verified stores, source outcomes and request statistics. Empty filters have no product charge.

### Monitor prices every day

Save a known item basket and your club selection as an Apify task, then add the task to a schedule. Each run fetches fresh prices and stock. Store the resulting datasets or export them to your database for history; this Actor does not invent a historical series from a single observation.

Use `(retailerKey, country, storeId, productId)` as the identity. Parent products can expand into item variants. Overlapping discovery is charged once per run. Each new scheduled run creates a fresh paid observation.

Summaries distinguish missing products, source failures, unpriced exclusions and empty matches. Null stock is unknown; it should not trigger out-of-stock alerts.

On reboot or migration, saved products and acknowledged charges are reconciled before collection resumes. The shared setup charge is not repeated for each retailer.

### Pricing and spending limits

| Delivered products | List product charge | Setup on a nonempty run |
| --- | --- | --- |
| 1 | $0.004 | $0.003 |
| 10 | $0.04 | $0.003 |
| 30 | $0.12 | $0.003 |
| 100 | $0.40 | $0.003 |
| 1,000 | $4.00 | $0.003 |

The platform start charge is $0.00005 per memory-based start unit, with a minimum of one unit. Product discounts are 5% on Bronze, 10% on Silver and 20% on Gold and higher. Setup is a fixed $0.003. The Pricing tab for your plan is authoritative.

Notes, retries, duplicates, missing products and rows with neither a selected-scope price nor a dated promotion have no Product charge. Empty runs have no setup charge. Optional details are included in the Product price. Both your maximum total charge and the item ceilings apply. The first row must fit product and setup charges together, or neither is charged.

### API use

Start asynchronously and read the returned default dataset ID:

```bash
curl -X POST 'https://api.apify.com/v2/acts/vant47~warehouse-club-prices-scraper/runs' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"searchTerms":["coffee"],"postalCodes":["44094"],"maxItemsPerRetailer":10,"maxItems":30}'
```

Python:

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('vant47/warehouse-club-prices-scraper').call(run_input={
    'searchTerms': ['coffee'],
    'postalCodes': ['44094'],
    'maxItemsPerRetailer': 10,
    'maxItems': 30,
})
for row in client.dataset(run['defaultDatasetId']).iterate_items():
    if row.get('recordType') == 'PRODUCT':
        print(row['retailerKey'], row['storeId'], row['priceScope'], row['price'])
summary = client.key_value_store(run['defaultKeyValueStoreId']).get_record('SUMMARY')
```

### Use with AI agents (MCP)

Expose `vant47/warehouse-club-prices-scraper` through `https://mcp.apify.com` and fetch the input schema. Example request: compare coffee prices at Costco US, Sam's Club and BJ's near ZIP 44094, at most ten products each, preserve club versus online scope, and list missing data from SUMMARY. For international comparisons, specify country storefronts and separate postcodes.

### Limits

- Costco US/Canada keywords match names in the current public product sitemap, not the retailer's native ranked search. Dynamic category grids without explicit product links are unavailable. Known IDs, product URLs and linked savings pages are the strongest monitoring baskets there.
- Sam's discovery uses the default visitor assortment, followed by a separate exact-club product check. It may miss products exclusive to a selected club. Some source promotion dates are yearless text in `promoEndText`; no year is invented.
- BJ's uses public shopping/coupon feeds and omits semantic-only recommendations without keyword matches. Detailed ingredients, product brands, UPCs, unit prices and exact ratings can be absent. Coupons requiring clipping are not automatically deducted, and geographic restrictions are preserved.
- UK/AU Costco prices and stock are online observations. A resolved warehouse supplies context, not a claim about physical shelf price or warehouse inventory.
- ZIP selection uses the source locator, except BJ's, which selects the nearest active retail club within 150 miles of a Census ZIP centroid by straight-line distance. Public BJ's club address metadata can be cached for seven days; prices and stock are fetched per run.
- Costco national flyers can disagree with exact-warehouse API prices. The selected warehouse API value is retained.
- Source outages, removed items, unpublished prices and missing inventory can reduce coverage. Null means unknown. Availability is an online signal, not an audited shelf count or reservation.
- Membership, quantity limits, tax, shipping and checkout conditions can change the final transaction price. No checkout, account access or verification challenge solving is performed. This independent tool is not affiliated with the retailers.

### FAQ

#### Does one run cover all three US clubs?

Yes. They are the default retailer selections. Row limits apply across every store requested within each retailer, then across the whole run.

#### Can I compare Canada, the UK and Australia?

Yes. Select their Costco storefront keys explicitly. Keep currencies and price scopes separate; the Actor does not perform foreign-exchange conversion.

#### Why did a retailer return fewer products than requested?

It may have fewer matching public items or fewer priced observations for the selected club. Check SUMMARY for source outcomes, no-match notes and unpriced exclusions.

#### What happens after an interrupted run?

Saved products and acknowledged charges are reconciled before work resumes. Duplicate observations and an already accepted setup charge are not charged again within that run.

# Actor input Schema

## `retailers` (type: `array`):

Default: Costco US, Sam's Club and BJ's. Also select costco-ca, costco-uk or costco-au. The alias costco selects costco-us.

## `searchTerms` (type: `array`):

Keywords across selected retailers. Costco US/CA uses sitemap name discovery; Sam's and BJ's and Costco UK/AU use native catalog discovery.

## `categoryUrls` (type: `array`):

Public category links. Routes automatically to the matching retailer domain. US/CA Costco dynamic grids are unavailable; explicit linked products only.

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

Public retailer URLs, routed by domain. Include known product URLs or linked savings pages.

## `productIds` (type: `array`):

Source item or product IDs. Use one retailer or retailerInputs to avoid sending the same number to unrelated catalogs. Never barcode inputs.

## `postalCodes` (type: `array`):

US ZIP codes, Canadian postcodes, UK postcodes or Australian postcodes appropriate to each selected retailer. Use retailerInputs for mixed countries.

## `locations` (type: `array`):

Combined with postalCodes without a hidden default. Exact storeIds take priority.

## `storeIds` (type: `array`):

Select exact source clubs. Scope IDs under retailerInputs when selecting more than one retailer.

## `maxItemsPerRetailer` (type: `integer`):

Delivered priced products only. The global and retailer ceilings both apply. Excluded unpriced products do not consume this limit.

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

Delivered priced products only. The global and retailer ceilings both apply. Excluded unpriced products do not consume this limit.

## `maxItemsPerSearch` (type: `integer`):

Delivered priced products only. The global and retailer ceilings both apply. Excluded unpriced products do not consume this limit.

## `dealsOnly` (type: `boolean`):

Keep current source offers. Coupons requiring clipping are retained separately and never subtracted automatically.

## `includeDetails` (type: `boolean`):

Add public-page details where supported. No extra detail charge; missing details stay null.

## `retailerInputs` (type: `object`):

Optional settings keyed by exact retailer selection, for example {"costco-us":{"productIds":\["512599"],"storeIds":\["1"]},"bjs":{"storeIds":\["0096"]}}. A local source basket replaces all global source fields, including a prefilled search. Local maxItems can lower but never raise maxItemsPerRetailer.

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

Automatic default datacenter first, then signed-out direct or country residential retry. Explicit disable, groups, country and custom URLs are preserved.

## Actor input object example

```json
{
  "retailers": [
    "costco-us",
    "sams-club",
    "bjs"
  ],
  "searchTerms": [
    "coffee"
  ],
  "postalCodes": [
    "44094"
  ],
  "maxItemsPerRetailer": 10,
  "maxItems": 30,
  "maxItemsPerSearch": 10,
  "dealsOnly": false,
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `products` (type: `string`):

No description

## `comparison` (type: `string`):

No description

## `deals` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `comparisonDataset` (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 = {
    "retailers": [
        "costco-us",
        "sams-club",
        "bjs"
    ],
    "searchTerms": [
        "coffee"
    ],
    "postalCodes": [
        "44094"
    ],
    "maxItemsPerRetailer": 10,
    "maxItems": 30,
    "maxItemsPerSearch": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("vant47/warehouse-club-prices-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 = {
    "retailers": [
        "costco-us",
        "sams-club",
        "bjs",
    ],
    "searchTerms": ["coffee"],
    "postalCodes": ["44094"],
    "maxItemsPerRetailer": 10,
    "maxItems": 30,
    "maxItemsPerSearch": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("vant47/warehouse-club-prices-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 '{
  "retailers": [
    "costco-us",
    "sams-club",
    "bjs"
  ],
  "searchTerms": [
    "coffee"
  ],
  "postalCodes": [
    "44094"
  ],
  "maxItemsPerRetailer": 10,
  "maxItems": 30,
  "maxItemsPerSearch": 10
}' |
apify call vant47/warehouse-club-prices-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vant47/warehouse-club-prices-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/l3CgdRvf7KB58xcwT/builds/662wyMoIYQPCvL15J/openapi.json
