{"uid":"cap_fIcJYDcaiJrsUqsjbALBF","slug":"food-barcode-facts-compare-two-foods-by-barcode-03f63c8f","name":"Food Barcode Facts: Compare Two Foods by Barcode","description":"Compare two packaged foods by barcode: Nutri-Score, NOVA, and per-100 g energy, sugars, saturated fat, salt, fibre and protein.","url":"https://food-barcode.x402tookit.com/food-compare?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["barcode","other"],"properties":{"other":{"type":"string","description":"Second product barcode"},"barcode":{"type":"string","description":"First product barcode"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"a":{"type":["null","object"],"properties":{"name":{"type":["null","string"]},"brands":{"type":["null","string"]},"barcode":{"type":["null","string"]},"quantity":{"type":["null","string"]},"novaGroup":{"type":["null","number"]},"nutriScore":{"type":["null","string"]},"dataQuality":{"type":["null","object"],"properties":{"completeness":{"type":["null","number"]},"lastModified":{"type":["null","string"]},"hasIngredients":{"type":["boolean","null"]}}}}},"b":{"type":["null","object"],"properties":{"name":{"type":["null","string"]},"brands":{"type":["null","string"]},"barcode":{"type":["null","string"]},"quantity":{"type":["null","string"]},"novaGroup":{"type":["null","number"]},"nutriScore":{"type":["null","string"]},"dataQuality":{"type":["null","object"],"properties":{"completeness":{"type":["null","number"]},"lastModified":{"type":["null","string"]},"hasIngredients":{"type":["boolean","null"]}}}}},"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"per100g":{"type":["array","null"],"items":{"type":"object","properties":{"a":{"type":["null","number"]},"b":{"type":["null","number"]},"nutrient":{"type":["null","string"]},"difference":{"type":["null","number"]}}}},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"sourceUrl":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"attribution":{"type":["null","string"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VZQREsb1p5GkQ_a-WvOBI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares two packaged foods side-by-side using their barcodes, returning Nutri-Score, NOVA group, and per-100g nutritional breakdown for both products.","exampleAgentPrompt":"Compare the nutritional profiles of these two cereals — barcode 5010029011012 vs barcode 3017620422003 — and tell me which has a better Nutri-Score, lower sugar, and less processing based on their NOVA groups.","exampleUseCases":[{"title":"Healthier cereal choice at breakfast","prompt":"I'm standing in the cereal aisle — can you compare barcode 5000112548167 and barcode 7622300441937 and tell me which one has a better Nutri-Score, less sugar per 100g, and is less processed?"},{"title":"Comparing two yogurt brands for a diet","prompt":"Which of these two yogurts is healthier? Compare barcode 3033490004743 and barcode 5449000131805 — I want to see their Nutri-Score, NOVA group, and protein and saturated fat per 100g."},{"title":"Supermarket own-brand vs name brand check","prompt":"Can you do a side-by-side nutrition comparison of barcode 5000128393188 and barcode 8410076472236 — I want to know the difference in salt, fibre, and energy per 100g, and which one scores better overall?"}],"resultDescription":"Returns a structured comparison object for both products including product name, brand, quantity, Nutri-Score grade, NOVA processing group, and a per-100g breakdown of energy, sugars, saturated fat, salt, fibre, and protein. Also includes a narrative summary, a verdict on which product is nutritionally preferable, reasons supporting the verdict, data quality indicators (completeness, last modified, has ingredients), data source, timestamp, and a flag indicating if the response is degraded due to missing data.","failureModes":["Barcode not found in database — product data returns null for one or both items","Invalid or malformed barcode string — schema validation error","Missing nutritional data for one or both products causing degraded response flag to be true","Product data is stale or incomplete leading to low data quality completeness score","Network timeout or upstream data source unavailability"],"whenToPreferThis":"Choose this endpoint when you need a direct side-by-side comparison of two packaged foods by barcode, including structured nutritional differences, Nutri-Score grades, and NOVA processing levels in a single call. Prefer it over single-product lookup endpoints when the user's goal is to decide between two products or identify which is healthier. It is ideal for shopping-assistant agents, nutrition comparison flows, or diet-tracking applications where a comparative verdict and narrative summary are needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:08:11.105Z","isFirstParty":false,"canonicalSlug":"food-barcode-facts-compare-two-foods-by-barcode-03f63c8f"}