search
Pack: openfoodfacts · Endpoint: https://gateway.pipeworx.io/openfoodfacts/mcp
Full-text search.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | |
page | number | no | |
page_size | number | no | |
sort_by | string | no | unique_scans_n | product_name | created_t | last_modified_t | nutriscore_score | nova_score |
fields | string | no | Comma-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
| Field | Type | Description |
|---|---|---|
count | number | Total results matching query |
page | number | Current page number |
page_size | number | Results per page |
products | array | Array 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.