# Costco Product Scraper (`scraptivo/costco-scraper`) Actor

Scrapes product data from Costco.com including prices, descriptions, ratings, and availability. Supports search queries with warehouse selection via ZIP code.

- **URL**: https://apify.com/scraptivo/costco-scraper.md
- **Developed by:** [Scraptivo](https://apify.com/scraptivo) (community)
- **Categories:** Automation, E-commerce, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

**Costco Product Scraper** collects product records from [Costco.com](https://www.costco.com) and turns them into structured data for price monitoring, competitor research, and inventory tracking. Provide search terms and an optional ZIP code, run the Actor, and export prices, discounts, ratings, specifications, and per-warehouse stock status to JSON, CSV, Excel, or your preferred integration. Use it to track competitor pricing, build a product database, and monitor location-based availability. Pricing starts at **$1 per 1,000 products**.

### What can you automate with Costco Product Scraper?

- **Track competitor prices** — Collect sale prices, original prices, and promotional savings for any product category, and compare against other retailers over time.
- **Build a product database** — Search by keyword and pull structured records with specifications, brands, categories, and images for market research.
- **Monitor warehouse inventory** — Check per-location stock status across distribution centers by supplying a delivery ZIP code.
- **Schedule recurring collection** — Run daily or weekly on the Apify Scheduler to keep pricing and availability data fresh.
- **Feed pricing pipelines** — Push structured product data through the Apify API or a webhook into dashboards, spreadsheets, or a data warehouse.

### Who is this scraper for?

| Team | Workflow |
|---|---|
| Retail and e-commerce analysts | Monitoring Costco's assortment, pricing, and promotions against competitors. |
| Market researchers | Building category-level product datasets with specs and brand coverage. |
| Pricing teams | Tracking price changes and promotional markdowns on a schedule. |
| Supply-chain and ops teams | Checking item availability near a specific warehouse or ZIP code. |

### What data can you collect from Costco.com?

| Data group | Example fields | How it helps |
|---|---|---|
| Product identity | `id`, `name`, `brand`, `brands`, `model`, `categories`, `url`, `imageUrl` | Identify and deduplicate records with the stable product `id`. |
| Pricing signals | `price`, `originalPrice`, `currency`, `marketingStatement` | Track current price, MSRP, and promotional savings. |
| Specifications | `features`, `categories` | Understand what a product includes and where it sits in the catalog. |
| Availability | `inventoryStatus`, `isBuyable`, `isReviewsEligible`, `programTypes`, `deliveryType` | See per-warehouse stock and how a product can be fulfilled. |

`inventoryStatus` reports per-location stock codes when a ZIP code is provided; some fields are null when the platform has no value for a given product.

### How to use Costco Product Scraper

1. Open the [Costco Product Scraper](https://apify.com/scraptivo/costco-scraper) on Apify.
2. Enter one or more **Search Queries** such as "laptop" or "paper towels".
3. Optionally add a **ZIP Code** to get warehouse-specific pricing and availability.
4. Set **Max Items** to control the number of products (0 = unlimited).
5. Run the Actor and export the dataset or connect it to your workflow.

```json
{
    "searchQueries": ["laptop", "gaming chair"],
    "zipCode": "98101",
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
```

### Example workflow

#### Track weekly laptop prices near Seattle

1. Schedule a run every Monday with `searchQueries` = `["laptop"]` and `zipCode` = `"98101"`.
2. Export the dataset to a spreadsheet and keep the `id`, `name`, `price`, and `originalPrice` columns.
3. Compare this week's `price` against last week's to spot markdowns and `marketingStatement` changes.
4. Deduplicate user-side against the stable product `id`.

### Automate and integrate your results

- **Schedules** — Product prices and stock change frequently. Run **daily** for close price tracking or **weekly** for catalog research. Create separate scheduled tasks per search term so each keeps its own dataset.
- **Webhooks** — Enable a webhook on run completion to push fresh product data into a database, Google Sheets, or Slack automatically.
- **Exports and API** — Download results as JSON, CSV, or Excel from the Apify Console, or call the Actor from the API:

```shell
curl "https://api.apify.com/v2/acts/scraptivo/costco-scraper/runs?token=YOUR-APIFY-TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQueries": ["laptop"],
    "zipCode": "98101",
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
  }'
```

- **Deduplication** — The Actor appends new results on every run and does not deduplicate across runs. Use the stable product `id` when merging results.

### Input reference

| Field | Type | Required | Default | What it controls |
|---|---:|---|---|---|
| `searchQueries` | Array of strings | No | `[]` | Search terms to look up on Costco.com. |
| `zipCode` | String | No | `""` | US ZIP code for warehouse-specific pricing and availability. |
| `maxItems` | Integer | No | `0` | Maximum products to scrape (`0` = unlimited). |
| `proxyConfiguration` | Proxy object | No | Apify proxy, RESIDENTIAL | Proxy settings for the run. |

### Output example

Each dataset item is one product:

```json
{
    "id": "4201003697",
    "name": "HP OmniBook 5 16\" Touchscreen Laptop - Intel Core Ultra 5 Series 3 Processor - 2K - 16GB - 1TB SSD",
    "price": 699.99,
    "originalPrice": 1149.99,
    "currency": "USD",
    "brand": "HP",
    "url": "https://www.costco.com/p/-/hp-omnibook-5-16-touchscreen-laptop/4201003697",
    "imageUrl": "https://bfasset.costco-static.com/U447IH35/as/kcw7gnjzsz9g8mfvnp7k2jz/4201003697-847__1",
    "categories": ["Computers", "Computers > Laptops"],
    "model": "16-cd0055cl",
    "features": ["Backlit Keyboard", "Bluetooth 6", "Integrated Webcam"],
    "marketingStatement": "$450 OFF",
    "isBuyable": true,
    "inventoryStatus": [
        {"location": "283-wm", "status": "IN_STOCK"},
        {"location": "725-wm", "status": "IN_STOCK"}
    ]
}
```

### How much does it cost to scrape Costco.com?

The Actor uses pay-per-event pricing. Each product record pushed to the dataset counts as one `result` event, billed at **$0.001 per product** — that is **$1 per 1,000 products**. A one-time actor-start event is also charged per run (one event per GB of memory, minimum one). Compute units consumed are deducted from your Apify plan, and volume discounts on paid Apify plans reduce the per-1,000 rate. When your event spending limit is reached, the run stops gracefully.

### Reliability and responsible use

- **Proxy requirement** — The Actor defaults to the Apify proxy with the RESIDENTIAL group. Residential IPs are recommended for consistent access to Costco.com.
- **Retries and rate limits** — The Actor includes built-in retry logic and handles rate limiting gracefully.
- **Conditional fields** — `inventoryStatus` depends on a ZIP code being supplied; several fields are nullable when the platform has no value for a product.
- **Public data** — The Actor collects publicly visible product information from Costco.com.
- **Responsible use** — Only use the data in ways that comply with Costco's terms of service and applicable law.

### Frequently asked questions

#### Can I search Costco.com by keyword?

Yes. Add any search term to `searchQueries` — for example "laptop" or "paper towels" — and the Actor returns all products from the paginated search results.

#### Can I check inventory near a specific ZIP code?

Yes. Provide a `zipCode` and the Actor returns warehouse-aware pricing and per-location `inventoryStatus` for the closest distribution centers.

#### What counts as one result?

A product record pushed to the dataset counts as one `result` event ($1 per 1,000 products). A small one-time actor-start event is also charged at the start of each run.

#### Why are some fields empty?

Fields such as `model`, `features`, and `marketingStatement` are populated only when the platform exposes them for a given product. A null value usually means Costco has no data for that field.

#### How do I avoid duplicate records?

The Actor appends results on every run and does not deduplicate across runs. Use the stable product `id` as the key when merging a fresh run into existing data.

#### Do I need a proxy?

The Actor works out of the box with the default Apify residential proxy, which is recommended for reliable access to Costco.com.

### Related Scraptivo automations

- **[Amazon Product Scraper](https://apify.com/scraptivo/amazon-product-scraper)** — Collect product data, prices, and seller details from Amazon for competitive research.
- **[Amazon Search Scraper](https://apify.com/scraptivo/amazon-scraper)** — Search Amazon products by keyword and export prices, ratings, and listings.
- **[HomeDepot Scraper](https://apify.com/scraptivo/homedepot-scraper)** — Extract product data from HomeDepot by collection URL and delivery ZIP.
- **[Etsy Scraper](https://apify.com/scraptivo/etsy-scraper)** — Scrape Etsy listings, prices, and shop data for market research.

### Support and custom workflows

Need a different field, source, or delivery workflow? Contact Scraptivo at scraptivo@gmail.com. Include the Actor name, sample URL, required fields, and expected volume so we can assess the request.

# Actor input Schema

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

Search terms to look up on Costco.com (e.g. 'laptop', 'paper towels'). Products from all paginated search results will be scraped.

## `zipCode` (type: `string`):

US ZIP code to determine warehouse location and delivery availability (e.g. '98101'). The closest warehouse to this ZIP code will be used for pricing and inventory.

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

Maximum number of product records to scrape. 0 = unlimited.

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

Proxy settings for the browser session.

## Actor input object example

```json
{
  "searchQueries": [
    "sheets"
  ],
  "zipCode": "72076",
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `keyValueStore` (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 = {
    "searchQueries": [
        "sheets"
    ],
    "zipCode": "72076",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraptivo/costco-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": ["sheets"],
    "zipCode": "72076",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("scraptivo/costco-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 '{
  "searchQueries": [
    "sheets"
  ],
  "zipCode": "72076",
  "maxItems": 20
}' |
apify call scraptivo/costco-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scraptivo/costco-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/LGBpCh2ppWIwdOjVf/builds/0F1thhWeEXx1bghU3/openapi.json
