HEMA
HEMA Suggestions API
HEMA's search suggestions for a partial query on one webshop: suggested phrases, matching categories with their product counts and the path /api/v1/hema/category takes, up to 5 products with their price, the corrected search terms and content pages, plus the number of results the full search would return. 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/jsonquerystringrequiredWhat the shopper has typed so far, 1-100 characters (kerst, sok, bougie, Socken).
Example: kerst
countrystringdefault:nlThe HEMA market, as a lowercase country code. This endpoint serves the four webshops: nl (nl-nl), be (nl-be, or fr-be with language fr), fr (fr-fr) and de (de-de). lu and at have no webshop and answer 400, not charged. Prices are in EUR everywhere. Any other country answers 400, not charged.
Example: nl
nl— Netherlands, nl (Dutch) (nl-nl, www.hema.nl), 570 stores. The default.be— Belgium, nl (Dutch) or fr (French); default nl (nl-be, www.hema.com/nl-be; fr-be, www.hema.com/fr-be), 111 stores.fr— France, fr (French) (fr-fr, www.hema.com/fr-fr), 69 stores.de— Germany, de (German) (de-de, www.hema.com/de-de), 17 stores.
languagestringBelgium only: nl (default, nl-be) or fr (fr-be). The other countries have one language: leave language out (sending another answers 400, not charged). Names, labels and facet values come back in it; prices are the same on both Belgian webshops.
Example: fr
Notes
Store. HEMA, the Dutch variety store (hema.nl / hema.com), on its four webshops: country picks the market (default nl, www.hema.nl; be, fr and de on www.hema.com) and, in Belgium, language the webshop (nl-be or fr-be). Names, labels, promotion texts, category names and facet values come back in that webshop's language, as HEMA writes them (Dutch by default); field names are English. Prices are numbers in EUR on every market. An article number (sku) is the same in every market; HEMA sets the price per market. Luxembourg (lu) and Austria (at) have HEMA stores but no webshop: only stores, store and store-stock serve them. Every webshop answer echoes country, language, market (e.g. nl-nl) and currency. Not the HEMA monomer or Hema Pharmaceuticals. Cost: 1 credit.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key", timeout=210)
d = client.hema.suggestions(query="kerst", country="nl")["data"]
print(d["total_results"], d["phrases"])
for c in d["categories"]:
print(c["name"], c["product_count"], c["category"])Response