# Open Food Facts product search and facets

Search Open Food Facts food products with words and Lucene filters through Search-a-licious, the project's search API, and count products per brand, category. Needs query.

Search Open Food Facts food products with words and Lucene filters through Search-a-licious, the project's search API, and count products per brand, category, label, country or grade (facets) for market mapping. Returns the count (it stops at 10,000 with is_count_exact false) and, per product, barcode, name, brands, quantity, category/label/country tags, Nutri-Score, NOVA group, Green-Score grade, scan count and front image. Query examples: 'oat milk barista', 'brands:"Ferrero"', 'categories_tags:"en:breakfast-cereals" AND countries_tags:"en:france" AND nutriscore_grade:a'. The index is a snapshot last refreshed in December 2024: products added since are missing; read live details by barcode with open-food-facts/product.

- Tool ID: `open-food-facts/search`
- Provider: [Open Food Facts](/providers/open-food-facts.md)
- Capability: [Product catalogs & food data](/tools/ecommerce/product-catalogs.md)
- Price: no charge per call
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

No charge per call. A workspace is still needed so your agent can call it.


```json
{
  "model": "per_call",
  "amountUsd": 0
}
```

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "description": "Words and/or Lucene field filters (brands, categories_tags, labels_tags, countries_tags, nutriscore_grade, nova_group, ecoscore_grade), e.g. 'categories_tags:\"en:breakfast-cereals\" AND nutriscore_grade:a'"
    },
    "facets": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "brands_tags",
          "categories_tags",
          "labels_tags",
          "countries_tags",
          "nutriscore_grade",
          "ecoscore_grade",
          "nova_groups",
          "owner"
        ]
      },
      "minItems": 1,
      "maxItems": 4,
      "uniqueItems": true,
      "description": "Also count matching products per value of these fields (top 10 each plus 'Other'), e.g. ['brands_tags', 'nutriscore_grade']"
    },
    "sort_by": {
      "type": "string",
      "enum": [
        "-unique_scans_n",
        "-popularity_key",
        "-last_modified_t",
        "-created_t",
        "nutriscore_score",
        "-ecoscore_score"
      ],
      "description": "Order instead of relevance: most scanned '-unique_scans_n', most popular, recently edited or added, best Nutri-Score 'nutriscore_score', best Green-Score; leave empty when searching words, e.g. '-unique_scans_n'"
    },
    "langs": {
      "type": "string",
      "pattern": "^[a-z]{2}(,[a-z]{2}){0,4}$",
      "default": "en",
      "description": "Languages to match words in, comma-separated, e.g. 'en,fr'"
    },
    "page_size": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 10,
      "description": "Products per page (max 50), e.g. 10"
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 1,
      "description": "Page number, starting at 1, e.g. 2"
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "open-food-facts/search",
  "input": {
    "query": "categories_tags:\"en:breakfast-cereals\" AND countries_tags:\"en:france\"",
    "facets": [
      "brands_tags",
      "nutriscore_grade"
    ],
    "page_size": 3
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

Licence: ODbL 1.0 (database), DbCL 1.0 (contents), CC BY-SA (images).

Attribution: Data from Open Food Facts contributors (world.openfoodfacts.org), ODbL.

[Provider documentation](https://search.openfoodfacts.org/docs)

[REST inspection](https://api.agentik.cc/v1/tools/open-food-facts/search) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/open-food-facts/search) · [Agent index](/llms.txt)
