iHerb
iHerb Product API
One iHerb product by id or URL (US store, prices in USD): name, brand, part number, UPC, price, list price, discount, price per serving, stock status, quantity limit, expiration date, first-available date, package size, weight and dimensions, rating and review count, breadcrumbs, best-seller rankings by category, badges, variants (size, potency, flavor) with their product ids, supplement facts, description, suggested use, ingredients, warnings and images. Costs 2 credits per request; a failed attempt is not charged.
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/jsonproduct_idstringiHerb product id: the number at the end of an iherb.com/pr/ URL, or a search result's product_id. A number is accepted too. Pass this or url.
Example: 70316
urlstringAn iherb.com product URL, as an alternative to product_id. Data is always the US store's, whatever the URL's country.
Example: https://www.iherb.com/pr/california-gold-nutrition-vitamin-d3-125-mcg-5-000-iu-90-fish-gelatin-softgels/70316
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
p = client.iherb.product(product_id="70316")["data"]
print(p["name"], p["price"], p["price_per_unit"]["text"], "UPC", p["upc"])
print("expires", p["expiration_date"], "| limit per order:", p["quantity_limit"])
for n in p["supplement_facts"]["nutrients"]:
print(n["name"], n["amount"], n["daily_value"])
for r in p["rankings"]:
print("#%d in %s" % (r["rank"], r["category"]))Response