Nana

v3.0.2
app.eezly/nana Checked 2 days ago Published 2 days ago

Real shelf prices, deals and grocery carts at major chains in the US, Canada, the UK and France.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

add_items Add to cart

Adds products to the household's cart. `items` is a list (even for one product), one entry per product. `item` is the product words only ("eggs", never "12 eggs"); `quantity` is the one place a count or amount goes: {"value": an integer, "unit": one of count, dozen, kg, g, lb, l, ml, pack, pint, quart, gallon, fl oz}, left out for one. `value`: At most 99; at most 9999 in fl oz, g, ml. A size goes in the unit its pack states (4 pint, 1 gallon, 2 l). Purpose words ("for 3 dinners") go in `purpose`, foods to avoid in `excluding`. `item_id` (optional) is the `catalog_item_id` a market tool return…

ParameterTypeDescription
idempotency_key *stringThe caller's key for this one change (8-128 letters, digits, '.', '_', ':' or '-'); each change has its own key. A resend under the SAME key with the SAME arguments, byte for byte, writes nothing twic…
items *array
expected_cart_versionintegerThe cart_version of the latest result read. When given, the call is refused (stale_expected_version) if the cart has changed since.

remove_items Remove from cart

Removes lines from the household's cart; each item names a line of the cart. One call removes every line it names and answers each removed line and the new `cart_version`. When a name matches several lines, nothing is removed and that name is answered with its `candidates`; a name no line matches is answered on its own and the other lines are removed.

ParameterTypeDescription
idempotency_key *stringThe caller's key for this one change (8-128 letters, digits, '.', '_', ':' or '-'); each change has its own key. A resend under the SAME key with the SAME arguments, byte for byte, writes nothing twic…
items *array
expected_cart_versionintegerThe cart_version of the latest result read. When given, the call is refused (stale_expected_version) if the cart has changed since.

replace_item Swap a cart item

Replaces one cart line with another product ("not the liquid eggs, real eggs in a carton"): `from_item` names the line, `to_item` the product wanted instead.

ParameterTypeDescription
from_item *string
idempotency_key *stringThe caller's key for this one change (8-128 letters, digits, '.', '_', ':' or '-'); each change has its own key. A resend under the SAME key with the SAME arguments, byte for byte, writes nothing twic…
to_item *object
expected_cart_versionintegerThe cart_version of the latest result read. When given, the call is refused (stale_expected_version) if the cart has changed since.

edit_quantity Change a quantity

Changes the quantity of one cart line: mode absolute sets it ("make it 3" is value 3), mode relative adds to it ("2 more" is value 2).

ParameterTypeDescription
idempotency_key *stringThe caller's key for this one change (8-128 letters, digits, '.', '_', ':' or '-'); each change has its own key. A resend under the SAME key with the SAME arguments, byte for byte, writes nothing twic…
item *string
mode *string
value *integer
expected_cart_versionintegerThe cart_version of the latest result read. When given, the call is refused (stale_expected_version) if the cart has changed since.

ask_total Cart total

The cost of the household's cart (scope cart) or of the last meal plan it made (scope last_plan; this connector creates no meal plan). Never writes the cart.

ParameterTypeDescription
scope *string
expected_cart_versionintegerThe cart_version of the latest result read. When given, the call is refused (stale_expected_version) if the cart has changed since.

my_savings My savings

How much less the household's list costs at its cheapest saved store than at its other saved stores, with each store's total ("how much am I saving?"). Never writes the cart.

ParameterTypeDescription
expected_cart_versionintegerThe cart_version of the latest result read. When given, the call is refused (stale_expected_version) if the cart has changed since.

compare_stores Compare stores

Compares what the cart (or the last meal plan made) costs at each store: the household's saved stores, or the ones in `banners`. `split_stores` splits the list between that many stores ("what do I buy where?" is 2); `product` compares one product ("are the eggs cheaper at Maxi or IGA?") at each of those stores instead of the cart: with `product`, `split_stores` is not read; `scope` `plan` compares the plan and does not read `product`.

ParameterTypeDescription
banners *array
product *
scope *string
split_stores *
expected_cart_versionintegerThe cart_version of the latest result read. When given, the call is refused (stale_expected_version) if the cart has changed since.

store_info Store details

A store's nearest location, hours or address (`banner` names the store), or which stores the household saved (question saved). Never changes the saved stores.

ParameterTypeDescription
banner *
question *string

product_lookup Find a product

Finds a product and its price ("do they have X?", "how much is X?", "is X available at IGA?"): the best matches with price and image. `about_offer` is the number of a product an earlier answer showed, and `seek` cheaper asks for one costing less ("a cheaper one"). Never writes the cart.

ParameterTypeDescription
about_offer *
banner *
max_results *integer
query *string
seek *string
expected_cart_versionintegerThe cart_version of the latest result read. When given, the call is refused (stale_expected_version) if the cart has changed since.

allergen_question Product label facts

The label facts the catalog holds for a product, for an allergy or diet question. Every restriction asked about is filed: the first in `allergen`, the rest in `other_allergens`. Each entry of `products` names the product read (`item_id`, `name`, `brand`, `size`, `store`) and how it was matched: `item_id` or `exact_name` is that product; `candidate` is only the closest catalog product and carries no label facts. `label_facts` lists its ingredient text and dietary tags, each with its `source`, whether it was `verified` and `as_of`; `not_held` lists what Nana does not hold. Nana gives no safety v…

ParameterTypeDescription
allergen *string
other_allergens *arrayEvery other restriction or allergen the same question asks about, beyond allergen ("peanuts or sesame?" files allergen peanut_free and other_allergens [sesame]); empty when it asks about one.
product *string

set_location Set my location

Saves where the household shops: its `country` and its `postal_code` (postal code in Canada, ZIP code in the US, postcode in the UK, code postal in France), or a `city`. Every price, deal, cart total and store comparison is read near this location. The answer lists the stores near it; the household's stores are saved separately. A new location clears the saved stores (and, in another country, the cart).

ParameterTypeDescription
country *stringThe country the household shops in; it decides which word and format `postal_code` takes.
citystringThe household's city, used only when no postal_code is given. A city in several regions is answered ambiguous_location with candidates; a city given as "<city>, <region>" names one of them.
postal_codestringThe household's code in that country's format (CA: postal code; FR: postal code; GB: postcode; US: zip code).

choose_stores Choose my stores

Without `store_ids`: the stores near the household's saved location whose banner has prices there, each with its `store_id` and whether it is saved; banners near it with no prices yet are listed in `banners_not_available`, never as stores. With `store_ids`: saves exactly those stores as the household's stores, and prices, deals, totals and comparisons are read at them. Requires a saved location.

ParameterTypeDescription
store_idsarrayThe stores the household shops at, by the store_id this tool listed. Absent, the answer lists the stores near the household's location (and which are saved).

market_regions Markets and banners

Read-only market data. Answers what is covered and how: each served market's country, currency, whether its shelf prices include sales tax or VAT, and region kind; per region, the grocery banners published there (at the published store floor), split into those the price tools quote at a current median and those with last week's prices only, and the banners withheld with their reason; the regions with last week's prices only; the regions of the market with none; the registered markets this server does not serve; where the prices come from; and how fresh a quoted price is. It answers per market…

market_prices Regional grocery prices

Read-only market data. For each term, ONE product per banner of one region of one market: that banner's best-value product for the term, the same pick Nana makes for a household there (a brand or size only when the term names one), priced at the banner's median times the packs that meet the term, with the lowest and highest. A term that names no size lists its products best value first: per kg, L or unit (rate_minor, rate_per; value_by_rate), a product no rate compares after them; a named size, cheapest first. Prices are banner medians confirmed within the last 8 days, each with its banner and…

ParameterTypeDescription
country *stringISO 3166-1 country code of the market.
terms *arrayGeneric grocery words, e.g. "milk", "eggs", "ground beef". Each is searched in the market's catalog.
alcoholbooleanTrue only when the person explicitly asked for an alcoholic drink (beer, wine, spirits, hard seltzer); false or omitted otherwise, and never inferred.
citystringA city name, used when no postal_code is given. A city resolves only when it names ONE place the country's store directory knows; otherwise the answer is location_unresolved and a postal_code is neede…
languagestringProduct-name language (French names where the catalog has them; English otherwise).
limitintegerMost products listed per term, cheapest first (default 25).
offsetintegerPaging (default 0): an answer over 48 KB comes in pages (paged true); the next page is this request with offset = next_offset and page_token = the page's page_token; next_offset null: last page.
page_tokenstringPaging: the page_token of the page before, sent with offset only when that page carried one. A next page without it, more than 5 minutes after the first page, or whose answer changed is refused page_e…
postal_codestringA postal code of the country, in that market's own format (CA: its postal code; FR: its postal code; GB: its postcode; US: its zip code); a partial code only where the market's format has one. Used fo…
regionstringThe region code in that country's market: CA: a province code (e.g. AB, BC); FR: an ISO 3166-2 region code (e.g. FR-20R, FR-ARA); GB: an ITL1 region code (e.g. TLC, TLD); US: a state code (e.g. AK, AL…
store_idsarrayWith a location, the answer covers these stores only, by store id: only the nearest store of each chain to that SAME location is accepted; other ids are ignored, and the call is refused when none of t…

market_compare_regions Compare regions

Read-only market data. Compares 2-4 regions of ONE market on the same catalog items: per term, each region's lowest banner median for every item priced in all of them (naming that banner), the percentage difference from the first region's (naming its banner), and a basket of each term's first common item with the banner of every line. A term with no item priced in every region compares each region's best-value pick, a SIMILAR product and not the same one, by unit price (basis unit_price: per kg, L or unit, never a kg against a L); when it cannot, the term is not compared and says why (not_comp…

ParameterTypeDescription
country *stringISO 3166-1 country code of the market.
regions *array
terms *arrayGeneric grocery words, e.g. "milk", "eggs", "ground beef". Each is searched in the market's catalog.
alcoholbooleanTrue only when the person explicitly asked for an alcoholic drink (beer, wine, spirits, hard seltzer); false or omitted otherwise, and never inferred.
languagestringProduct-name language (French names where the catalog has them; English otherwise).
offsetintegerPaging (default 0): an answer over 48 KB comes in pages (paged true); the next page is this request with offset = next_offset and page_token = the page's page_token; next_offset null: last page.
page_tokenstringPaging: the page_token of the page before, sent with offset only when that page carried one. A next page without it, more than 5 minutes after the first page, or whose answer changed is refused page_e…

market_staple_prices Staple basket prices

Read-only market data. The reviewed staple basket in one region: per staple, each banner's best-value product for the staple at its stated size (the same pick Nana makes for a household at that banner), priced at the banner's region-wide median times the packs that meet the size (a pick billing less than the size, sized in another unit, or with no size is not counted); the median of those banner figures when 3+ banners (each with 5+ stores) have one, the lowest and highest, and each banner's product. Medians confirmed within 8 days; a banner priced only up to 14 days ago is listed apart under…

ParameterTypeDescription
country *stringISO 3166-1 country code of the market.
region *stringThe region code in that country's market: CA: a province code (e.g. AB, BC); FR: an ISO 3166-2 region code (e.g. FR-20R, FR-ARA); GB: an ITL1 region code (e.g. TLC, TLD); US: a state code (e.g. AK, AL…
languagestring
offsetintegerPaging (default 0): an answer over 48 KB comes in pages (paged true); the next page is this request with offset = next_offset and page_token = the page's page_token; next_offset null: last page.
page_tokenstringPaging: the page_token of the page before, sent with offset only when that page carried one. A next page without it, more than 5 minutes after the first page, or whose answer changed is refused page_e…
staplesarrayStaple keys; absent is the whole basket.

market_coverage Store coverage

Read-only market data. Per region of one market: the banners published (each with 5+ live stores), the banners withheld with their reason, and the live store count. Without a region, also each chain of the market once (chains: banner_id, the registry name, stores_enabled summed over the regions, published or withheld) and the market's totals. store_count counts the banner's stores Nana's catalog reads in the region, not every store the chain operates. too_few_stores: fewer than 5 such stores, too few for a regional median; at a location the banner's nearest store is still priced. no_fresh_pric…

ParameterTypeDescription
country *stringISO 3166-1 country code of the market.
regionstringThe region code in that country's market: CA: a province code (e.g. AB, BC); FR: an ISO 3166-2 region code (e.g. FR-20R, FR-ARA); GB: an ITL1 region code (e.g. TLC, TLD); US: a state code (e.g. AK, AL…

market_deals Regional deals

Read-only market data. The latest published deals in one region of one market, per banner: item, brand, size, sale price and regular price, groceries first and then by discount (the household deals card's order), each banner's page dated by its confirmed_at, the day its flyer was read. A page answers for up to 8 days after confirmed_at, so one confirmed 7 days or more before read_at may be last week's flyer, not this week's; its confirmed_at is its date. The same deals a household sees for that banner and region, alcohol screened out: each deal carries alcohol, the catalog's own verdict (categ…

ParameterTypeDescription
country *stringISO 3166-1 country code of the market.
bannerstringOne banner key published in the region; every published banner of the region when absent.
citystringA city name, used when no postal_code is given. A city resolves only when it names ONE place the country's store directory knows; otherwise the answer is location_unresolved and a postal_code is neede…
languagestringProduct-name language (French names where the catalog has them; English otherwise).
limitintegerDeals per banner, in the page's order (default 20).
postal_codestringA postal code of the country, in that market's own format (CA: its postal code; FR: its postal code; GB: its postcode; US: its zip code); a partial code only where the market's format has one. Used fo…
regionstringThe region code in that country's market: CA: a province code (e.g. AB, BC); FR: an ISO 3166-2 region code (e.g. FR-20R, FR-ARA); GB: an ITL1 region code (e.g. TLC, TLD); US: a state code (e.g. AK, AL…
store_idsarrayWith a location, the answer covers these stores only, by store id: only the nearest store of each chain to that SAME location is accepted; other ids are ignored, and the call is refused when none of t…

market_stores Stores by banner

Read-only market data. The live stores of one region per published banner: the banner name, its store count and opaque store ids. For a region, stores are named by banner only; at a location, stores lists each store once with its store name, street and city. Takes EITHER region OR a location (postal_code, or city). With a location the answer is for the nearest store of each banner there (each store it names carries its banner, store id, store name, street and city; never a distance or coordinates), exactly as Nana answers a household at that code. Every figure is dated by the answer's as_of da…

ParameterTypeDescription
country *stringISO 3166-1 country code of the market.
citystringA city name, used when no postal_code is given. A city resolves only when it names ONE place the country's store directory knows; otherwise the answer is location_unresolved and a postal_code is neede…
postal_codestringA postal code of the country, in that market's own format (CA: its postal code; FR: its postal code; GB: its postcode; US: its zip code); a partial code only where the market's format has one. Used fo…
regionstringThe region code in that country's market: CA: a province code (e.g. AB, BC); FR: an ISO 3166-2 region code (e.g. FR-20R, FR-ARA); GB: an ITL1 region code (e.g. TLC, TLD); US: a state code (e.g. AK, AL…
store_idsarrayWith a location, the answer covers these stores only, by store id: only the nearest store of each chain to that SAME location is accepted; other ids are ignored, and the call is refused when none of t…

market_basket Shopping list by store

Read-only market data. A shopping list billed at the stores of ONE location (postal_code, or city): per item, each store's best-value product in the packs that meet the quantity, with its price and price_basis (a median line carries the confirmed_at of its median, a shelf line and a last_week line the confirmed_at their price was observed (last_week: not as_of)); per store, the list's total there and whether it priced every item; and the cheapest store that priced the whole list, with its total. The same picks, prices and bill Nana gives a household at that code; a last-week price is shown lab…

ParameterTypeDescription
country *stringISO 3166-1 country code of the market.
items *arrayThe shopping list: each item once, with its quantity.
alcoholbooleanTrue only when the person explicitly asked for an alcoholic drink (beer, wine, spirits, hard seltzer); false or omitted otherwise, and never inferred.
citystringA city name, used when no postal_code is given. A city resolves only when it names ONE place the country's store directory knows; otherwise the answer is location_unresolved and a postal_code is neede…
languagestringProduct-name language (French names where the catalog has them; English otherwise).
offsetintegerPaging (default 0): an answer over 48 KB comes in pages (paged true); the next page is this request with offset = next_offset and page_token = the page's page_token; next_offset null: last page.
page_tokenstringPaging: the page_token of the page before, sent with offset only when that page carried one. A next page without it, more than 5 minutes after the first page, or whose answer changed is refused page_e…
postal_codestringA postal code of the country, in that market's own format (CA: its postal code; FR: its postal code; GB: its postcode; US: its zip code); a partial code only where the market's format has one. Used fo…
store_idsarrayWith a location, the answer covers these stores only, by store id: only the nearest store of each chain to that SAME location is accepted; other ids are ignored, and the call is refused when none of t…