search

Pack: openfoodfacts · Endpoint: https://gateway.pipeworx.io/openfoodfacts/mcp

Full-text search.

Parameters

NameTypeRequiredDescription
querystringyes
pagenumberno
page_sizenumberno
sort_bystringnounique_scans_n | product_name | created_t | last_modified_t | nutriscore_score | nova_score
fieldsstringnoComma-sep return fields.

Example call

Arguments

{
  "query": "chocolate"
}

curl

curl -X POST https://gateway.pipeworx.io/openfoodfacts/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search","arguments":{"query":"chocolate"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('search', {
  "query": "chocolate"
});

More examples

{
  "query": "organic milk",
  "page": 1,
  "page_size": 20,
  "sort_by": "nutriscore_score"
}

Response shape

FieldTypeDescription
countnumberTotal results matching query
pagenumberCurrent page number
page_sizenumberResults per page
productsarrayArray of matching products
Full JSON Schema
{
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Total results matching query"
    },
    "page": {
      "type": "number",
      "description": "Current page number"
    },
    "page_size": {
      "type": "number",
      "description": "Results per page"
    },
    "products": {
      "type": "array",
      "description": "Array of matching products",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Product barcode"
          },
          "product_name": {
            "type": "string",
            "description": "Product name"
          },
          "brands": {
            "type": "string",
            "description": "Brand names"
          },
          "categories": {
            "type": "string",
            "description": "Product categories"
          },
          "nutrition_grade_fr": {
            "type": "string",
            "description": "Nutri-Score grade"
          },
          "nutriscore_score": {
            "type": "number",
            "description": "Nutri-Score value"
          },
          "nova_group": {
            "type": "number",
            "description": "NOVA group"
          }
        }
      }
    }
  }
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "openfoodfacts": {
      "url": "https://gateway.pipeworx.io/openfoodfacts/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026