Grocery, Retail & Packaged Foods

Dual Barcode & Packaged Food Scanner API

Instantly resolve global UPC and EAN barcodes with dual-pass database grounding, supported by panoramic multimodal OCR for curved bottles and rare packaged foods.

The Barcode Scanner Problem

Why Traditional Mobile Barcode Scanners Fail

Single-database lookups and rigid OCR libraries fail on more than 30% of real-world grocery store items.

Single Database Blind Spots

Relying solely on one catalog leads to frequent "Product Not Found" errors on regional supermarket brands and new snack releases.

Curved & Glossy Packaging

Soda cans, protein powder tubs, and foil snack bags reflect flash glare and distort text boxes, causing classic OCR engines to miss numbers.

Outdated Nutrition Data

Food brands quietly reduce sodium or reformulate sugar content without updating the UPC. FoodVivo cross-checks multiple registries.

Verified Barcode Payload

Sub-5ms Edge Responses with Full Ingredient Lists

Get clean, verified packaged food nutrition, serving sizes, and allergen warnings directly on the edge.

Supports UPC-A, UPC-E, EAN-13, EAN-8, and QR formats
Includes complete ingredient list and allergen disclosures
Sub-5ms response from global Tier-0 Anycast cache
GTIN Lookup • 3.8ms Edge KV200 OK
{
  "success": true,
  "data": {
    "barcode": "0049000000443",
    "product_name": "Coca-Cola Original Taste",
    "brand": "The Coca-Cola Company",
    "serving_size_label": "1 can (355 mL / 12 fl oz)",
    "serving_weight_g": 355,
    "servings_per_container": 1,
    "per_serving": {
      "calories": 140,
      "protein_g": 0,
      "carbs_g": 39,
      "fat_g": 0,
      "fiber_g": 0,
      "sugar_g": 39,
      "sodium_mg": 45
    },
    "per_100g": {
      "calories": 39,
      "protein_g": 0,
      "carbs_g": 10.6,
      "fat_g": 0,
      "sugar_g": 10.6,
      "sodium_mg": 12
    },
    "calculated_portion": {
      "multiplier": 1,
      "calories": 140,
      "protein_g": 0,
      "carbs_g": 39,
      "fat_g": 0,
      "sugar_g": 39,
      "sodium_mg": 45
    },
    "allergens": [],
    "dietary": [
      "vegan",
      "gluten_free",
      "dairy_free",
      "kosher"
    ],
    "confidence": 0.99,
    "sources": [
      "foodvivo_catalog",
      "foodvivo_portion_arbiter"
    ]
  }
}

Barcode Scanner Example

Dual barcode lookup with automatic multimodal OCR label fallback.

# 1. Instant GTIN / UPC Barcode Lookup (sub-5ms)
curl -X POST https://foodvivo-api.flappybird-assets.workers.dev/v1/food/barcode \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "barcode": "0049000000443",
    "portion_multiplier": 1.0
  }'

# 2. Multimodal Nutrition Facts Label Scanner (Curved Cans & Labels)
curl -X POST https://foodvivo-api.flappybird-assets.workers.dev/v1/food/label \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "images": [
      { "base64": "data:image/jpeg;base64,/9j/4AAQSkZJR..." }
    ],
    "package_context": "Curved soda can nutrition table"
  }'

Barcode & Grocery FAQs

Technical details on GTIN resolution, fallback pipelines, and label OCR.

How does FoodVivo's dual-pass GTIN search work?

When a barcode is submitted, FoodVivo queries proprietary catalog pipelines and verified manufacturer databases in parallel. It normalizes serving sizes, validates Atwater macro consistency, and caches the result on our global edge network for sub-5ms repeat responses.

What happens if a boutique or imported product barcode is missing from databases?

If a barcode is not found in standard GTIN registries, FoodVivo seamlessly triggers a neural web search fallback to crawl the manufacturer's verified product disclosure sheet and extract standard nutrition facts.

How does FoodVivo handle curved bottles, wrinkled wrappers, and glare?

Our proprietary multimodal vision pipeline applies geometric perspective rectification to unroll cylindrical cans and bottles before extracting the nutrition facts table, eliminating bounding-box errors common in rigid OCR libraries.

Can the API extract full ingredient lists and allergen warnings?

Yes. In addition to calorie and macro values, FoodVivo returns the complete ingredient text string and automatically parses declared allergens (e.g. 'Contains: Milk, Soy').