Costco
Costco Category API
Products in one Costco category as JSON, with the same sort, filters and per-warehouse pricing as search: online price, rating and review count, member-only and stock flags, promotions and facets. Category slugs come from the Categories endpoint. Costs 1 credit per request.
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsoncategorystringrequiredCategory slug from the Categories endpoint, or a costco.com category URL.
Example: televisions
countryenum<string>default:uscostco.com (us) or costco.ca (ca).
Example: ca
us— costco.com, United States.ca— costco.ca, Canada.
warehouse_idstringCostco warehouse number from the Warehouses endpoint. Adds that warehouse's in-store price, stock status and price code to every result. Omit for online prices only. us and ca only.
Example: 1062
sort_byenum<string>default:best_matchResult order. Costco broadens matching under any sort other than best_match. newest is not available on uk, au, mx, jp, kr or tw.
Example: price_low
best_match— Costco's relevance ranking.price_low— Price, lowest first.price_high— Price, highest first.top_rated— Highest average rating first.newest— Newest items first (us and ca).
brandsarray<string>Only these brands, up to 20 names, e.g. ["Kirkland Signature"]. us and ca only.
Example: ["Kirkland Signature"]
min_pricenumberMinimum online price, inclusive, 0 or greater. us and ca only.
Example: 10
max_pricenumberMaximum online price, inclusive, 0 or greater. us and ca only.
Example: 50
min_ratingnumberMinimum average star rating, 1-5. us and ca only.
Example: 4
on_salebooleanOnly items with an active discount. us and ca only.
Example: true
in_stockbooleanHide out-of-stock items. us and ca only.
Example: true
in_warehousebooleanOnly items sold and in stock at warehouse_id. Requires warehouse_id.
Example: true
pageintegerdefault:1Results page, 1-based, 1-500.
Example: 2
page_sizeintegerdefault:24Results per page, 1-120 (up to 100 on uk, au, mx, jp, kr and tw).
Example: 48
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
results = client.costco.category("televisions", sort_by="price_low", page_size=5)
for item in results["data"]["results"]:
print(item["item_number"], item["title"], item["price"], item["member_only"])Response