# Openfoodfacts Product Lookup

> Look up food products by barcode or search with filters. Find products by category, nutrition grade, eco-score, label, ingredient, or allergen. Use when you have a barcode or need to find products matching specific criteria.

- **Type:** Skill
- **Install:** `agentstack add skill-alfredvc-openfoodfacts-cli-openfoodfacts-product-lookup`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Alfredvc](https://agentstack.voostack.com/s/alfredvc)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Alfredvc](https://github.com/Alfredvc)
- **Source:** https://github.com/Alfredvc/openfoodfacts-cli/tree/main/skills/openfoodfacts-product-lookup

## Install

```sh
agentstack add skill-alfredvc-openfoodfacts-cli-openfoodfacts-product-lookup
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# openfoodfacts-product-lookup

Workflow for finding food product data from the Open Food Facts database.

## Look Up a Product by Barcode

```bash
openfoodfacts --json products get 
```

Example (Nutella):

```bash
openfoodfacts --json products get 3017624010701
```

Use `--fields` to return only what you need:

```bash
openfoodfacts --json --fields product_name,brands,nutriscore_grade,ecoscore_grade,ingredients_text_en products get 3017624010701
```

If the product is not found, the CLI exits 1 with `{"error": "product not found: "}`.

## Search by Filters

Filter-only search (no full-text query) uses the v2 API:

```bash
openfoodfacts --json products search --category en:chocolates --nutrition-grade a
```

Available filter flags:

| Flag | Description | Example |
|------|-------------|---------|
| `--category ` | Category tag | `en:chocolates` |
| `--nutrition-grade ` | Nutri-Score | `a` |
| `--ecoscore-grade ` | Eco-Score | `b` |
| `--label ` | Label tag | `en:organic` |
| `--ingredient ` | Ingredient tag | `en:salt` |
| `--allergen ` | Allergen tag | `en:gluten` |

Combine filters freely — all are ANDed:

```bash
openfoodfacts --json products search --category en:biscuits-and-cakes --nutrition-grade a --label en:organic
```

## Full-Text Search

Use `--query` for keyword search (routes to the v1 search endpoint):

```bash
openfoodfacts --json products search --query "organic olive oil"
```

Combine with filters:

```bash
openfoodfacts --json products search --query "dark chocolate" --nutrition-grade b --label en:fair-trade
```

## Pagination

Default: 20 results per page. The response envelope tells you how many pages exist:

```json
{"count": 4821, "page": 1, "page_count": 242, "page_size": 20, "products": [...]}
```

Fetch a specific page:

```bash
openfoodfacts --json products search --category en:chocolates --page 3 --page-size 50
```

Fetch all pages at once (returns flat array — use with care on large result sets):

```bash
openfoodfacts --json products search --category en:chocolates --nutrition-grade a --all
```

## Tips

- Tag values are always prefixed with a language code: `en:chocolates`, not `chocolates`. Use `facets list` to discover valid tags.
- Use `--fields code,product_name,nutriscore_grade` on search results to keep response sizes small.
- `--all` can trigger many API calls. Check `page_count` in a regular search first.
- Rate limit for search is 10 req/min — avoid tight loops.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Alfredvc](https://github.com/Alfredvc)
- **Source:** [Alfredvc/openfoodfacts-cli](https://github.com/Alfredvc/openfoodfacts-cli)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-alfredvc-openfoodfacts-cli-openfoodfacts-product-lookup
- Seller: https://agentstack.voostack.com/s/alfredvc
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
