Costco Scraper API - Warehouse Prices, Deals & Product Data avatar

Costco Scraper API - Warehouse Prices, Deals & Product Data

Pricing

from $2.00 / 1,000 results

Go to Apify Store
Costco Scraper API - Warehouse Prices, Deals & Product Data

Costco Scraper API - Warehouse Prices, Deals & Product Data

Extract Costco prices and product data from costco.ca and costco.com — sale prices, discounts, package sizes, normalized unit pricing, images and item numbers. Pick a warehouse by postal code for regional pricing. Browse any department, paste product URLs, or search. Export as JSON, CSV or Excel.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

JChaw

JChaw

Maintained by Community

Actor stats

1

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Costco Scraper — Warehouse Prices, Deals & Product Data

Extract product data from Costco Canada and Costco US — product names, current prices, sale prices and discounts, package sizes, derived unit pricing, images, ratings, and warehouse item numbers.

The scraper is location-aware: give it a postal code and it resolves the nearest warehouse, then returns that region's catalog and pricing. Costco's assortment genuinely differs by province — a BC run and an Ontario run return different products for the same query.

⚡ Quick start

Scrape Costco Canada's grocery department for a Vancouver warehouse:

{
"site": "CABC",
"categories": ["grocery-household"],
"postal_code": "V6B 1V4",
"max_items": 1000
}

Selecting a department also scrapes everything nested beneath it, so you don't need to list its subcategories as well.

Pair this with our other North American grocery scrapers for full coverage:

Who is this for?

  • Developers building grocery and retail price comparison apps
  • Retail analysts tracking Costco pricing and discounts across regions
  • CPG brands monitoring how their products are priced at Costco
  • Deal sites and price-alert tools that need Costco's current promotions
  • Researchers studying bulk-retail pricing and food affordability
  • Data teams building North American product databases

Features

  • Whole catalog, or any slice of it — 43 selectable departments, subcategories and curated lists (New Items, Treasure Hunt, Offers Ending Sunday), or all for everything.
  • Raw Costco links — paste a product, category, or search URL and the actor works out what to do with it.
  • Location-aware pricing — warehouse resolved from a postal code, with the province driving regional prices and assortment.
  • Discounts — current price, original price, and Costco's promotional text with its validity window.
  • Derived unit pricing — per 100 g / 100 ml / unit, computed from package sizes so you can compare across pack formats.
  • Canada and the US — one actor, both storefronts.
  • No browser — plain HTTP against Costco's own catalog API, so runs are fast and cheap.

What data does the Costco scraper extract?

FieldDescription
name, brandProduct title and brand
price, was_price, is_on_saleCurrent price, original price, discount flag
multi_buy_deal, promotion_text, promotion_validityCostco's promotional text and its dates
unit_price, comparable_unit_priceDerived per-100g / per-100ml / per-unit pricing
package_size, parsed_package_size, normalized_package_sizePackage size, parsed and normalized
image_url, product_urlProduct image and page link
product_id, item_numberCatalog id and the warehouse item number from the shelf tag
availability, member_onlyStock status and membership restriction
rating, rating_countCustomer rating and review count
location, location_name, location_postal_code, location_coordinatesThe warehouse the prices were resolved for
store, currency, categoryStorefront, currency, and the category scraped

⬇️ Input

FieldTypeDescription
sitestringCABC (costco.ca, CAD) or USBC (costco.com, USD). Default CABC.
categoriesarrayDepartment, subcategory or curated-list slugs, or all for the entire catalog.
startUrlsarrayRaw costco.ca / costco.com product, category or search URLs.
search_termsarrayFree-text queries. Combined with categories, they filter category results instead.
postal_codestringResolves the nearest warehouse and sets the pricing region. Required — see below.
warehouseIdstringUse a specific warehouse number. Requires postal_code too.
shipToStatestringOverride the province/state code (BC, ON, WA, …).
latitude, longitudestringResolve the warehouse from coordinates. This is how you select a US warehouse.
on_sale_onlybooleanKeep only discounted products.
max_itemsintegerStop after N products. 0 means no limit. Default 1000.

A location is required

Costco's catalog API returns zero results when no postal code is supplied — it doesn't error, it just serves an empty catalog. The actor therefore fails fast rather than reporting an empty run. Supply one of:

  • postal_code — Canadian postal codes are geocoded automatically (site: "CABC").
  • latitude + longitude — works for both countries, and is the supported way to pick a US warehouse.
  • warehouseId together with postal_code.

Example inputs

Discounted grocery items only:

{
"site": "CABC",
"categories": ["grocery-household"],
"postal_code": "M5H 2N2",
"on_sale_only": true
}

A single product from its URL:

{
"site": "CABC",
"postal_code": "V6B 1V4",
"startUrls": ["https://www.costco.ca/p/-/scotties-premium-facial-tissue-21-pack/4000376464"]
}

Costco US, warehouse resolved from coordinates:

{
"site": "USBC",
"latitude": "47.6062",
"longitude": "-122.3321",
"search_terms": ["olive oil"]
}

The entire Costco Canada catalog (~11,000 products):

{
"site": "CABC",
"categories": ["all"],
"postal_code": "V6B 1V4",
"max_items": 0
}

⬆️ Output

JSON output example

{
"store": "Costco",
"currency": "CAD",
"category": "grocery-household",
"name": "Ruffles Potato Chips Variety Pack, 36 × 28 g",
"brand": "Ruffles",
"price": 17.49,
"was_price": 20.99,
"is_on_sale": true,
"multi_buy_deal": "$3.50 OFF",
"promotion_text": "$3.50 OFF",
"promotion_validity": "Valid for orders placed 08/03/26 to 08/30/26.",
"unit_price": "1008g, $1.74/100g",
"comparable_unit_price": 1.74,
"package_size": "1008g",
"parsed_package_size": { "size": 1008, "unit": "g" },
"normalized_package_size": { "size": 1008, "unit": "g" },
"parsed_unit_price": { "value": 1.74, "quantity": 100, "unit": "g", "unit_type": "weight" },
"selling_type": "by_weight",
"image_url": "https://bfasset.costco-static.com/.../4160094-894__1?auto=webp&format=jpg",
"product_url": "https://www.costco.ca/p/-/ruffles-potato-chips-variety-pack-36-x-28-g/4000363385",
"product_id": "4000363385",
"item_number": "4160094",
"availability": "IN_STOCK",
"member_only": false,
"rating": 4.3,
"rating_count": 128,
"location": "552",
"location_name": "Vancouver BC",
"location_postal_code": "V6B 1V4",
"location_coordinates": { "lat": 49.278, "lng": -123.11 }
}

❓ FAQ

Where does the unit price come from?

Costco publishes no unit price and no package-size field, so the actor derives both from the product title, which Costco consistently suffixes with the size (", 1 kg", "36 × 28 g", "21-pack"). Multipacks are collapsed to their total contents, so 36 × 28 g becomes 1008g and the unit price reflects the whole box.

When a title carries no parseable size — gift cards, furniture, apparel — package_size and comparable_unit_price come back null rather than a guess, because a wrong unit price silently corrupts comparisons.

Are sale prices included?

Yes. price is the live discounted price, was_price is the original, and multi_buy_deal / promotion_text carry Costco's own wording ("$6 OFF"). Use on_sale_only: true to keep only discounted items.

Does the scraper return warehouse-specific prices?

It returns prices for the region the warehouse sits in. Costco prices and assortment vary by province/state rather than by individual warehouse, so two warehouses in the same province generally return the same catalog.

Do I need a Costco membership?

No. The actor reads Costco's public catalog. No account, no membership, no login.

Is there an official Costco API?

Costco does not offer a public product or pricing API. This actor gives you structured, ready-to-use data without maintaining a scraper of your own.

Scraping publicly available product and price information is generally legal, but you are responsible for complying with Costco's terms of service and any applicable laws in your jurisdiction. Use the data responsibly and avoid excessive request volume.

How much does it cost to run?

The actor runs on Apify's pay-per-usage model. It makes plain HTTP calls with no browser, so runs are inexpensive; a few categories typically fit within Apify's free tier credits. A full-catalog run scales with the product count.

Can I integrate the scraper with other tools?

Yes — use Apify integrations to connect with Zapier, Make, Google Sheets, Airbyte, and more, or trigger runs via webhooks and the Apify API. Export as JSON, CSV, or Excel.

Can I schedule recurring scrapes?

Yes — use Apify's built-in scheduler to run the actor daily, weekly, or on any cron schedule, which is how you build a Costco price history.

🔧 Maintainer notes

Credentials

The actor calls Costco's catalog API with the request headers its own storefront sends. Those values are published in the page source of any costco.ca page. If Costco rotates them the actor will start returning 401; re-read them by fetching a storefront page and searching the HTML for catalog/search/api/v1/search, then copy the adjacent required_request_headers block. Both values can be overridden without a code change:

VariableDefault
COSTCO_GRS_ENDPOINThttps://gdx-api.costco.com/catalog/search/api/v1/search
COSTCO_CLIENT_IDENTIFIER168287ea-1201-45f6-9b45-5bbea49f8ee7

Using this module outside Apify

src/costco-api.ts is a plain fetch client with no Apify import, matching the other actors in this repository. Wiring Costco into the daily MongoDB scrape is therefore a matter of adding an adapter in packages/scraper/src/api-handlers/actor-handlers.ts, registering it in registry.ts, adding a costco: block to packages/scraper/config.yml, and registering a location handler with supportsMultiLocation: true so the orchestrator visits every configured warehouse.

📝 Your feedback

We're always working on improving the performance of our Actors. If you've got any technical feedback for the Costco Scraper or found a bug, please create an issue on the Actor's Issues tab.