Skip to main content
fastCRW Pergamon
Public records

Open Food Facts

world.openfoodfacts.org

Food product data by barcode: ingredients, allergens, additives, Nutri-Score and nutrition facts.

Showing the catalogue

1Request

What the user has typed so far.

Comma-separated taxonomies to search in. Note these are singular here (category, not categories).

Two-letter language code for the suggestions.

How many suggestions to return.

1 credit⌘ ↵
Code follows the fields above
curl "https://api.fastcrw.com/v1/data/openfoodfacts/autocomplete?q=choco&taxonomy_names=category&lang=en&size=5" \
  -H "Authorization: Bearer $FASTCRW_API_KEY"

2Response example

A sample shape. Press Run to see live data from Open Food Facts.

JSON
{
  "took": 2,
  "timed_out": false,
  "options": [
    {
      "id": "en:sprinkles",
      "text": "Chocolat or sugar sprinkles",
      "taxonomy_name": "category"
    },
    {
      "id": "en:chocolate-advent-calendars",
      "text": "Chocolate Advent calendars",
      "taxonomy_name": "category"
    },
    "… 3 more items"
  ],
  "debug": {
    "query": {
      "suggest": {
        "taxonomy_suggest": {
          "text": "choco",
          "completion": {
            "field": "names.en",
            "size": 5,
            "contexts": {
              "taxonomy_name": [
                "category"
              ]
            }
          }
        }
      }
    }
  }
}

Attribution: Source: Open Food Facts (ODbL)

Licence: The Open Food Facts database is available under the Open Database License (ODbL): commercial use and redistribution are permitted, but a derived database must be shared under the same licence and Open Food Facts must be credited.

Ask with this source

A prompt for your agent that names this source and how to call it through the crw MCP.

  • Taxonomy autocomplete

    Use Open Food Facts (openfoodfacts) from fastCRW Pergamon, capability "Taxonomy autocomplete" (autocomplete). A user is typing a category, brand or label and you need to resolve it to a canonical tag. Example options: q=choco, taxonomy_names=category, lang=en. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "openfoodfacts" and capability "autocomplete". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Indexed product document

    Use Open Food Facts (openfoodfacts) from fastCRW Pergamon, capability "Indexed product document" (indexed-product). You got a hit from the full-text search and want that exact indexed document rather than the live product record. Example options: barcode=3017620422003. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "openfoodfacts" and capability "indexed-product". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Product by barcode

    Use Open Food Facts (openfoodfacts) from fastCRW Pergamon, capability "Product by barcode" (product). You have a barcode (EAN/UPC) and want everything known about that food product. Example options: barcode=3017624010701, fields=product_name,brands,nutriscore_grade,nova_group,ingredients_text, lc=en. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "openfoodfacts" and capability "product". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Filter products by tag

    Use Open Food Facts (openfoodfacts) from fastCRW Pergamon, capability "Filter products by tag" (search). You want products that match structured criteria (a category, a brand, a Nutri-Score) rather than a text query. Example options: page_size=5, categories_tags=en:chocolate-spreads, brands_tags=ferrero. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "openfoodfacts" and capability "search". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>