# Costco Product Scraper | US CA MX UK Prices (`lentic_clockss/costco-scraper`) Actor

Scrape Costco.com & Costco.ca/MX/UK/AU/JP/KR/TW — keyword search, categories, Hot Buys, PDP, warehouses & reviews. Extract prices, ratings, itemId/sku. Export Excel/CSV/JSON.

- **URL**: https://apify.com/lentic\_clockss/costco-scraper.md
- **Developed by:** [kane liu](https://apify.com/lentic_clockss) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Costco Product Scraper | US CA MX UK Prices & Search

**Scrape Costco product listings, keyword search, categories, Hot Buys, product detail pages, warehouse locations, and reviews — then download structured multi-market data as Excel, CSV, or JSON.**

Use this Actor as a practical **Costco product data API** for price monitoring, assortment research, and competitor tracking across Costco ecommerce markets. Choose a country, pick a mode, set limits, and get Dataset rows with prices, ratings, dual IDs (`itemId` / `sku`), and product URLs.

- Scrape **Costco keyword search**, **category browse**, **specialty topics** (Hot Buys / What’s New / warehouse-only / grocery), **category trees**, **product detail pages (PDP)**, **warehouse locations**, and **product reviews**
- Cover **US · CA · MX · UK · AU · JP · KR · TW** ecommerce hosts (not membership-only warehouse apps)
- Extract **price, currency, title, itemId, sku, brand, rating, review count, availability, zip/warehouse context**
- Optional **PDP enrich** on listings (`enrichDetails`) to backfill dual IDs and prices
- Export to **Excel / CSV / JSON**, or connect Make, n8n, Zapier, Python, or the Apify API
- **Pay per event** — Actor start + each Dataset result; **platform usage is included** (you do not pay separate Apify compute on top)

> **Unofficial tool.** This Actor is not affiliated with, endorsed by, or sponsored by Costco Wholesale. It collects publicly reachable shopping surfaces and does **not** place orders, checkout, or access private member accounts. **Same Day, Business Delivery, Pharmacy, Travel, and Photo** apps are out of scope. **China (CN)** is not included in this version.

---

### What does the Costco Product Scraper do?

Costco Product Scraper lets you **extract structured product and location data from Costco ecommerce sites** without running your own anti-bot browser fleet. Give it a keyword, category URL/slug, specialty topic, product URL / itemId, or zip for warehouses, then start a run.

Under the hood, the Actor:

1. Validates your input (market, mode, keyword / category / product / topic, filters)
2. Enforces free-tier caps when you are on a free Apify plan
3. Calls a managed Cloud Run worker (`costco-com`) that opens Costco with residential egress + browser unlock
4. Parses listing cards (DOM / Next data) and PDP JSON-LD (dual `itemId` vs `sku`)
5. Pushes Dataset rows ready for Excel / CSV / JSON export
6. Writes `RUN_SUMMARY` (and `ERROR_SUMMARY` on failure) to the key-value store

You run it like any other Apify Actor — schedule it, call it from the API, or plug it into automations.

---

### What Costco data can I extract?

| Data | Keyword search | Category / Specialty | Product detail | Warehouses | Reviews | Category tree |
| --- | :---: | :---: | :---: | :---: | :---: | :---: |
| itemId / URL | ✅ | ✅ | ✅ | — | ✅* | — |
| Title | ✅ | ✅ | ✅ | name* | ✅* | name |
| Price / currency | ✅ | ✅ | ✅ | — | — | — |
| JSON-LD sku (dual ID) | ✅* | ✅* | ✅ | — | — | — |
| Rating / review count | ✅* | ✅* | ✅ | — | rating | — |
| Brand / availability | ✅* | ✅* | ✅ | — | — | — |
| Zip / warehouse context | ✅ | ✅ | ✅ | ✅ | — | — |
| Review text / author | — | — | — | — | ✅* | — |
| Category slug / path | — | ✅ | — | — | — | ✅ |

\*When present on the page or after `enrichDetails` / Bazaarvoice best-effort. Reviews may return a soft note row when passkeys are missing.

---

### Why scrape Costco?

Costco is a major warehouse-club retailer with distinct ecommerce catalogs by country. Teams scrape Costco for **price monitoring**, **competitive analysis**, and **assortment research**:

- Monitor **Costco.com / Costco.ca / Costco.com.mx / Costco.co.uk** (and AU/JP/KR/TW) prices and Hot Buys
- Track **itemId vs sku dual IDs**, ratings, and PDP availability
- Map **category trees** and specialty merchandising pages (grocery, warehouse-only)
- Pull **warehouse location** rows by zip for geo context
- Feed BI dashboards, pricing tools, or AI agents with structured Costco rows

Compared with US-only Costco Actors that only accept a search URL **or** only PDP links, this Actor covers **keyword + category + specialty topics + category tree + PDP + warehouses + reviews** across **eight markets** in one input surface.

---

### More Actors like this

Looking for another **e-commerce** scraper, or a specialized Actor outside Costco? Use a dedicated Actor when one exists — structured fields, better coverage, usually lower cost.

#### Similar e-commerce Actors
- [Walmart Product Scraper](https://apify.com/lentic_clockss/walmart-scraper)
- [Target Product Scraper](https://apify.com/lentic_clockss/target-scraper)
- [Amazon Search Scraper](https://apify.com/lentic_clockss/amazon-search-results-collector)
- [Shopee Search Scraper](https://apify.com/lentic_clockss/shopee-search-scraper)
- [Etsy Scraper](https://apify.com/lentic_clockss/etsy-scraper)
- [SHEIN Product Scraper](https://apify.com/lentic_clockss/shein-scraper)
- [Temu Product Scraper](https://apify.com/lentic_clockss/temu-scraper)
- [Allegro Scraper](https://apify.com/lentic_clockss/allegro-scraper)
- [E-commerce Scraper](https://apify.com/lentic_clockss/ecommerce-scraper)

#### Prefer another specialized scraper?

**Jobs & Freelance**
- [LinkedIn Jobs Scraper](https://apify.com/lentic_clockss/linkedin-jobs-scraper)
- [Indeed Jobs Scraper](https://apify.com/lentic_clockss/indeed-jobs-scraper)
- [Upwork Jobs Scraper](https://apify.com/lentic_clockss/upwork-jobs-scraper)
- [Glassdoor Scraper](https://apify.com/lentic_clockss/glassdoor-scraper)
- [Fiverr Gigs Scraper](https://apify.com/lentic_clockss/fiverr-programming-tech-gigs-scraper)
- [Bayt Jobs Scraper](https://apify.com/lentic_clockss/bayt-scraper)

**Real Estate**
- [Zillow & Zumper Scraper](https://apify.com/lentic_clockss/us-real-estate-scraper)
- [Realtor.com Scraper](https://apify.com/lentic_clockss/realtor-com-scraper)
- [Apartments.com Rental Scraper](https://apify.com/lentic_clockss/apartments-com-rental-scraper)
- [Rightmove Scraper](https://apify.com/lentic_clockss/rightmove-property-scraper)
- [Idealista Scraper](https://apify.com/lentic_clockss/idealista-scraper)
- [realestate.com.au Scraper](https://apify.com/lentic_clockss/realestate-com-au-scraper)

**Travel & Stays**
- [Booking.com & Airbnb Scraper](https://apify.com/lentic_clockss/booking-airbnb-scraper)
- [Booking.com Hotels Scraper](https://apify.com/lentic_clockss/booking-hotels-scraper)
- [Airbnb Listings Scraper](https://apify.com/lentic_clockss/airbnb-listings-scraper)
- [Expedia Scraper](https://apify.com/lentic_clockss/expedia-scraper)
- [TripAdvisor Scraper](https://apify.com/lentic_clockss/tripadvisor-scraper)

**Social & Content**
- [YouTube Research Scraper](https://apify.com/lentic_clockss/youtube-research-scraper)
- [TikTok Scraper](https://apify.com/lentic_clockss/tiktok-scraper)
- [Reddit Scraper](https://apify.com/lentic_clockss/reddit-scraper)
- [YouTube Shorts Scraper](https://apify.com/lentic_clockss/youtube-shorts-scraper)

**Ads Intelligence**
- [Facebook Ad Library Scraper](https://apify.com/lentic_clockss/facebook-ad-library-scraper)
- [TikTok Ads Scraper](https://apify.com/lentic_clockss/tiktok-ads-top-ads-actor)

**Local & Maps**
- [Google Maps Scraper](https://apify.com/lentic_clockss/google-maps-scraper)

**General Tools**
- [Stealth Web Scraper](https://apify.com/lentic_clockss/stealth-web-scraper)
- [Email Risk Validator](https://apify.com/lentic_clockss/email-risk-validator)
- [Phone Number Intelligence](https://apify.com/lentic_clockss/phone-number-intelligence)

→ See the full catalog in [Related Actors](#related-actors) below, or browse [apify.com/lentic_clockss](https://apify.com/lentic_clockss).

---

### How to scrape Costco products (no code required)

1. Create a free [Apify](https://apify.com/) account
2. Open [Costco Product Scraper](https://apify.com/lentic_clockss/costco-scraper)
3. Choose a **browseCountry**: `US`, `CA`, `MX`, `UK`, `AU`, `JP`, `KR`, or `TW`
4. Choose a **mode**: `keywordSearch`, `categoryBrowse`, `specialtyBrowse`, `categoryTree`, `productDetail`, `warehouseLocations`, or `productReviews`
5. Enter a **keyword**, **categoryUrl** / **categorySlug**, **topic**, or **productUrl** / **itemId**
6. *(Optional)* Set `zip`, `dept`, `sort`, `enrichDetails`, `maxResults`
7. Click **Start** and download the Dataset as JSON, CSV, Excel, or JSONL

Start with `maxResults: 5–10` to verify the query, then scale up.

---

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

This Actor uses **pay-per-event** pricing. You are charged for:

| Event | Price |
| --- | --- |
| Actor Start (`apify-actor-start`) | **$0.005** per start |
| Result (`apify-default-dataset-item`) | **$3.00 / 1,000** results (**$0.003** each) |

**Platform usage costs are included** — you do **not** pay separate Apify compute/proxy usage for this Actor on top of the event prices above (**User pays platform usage costs = No**).

#### Example cost estimates

| Results collected | Approx. event cost* |
| --- | ---: |
| 100 | ~$0.31 |
| 1,000 | ~$3.01 |
| 10,000 | ~$30.01 |

\*Assumes one Actor start at default memory billing for start events, plus `$0.003` per Dataset item. Exact start billing can scale with allocated memory (one start event per GB, minimum one).

#### Free plan limits

On a **free Apify plan**, this Actor enforces developer limits of **10 runs** and **200 results per run**. Upgrade to a paid Apify plan for unlimited runs (event prices still apply).

---

### Input examples

#### Keyword search (US)

```json
{
  "mode": "keywordSearch",
  "browseCountry": "US",
  "keyword": "air fryer",
  "maxResults": 40,
  "maxPages": 2,
  "enrichDetails": true,
  "enrichLimit": 5
}
````

#### Keyword search (Mexico)

```json
{
  "mode": "keywordSearch",
  "browseCountry": "MX",
  "keyword": "cafe",
  "maxResults": 20,
  "maxPages": 1,
  "enrichDetails": false
}
```

#### Specialty / Hot Buys

```json
{
  "mode": "specialtyBrowse",
  "browseCountry": "US",
  "topic": "hotBuys",
  "maxResults": 30,
  "maxPages": 1
}
```

#### Category browse

```json
{
  "mode": "categoryBrowse",
  "browseCountry": "US",
  "categorySlug": "grocery-household",
  "maxResults": 30
}
```

#### Product detail (PDP)

```json
{
  "mode": "productDetail",
  "browseCountry": "US",
  "productUrl": "https://www.costco.com/p/-/kirkland-signature/100334021"
}
```

#### Warehouse locations

```json
{
  "mode": "warehouseLocations",
  "browseCountry": "US",
  "zip": "98101",
  "maxResults": 20
}
```

#### Product reviews

```json
{
  "mode": "productReviews",
  "browseCountry": "US",
  "itemId": "10024438",
  "maxResults": 20
}
```

***

### Output example

Listing row (search / category):

```json
{
  "itemId": "4000376434",
  "sku": null,
  "url": "https://www.costco.com/p/-/ninja-crispi-portable-air-fryer/4000376434",
  "title": "Ninja Crispi 5-in-1 Portable Glass Air Fry Cooking System",
  "price": 119.99,
  "currency": "USD",
  "rating": 4.7,
  "browseCountry": "US",
  "sourceSurface": "keywordSearch",
  "enginePath": "brightdata_browser+dom",
  "platform": "usbc"
}
```

PDP rows may include `sku` (JSON-LD), `brand`, `availability`, `images`, and nested `pdp` after enrich. Review rows may include `reviewId`, `text`, `author`, `submissionTime`.

***

### Coverage matrix

| Dimension | Scope |
| --- | --- |
| Markets | **US** `costco.com` · **CA** `costco.ca` · **MX** `costco.com.mx` · **UK** `costco.co.uk` · **AU** · **JP** · **KR** · **TW** |
| Platforms | US/CA Next (`/s?keyword=`) · MX/UK Hybris (`/search?text=`) |
| Modes | keywordSearch · categoryBrowse · specialtyBrowse · categoryTree · productDetail · warehouseLocations · productReviews |
| Pagination | `currentPage` (usbc) · `page` (sap) |
| Waived | Same Day / Business / Pharmacy / Travel / Photo apps; CN; member-only price deltas |

***

### Tips for better Costco scrapes

- Prefer **specific keywords** (`kirkland paper towels`) over single generic words
- Use **`browseCountry`** that matches the host you care about — MX/UK are not US URL clones
- Enable **`enrichDetails`** when you need JSON-LD `sku` / cleaner PDP prices (costs more navigations)
- Set **`zip`** when inventory or warehouse context matters
- Keep **`maxResults`** modest on first runs; Bright Data adaptive limits reward spaced requests

***

### Integrations

- **Apify API / client** — start runs and pull Dataset items programmatically
- **Schedules** — daily/weekly price monitors
- **Webhooks** — notify your backend when a run finishes
- **Make / n8n / Zapier** — no-code pipelines into Sheets, Slack, or CRM

***

### FAQ

**Is this an official Costco API?**\
No. It scrapes publicly reachable Costco ecommerce pages. It is not affiliated with Costco.

**Why do `itemId` and `sku` differ?**\
Costco URLs often use an `itemId` / item number that is **not** the same as the JSON-LD `sku`. This Actor keeps both when available.

**Do I need my own proxies?**\
No for normal Store runs. The worker provides egress (`WORKER_PROVIDES_PROXY=1`). Free-tier run/result caps still apply on free Apify plans.

**Can I scrape Same Day or Pharmacy?**\
Those are separate Costco apps / hosts and are waived in this Actor.

***

### Support

Questions or feature requests: open an issue on the Actor page or contact the developer via Apify Console.

***

### Related Actors

All **77** public Actors from \[[lentic\_clockss](https://apify.com/lentic_clockss)]. Click a name to open the Store detail page.

#### Jobs & Freelance

- [LinkedIn Jobs Scraper](https://apify.com/lentic_clockss/linkedin-jobs-scraper)
- [Bayt Jobs Scraper](https://apify.com/lentic_clockss/bayt-scraper)
- [Fiverr Gigs Scraper](https://apify.com/lentic_clockss/fiverr-programming-tech-gigs-scraper)
- [Freelancer.com Scraper](https://apify.com/lentic_clockss/freelancer-scraper)
- [Glassdoor Scraper](https://apify.com/lentic_clockss/glassdoor-scraper)
- [Himalayas Jobs Scraper](https://apify.com/lentic_clockss/himalayas-jobs-scraper)
- [Indeed Jobs Scraper](https://apify.com/lentic_clockss/indeed-jobs-scraper)
- [Jobicy Remote Jobs Scraper](https://apify.com/lentic_clockss/jobicy-remote-jobs-scraper)
- [RemoteOK Jobs Scraper](https://apify.com/lentic_clockss/remoteok-all-jobs-scraper)
- [SEEK Jobs Scraper](https://apify.com/lentic_clockss/seek-scraper)
- [Upwork Jobs Scraper](https://apify.com/lentic_clockss/upwork-jobs-scraper)

#### Real Estate

- [Zillow & Zumper Scraper](https://apify.com/lentic_clockss/us-real-estate-scraper)
- [Realtor.com Scraper](https://apify.com/lentic_clockss/realtor-com-scraper)
- [99.co Scraper](https://apify.com/lentic_clockss/ninetynine-co-sg-scraper)
- [Realtor.com Agents Scraper](https://apify.com/lentic_clockss/realtor-com-agents-scraper)
- [Apartments.com Rental Scraper](https://apify.com/lentic_clockss/apartments-com-rental-scraper)
- [Bayut Scraper](https://apify.com/lentic_clockss/bayut-uae-scraper)
- [Craigslist Housing Scraper](https://apify.com/lentic_clockss/craigslist-housing-scraper)
- [Daft.ie Scraper](https://apify.com/lentic_clockss/daft-property-scraper)
- [Dot Property Scraper](https://apify.com/lentic_clockss/dot-property-th-scraper)
- [FINN.no Scraper](https://apify.com/lentic_clockss/finn-scraper)
- [Funda Scraper](https://apify.com/lentic_clockss/funda-scraper)
- [Hepsiemlak Scraper](https://apify.com/lentic_clockss/hepsiemlak-scraper)
- [Idealista Scraper](https://apify.com/lentic_clockss/idealista-scraper)
- [Immobiliare.it Scraper](https://apify.com/lentic_clockss/immobiliare-property-scraper)
- [ImmoScout24 Scraper](https://apify.com/lentic_clockss/immobilienscout24-scraper)
- [Naver Land Scraper](https://apify.com/lentic_clockss/naver-land-scraper)
- [OpenSooq Scraper](https://apify.com/lentic_clockss/opensooq-real-estate-scraper)
- [Otodom Scraper](https://apify.com/lentic_clockss/otodom-scraper)
- [Property Finder Scraper](https://apify.com/lentic_clockss/property-finder-uae-scraper)
- [PropertyGuru Scraper](https://apify.com/lentic_clockss/propertyguru-sg-scraper)
- [realestate.com.au Scraper](https://apify.com/lentic_clockss/realestate-com-au-scraper)
- [Realtor.ca Scraper](https://apify.com/lentic_clockss/realtor-ca-scraper)
- [Rightmove Scraper](https://apify.com/lentic_clockss/rightmove-property-scraper)
- [SeLoger Scraper](https://apify.com/lentic_clockss/seloger-property-scraper)
- [SUUMO Scraper](https://apify.com/lentic_clockss/suumo-property-scraper)
- [Zillow Group Scraper](https://apify.com/lentic_clockss/zillow-group-scraper)

#### E-commerce

- [Shopee Search Scraper](https://apify.com/lentic_clockss/shopee-search-scraper)
- [E-commerce Scraper](https://apify.com/lentic_clockss/ecommerce-scraper)
- [1688 Global Product Search Scraper](https://apify.com/lentic_clockss/1688-global-scraper)
- [Allegro Scraper](https://apify.com/lentic_clockss/allegro-scraper)
- [Amazon Search Scraper](https://apify.com/lentic_clockss/amazon-search-results-collector)
- [ASOS Product Scraper](https://apify.com/lentic_clockss/asos-scraper)
- [Cdiscount Product Scraper](https://apify.com/lentic_clockss/cdiscount-scraper)
- [Costco Product Scraper](https://apify.com/lentic_clockss/costco-scraper)
- [Coupang Product Scraper](https://apify.com/lentic_clockss/coupang-scraper)
- [Etsy Scraper](https://apify.com/lentic_clockss/etsy-scraper)
- [Lazada Scraper](https://apify.com/lentic_clockss/lazada-ph-search-results-collector)
- [MercadoLibre Scraper](https://apify.com/lentic_clockss/mercadolibre-scraper)
- [Mercari Japan Scraper](https://apify.com/lentic_clockss/mercari-scraper)
- [Rakuten Japan Scraper](https://apify.com/lentic_clockss/rakuten-scraper)
- [SHEIN Product Scraper](https://apify.com/lentic_clockss/shein-scraper)
- [Target Product Scraper](https://apify.com/lentic_clockss/target-scraper)
- [Temu Product Scraper](https://apify.com/lentic_clockss/temu-scraper)
- [Walmart Product Scraper](https://apify.com/lentic_clockss/walmart-scraper)

#### Travel & Stays

- [Booking.com & Airbnb Scraper](https://apify.com/lentic_clockss/booking-airbnb-scraper)
- [Agoda Scraper](https://apify.com/lentic_clockss/agoda-scraper)
- [Airbnb Listings Scraper](https://apify.com/lentic_clockss/airbnb-listings-scraper)
- [Booking.com Hotels Scraper](https://apify.com/lentic_clockss/booking-hotels-scraper)
- [Despegar Scraper](https://apify.com/lentic_clockss/despegar-scraper)
- [Expedia Scraper](https://apify.com/lentic_clockss/expedia-scraper)
- [Traveloka Scraper](https://apify.com/lentic_clockss/traveloka-scraper)
- [Travelstart Flights Scraper](https://apify.com/lentic_clockss/travelstart-scraper)
- [Trip.com Scraper](https://apify.com/lentic_clockss/trip-com-scraper)
- [TripAdvisor Scraper](https://apify.com/lentic_clockss/tripadvisor-scraper)

#### Social & Content

- [TikTok Scraper](https://apify.com/lentic_clockss/tiktok-scraper)
- [Reddit Scraper](https://apify.com/lentic_clockss/reddit-scraper)
- [YouTube Shorts Scraper](https://apify.com/lentic_clockss/youtube-shorts-scraper)
- [YouTube Research Scraper](https://apify.com/lentic_clockss/youtube-research-scraper)
- [Hacker News Scraper](https://apify.com/lentic_clockss/hacker-news-scraper)

#### Ads Intelligence

- [Facebook Ad Library Scraper](https://apify.com/lentic_clockss/facebook-ad-library-scraper)
- [Google Ads Transparency VN](https://apify.com/lentic_clockss/google-ads-transparency-center-vn)
- [TikTok Ads Scraper](https://apify.com/lentic_clockss/tiktok-ads-top-ads-actor)

#### Local & Maps

- [Google Maps Scraper](https://apify.com/lentic_clockss/google-maps-scraper)

#### General Tools

- [Stealth Web Scraper](https://apify.com/lentic_clockss/stealth-web-scraper)
- [Email Risk Validator](https://apify.com/lentic_clockss/email-risk-validator)
- [Phone Number Intelligence](https://apify.com/lentic_clockss/phone-number-intelligence)

→ Browse the full profile: [apify.com/lentic\_clockss](https://apify.com/lentic_clockss)

# Actor input Schema

## `mode` (type: `string`):

keywordSearch | categoryBrowse | productDetail | warehouseLocations | categoryTree | specialtyBrowse | productReviews

## `browseCountry` (type: `string`):

US/CA/MX/UK/AU/JP/KR/TW Costco ecommerce hosts.

## `currency` (type: `string`):

Optional override (defaults by market).

## `keyword` (type: `string`):

Search keyword for keywordSearch.

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

Alias of keyword.

## `categoryUrl` (type: `string`):

Full category URL.

## `categorySlug` (type: `string`):

Category HTML slug without host (e.g. grocery-household).

## `topic` (type: `string`):

For specialtyBrowse: hotBuys | whatsNew | warehouseOnly | grocery

## `productUrl` (type: `string`):

PDP URL (/p/-/{slug}/{itemId} or legacy .product.{id}.html).

## `itemId` (type: `string`):

Costco URL itemId (may differ from JSON-LD sku).

## `slug` (type: `string`):

Optional slug when building PDP from itemId.

## `zip` (type: `string`):

Best-effort geo context (warehouse / inventory cookies).

## `warehouse` (type: `string`):

Optional warehouse context id/code.

## `dept` (type: `string`):

Optional Costco dept query for keywordSearch (usbc).

## `sort` (type: `string`):

relevance | priceAsc | priceDesc | newest | rating (soft aliases).

## `page` (type: `integer`):

Maps to Costco currentPage (usbc) or page (MX sap).

## `maxPages` (type: `integer`):

Max pages

## `maxResults` (type: `integer`):

Max results

## `enrichDetails` (type: `boolean`):

Fetch PDP details for the first enrichLimit listing rows (default on).

## `enrichLimit` (type: `integer`):

PDP enrich limit

## `workerBaseUrl` (type: `string`):

Optional Cloud Run worker origin override (https://…run.app).

## Actor input object example

```json
{
  "mode": "keywordSearch",
  "browseCountry": "US",
  "keyword": "paper towels",
  "page": 1,
  "maxPages": 3,
  "maxResults": 40,
  "enrichDetails": true,
  "enrichLimit": 5
}
```

# Actor output Schema

## `results` (type: `string`):

Normalized Costco product rows from the default dataset.

## `runSummary` (type: `string`):

Structured summary record stored in the default key-value store.

## `inputEcho` (type: `string`):

Normalized input saved at run start.

## `errorSummary` (type: `string`):

Present when a failed run stores structured terminal error information.

# 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 = {
    "keyword": "paper towels"
};

// Run the Actor and wait for it to finish
const run = await client.actor("lentic_clockss/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 = { "keyword": "paper towels" }

# Run the Actor and wait for it to finish
run = client.actor("lentic_clockss/costco-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 '{
  "keyword": "paper towels"
}' |
apify call lentic_clockss/costco-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Costco Product Scraper | US CA MX UK Prices",
        "description": "Scrape Costco.com & Costco.ca/MX/UK/AU/JP/KR/TW — keyword search, categories, Hot Buys, PDP, warehouses & reviews. Extract prices, ratings, itemId/sku. Export Excel/CSV/JSON.",
        "version": "0.1",
        "x-build-id": "PKqEhmejh064Y08UL"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lentic_clockss~costco-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lentic_clockss-costco-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/lentic_clockss~costco-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lentic_clockss-costco-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/lentic_clockss~costco-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lentic_clockss-costco-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": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "keywordSearch",
                            "categoryBrowse",
                            "productDetail",
                            "warehouseLocations",
                            "categoryTree",
                            "specialtyBrowse",
                            "productReviews"
                        ],
                        "type": "string",
                        "description": "keywordSearch | categoryBrowse | productDetail | warehouseLocations | categoryTree | specialtyBrowse | productReviews",
                        "default": "keywordSearch"
                    },
                    "browseCountry": {
                        "title": "Market",
                        "enum": [
                            "US",
                            "CA",
                            "MX",
                            "UK",
                            "AU",
                            "JP",
                            "KR",
                            "TW"
                        ],
                        "type": "string",
                        "description": "US/CA/MX/UK/AU/JP/KR/TW Costco ecommerce hosts.",
                        "default": "US"
                    },
                    "currency": {
                        "title": "Currency",
                        "type": "string",
                        "description": "Optional override (defaults by market)."
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Search keyword for keywordSearch."
                    },
                    "query": {
                        "title": "Query (alias)",
                        "type": "string",
                        "description": "Alias of keyword."
                    },
                    "categoryUrl": {
                        "title": "Category URL",
                        "type": "string",
                        "description": "Full category URL."
                    },
                    "categorySlug": {
                        "title": "Category slug",
                        "type": "string",
                        "description": "Category HTML slug without host (e.g. grocery-household)."
                    },
                    "topic": {
                        "title": "Specialty topic",
                        "enum": [
                            "hotBuys",
                            "whatsNew",
                            "warehouseOnly",
                            "grocery"
                        ],
                        "type": "string",
                        "description": "For specialtyBrowse: hotBuys | whatsNew | warehouseOnly | grocery"
                    },
                    "productUrl": {
                        "title": "Product URL",
                        "type": "string",
                        "description": "PDP URL (/p/-/{slug}/{itemId} or legacy .product.{id}.html)."
                    },
                    "itemId": {
                        "title": "Item ID",
                        "type": "string",
                        "description": "Costco URL itemId (may differ from JSON-LD sku)."
                    },
                    "slug": {
                        "title": "Product slug",
                        "type": "string",
                        "description": "Optional slug when building PDP from itemId."
                    },
                    "zip": {
                        "title": "ZIP / postal code",
                        "type": "string",
                        "description": "Best-effort geo context (warehouse / inventory cookies)."
                    },
                    "warehouse": {
                        "title": "Warehouse",
                        "type": "string",
                        "description": "Optional warehouse context id/code."
                    },
                    "dept": {
                        "title": "Department filter",
                        "type": "string",
                        "description": "Optional Costco dept query for keywordSearch (usbc)."
                    },
                    "sort": {
                        "title": "Sort",
                        "type": "string",
                        "description": "relevance | priceAsc | priceDesc | newest | rating (soft aliases)."
                    },
                    "page": {
                        "title": "Start page",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maps to Costco currentPage (usbc) or page (MX sap).",
                        "default": 1
                    },
                    "maxPages": {
                        "title": "Max pages",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Max pages",
                        "default": 3
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Max results",
                        "default": 40
                    },
                    "enrichDetails": {
                        "title": "Enrich listings with PDP",
                        "type": "boolean",
                        "description": "Fetch PDP details for the first enrichLimit listing rows (default on).",
                        "default": true
                    },
                    "enrichLimit": {
                        "title": "PDP enrich limit",
                        "minimum": 0,
                        "maximum": 50,
                        "type": "integer",
                        "description": "PDP enrich limit",
                        "default": 5
                    },
                    "workerBaseUrl": {
                        "title": "Worker base URL override",
                        "type": "string",
                        "description": "Optional Cloud Run worker origin override (https://…run.app)."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
