Total Wine
Total Wine Search API
Search Total Wine & More at one store and get each product's price at that store, units in stock, purchase limit, aisle, size, brand, rating, review count, and whether in-store pickup, delivery and shipping are available. Prices are in cents (2999 = $29.99). store_id is required: find it with the Total Wine Store Locator. Costs 10 credits per request.
POST/api/v1/totalwine/search
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.
Example: titos
store_idstringrequiredTotal Wine store number from /api/v1/totalwine/stores. Prices and stock are per store.
Example: 503
pageintegerResults page, 1-based. 24 results per page.
Example: 1
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
# Store 503 = San Antonio (Del Norte), TX
results = client.totalwine.search("titos", store_id="503")
for p in results["data"]["products"]:
print(p["name"], p["size"], f"${p['price'] / 100:.2f}", f"{p['stock']} in stock", p["aisle"])Response
"query": "titos",
"store_id": "503",
"page": 1,
"total_results": 13,
"total_pages": 1,
"searched_all_stores": false,
"count": 13,
},
"response_time": 11108
}