canonical: https://jentic.com/apis/openfoodfacts.org/openfoodfacts

# Open Food Facts API (public)

The Open Food Facts API is the public interface to Open Food Facts, a collaborative database of food products from around the world. Given a product barcode it returns the product's attributes, and its search endpoints find products by name, brand, category, and other criteria. Both a version 2 and a version 3 of the product and search endpoints are available.

## For AI agents

Look up food products by barcode and search the Open Food Facts database by name, brand, and category through its public API.

## Scope

Does not sell products or track inventory. Use it to look up food products by barcode and search the Open Food Facts database only.

## Capabilities

- Look up a food product by barcode and read its attributes
- Search products by name, brand, category, and other criteria
- Read nutrition facts, ingredients, and labels returned for a product
- Choose the version 2 or version 3 product and search endpoints

## Use cases

### AI Agent Product Lookup

Give an AI agent a food knowledge source. The agent discovers the product and search operations through Jentic and looks up any barcode to read ingredients, nutrition, and labels, without bespoke HTTP wiring. Because the API is public and read-only, the agent gathers facts rather than changing anything.

Example prompt: Look up a product by barcode and return its ingredients, nutrition facts, and dietary labels

### Nutrition and Ingredient Data

Pull nutrition and ingredient details for packaged foods. A barcode lookup returns the product's nutrition facts, ingredient list, and labels, so a diet or health app can present accurate information for a scanned item.

Example prompt: Retrieve a product by barcode and extract its nutrition facts and ingredient list

### Product Search and Discovery

Find products without a barcode in hand. The search endpoints match products by name, brand, and category, so an app can surface options and let a user pick the right item before reading its details.

Example prompt: Search for products by brand and category and return the matching items with their barcodes

### Label and Diet Filtering

Screen products against dietary needs. Product records carry labels and category data, so a workflow can look up a barcode and check whether an item fits a vegan, gluten-free, or allergen-aware requirement.

Example prompt: Look up a product by barcode and report which dietary labels it carries

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/v2/product/{barcode}` | Look up a product by barcode (v2) |
| GET | `/api/v2/search` | Search products (v2) |
| GET | `/api/v3/product/{barcode}` | Look up a product by barcode (v3) |
| GET | `/api/v3/search` | Search products (v3) |

## Key resources

- **Product** — Look up a food product's attributes by barcode (v2 and v3).
- **Search** — Find products by name, brand, category, and other criteria (v2 and v3).

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 38 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 56 / 100
  - AI-Readiness & Agent Experience: 15 / 100
  - Agent Usability: 94 / 100
  - Security: 100 / 100
  - AI Discoverability: 50 / 100
- **View full report:** https://jentic.com/apis/openfoodfacts.org/openfoodfacts/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Open Food Facts by hand still means reading its docs, choosing between the version 2 and version 3 endpoints, and paging search results yourself. Through Jentic you install once, import the API from the API Directory, and your agent calls the lookup or search operation it needs.
- **Permission scoping:** You decide which Open Food Facts operations your agent may call. A rule can allow product lookups and searches, and because the API is read-only, the agent can only read public product data. A rule bounds which operations run, and every call is logged.
- **Credential handling:** Open Food Facts is a public API and needs no key, so there is nothing to store. Jentic still routes every call through your own Jentic One instance, keeping the request path under your control.
- **Discovery method:** Agents search Jentic by intent such as 'look up a product by barcode' or 'search products by brand', and Jentic returns the matching Open Food Facts operation with its input schema so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **Edamam** — Returns nutrition analysis and food database lookups.
- **Spoonacular** — Provides recipe, ingredient, and food product data.
- **TheMealDB** — Serves recipes and meal data by ingredient and category.

## FAQ

### What authentication does the Open Food Facts API use?

The public Open Food Facts API requires no authentication in its OpenAPI spec: the product and search endpoints are open. Because there is no key, there is nothing for Jentic to inject, and calls still route through your own Jentic One instance so the request path stays under your control.

### Can I search Open Food Facts without a barcode?

Yes. The search endpoints match products by name, brand, category, and other criteria, so an agent can discover items and read their barcodes before pulling full product details.

### What are the rate limits for the Open Food Facts API?

The OpenAPI spec does not publish specific rate limits. Check the Open Food Facts documentation for current guidance, and have your agent cache results and back off when it receives a throttling response.

### How do I look up a product with the Open Food Facts API through Jentic?

Search Jentic for an intent like 'look up a product by barcode', and it returns the matching Open Food Facts operation with its input schema. Import the connector once and your agent reads product data without hand-written HTTP code. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there an Open Food Facts MCP server?

You don't need an MCP server to give your agent Open Food Facts. Jentic connects it directly from the Jentic API Directory: import the API and your agent calls the product and search operations. Operations are discovered on demand, so no extra tool definitions are loaded into the agent's context.

### Can I limit what my agent is allowed to do with the Open Food Facts API?

Yes. You choose the operations the agent may call, so a rule can allow product lookups and searches. Since the API is read-only and public, the agent can only read product data, and every call is logged.
