Tony Wang6 min readHow to Scrape Costco in 2026 (API & Python)
Scrape Costco in 2026 — product search, pricing, availability, reviews, and warehouses as structured JSON — DIY, no-code, or a structured API.
The fastest way to scrape Costco in 2026 is to call a structured API that returns normalized JSON for product search, detail, availability, reviews, categories, and nearby warehouses — instead of parsing Costco.com's pages yourself. Costco.com is open to browse without a membership, but it has no self-serve public API, sits behind Akamai's bot management, and carries a membership signal running through its data — some products and prices are member-only, and non-members pay a surcharge on the rest. This guide covers all three approaches, what each returns, where DIY breaks, and the legal and access basics.
Why scrape Costco?
Costco's product and warehouse data powers:
- Pricing intelligence — track how a bulk item's price moves over time, including reduced-price flags.
- Assortment and category research — see what's carried in a category and how counts shift.
- Review and sentiment analysis — pull rating trends and review text for a product line.
- Availability monitoring — check delivery estimates for a product in a given ZIP or state before it goes out of stock.
- Warehouse and market coverage mapping — find the nearest physical warehouses to a location for local-availability or store-density research.
Is it legal to scrape Costco?
Option 1: DIY in Python (and why it breaks)
Costco's product pages render from server-side data rather than a stable public JSON endpoint, so a DIY scraper has to fetch and parse the rendered page:
import requests
from bs4 import BeautifulSoup
resp = requests.get(
"https://www.costco.com/p/4000103922",
headers={"User-Agent": "Mozilla/5.0 (compatible; research-bot/1.0)"},
)
soup = BeautifulSoup(resp.text, "html.parser")
# Price, rating, and availability are embedded in page data, not
# consistently exposed as selectable markup
It demos and then breaks:
- Akamai bot management fronts the site. A routine, unauthenticated request gets challenged or blocked quickly — naive
requestscalls don't get far, and a browser-based scraper needs ongoing upkeep as the defense updates. - Availability and delivery estimates are location-specific. The same product returns a different
availabilityandestimated_delivery_datedepending on postal code and state, so a single page fetch never gives you the full picture — you need a per-location request. - Pricing carries a membership signal you can't ignore. Some products are
membership_requiredand priced only for logged-in members; scraping a non-member view without accounting for that flag gives you an incomplete or misleading price. - No official third-party API. Costco has no self-serve developer program — a handful of third-party scraping services exist precisely because there's no sanctioned alternative.
Option 2: No-code tools
Marketplace scraper actors for Costco exist and suit a one-off pull of a category or a short product list, but they inherit the same Akamai-fragility as DIY and don't give you a stable, versioned schema to build a pipeline on.
Option 3: A structured Costco API
For a repeatable workflow, Crawlora's Costco API returns normalized JSON for search, product detail, availability, reviews, categories, and warehouses — no page parsing or bot-defense upkeep. Search by keyword:
curl "https://api.crawlora.net/api/v1/costco/search?query=refrigerator" \
-H "x-api-key: $CRAWLORA_API_KEY"
Then resolve a product id and pull detail, availability, and reviews in Python:
import requests
h = {"x-api-key": "YOUR_API_KEY"}
base = "https://api.crawlora.net/api/v1/costco"
hits = requests.get(f"{base}/search", headers=h, params={"query": "refrigerator"}).json()["data"]["products"]
product_id = hits[0]["id"]
detail = requests.get(f"{base}/product/{product_id}", headers=h).json()["data"]
availability = requests.get(
f"{base}/product/{product_id}/availability",
headers=h,
params={"postal_code": "98134", "state": "WA"},
).json()["data"]
reviews = requests.get(f"{base}/product/{product_id}/reviews", headers=h).json()["data"]
A product-detail response is normalized JSON (real fields — check the docs):
{
"code": 200,
"msg": "OK",
"data": {
"id": "4000103922",
"title": "LG 26 cu. ft. Smart Mirror InstaView Counter-Depth MAX French Door Refrigerator with Four Types of Ice",
"manufacturer": "LG ELECTRONICS USA INC",
"price": 1399.99,
"list_price": 1399.99,
"buyable": true,
"membership_required": false,
"rating": 4.44,
"rating_count": 477
}
}
Availability is postal-code and state specific, with a delivery estimate:
{
"data": {
"product_id": "1942114",
"availability": "INSTOCK",
"available_for_sale": true,
"fulfilled_by": "LG",
"estimated_delivery_date": "2026-08-17T00:00:00"
}
}
Nearby warehouses come from a latitude/longitude lookup — useful for pairing online availability with the closest physical store:
curl "https://api.crawlora.net/api/v1/costco/warehouses?latitude=47.6062&longitude=-122.3321" \
-H "x-api-key: $CRAWLORA_API_KEY"
Store one row per product per pull, keyed by product id, and re-run on a schedule to track price/list_price changes and buyable flips.
What you can collect
Public product and location data: search results (id, url, title, brand, model, categories, rating); full product detail (title, manufacturer, price, list_price, buyable, membership_required, rating, rating_count); postal-code/state-specific availability (in-stock status, fulfilled_by, supplier and estimated delivery dates); product reviews (title, text, rating, author, recommended flag, submission date); category facets by keyword; and nearby warehouses by coordinates (name, address, distance). Public product-page data only — not member account, order, or payment information.
Limitations and common challenges
- Akamai bot management on the front end. Expect challenges on naive or high-volume automated requests to costco.com directly.
- Membership shapes the data, not just the checkout.
membership_requiredand the 5% non-member surcharge on most items mean the price you scrape can differ from what a member ultimately pays — treat listed price as a reference point, not a guaranteed member price. - Availability is location-bound.
availability/estimated_delivery_datevary by postal code and state — pull per location if you need coverage across markets. - No nationwide bulk export. There's no official feed of Costco's full catalog; build coverage by iterating search and category queries.
- Public data only. This is what a product page and its detail sub-pages already show publicly — not a way around a membership login or into account-level data.
Where this gets used
- Pricing intelligence — track
price/list_priceand reduced-price flags on bulk and appliance categories over time. - Assortment research — measure category counts and coverage by keyword.
- Local availability mapping — pair
availabilityby postal code with nearby-warehouse lookup to model regional stock.
Sources
Start collecting
Try it first, free: run any public URL through the Free Web Scraper, or check whether a site blocks bots with the Anti-Bot Checker — no signup.
Test the search, product, and availability endpoints in the Playground, check the schema in the API docs, and review pricing. For the same big-box retail pattern on a different chain, see how to scrape Target; for the same product-search-to-detail shape on a general marketplace, see how to scrape Amazon product data; for the closest general-merchandise competitor, see how to scrape Walmart; and for the grocery-delivery side of Costco's own catalog, see how to scrape Instacart. See also how to choose a web scraping API and is web scraping legal.
Part of our how-to-scrape guide series — every platform we cover, in one index.
Frequently asked questions
Does Costco have a public API for developers?
No. Costco has no self-serve public developer API — there is no official channel for a third-party developer to request programmatic access to product or pricing data.
Do I need a Costco membership to scrape Costco.com?
No — Costco.com is browsable without a membership, but some products are membership_required and non-members pay a 5% surcharge over member pricing on most other items.
Is it legal to scrape Costco product data?
Public product facts are not copyrightable and accessing public pages is not itself a CFAA violation under hiQ Labs v. LinkedIn, but Costco Terms and Conditions of Use restrict site usage and Costco.com runs Akamai bot management — scrape only public product-page data, respect rate limits, and never bypass a membership login.
Why does the same product show different availability?
Costco availability and delivery estimates are postal-code and state specific — the same product id returns different availability and estimated_delivery_date values depending on the location you query.
What Costco data can I collect with an API?
Product search results, full product detail (price, list_price, buyable, membership_required, rating), location-specific availability, product reviews, category facets, and nearby warehouses by coordinates.
Can I scrape Costco member-only pricing?
No — member-only pricing sits behind a membership login. Only scrape what a page shows publicly; never attempt to log in or bypass authentication through automation.
What blocks a DIY Costco scraper?
Costco.com runs Akamai bot management that challenges naive or high-volume automated requests, and there is no stable public JSON endpoint — a DIY scraper has to parse rendered page data that shifts over time.