JCPenney
JCPenney Clearance, Sale & Deals API
JCPenney deal listings across all products or one department: Clearance (default), Sale, Black Friday deals, Big Buy, Limited Time Special, Best Value, Gotta Have It, Closeout, Buy 1 Get 1, or any Deals & Promotions label verbatim. 48 products per page, up to 25 pages, with the search sorts and filters (brand, color, size, price range and any facet). Each item has id, title, brand, URL, SKU id, current and regular price ranges, price type, percent off, deal label, the price after today's coupon with its code, rating and review count. 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/jsontypestringclearance (default), sale, black_friday, big_buy, limited_time_special, best_value, gotta_have_it, closeout or bogo (every Buy 1 Get 1 offer). Seasonal labels (black_friday) list nothing once the event ends.
Example: clearance
labelstringAny Deals & Promotions label verbatim from a previous response's facets (s1_deals_and_promotions), instead of type.
Example: BUY 1 GET 1 50% OFF
departmentstringLimit the deal to one department or category id (dept... / cat..., from breadcrumbs or a category URL).
Example: dept20000011
brandstring | string[]Only this brand (or any of several), as the Brand facet lists it.
Example: st. john's bay
pageintegerResults page, 1-based, 1-25. Defaults to 1. 48 products per page.
Example: 2
sortstringrelevance (default), new_arrivals, best_sellers, rating, price_low_to_high or price_high_to_low. The price orders are JCPenney's own and loose.
colorstring | string[]Only this color (or any of several), as the Color facet lists it.
Example: black
sizestring | string[]Only this size (or any of several), as the Size facet lists it.
Example: m
price_rangestring | string[]A Price Range facet value ("under $5", "$20 - $24"...).
Example: $10 - $14
filtersobjectAny facet from a previous response: {facets[].id: a value or a list of values}, e.g. {"gender": "women"}. Several facets combine (AND).
Example: {"gender": "women"}
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
# JCPenney clearance. Run it daily and keep your own history:
# the API returns today's price only.
res = client.jcpenney.deals(type="clearance")["data"]
print(res["total"], "clearance items")
for item in sorted(res["items"], key=lambda i: i["percent_off"] or 0, reverse=True):
print(item["id"], item["title"], item["regular_price"], item["price"], item["percent_off"], item["coupon_price"], item["coupon_code"])Response