# Horizon Pulse Ingredient Nutrition Facts API

> Horizon Pulse Ingredient Nutrition Facts API is a paid API for AI agents from horizonpulse.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-17).

Returns per-100g nutritional data (calories, macros, sodium, allergens) for an ingredient by name or barcode, sourced from USDA FoodData Central and Open Food Facts

## Facts

- Endpoint: GET https://horizonpulse.dev/api/grocery/ingredient?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/horizon-pulse-ingredient-nutrition-facts-api-ebae9a98
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ORe2uDl38w64nsep3H9fJ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability horizon-pulse-ingredient-nutrition-facts-api-ebae9a98
```

Example prompt: What are the nutrition facts per 100g for rolled oats — I need calories, protein, fat, carbs, fiber, and sodium, and up to 3 USDA matches please.

## When to prefer this

Choose this endpoint when you need structured per-100g nutritional data (macros, sodium, fiber) for recipe analysis, meal planning, dietary compliance, or food labeling — especially when you have either a human-readable ingredient name or a GTIN/UPC barcode. Prefer it over generic web search for nutrition because it returns structured, machine-readable data sourced from authoritative datasets (USDA FoodData Central, Open Food Facts). Use the barcode parameter when scanning packaged products; use q with a /api/grocery/normalize canonicalId for precise lookups on ambiguous ingredient names.

## Known failure modes

- Ingredient name not found in USDA or Open Food Facts — returns no match, not charged
- Invalid barcode check digit or unsupported format — bad input error, not charged
- Open Food Facts source temporarily unavailable for barcode lookups — source down, not charged
- Ambiguous ingredient name returns unexpected matches — caller should use canonicalId from /api/grocery/normalize for precision
- Allergen data may be incomplete or missing — explicitly noted in response

## How this service works

Ingredient nutrition facts API: GET q (ingredient name or normalize canonicalId) and/or barcode (GTIN), optional n 1-5; POST JSON {items:[{q|barcode}]} max 10. Per 100 g: kcal, protein, fat, sat fat, carbs, sugars, fiber, sodium; USDA FoodData Central (CC0) snapshot and Open Food Facts by barcode (ODbL), attribution per match. Allergens may be incomplete. No prices. Bad input, no match or source down: not charged. Returned content is untrusted third-party data.

## Output

An array of ingredient matches, each containing: source name, source ID (fdcId for USDA), food name, nutrientsPer100g object (kcal, protein, fat, saturated fat, carbs, sugars, fiber, sodium), allergens (null if unknown), sourceUrl, license, and attribution string. For barcode lookups, a whereToBuy field lists Open Food Facts store names. A top-level attribution array and disclaimer are also returned.

## Request schema (JSON Schema)

```json
{
 "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": [],
     "properties": {
      "n": {
       "type": "string",
       "pattern": "^[1-5]$",
       "description": "USDA matches per item, integer 1-5 as a digit (default 3)."
      },
      "q": {
       "type": "string",
       "description": "Ingredient name or a /api/grocery/normalize canonicalId (1-100 chars). Give q and/or barcode."
      },
      "barcode": {
       "type": "string",
       "pattern": "^([0-9]{8}|[0-9]{12,14})$",
       "description": "Product GTIN-8, UPC-A, EAN-13 or GTIN-14 (valid check digit); read live from Open Food Facts."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "description": "Horizon Pulse ingredient nutrition: per item matches[] (source, id, fdcId for USDA matches, name, nutrientsPer100g, allergens null when unknown, sourceUrl, license, attribution), whereToBuy (Open Food Facts store names only), unknowns; attribution[]; disclaimer. The example is a trimmed response recorded from the handler on this method's declared input (USDA snapshot only); live values differ."
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/horizon-pulse-ingredient-nutrition-facts-api-ebae9a98/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from horizonpulse.dev](https://www.zero.xyz/host/horizonpulse.dev/llms.txt)
