Macy's
Macy's Search API
Search macys.com (US) by keyword: 60 organic items per page, sorted featured, by price, top rated, best sellers or newest, and filtered by brand, color, special offer (Clearance, Last Act, Black Friday Deal, Today Only...), any price range, store pickup at one store, or any other facet. Each item has id, title, brand, URL, image, current, regular and sale price, percent off, price label, on-sale flag, sale end date, deal label, promotions, rating, review count, colors and a sponsored flag. Also returns total, total_pages, the facets with a count per value and the filters Macy's applied. A keyword Macy's maps to a category comes back as redirected_to_category. 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/jsonquerystringrequiredSearch keywords, 1-200 characters.
Example: jeans
pageintegerResults page, 1-based, up to 1000. Defaults to 1. 60 organic items per page.
Example: 1
sortstringfeatured (default), price_low_to_high, price_high_to_low, top_rated, best_sellers or newest. The total can differ between sorts, as it does on macys.com.
brandstring | string[]Only these brands, spelled as the BRAND facet lists them (Levi's, Calvin Klein). A list of up to 20 matches any of them.
Example: Levi's
colorstring | string[]Only these colors, as the COLOR_NORMAL facet lists them (Black, Blue, Red...). A list matches any of them.
Example: Blue
special_offerstring | string[]Only items with this offer: limited_time_special, gift_with_purchase, black_friday_deal, clearance, last_act, our_lowest_price, sales_and_discounts, special_offer or today_only. A list matches any of them.
Example: clearance
min_pricenumberLowest price in US dollars. Any bound works, not only the site's price buckets; an item sold at a price range matches when its range overlaps.
Example: 50
max_pricenumberHighest price in US dollars. Either bound can be sent alone.
Example: 100
pickup_store_idintegerOnly items available for pickup at this store: a store_id from /api/v1/macys/stores (4592 is State Street, Chicago).
Example: 4592
filtersobjectAny other facet from a previous response's facets list: its name to one value or a list, up to 10 facets and 20 values each, e.g. {"GENDER": "Women", "CUSTRATINGS": "4 stars & up"}.
Example: {"GENDER": "Women"}
include_sponsoredbooleanKeep the ad-only sponsored tiles, flagged is_sponsored. Defaults to false: they are dropped and counted in sponsored_dropped. Organic items that also hold a paid slot are always kept, flagged is_sponsored.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
res = client.macys.search(query="jeans", sort="price_low_to_high", special_offer="clearance")["data"]
print(res["total"], "items over", res["total_pages"], "pages")
for item in res["items"]:
print(item["id"], item["brand"], item["title"], item["price"], item["regular_price"], item["percent_off"], item["deal_label"])Response