# Costco Products Scraper (`fetch_cat/costco-products-scraper`) Actor

Scrape public Costco product search, category, and product-page data for pricing, stock, ratings, images, and catalog research.

- **URL**: https://apify.com/fetch\_cat/costco-products-scraper.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.36 / 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?

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 Products Scraper

Costco Products Scraper exports structured public Costco product data from keywords, search URLs, category URLs, and product URLs. Use it for ecommerce catalog research, price monitoring, assortment checks, stock signal tracking, and repeatable CSV/JSON/API workflows.

### What does this scraper do?

- **Search and category extraction:** collect Costco products from search terms like `laptop` or public category URLs like `/hair-care.html`.
- **Product snapshots:** normalize a direct Costco product URL into the same output format when Costco returns it through the public product data route.
- **Buyer-ready product fields:** product URL, item number, IDs, name, brand, description, price fields, currency, rating, reviews, availability signals, member-only flag, categories, and images.
- **Cost control:** cap total products, products per source, and paginated pages per source.

### Costco price tracker and product-data use cases

Use this Costco price tracker workflow to monitor public assortment and visible price changes. The same output also supports a Costco product data API workflow for ecommerce, reporting, and automation.

- **Ecommerce teams:** monitor Costco assortment and visible price changes.
- **Market researchers:** compare product names, categories, brands, and customer-review signals.
- **Data teams:** feed public Costco catalog records into BI, spreadsheets, alerts, and internal APIs.
- **Automation builders:** run repeatable Apify tasks or MCP-powered agents with the same JSON input.

### Input example

```json
{
  "keywords": ["laptop"],
  "maxItems": 10,
  "maxItemsPerStartUrl": 10,
  "maxSearchPagesPerStartUrl": 1
}
```

### Output example

```json
{
  "productUrl": "https://www.costco.com/.product.4000318634.html",
  "sourceUrl": "https://www.costco.com/s?keyword=laptop",
  "itemNumber": "4000318634",
  "name": "Lenovo Slim 7i 14\" OLED Touchscreen Copilot+ PC",
  "brand": "Lenovo",
  "price": 999.99,
  "currencyCode": "USD",
  "rating": 4.5,
  "reviewsCount": 123,
  "isInStock": true,
  "image": "https://www.costco.com/example.jpg",
  "scrapedAt": "2026-07-29T00:00:00.000Z"
}
```

### Input settings

| Field | Type | Description |
| --- | --- | --- |
| `keywords` | string\[] | Costco search terms such as `laptop`, `coffee`, or `vitamins`. |
| `startUrls` | request list | Costco search, category, or product URLs. |
| `searchUrls` | string\[] | Optional plain URL list for compatibility with other Costco scraper inputs. |
| `maxItems` | integer | Hard cap on total product records. |
| `maxItemsPerStartUrl` | integer | Hard cap for each keyword or URL. |
| `maxSearchPagesPerStartUrl` | integer | Maximum paginated Costco result pages per source. |
| `proxyConfiguration` | object | Optional proxy settings. Default runs without proxy for the public search API route. |
| `debug` | boolean | Save blocked or malformed response snippets to the key-value store. |

### Output fields

| Field | Description |
| --- | --- |
| `productUrl`, `sourceUrl` | Product URL and the input/source URL that produced the record. |
| `productId`, `groupId`, `itemNumber` | Costco product identifiers when available. |
| `name`, `brand`, `brands`, `description` | Product text and brand data. |
| `price`, `listPrice`, `minPrice`, `maxPrice`, `currencyCode`, `pricePerUnit` | Visible price data returned by Costco. |
| `rating`, `reviewsCount` | Review summary fields when available. |
| `isBuyable`, `isInStock`, `availabilityStatus`, `memberOnly` | Availability and member-only signals. |
| `categoryPaths`, `image`, `images`, `scrapedAt` | Category, image, and scrape timestamp metadata. |

### Input recipes

- **Costco laptop search:** `{"keywords":["laptop"],"maxItems":25,"maxSearchPagesPerStartUrl":2}`
- **Costco category monitor:** `{"startUrls":[{"url":"https://www.costco.com/hair-care.html"}],"maxItems":25}`
- **Costco product snapshot:** `{"startUrls":[{"url":"https://www.costco.com/.product.4000318634.html"}],"maxItems":1}`

### Pricing

This Actor uses pay-per-event pricing:

| Event | Price |
| --- | ---: |
| Run start | $0.005 per run |
| Product scraped - Free tier | $0.00046 per product |
| Product scraped - Bronze tier | $0.00040 per product |
| Product scraped - Silver tier | $0.000312 per product |
| Product scraped - Gold tier | $0.00024 per product |
| Product scraped - Platinum tier | $0.00016 per product |
| Product scraped - Diamond tier | $0.000112 per product |

### Tips and limits

- Keep first runs small (`maxItems` 10-25) while validating your source terms.
- Costco may omit optional fields for some products; nullable fields are preserved instead of dropping valid records.
- This Actor scrapes public product/search/category data only. It does not log in, use private accounts, read carts, or claim warehouse-specific member inventory.

### API usage

#### Node.js

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/costco-products-scraper').call({
  keywords: ['laptop'],
  maxItems: 10
});
console.log(run.defaultDatasetId);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('fetch_cat/costco-products-scraper').call(run_input={
    'keywords': ['laptop'],
    'maxItems': 10,
})
print(run['defaultDatasetId'])
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~costco-products-scraper/runs?token=YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"keywords":["laptop"],"maxItems":10}'
```

### MCP / agent usage

Use this Actor from Apify MCP when you want an AI agent to collect public Costco product data.

```bash
claude mcp add apify -- npx -y @apify/actors-mcp-server --actors fetch_cat/costco-products-scraper
```

```json
{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--actors", "fetch_cat/costco-products-scraper"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
```

Example prompts:

- "Scrape 25 Costco laptop products and return price, rating, and product URL."
- "Monitor this Costco category URL and list products that are member-only."
- "Get one product snapshot for this Costco product URL."

### Related actors

- [Amazon Products Search Scraper](https://apify.com/fetch_cat/amazon-products-search-scraper)
- [Walmart Products Scraper](https://apify.com/fetch_cat/walmart-products-scraper)
- [Target Products Scraper](https://apify.com/fetch_cat/target-products-scraper)
- [AliExpress Products Scraper](https://apify.com/fetch_cat/aliexpress-products-scraper)
- [eBay Marketplace Scraper](https://apify.com/fetch_cat/ebay-marketplace-scraper)
- [Ecommerce Product Page Scraper](https://apify.com/fetch_cat/ecommerce-product-page-scraper)

### Responsible use

This Actor collects public product data. Make sure your use complies with Costco terms, applicable laws, and privacy rules. Do not use it to access accounts, carts, private member data, or non-public systems.

### FAQ

**What data can I export with Costco Products Scraper?** Public listing records can include product IDs, item numbers, names, brands, visible prices, availability signals, review summaries, categories, images, and source URLs when Costco returns them.

**Can I run Costco Products Scraper through an API, schedule, or MCP client?** Yes. Use the API examples above for programmatic runs, schedule the same input in Apify, or call the Actor from an MCP client.

**How much does it cost to use Costco Products Scraper?** The Actor charges one run-start event and one event for each product record it saves. Current tier prices are shown in the Pricing section and on the Actor Pricing tab.

**Can it scrape warehouse-specific prices?** No. It extracts public product/search/category data returned by Costco's public routes.

**Why are some price or review fields empty?** Costco does not return every optional field for every product. Empty optional fields are kept as `null` or empty arrays.

**Can I use category URLs and keywords together?** Yes. Combine `keywords`, `startUrls`, and `searchUrls`; `maxItems` still caps the total output.

### Support

If you need help, open an issue on the Actor page and include:

- **Input JSON:** the exact input you used.
- **Expected output:** what product, field, or count you expected.
- **Actual output:** what the run produced instead.
- **Reproducible public URL:** a Costco keyword, category URL, product URL, or public Apify run URL that reproduces the issue.

# Actor input Schema

## `keywords` (type: `array`):

Costco search terms such as laptop, coffee, vitamins, or hair care.

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

Costco search URLs, category URLs, or product URLs.

## `searchUrls` (type: `array`):

Optional plain string list of Costco search or category URLs.

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

Hard cap on product records saved to the dataset.

## `maxItemsPerStartUrl` (type: `integer`):

Hard cap on product records from each keyword or URL.

## `maxSearchPagesPerStartUrl` (type: `integer`):

Maximum paginated Costco API pages to request per keyword or category.

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

Optional Apify proxy configuration. Costco API route usually works without a browser; use proxies only when needed.

## `debug` (type: `boolean`):

Save blocked or malformed response snippets to key-value store for troubleshooting.

## Actor input object example

```json
{
  "keywords": [
    "laptop"
  ],
  "startUrls": [
    {
      "url": "https://www.costco.com/hair-care.html"
    }
  ],
  "searchUrls": [],
  "maxItems": 10,
  "maxItemsPerStartUrl": 10,
  "maxSearchPagesPerStartUrl": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "debug": false
}
```

# Actor output Schema

## `overview` (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 = {
    "keywords": [
        "laptop"
    ],
    "startUrls": [
        {
            "url": "https://www.costco.com/hair-care.html"
        }
    ],
    "maxItems": 10,
    "maxItemsPerStartUrl": 10,
    "maxSearchPagesPerStartUrl": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/costco-products-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 = {
    "keywords": ["laptop"],
    "startUrls": [{ "url": "https://www.costco.com/hair-care.html" }],
    "maxItems": 10,
    "maxItemsPerStartUrl": 10,
    "maxSearchPagesPerStartUrl": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/costco-products-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 '{
  "keywords": [
    "laptop"
  ],
  "startUrls": [
    {
      "url": "https://www.costco.com/hair-care.html"
    }
  ],
  "maxItems": 10,
  "maxItemsPerStartUrl": 10,
  "maxSearchPagesPerStartUrl": 1
}' |
apify call fetch_cat/costco-products-scraper --silent --output-dataset

```

## MCP server setup

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