Costco
Costco Warehouse Prices API
Online price versus in-warehouse price for up to 20 Costco items across up to 10 warehouses: each location's price, discount, final price, promotion dates, order and member limits, and price code. Costs 1 credit for up to 9 warehouses and 2 credits for 10.
POST/api/v1/costco/prices
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 items in one call.
Example: ["1492456", "692731"]
warehouse_idsarray<string>requiredWarehouses to price, up to 10, from the Warehouses endpoint. The online price is always included.
Example: ["1062", "1107"]
countryenum<string>default:uscostco.com (us) or costco.ca (ca).
Example: ca
us— costco.com, United States.ca— costco.ca, Canada.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
prices = client.costco.prices(item_id="1492456", warehouse_ids=["1062", "1107"])
for item in prices["data"]["items"]:
print("online", item["online"]["final_price"])
for w in item["warehouses"]:
code = w["price_code"] or {}
print(w["warehouse_id"], w["final_price"], code.get("meaning"))Response
"country": "us",
"count": 1,
},
"response_time": 1405
}