GET search by name, brand, producer
/products/search
This endpoint allows apps and delivery services to search for products by name, brand, and producer.
Parameter | Type | Description |
---|---|---|
q | string | The search query. |
brand | string | The brand of the product. |
producer | string | The producer of the product. |
subcategories | Array | An 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".
Field | Parameter | Description |
---|---|---|
product_id | string | Unique ID of the product. |
product_name | string | The name of the product. |
producer | string | The producer of the product. |
brand | string | The brand of the product. |
producer_address | string | The address of the producer. |
producer_state | string | The state of the producer. |
producer_city | string | The city of the producer. |
producer_country_code | string | The country code of the producer. |
producer_postal_code | string | The postal code of the producer. |
upc | string | The UPC code of the product. |
grocery | object | The corresponding grocery of the product. Each object has the following fields: grocery_id, category, subcategory |
stores | array of objects | The 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 |
weight | object | The weight of the product. Each object has the following fields: value, unit |
size | object | The size of the product. Each object has the following fields: lenght, width, heigth, unit |
macronutrients | object | The macronutrients of the product. Each object has the following fields: fat, saturated_fat, calories, carbs, proteins, total_sugars |
micronutrients | object | The micronutrients of the product. Each object has the following fields: vitamin_d, vitamin_a, calcium, iron, potassium |
Error codes
Field | Description |
---|---|
400 | Invalid search query. |
404 | Product not found. |