Search products by name or brand

Searches products by name, optionally within one country.

Request

GEThttps://food-nutrition.p.apihiver.com/v1/search?q=nutella&limit=3
*
String. Product name, e.g. nutella.
String. e.g. india.
Number. Maximum number of results (1–50, default 20).
Language
Client
1curl --request GET \
2  --url 'https://food-nutrition.p.apihiver.com/v1/search?q=nutella&country=%7Bcountry%7D&limit=3' \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY'

Search products by name or brand: Food Nutrition API reference

Searches products by name, optionally within one country. This endpoint is part of the Food Nutrition API: Nutrition facts, ingredients, Nutri-Score and allergens for millions of packaged foods — by barcode or name.

Example response (200, application/json)

Success.

1{
2  "count": 3,
3  "query": "nutella",
4  "products": [
5    {
6      "name": "Nutella",
7      "brand": "Nutella, Ferrero",
8      "image": "https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.879.400.jpg",
9      "barcode": "3017620422003",
10      "quantity": "400 g e",
11      "nova_group": 4,
12      "nutri_score": "E",
13      "nutrition_per_100g": {
14        "fat_g": 30.9,
15        "salt_g": 0.107,
16        "fiber_g": 0,
17        "sodium_g": 0.0428,
18        "sugars_g": 56.3,
19        "protein_g": 6.3,
20        "energy_kcal": 539,
21        "carbohydrates_g": 57.5,
22        "saturated_fat_g": 10.6
23      }
24    },
25    {
26      "name": "Nutella",
27      "brand": "Nutella, FERRERO FRANCE COMMERCIALE",
28      "image": "https://images.openfoodfacts.org/images/products/301/762/042/5035/front_en.583.400.jpg",
29      "barcode": "3017620425035",
30      "quantity": "1 kg",
31      "nova_group": 4,
32      "nutri_score": "E",
33      "nutrition_per_100g": {
34        "fat_g": 30.9,
35        "salt_g": 0.107,
36        "sodium_g": 0.0428,
37        "sugars_g": 56.3,
38        "protein_g": 6.3,
39        "energy_kcal": 539,
40        "carbohydrates_g": 57.5,
41        "saturated_fat_g": 10.6
42      }
43    },
44    {
45      "name": "Nutella",
46      "brand": "Nutella, Ferrero",
47      "image": "https://images.openfoodfacts.org/images/products/301/762/042/9484/front_en.373.400.jpg",
48      "barcode": "3017620429484",
49      "quantity": "825 g",
50      "nova_group": 4,
51      "nutri_score": "E",
52      "nutrition_per_100g": {
53        "fat_g": 30.9,
54        "salt_g": 0.107,
55        "fiber_g": 3.4,
56        "sodium_g": 0.0428,
57        "sugars_g": 56.3,
58        "protein_g": 6.3,
59        "energy_kcal": 539,
60        "carbohydrates_g": 57.5,
61  …

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "q: Field required"
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.