Petco
Petco Category API
Every product in a Petco category, such as dog/dog-food/dry-dog-food, 48 per page: price, list price and Repeat Delivery (autoship) price, rating, review count, brand, part_number, cat_entry_id, fulfillment flags, deal groups and every variation with its own prices, plus total_results and facets with counts. Deal groups work as categories too. Prices are national. 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/jsonpathstringrequiredA petco.com category: its path (dog/dog-food/dry-dog-food), /category/<path>, or the full URL. A search result's categories[].url, or a deal_group_ids value, works too.
Example: dog/dog-food/dry-dog-food
pageintegerResults page, 1-based, up to 100. Defaults to 1. 48 products per page.
Example: 2
sortstringrelevance (default), price, rating, top_sold, newest or name.
sort_orderstringasc or desc. Defaults to asc for price and name, desc for everything else.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
res = client.petco.category(path="dog/dog-food/dry-dog-food", sort="price")["data"]
print(res["total_results"], "products in", res["group_id"])
for p in res["products"]:
print(p["part_number"], p["name"], p["price"], "was", p["list_price"])Response