Dollar General
Dollar General Deals API
Dollar General products on sale or on clearance, priced and stocked at one store, 24 per page, with price, original price, units on hand, rating, coupons and promotions. Clearance items carry the current price only, with no was-price. 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/jsonstore_idstringrequiredDollar General store number. Prices and unit counts are that store's. Find numbers with /api/v1/dollargeneral/stores.
Example: 12629
typestringrequiredon_sale (everything on sale) or clearance (the clearance event).
Example: on_sale
pageintegerResults page, 1-based. Defaults to 1. 24 results per page.
Example: 1
sortstringrecommended (default), price_low, price_high or rating.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
res = client.dollar_general.deals(store_id="12629", type="on_sale")["data"]
# The listing covers the whole chain: keep what this store has on hand
for p in res["products"]:
if p["available_quantity"] > 0:
print(p["upc"], p["title"], p["price"], "was", p["original_price"], "on hand:", p["available_quantity"])Response