Costco
Costco Product API
Full details for up to 20 Costco items in one call: description, features, specifications, variants, member-only flag and purchase limits, delivery fee, and promotions with start and end dates. 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/jsonitem_idstringOne Costco item number or product id, or a costco.com product URL. Send item_id or item_ids.
Example: 1492456
item_idsarray<string>Up to 20 item numbers, product ids or URLs in one call, for the same 1 credit. us and ca only; other countries take one item_id per call.
Example: ["100334960", "1492456"]
countryenum<string>default:usCostco site. us and ca support every parameter; uk, au, mx, jp, kr and tw support keyword, sort and paging only.
Example: uk
us— costco.com, United States.ca— costco.ca, Canada.uk— United Kingdom.au— Australia.mx— Mexico.jp— Japan.kr— South Korea.tw— Taiwan.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
products = client.costco.product(item_ids=["100334960", "1492456"])
for p in products["data"]["products"]:
print(p["item_number"], p["title"], p["price"], p["delivery_fee"])
for promo in p["promotions"]:
print(" ", promo["amount_off"], "off until", promo["end_date"])Response