Costco
Costco Clearance Finder API
Scan a query or category at one Costco warehouse and get the items whose in-warehouse price carries a markdown code: .97 clearance and .00/.88 manager markdown by default, .49/.79/.89 special buy on request. 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/jsonwarehouse_idstringrequiredThe warehouse whose shelf prices are checked, from the Warehouses endpoint.
Example: 1062
querystringKeywords to scan, 1-200 characters. Send query or category.
Example: snacks
categorystringCategory slug to scan instead of a query.
Example: televisions
pagesintegerdefault:3Result pages of 120 products to scan, 1-5.
Example: 5
price_codesarray<enum>default:["clearance", "manager_markdown"]Which markdown codes to keep: clearance (.97), manager_markdown (.00 and .88), special_buy (.49, .79 and .89). special_buy endings are common on regular grocery prices, so it is off by default.
Example: ["clearance"]
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")
found = client.costco.clearance(warehouse_id="1062", query="snacks", pages=2)
print(found["data"]["products_scanned"], "scanned,", found["data"]["count"], "marked down")
for item in found["data"]["results"]:
w = item["warehouse"]
print(item["item_number"], item["title"], item["price"], "->", w["price"], w["price_code"]["meaning"])Response