Product API
Endpoints
GET Search by name, brand, producer

GET search by name, brand, producer

/products/search

This endpoint allows apps and delivery services to search for products by name, brand, and producer.

ParameterTypeDescription
qstringThe search query.
brandstringThe brand of the product.
producerstringThe producer of the product.
subcategoriesArrayAn array of grocery subcategories

Example Usage:

GET api.foodin.ai/products/search?q=milk&brand=Kroger&producer=Kroger

This request will return all products that contain the word "milk", have a brand of "Kroger" and a producer of "Kroger".

FieldParameterDescription
product_idstringUnique ID of the product.
product_namestringThe name of the product.
producerstringThe producer of the product.
brandstringThe brand of the product.
producer_addressstringThe address of the producer.
producer_statestringThe state of the producer.
producer_citystringThe city of the producer.
producer_country_codestringThe country code of the producer.
producer_postal_codestringThe postal code of the producer.
upcstringThe UPC code of the product.
groceryobjectThe corresponding grocery of the product. Each object has the following fields: grocery_id, category, subcategory
storesarray of objectsThe array of stores that carry the product. Each object has the following fields: store_id, store_name, price, sale_price, categories, subcategories, currency, stock, sku
weightobjectThe weight of the product. Each object has the following fields: value, unit
sizeobjectThe size of the product. Each object has the following fields: lenght, width, heigth, unit
macronutrientsobjectThe macronutrients of the product. Each object has the following fields: fat, saturated_fat, calories, carbs, proteins, total_sugars
micronutrientsobjectThe micronutrients of the product. Each object has the following fields: vitamin_d, vitamin_a, calcium, iron, potassium

Error codes

FieldDescription
400Invalid search query.
404Product not found.