Dick's Sporting Goods
Dick's Sporting Goods Store Availability API
Store unit counts for 1 to 20 Dick's Sporting Goods SKUs at up to 100 stores near a ZIP code or a point, nearest first, within 25 miles by default (up to 250). chain picks DICK'S stores (the default, including House of Sport and Going, Going, Gone!), Golf Galaxy or Public Lands. Each store has its id, chain, name, address, shopping center, phone, coordinates, distance, status and weekly hours, and per SKU the units the store can sell and the units on hand. Also returns totals per SKU and how many stores have stock. Take the SKUs from the product endpoint's variants. 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/jsonskusstring[]required1 to 20 SKU ids from the product endpoint's variants[].sku. An id Dick's does not know reads 0 at every store (the same as out of stock), so take them from product.
Example: ["25535758", "26810079"]
zipstringUS ZIP code to search around. One of zip or lat + lng is required.
Example: 60601
latnumberLatitude (with lng), instead of zip.
Example: 41.8859
lngnumberLongitude (with lat).
Example: -87.6248
radiusintegerSearch radius in miles, 1-250. Defaults to 25. Up to 100 stores are returned.
Example: 50
chainstringdicks (DICK'S Sporting Goods, including House of Sport and Going, Going, Gone! stores; default), golf_galaxy or public_lands.
Example: golf_galaxy
in_stock_onlybooleanOnly the stores that have at least one of the SKUs.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
# 1. A product's variants carry the sku of each color and size (allow 180 s).
p = client.dicks.product(product_id="23FHQMCLFTN9GTXBLMNS")["data"]
skus = [v["sku"] for v in p["variants"] if v["is_clearance"]]
# 2. Units for every clearance size at the stores near a ZIP, 20 SKUs per call.
res = client.dicks.store_availability(skus=skus[:20], zip="60601", in_stock_only=True)["data"]
print(res["stores_with_stock"], "stores with stock")
for s in res["stores"]:
print(s["name"], s["city"], s["distance_miles"], [(k["sku"], k["units"]) for k in s["skus"] if k["units"]])Response