# Allergen Nutrition Extractor

> Extracts allergens and nutrition facts from food PDFs into structured JSON using OCR and evidence-based mapping.

Allergen Nutrition Extractor is a free AI agent skill on Agensi by bd, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [bd](https://www.agensi.io/creators/bd)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.0
- Last updated: 2026-11-27
- Security: scan passed (2026-11-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/allergen-nutrition-extractor
- Tags: api, python, ocr, food-safety, json-schema

## About this skill

Extracting structured data from messy food labels and specification sheets is error-prone and slow. This skill automates the extraction of allergens and nutrition facts from text-based or scanned PDFs into valid JSON.

### What it does
- **Automated OCR** handles scanned documents using Tesseract when embedded text is missing or insufficient.
- **Bilingual processing** supports English and Hungarian documents, identifying ingredient lists and precautionary statements.
- **Evidence-based extraction** classifies allergens into 14 regulatory groups based on specific document evidence.
- **Nutrition mapping** captures product names, decimal values, and units (per 100g or per serving) exactly as stated.
- **Confidence labeling** distinguishes between confirmed ingredients, precautionary "may contain" warnings, and unknown statuses.

### How it works
1. Run the `extract_text.py` script on a local food product PDF to pull text or perform OCR.
2. The skill analyzes the extracted text against a reference allergen list and the provided JSON schema.
3. It maps ingredients to specific allergen categories while preserving original nutrition decimals and units.
4. It outputs a structured JSON object containing the product metadata, allergen status, and nutrition table.

### Frameworks & tools
Built for Python environments requiring `pypdf`, `pdf2image`, `pytesseract`, and `Pillow`. It relies on system-level Poppler and Tesseract OCR utilities for processing scanned images.

### Why this beats prompting it yourself
Generic prompts often hallucinate the absence of allergens or fail to distinguish between "contains" and "may contain" warnings. This skill enforces a strict evidence-only policy, preventing the AI from inferring safety where the document is silent.

### Use cases
- Automating the intake of supplier product specification sheets.
- Building a database from scanned retail food labels.
- Auditing ingredient lists for regulatory allergen compliance.

### Known limitations
Does not provide food-safety guarantees or professional reviews. Requires Tesseract and Poppler installed on the host system for OCR functionality.

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Allergen Nutrition Extractor skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What specific types of food data can this skill extract from my PDFs?

The skill extracts 14 specific regulatory allergen groups and maps nutrition data including product names, decimal values, and units (per 100g or serving) directly into a structured JSON schema.

### How does this handle the difference between 'contains' and 'may contain' allergen warnings?

Unlike generic AI prompts, this skill uses an evidence-based extraction policy that distinguishes between confirmed ingredients and "may contain" warnings while preventing the AI from hallucinating safety when information is missing.

### Can this skill process scanned food labels or only text-based PDFs?

Yes, the skill includes a built-in OCR pipeline using Tesseract to process scanned labels and images within PDFs, ensuring data is captured even when embedded text is unavailable.

### What is included in the purchase of this skill?

You will receive the core Python processing scripts, the evidence-based mapping logic, and the JSON schema required to integrate this skill into your local AI agent or automated workflow.

### Are there any specific technical requirements or dependencies for my local machine?

The skill requires a Python environment with pypdf and Pillow, as well as system-level installations of Tesseract OCR and Poppler for handling image-to-text conversions.

### Which languages are supported for ingredient list analysis?

Currently, the skill is optimized for bilingual processing in English and Hungarian, supporting ingredient lists and precautionary statements in both languages.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
