Instacart
Instacart Suggestions API
Instacart's search suggestions for a partial query (instacart.com, the US and Canada grocery delivery and pickup marketplace), for one store or across every store serving a ZIP: search terms, collections and retailers. Costs 1 credit.
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/jsonquerystringrequired1-100 characters: what the shopper has typed so far (eg, chi).
Example: eg
zipstringrequiredThe delivery location: a US ZIP (10001) or, with country ca, a Canadian postal code (M5V 2T6 or M5V2T6). Stores, prices and availability are for this location. A ZIP where Instacart has no service area answers 200 with an empty list and a note; a ZIP Instacart does not recognise is a charged 404.
Example: 10001
retailerstringA retailer slug or id from retailers: that store's suggestions. Without it, suggestions across every store serving the ZIP.
Example: jewel-osco
countrystringdefault:usThe Instacart site, as a lowercase code: us (www.instacart.com, USD), ca (www.instacart.ca, CAD). Any other value answers 400, not charged.
Example: us
us— United States, www.instacart.com, prices in USD. 1 credit per call. The default.ca— Canada, www.instacart.ca, prices in CAD. 1 credit per call.
languagestringdefault:enen only. Instacart Canada answers French prefixes with no suggestions, so language fr answers 400, not charged.
Example: en
Notes
Store. Instacart (instacart.com, the US and Canada grocery delivery and pickup marketplace; instacart.ca for Canada): country picks the site (default us). Instacart says it partners with more than 2,200 retail banners representing nearly 100,000 stores; which of them serve a request depends on the ZIP or postal code you send. Field names are English; names, sizes and price text come as Instacart shows them (French in Canada with language fr). Prices are numbers in the site's currency (USD on us, CAD on ca), never converted. Every answer echoes country, language, currency, zip and place (Instacart's name for the location). Instacart's search suggestions for what a shopper has typed so far: search terms, collections (Dairy & Eggs) and, across every store, retailers. With retailer, the suggestions of that store (scope retailer); without it, the suggestions across every store serving the ZIP (scope all_retailers). English prefixes: Instacart Canada answers French prefixes with no suggestions, so language fr is a 400, not charged.
| country | Site, currency | language | This endpoint |
|---|---|---|---|
us (default) | United States, www.instacart.com, USD | en | 1 credit |
ca | Canada, www.instacart.ca, CAD | en | 1 credit (English) |
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key", timeout=120)
d = client.instacart.suggestions(query="eg", retailer="jewel-osco", zip="60540")["data"]
print([(s["type"], s["text"]) for s in d["suggestions"]])Response