# Costco Scraper — Canada & USA Prices, Deals, Stock & Warehouses (`yugenox/costco-scraper`) Actor

Costco price tracker and scraper for Costco.ca and Costco.com: search by keyword, category, product URL, item number or the full catalogue. Prices, sale prices and deal end dates, warehouse stock by postal code, ratings, model numbers, specs, plus every warehouse with hours. No login.

- **URL**: https://apify.com/yugenox/costco-scraper.md
- **Developed by:** [Yugenox Corp](https://apify.com/yugenox) (community)
- **Categories:** E-commerce, Automation, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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.

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

## Costco Scraper — Canada & USA prices, deals, stock and warehouses

Scrape **Costco.ca** and **Costco.com** products by keyword, category, product URL, item number — or the **entire online catalogue** — with prices, sale prices, savings and deal end dates, stock at your local warehouse, ratings, item numbers, model numbers and full specifications. A second mode lists **every Costco warehouse** with address, hours, holiday closures and services (gas station, pharmacy, tire centre and more).

No Costco account or membership needed.

### Why this Costco scraper

- 🇨🇦 **Costco Canada and Costco USA** from one actor, prices in CAD or USD.
- 📍 **Location-aware.** Give a postal / ZIP code (or a warehouse number) and get the assortment, delivery prices and stock Costco shows shoppers there — plus in-warehouse stock at the nearest warehouse.
- 💸 **Deals built in.** Regular price, sale price, savings in $ and %, the promotion label ("$250 OFF") and the date the deal ends. Filter to on-sale items only.
- 🗂️ **Full catalogue in minutes.** About 11,000 Canadian products in one run — every result, no duplicates.
- 🏷️ **Price tracking by item number.** Paste the numbers from shelf tags or receipts and re-run on a schedule.
- 🏬 **Warehouse locator.** All ~115 Canadian and ~650 US warehouses, or the nearest ones to a postal code.

### What you can scrape

| Input | Example |
|---|---|
| Search terms | `coffee`, `kirkland olive oil`, `tv` |
| Category URLs | `https://www.costco.ca/televisions.html`, `https://www.costco.com/laptops.html` |
| Search URLs | `https://www.costco.ca/s?keyword=paper+towels` |
| Product URLs | `https://www.costco.ca/p/-/balzacs-farmers-blend-whole-bean-medium-roast-coffee-907-g/4000405951` |
| Item numbers / product ids | `15071`, `4000405951` |
| Full catalogue | switch on **Full catalogue** |
| Warehouses | set **What to scrape** to **Warehouses** |

### Input example

```json
{
  "country": "CA",
  "searchTerms": ["coffee", "protein bars"],
  "startUrls": [{ "url": "https://www.costco.ca/televisions.html" }],
  "postalCode": "V6B 1A1",
  "maxItemsPerQuery": 200,
  "sortBy": "price_asc",
  "onSaleOnly": false,
  "includeDetails": false
}
```

Leave **Postal / ZIP code** empty to use downtown Toronto (Canada) or Seattle (USA).

### Output example

```json
{
  "productId": "4201015543",
  "itemNumber": "2160316",
  "title": "HP OmniBook 3 16-in Touchscreen Laptop, Intel Core Ultra 5 225U - 16GB RAM, 512GB SSD",
  "brand": "HP",
  "model": "16-bu0002ca",
  "url": "https://www.costco.ca/p/-/hp-omnibook-3-16-in-touchscreen-laptop-intel-core-ultra-5-225u---16gb-ram-512gb-ssd/4201015543",
  "image": "https://gdx-assets.costco.com/adobe/assets/urn:aaid:aem:9a1e66e5-b5fd-40f9-acac-4f79f54b43c9/as/2160316-894__1.avif",
  "price": 999.99,
  "maxPrice": null,
  "currency": "CAD",
  "originalPrice": 1249.99,
  "onSale": true,
  "discount": 250,
  "discountPercent": 20,
  "promotions": [
    "$250 OFF"
  ],
  "dealLabel": "$250 OFF",
  "offerEnds": "2026-09-28",
  "promotionalText": "Valid for orders placed 08/24/26 to 09/28/26.",
  "deliveryPrice": 999.99,
  "warehousePrice": 999.99,
  "priceNote": null,
  "inStock": true,
  "deliveryAvailability": "IN_STOCK",
  "warehouseAvailability": "IN_STOCK",
  "rating": 5,
  "reviewCount": 2,
  "category": "Windows Laptops",
  "categoryPath": "Computers > Laptops > Windows Laptops",
  "categories": [
    "Computers",
    "Computers > Laptops",
    "Computers > Laptops > Windows Laptops"
  ],
  "labels": [],
  "features": [
    "Backlit Keyboard",
    "Bluetooth",
    "Integrated Webcam",
    "Numeric Keypad",
    "Touchscreen",
    "Wi-Fi"
  ],
  "memberOnly": false,
  "buyable": true,
  "fsaEligible": false,
  "variableWeight": false,
  "programTypes": [
    "3rdPartyDelivery",
    "SiteControlledInventory",
    "InWarehouse",
    "Standard",
    "WarehouseDelivery",
    "ShipIt"
  ],
  "sameDayDelivery": true,
  "twoDayDelivery": false,
  "soldInWarehouse": true,
  "shipToHome": true,
  "minOrderQty": 1,
  "maxOrderQty": null,
  "variantCount": 1,
  "itemNumbers": [
    "2160316"
  ],
  "listedDate": "2026-06-08",
  "warehouseId": "552",
  "warehouseName": "Vancouver BC",
  "postalCode": "V6B1A1",
  "country": "CA",
  "source": {
    "type": "product",
    "input": "4201015543"
  },
  "position": 1,
  "scrapedAt": "2026-09-24T03:43:19.373Z"
}
```

With **Include full product details** each product also gets `description`, `featureList`, `specifications` (a key → value table such as Brand, Screen Size, Processor), `deliveryStatement`, `department`, `limitOnePerMember`, `membershipRequired` and `variants` (sizes / colours with their own item numbers).

#### Warehouse output

```json
{
  "warehouseId": "1316",
  "name": "Thorncliffe Park",
  "type": "Warehouse",
  "address": "42 OVERLEA BLVD",
  "city": "TORONTO",
  "province": "ON",
  "postalCode": "M4H 1B6",
  "country": "CA",
  "latitude": 43.7074393,
  "longitude": -79.34780281,
  "phone": "(647) 265-9377",
  "timeZone": "America/Toronto",
  "openingDate": "2018-07-24",
  "isOpen": true,
  "distanceKm": 6.3,
  "hours": [
    {
      "days": "Mon-Fri",
      "open": "09:00",
      "close": "20:30",
      "closed": false
    }
  ],
  "holidays": [
    {
      "date": "2026-10-12",
      "name": "Thanksgiving",
      "closed": true
    }
  ],
  "hasGasStation": false,
  "hasPharmacy": true,
  "hasTireCentre": true,
  "hasFoodCourt": true,
  "hasOptical": true,
  "hasHearingAids": true,
  "hasPropane": false,
  "hasCarWash": false,
  "departments": [
    "Bakery",
    "Executive Membership",
    "Fresh Produce",
    "Independent Optometrist",
    "Membership",
    "Rotisserie Chicken",
    "Service Deli"
  ],
  "services": [
    {
      "code": "food",
      "name": "Food Court",
      "phone": "(647) 265-9399"
    },
    {
      "code": "hearing",
      "name": "Hearing Aids",
      "phone": "(647) 265-9397"
    }
  ],
  "url": "https://www.costco.ca/w/-/on/toronto/1316",
  "scrapedAt": "2026-09-24T03:54:50.436Z"
}
```

### Use cases

- **Price monitoring** — track Costco prices by item number on a daily or weekly schedule and get alerted when something drops.
- **Deal hunting** — pull every item on sale in Canada or the US with the savings and the date each deal ends.
- **Retail & competitor intelligence** — compare Costco with other retailers, category by category, with brand and model numbers for matching.
- **Reselling / arbitrage** — find discounted products and check stock at specific warehouses.
- **Store analytics** — map every Costco warehouse with its services and opening hours.

### FAQ

**Do I need a Costco membership, account, cookies or a login?** No. No login is needed: the scraper reads the same public product listings, prices and warehouse pages any visitor sees on costco.ca and costco.com, and needs nothing from you except a search, category, URL or item number.

**Why do some products have no price?**
Some fresh and in-warehouse-only items (eggs, meat, produce) are listed online without a price — Costco only shows it in the warehouse. These rows have `price: null` and a `priceNote` explaining why, instead of a misleading 0.

**Does the postal code change prices?**
Mostly it changes *what* is available (the online assortment and delivery options) and stock. Delivery prices can differ slightly by province or state. `warehouseAvailability` is the stock at the chosen warehouse.

**What is the difference between product id and item number?**
The item number is the number on the shelf tag, receipt and the product page. The product id is Costco's online listing id (one listing can hold several item numbers, e.g. sizes). You can paste either.

**How many products can I get?**
Everything Costco lists online for the location — about 11,000 products in Canada. A search returns every matching product, not just the first pages.

**Can I get French results?**
Not currently — results are in English.

**Does it scrape reviews?**
Ratings and review counts are included. Review texts and reviewer names are not collected.

**How do I scrape several locations?**
Run the actor once per postal code or warehouse number (you can schedule several tasks with different inputs).

**Which proxy should I use?** Keep the default (Apify Proxy, datacenter). It comes with every Apify plan, including the free one, and Costco answers it. The scraper keeps the datacenter IPs Costco accepts and drops the ones it refuses. If almost all of them are refused for a while, the run switches to residential proxies when your account has them, and carries on without them when it doesn't. If the proxy you picked isn't available on your account, the run uses datacenter instead and says so in its status message.

**What happens if a run hits its time limit?** It stops shortly before the timeout (20% of the run time, at most a minute), saves everything collected so far, and finishes successfully. If the timeout is so short that nothing came back, the status message says so: give the run at least 120 seconds.

**Is it legal to scrape Costco?** This Actor only collects publicly available data: product listings, prices, deals, stock levels, ratings and warehouse details (address, hours, services and the warehouse's business phone number) that anyone can see on costco.ca and costco.com without an account. Collecting publicly available data is generally legal, but you're responsible for how you use it. The results contain no personal data: ratings are averages and counts only, with no reviewer names or review text. You must follow Costco's terms and laws such as PIPEDA, GDPR and CCPA. If you're unsure, check with a lawyer. More on this: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

**Does it access any private data?** No. Everything comes from what Costco shows to any visitor without logging in. It never uses a login or membership, never touches private or restricted accounts, and never reaches password-protected areas.

# Actor input Schema

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

Products: search results, categories, product pages or the whole catalogue. Warehouses: every Costco warehouse in the country (address, hours, holiday closures, gas station, pharmacy, tire centre and other services), nearest first if you give a postal code.

## `country` (type: `string`):

Costco Canada (costco.ca, prices in CAD) or Costco USA (costco.com, prices in USD). Costco URLs you paste are always scraped on their own site.

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

Keywords, exactly as you would type them in Costco's search box. Each term is scraped separately. Terms that Costco sends to a category (for example "tv") scrape that category.

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

Category pages (https://www.costco.ca/televisions.html), search pages (https://www.costco.com/s?keyword=olive+oil) and product pages (https://www.costco.ca/p/-/…/4000405951).

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

Costco item numbers (the number on the shelf tag and receipt, e.g. 15071) or product ids (e.g. 4000405951). Great for tracking the price of specific products.

## `fullCatalog` (type: `boolean`):

Scrape every product Costco lists online for your location (about 11,000 in Canada). Takes a few minutes. Combine with "Only items on sale" for a complete deals list.

## `postalCode` (type: `string`):

Your location. Costco's online assortment, delivery prices and stock depend on it, and the nearest warehouse is used for in-warehouse stock. Leave empty for downtown Toronto (M5V 3L9) or Seattle (98101). In Warehouses mode, sorts warehouses by distance.

## `warehouseId` (type: `string`):

Check stock at a specific warehouse instead of the one nearest your postal code (e.g. 1316 = Thorncliffe Park, Toronto). Run the Warehouses mode to list every number.

## `sortBy` (type: `string`):

Order of results within each search / category. Price sorting applies to everything matching the search, so broad keywords can surface loosely related cheap items first.

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

Maximum number of rows for the whole run. Leave empty for no limit.

## `maxItemsPerQuery` (type: `integer`):

Cap for each search term, category or URL. Leave empty for no per-input limit.

## `onSaleOnly` (type: `boolean`):

Keep only products that currently have a discount (instant savings / manufacturer's savings).

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

Add the full description, feature list, specifications table, delivery note, department and variants (sizes / colours with their item numbers) to every product.

## `maxConcurrency` (type: `integer`):

Parallel requests. The default is fast and gentle; raise it for big catalogue crawls.

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

Apify Proxy is required. Datacenter proxies work and are the cheapest; the scraper switches to residential automatically if needed.

## Actor input object example

```json
{
  "mode": "products",
  "country": "CA",
  "searchTerms": [
    "coffee"
  ],
  "fullCatalog": false,
  "sortBy": "relevance",
  "maxItems": 50,
  "onSaleOnly": false,
  "includeDetails": false,
  "maxConcurrency": 6,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped products (or warehouses).

## `run` (type: `string`):

Status and statistics for this run.

## `report` (type: `string`):

RUN_REPORT: how the run ended, counts and proxy use.

# 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 = {
    "searchTerms": [
        "coffee"
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("yugenox/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 = {
    "searchTerms": ["coffee"],
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("yugenox/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 '{
  "searchTerms": [
    "coffee"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call yugenox/costco-scraper --silent --output-dataset

```

## MCP server setup

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