# Food & Nutrition Search (`primeselectai/food-product-catalog-nutrition-search`) Actor

Search and normalize packaged-food products by barcode, brand, ingredient, category, or country. Get catalog-ready nutrition, allergens, ingredients, completeness scores, and change-detection hashes with Open Food Facts attribution.

- **URL**: https://apify.com/primeselectai/food-product-catalog-nutrition-search.md
- **Developed by:** [Simon Jessen](https://apify.com/primeselectai) (community)
- **Categories:** Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Food Product Catalog & Nutrition Search

Get clean food-product records ready for catalog enrichment, nutrition apps, grocery search, and assortment analysis. Each result includes a stable product ID, normalized name and brand, ingredients, allergens, nutrition fields, categories, completeness score, source timestamp, and record hash. Configure search and pagination only after choosing your buyer workflow.

### Outcome

Search and normalize packaged-food products by name, barcode, brand, category, ingredients, allergens, and nutrition so teams can enrich catalogs and monitor product-data changes without building their own food-data pipeline.

### Use cases

- Use the Actor when you need search and normalize packaged-food products by name, barcode, brand, category, ingredients, allergens, and nutrition so teams can enrich catalogs and monitor product-data changes without building their own food-data pipeline.
- Build workflows around adds buyer-ready normalization, field selection, nutrition and allergen extraction, stable barcode-based identity, deduplication, completeness scoring, source timestamps, and optional change detection instead of merely proxying the Open Food Facts API.
- Designed for Grocery retailers, food brands, nutrition apps, recipe platforms, marketplace operators, and data teams needing normalized packaged-food catalog data..
- Schedule repeat runs: Retailers and food apps rerun scheduled searches to refresh catalog enrichment, detect ingredient or nutrition changes, and identify newly added or incomplete products.
- Feed normalized dataset records into APIs, spreadsheets, databases, automations, or AI/agent workflows.

### Quick start

1. Open the Actor input form.
2. Set the filters or query relevant to your workflow.
3. Start with a small `maxResults` value.
4. Run the Actor and inspect the default dataset before scheduling larger or recurring jobs.

Example input:

```json
{
  "query": "organic tomato soup",
  "maxResults": 10
}
```

### Inputs

- **query** (string, optional) — Free-text product, brand, ingredient, category, or barcode search.
- **barcode** (string, optional) — Optional UPC, EAN, GTIN, or other product barcode.
- **country** (string, optional) — Optional country filter such as United States, France, or Canada.
- **category** (string, optional) — Optional product category or tag filter.
- **maxResults** (integer, optional) — Maximum number of normalized product records to return, capped at 100 per request.
- **includeImages** (boolean, optional) — Whether to return source image URLs. Image reuse is subject to individual image licenses and third-party rights.
- **includeRaw** (boolean, optional) — Whether to include a limited raw-source payload for auditability.

### Output example

The example below is taken from the latest validated local live-source sample when available; otherwise it is derived from the bundled dataset schema.

```json
{
  "id": "0052603041201",
  "barcode": "0052603041201",
  "product_name": "Organic Creamy Tomato Soup",
  "brands": [
    "Pacific Foods"
  ],
  "categories": [
    "en:plant-based-foods-and-beverages",
    "en:plant-based-foods",
    "en:fruits-and-vegetables-based-foods",
    "en:meals",
    "en:soups",
    "en:vegetable-soups",
    "en:cream-soups",
    "en:cream-of-vegetable-soups"
  ],
  "countries": [
    "en:united-states"
  ],
  "ingredients_text": "Reduced fat milk*, water, tomato paste*, cane sugar*, sea salt, sodium citrate, rice flour*, cheddar cheese flavor (cheddar cheese [pasteurized milk*, cheese cultures, salt, enzymes]*, water, salt)*, garlic powder*, onion powder*.",
  "allergens": [],
  "nutriments": {
    "added-sugars": 1.66666666666667,
    "added-sugars_100g": 1.66666666666667,
    "added-sugars_serving": 4,
    "added-sugars_unit": "g",
    "added-sugars_value": 1.66666666666667,
    "calcium": 0.0416666666666667,
    "calcium_100g": 0.0416666666666667,
    "calcium_serving": 0.1,
    "calcium_unit": "g",
    "calcium_value": 0.0416666666666667,
    "carbohydrates": 6.66666666666667,
    "carbohydrates_100g": 6.66666666666667,
    "carbohydrates_serving": 16,
    "carbohydrates_unit": "g",
    "carbohydrates_value": 6.66666666666667,
    "cholesterol": 0.00416666666666667,
    "cholesterol_100g": 0.00416666666666667,
    "cholesterol_serving": 0.01,
    "cholesterol_unit": "g",
    "cholesterol_value": 0.00416666666666667,
    "energy": 179.166666666667,
    "energy-kcal": 41.6666666666667,
    "energy-kcal_100g": 41.6666666666667,
    "energy-kcal_serving": 100,
    "energy-kcal_unit": "kcal",
    "energy-kcal_value": 41.6666666666667,
    "energy-kj": 179.166666666667,
    "energy-kj_100g": 179.166666666667,
    "energy-kj_modifier": "~",
    "energy-kj_serving": 430,
    "energy-kj_unit": "kJ",
    "energy-kj_value": 179.166666666667,
    "energy_100g": 179.166666666667,
    "energy_modifier": "~",
    "energy_serving": 430,
    "energy_unit": "kJ",
    "energy_value": 179.166666666667,
    "fat": 0.833333333333333,
    "fat_100g": 0.833333333333333,
    "fat_serving": 2,
    "fat_unit": "g",
    "fat_value": 0.833333333333333,
    "fiber": 0.833333333333333,
    "fiber_100g": 0.833333333333333,
    "fiber_serving": 2,
    "fiber_unit": "g",
    "fiber_value": 0.833333333333333,
    "fruits-vegetables-legumes-estimate-from-ingredients_100g": 11.25,
    "fruits-vegetables-nuts-estimate-from-ingredients_100g": 11.25,
    "iron": 0.000416666666666667,
    "iron_100g": 0.000416666666666667,
    "iron_serving": 0.001,
    "iron_unit": "g",
    "iron_value": 0.000416666666666667,
    "nova-group": 1.25,
    "nova-group_100g": 1.25,
    "nova-group_serving": 1.25,
    "nova-group_unit": "",
    "nova-group_value": 1.25,
    "potassium": 0.179166666666667,
    "potassium_100g": 0.179166666666667,
    "potassium_serving": 0.43,
    "potassium_unit": "g",
    "potassium_value": 0.179166666666667,
    "proteins": 1.66666666666667,
    "proteins_100g": 1.66666666666667,
    "proteins_serving": 4,
    "proteins_unit": "g",
    "proteins_value": 1.66666666666667,
    "salt": 0.697916666666667,
    "salt_100g": 0.697916666666667,
    "salt_serving": 1.68,
    "salt_unit": "g",
    "salt_value": 0.697916666666667,
    "saturated-fat": 0.625,
    "saturated-fat_100g": 0.625,
    "saturated-fat_serving": 1.5,
    "saturated-fat_unit": "g",
    "saturated-fat_value": 0.625,
    "sodium": 0.279166666666667,
    "sodium_100g": 0.279166666666667,
    "sodium_serving": 0.67,
    "sodium_unit": "g",
    "sodium_value": 0.279166666666667,
    "sugars": 5,
    "sugars_100g": 5,
    "sugars_serving": 12,
    "sugars_unit": "g",
    "sugars_value": 5.0
  },
  "nutrition_grade": "c",
  "packaging": [],
  "source_updated_at": "1780529887",
  "source_attribution": "Source: Open Food Facts. Data available under the Open Database License (ODbL) 1.0. https://world.openfoodfacts.org/",
  "completeness_score": null,
  "record_hash": null
}
```

### Pricing

Store pricing is configured in Apify. The intended primary paid unit is **normalized product record**. Start with a small result limit while validating your workflow, then scale only when the output and economics fit your use case. The README never hard-codes a price that could drift from the live Store configuration.

### Source and limitations

- Source: Open Food Facts.
- Licence/terms: Open Database License 1.0 (ODbL); individual database contents may be under the Database Contents License; product images are commonly CC BY-SA 3.0 but may contain additional rights restrictions..
- Reuse condition: Open Food Facts explicitly permits commercial reuse and redistribution, including monetized services, subject to ODbL attribution and share-alike requirements for derivative databases. The Actor must display or include Open Food Facts attribution and provide the applicable ODbL notice/source link. Do not imply Open Food Facts endorsement. Keep the derived catalog/database openly reusable under compatible terms where ODbL applies. Product images must not be redistributed by default unless their individual license and third-party rights are verified. Logos, trademarks, long descriptions, and other non-database elements may have separate restrictions.
- Automation condition: Respect Open Food Facts endpoint rate limits and fair-use requirements. Use bounded pagination, caching, retries with backoff, and a descriptive User-Agent such as this Actor's product name and contact URL. Avoid unrestricted bulk crawling through the search endpoint; use official bulk data exports for large catalog jobs if later supported.
- Open Food Facts is community-maintained, so product coverage, accuracy, freshness, language quality, and field completeness vary by market.
- ODbL share-alike obligations apply to qualifying derivative databases; the Actor should expose attribution and license information and obtain legal review before offering a closed proprietary mirror of the full dataset.
- Product images, logos, trademarks, packaging artwork, and some descriptive content may have rights beyond the database license; exclude them by default or return URLs with explicit rights warnings.
- The public API enforces rate limits and is not an unrestricted high-volume commercial extraction channel; large-scale jobs may require use of official bulk exports and careful operational controls.
- Open Food Facts does not represent current retailer price, inventory, or guaranteed commercial availability, so the Actor should not market itself as a live price or stock monitor.

This Actor does not bypass authentication, rate limits, robots/API policies, licensing conditions, or upstream access controls. Missing upstream values are not invented.

### FAQ

**Does this use the approved source contract?**\
Yes. Runtime requests are restricted to the source contract validated by Market Hunter before build.

**Can I schedule repeat runs?**\
Yes, when the source permits automated access. Use conservative schedules and result limits that respect upstream conditions.

**Why can some fields be empty or null?**\
The upstream source may omit fields for particular records. The Actor preserves missing values rather than fabricating data.

### Troubleshooting

- If a narrow query returns no rows, loosen filters and retry with a small result limit.
- If the upstream source returns a rate-limit or temporary server error, retry later instead of increasing request pressure.
- If authentication or source identity is required, verify the protected credential/identity configured for the Actor.
- If the upstream response schema changes, report the failed run so the deterministic mapping can be updated.

### Related Actors

- Food Product Barcode Lookup
- Food Ingredient and Allergen Monitor
- Grocery Product Category Normalizer
- Food Catalog Change Detection

> Store publication remains an explicit manual action. This product is not affiliated with or endorsed by the upstream source unless the Store listing explicitly states otherwise.

# Actor input Schema

## `query` (type: `string`):

Free-text product, brand, ingredient, category, or barcode search.

## `barcode` (type: `string`):

Optional UPC, EAN, GTIN, or other product barcode.

## `country` (type: `string`):

Optional country filter such as United States, France, or Canada.

## `category` (type: `string`):

Optional product category or tag filter.

## `maxResults` (type: `integer`):

Maximum number of normalized product records to return, capped at 100 per request.

## `includeImages` (type: `boolean`):

Whether to return source image URLs. Image reuse is subject to individual image licenses and third-party rights.

## `includeRaw` (type: `boolean`):

Whether to include a limited raw-source payload for auditability.

## Actor input object example

```json
{
  "query": "organic tomato soup",
  "maxResults": 10,
  "includeImages": false,
  "includeRaw": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `runMeta` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "organic tomato soup",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("primeselectai/food-product-catalog-nutrition-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "organic tomato soup",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("primeselectai/food-product-catalog-nutrition-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "organic tomato soup",
  "maxResults": 10
}' |
apify call primeselectai/food-product-catalog-nutrition-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,primeselectai/food-product-catalog-nutrition-search"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/5D2fPoIF39Yz8cifp/builds/XzA12QLt89whYAZ2O/openapi.json
