# Open Food Facts API: Search packaged foods

> Searches Open Food Facts packaged foods by name, optionally filtered by diet, country where sold and brand, ordered by popularity (most scanned first).

Unofficial. Not affiliated with or endorsed by Open Food Facts.

- Page: https://fous.com/methods/openfoodfacts.org/search-products
- Method: `openfoodfacts.org/search_products`, version 1
- Website: openfoodfacts.org
- Returns: product name, brand, quantity, Nutri-Score, processing level, energy, sugars, fat, salt per 100 g, photo, product link, barcode
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `diet` | string | no | `"vegan"` | Diet filter, for example vegan. Default: any. One of "any", "vegan", "vegetarian", "gluten_free", "palm_oil_free". Default "any". |
| `page` | integer | no |  | Results page number, for example 2. Default: 1. Default 1. |
| `brand` | string | no |  | Brand to match, for example Nature Valley. Default: any. Default "any". |
| `query` | string | yes | `"granola"` | Words to search for, for example granola or oat milk. |
| `country` | string | no | `"United States"` | Country where the food is sold, for example United States or US. Default: any. Default "any". |
| `max_results` | integer | no | `5` | Products per page, for example 20; maximum 100. Default 20. |

## Output

From a run on Oct 31, 2026, shortened. Its input:

```json
{
  "diet": "vegan",
  "query": "granola",
  "country": "United States",
  "max_results": 5
}
```

Its output:

```json
{
  "products": [
    {
      "brand": "Kirkland Signature",
      "barcode": "0096619194261",
      "quantity": "35.3 oz (1 kg)",
      "photo_link": "https://images.openfoodfacts.org/images/products/009/661/919/4261/front_en.199.400.jpg",
      "product_link": "https://world.openfoodfacts.org/product/0096619194261",
      "product_name": "Ancient Grains Probiotic Granola",
      "fat_g_per_100g": 16.3636363636364,
      "salt_g_per_100g": 1.09090909090909,
      "processing_level": "Ultra-processed foods",
      "nutri_score_grade": "D",
      "sugars_g_per_100g": 16.3636363636364,
      "energy_kcal_per_100g": 454.545454545455
    },
    {
      "brand": "Nature's Path Organic",
      "barcode": "0058449770565",
      "quantity": "35.3 oz (2 lb 3.3 oz) 1 kg",
      "photo_link": "https://images.openfoodfacts.org/images/products/005/844/977/0565/front_en.111.400.jpg",
      "product_link": "https://world.openfoodfacts.org/product/0058449770565",
      "product_name": "Pumpkin Seed + Flax Granola",
      "fat_g_per_100g": 18.1818181818182,
      "salt_g_per_100g": 0.204545454545455,
      "processing_level": "Processed foods",
      "nutri_score_grade": "C",
      "sugars_g_per_100g": 18.1818181818182,
      "energy_kcal_per_100g": 472.727272727273
    },
    {
      "brand": "purely elizabeth.",
      "barcode": "0855140002175",
      "quantity": "12 oz (340 g)",
      "photo_link": "https://images.openfoodfacts.org/images/products/085/514/000/2175/front_en.72.400.jpg",
      "product_link": "https://world.openfoodfacts.org/product/0855140002175",
      "product_name": "ORIGINAL ANCIENT GRAIN GRANOLA",
      "fat_g_per_100g": 16.6666666666667,
      "salt_g_per_100g": 1.125,
      "processing_level": "Processed foods",
      "nutri_score_grade": "E",
      "sugars_g_per_100g": 20,
      "energy_kcal_per_100g": 433.333333333333
    }
  ]
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"openfoodfacts.org/search_products","input":{"diet":"vegan","query":"granola","country":"United States","max_results":5}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Find vegan oat milk brands sold in the United States and show me their Nutri-Score and sugar per 100 g
- What are the most popular gluten-free crackers available in Canada? I need the barcodes too
- On Open Food Facts, look up Nature Valley granola bars and list energy, fat and salt per 100 g
- Search Open Food Facts for palm oil free chocolate spreads sold in France, 50 results please
- Show me page 2 of vegetarian frozen pizza products in the UK with their processing level and photos

## Input schema

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "diet": {
      "enum": [
        "any",
        "vegan",
        "vegetarian",
        "gluten_free",
        "palm_oil_free"
      ],
      "type": "string",
      "default": "any",
      "description": "Diet filter, for example vegan. Default: any."
    },
    "page": {
      "type": "integer",
      "default": 1,
      "minimum": 1,
      "description": "Results page number, for example 2. Default: 1."
    },
    "brand": {
      "type": "string",
      "default": "any",
      "description": "Brand to match, for example Nature Valley. Default: any."
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Words to search for, for example granola or oat milk."
    },
    "country": {
      "type": "string",
      "default": "any",
      "description": "Country where the food is sold, for example United States or US. Default: any."
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Products per page, for example 20; maximum 100."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "products"
  ],
  "properties": {
    "products": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "product_name",
          "brand",
          "quantity",
          "nutri_score_grade",
          "processing_level",
          "energy_kcal_per_100g",
          "sugars_g_per_100g",
          "fat_g_per_100g",
          "salt_g_per_100g",
          "photo_link",
          "product_link",
          "barcode"
        ],
        "properties": {
          "brand": {
            "type": [
              "string",
              "null"
            ],
            "description": "Brand name."
          },
          "barcode": {
            "type": "string",
            "description": "Product barcode.",
            "x-fous-developer": true
          },
          "quantity": {
            "type": [
              "string",
              "null"
            ],
            "description": "Package quantity."
          },
          "photo_link": {
            "type": [
              "string",
              "null"
            ],
            "description": "Product photo link."
          },
          "product_link": {
            "type": "string",
            "description": "Open Food Facts product page."
          },
          "product_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Product name."
          },
          "fat_g_per_100g": {
            "type": [
              "number",
              "null"
            ],
            "description": "Fat in grams per 100 g."
          },
          "salt_g_per_100g": {
            "type": [
              "number",
              "null"
            ],
            "description": "Salt in grams per 100 g."
          },
          "processing_level": {
            "type": [
              "string",
              "null"
            ],
            "description": "Processing category in words, when known."
          },
          "nutri_score_grade": {
            "enum": [
              "A",
              "B",
              "C",
              "D",
              "E",
              null
            ],
            "type": [
              "string",
              "null"
            ],
            "description": "Nutri-Score grade, A to E, when known."
          },
          "sugars_g_per_100g": {
            "type": [
              "number",
              "null"
            ],
            "description": "Sugars in grams per 100 g."
          },
          "energy_kcal_per_100g": {
            "type": [
              "number",
              "null"
            ],
            "description": "Energy in kilocalories per 100 g."
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
```

## See more

- [Open Food Facts API: Get packaged food product](https://fous.com/methods/openfoodfacts.org/get-product.md): Looks up a packaged food by barcode or by product name and brand, returning ingredients, allergens, Nutri-Score, NOVA processing level and nutrition from Open Food Facts.
- [USDA API: Search foods](https://fous.com/methods/fdc.nal.usda.gov/search-foods.md): Searches USDA FoodData Central foods and branded products by food or brand name, ranked by relevance. Calories and serving sizes are null when not supplied.
- [FDA API: Search food recalls](https://fous.com/methods/open.fda.gov/search-food-recalls.md): Finds FDA food recall enforcement reports by product, brand, or allergen, newest first. Reports are updated weekly and recall statuses may lag.
- [Trader Joe's API: Search products](https://fous.com/methods/traderjoes.com/search-products.md): Searches Trader Joe's public product catalogue by name or keywords, optionally within a main category. Prices are website reference prices and may vary by store.
- [BBC Good Food API: Search recipes](https://fous.com/methods/bbcgoodfood.com/search-recipes.md): Finds BBC Good Food recipes for a dish or ingredients in search order, with ratings, time, difficulty, photos and links. Excludes app-only recipes.
- [ALDI API: Search products](https://fous.com/methods/aldi.us/search-products.md): Search ALDI US groceries in site order with prices for the selected store. Prices and availability vary by store; related search results may follow direct matches.
- [Food Network API: Search recipes](https://fous.com/methods/foodnetwork.com/search-recipes.md): Finds Food Network recipes for a dish or ingredient, optionally filtered by chef, in site search order.
- [IKEA API: Search products](https://fous.com/methods/ikea.com/search-products.md): Searches IKEA products in a chosen country and returns current prices, details, photos and reviews in IKEA's result order.
- [All Open Food Facts methods](https://fous.com/methods/openfoodfacts.org.md)
