26trust / 100

Grocery Ingredient

by Horizon Pulse in Other

x402 APIFailing, checked 7 h ago

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.

GET
https://horizonpulse.dev/api/grocery/ingredient
Price
$0.005
per call in USDC
Uptime
3.7%
last 30 days
Response time
240 ms
283 ms slowest 5%
Last check
Failed
7 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 7 h ago: Amount "0.005" is not in atomic token units

Status and outage history · Atom feed · Watch with other listings

How to call it

GET https://horizonpulse.dev/api/grocery/ingredient

Each call costs $0.005 in USDC on Polygon, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

GET https://horizonpulse.dev/api/grocery/ingredient?n=2&q=all-purpose+flour

Parameters

ParameterTypeRequiredDescription
barcodestringNoProduct GTIN-8, UPC-A, EAN-13 or GTIN-14 (valid check digit); read live from Open Food Facts.
nstringNoUSDA matches per item, integer 1-5 as a digit (default 3).
qstringNoIngredient name or a /api/grocery/normalize canonicalId (1-100 chars). Give q and/or barcode.

Example response

The provider's example. We can't check it without paying.

Example response, 94 lines
{
  "asOf": "2026-10-16T14:39:25.223Z",
  "attribution": [
    "Source: U.S. Department of Agriculture, Agricultural Research Service. FoodData Central, Foundation Foods, April 2026. fdc.nal.usda.gov. Public domain (CC0 1.0)."
  ],
  "disclaimer": "Indicative data only. Open Food Facts data is entered by volunteers and USDA data describes generic or reported foods; values can be wrong, missing or out of date, and recipes and labels change. Allergen and ingredient fields may be incomplete: an empty or missing allergen list does NOT mean a product is free of any allergen or trace. Always check the product's own label. Not for medical, dietary or allergy decisions. Not advice.",
  "fdcSnapshot": [
    {
      "dataType": "Foundation",
      "foods": 363,
      "release": "Foundation Foods, April 2026",
      "url": "https://fdc.nal.usda.gov/fdc-datasets/FoodData_Central_foundation_food_json_2026-04-30.zip",
      "zipSha256": "186e988ec542e913f51ef62b86a47758e8cdd0d1dc3889e7b055581f3c09c77a"
    },
    {
      "dataType": "SR Legacy",
      "foods": 7793,
      "release": "SR Legacy, April 2018",
      "url": "https://fdc.nal.usda.gov/fdc-datasets/FoodData_Central_sr_legacy_food_json_2018-04.zip",
      "zipSha256": "0fe8ae486a2c8eb42cb96413f058deb51863a46c8fb8eeb4b1fb45006dd338ef"
    }
  ],
  "items": [
    {
      "matches": [
        {
          "attribution": "Source: U.S. Department of Agriculture, Agricultural Research Service. FoodData Central, Foundation Foods, April 2026. fdc.nal.usda.gov. Public domain (CC0 1.0).",
          "category": "Cereal Grains and Pasta",
          "dataType": "Foundation",
          "fdcId": 790018,
          "id": "790018",
          "license": "Public domain (CC0 1.0)",
          "matchScore": 12.36,
          "name": "Flour, wheat, all-purpose, unenriched, unbleached",
          "nutrientsPer100g": {
            "carbs_g": 74.6,
            "energy_kcal": 362,
            "fat_g": 1.7,
            "fiber_g": 3,
            "protein_g": 12,
            "sat_fat_g": null,
            "sodium_mg": 2,
            "sugars_g": null
          },
          "source": "usda_fdc",
          "sourceUrl": "https://fdc.nal.usda.gov"
        },
        {
          "attribution": "Source: U.S. Department of Agriculture, Agricultural Research Service. FoodData Central, Foundation Foods, April 2026. fdc.nal.usda.gov. Public domain (CC0 1.0).",
          "category": "Cereal Grains and Pasta",
          "dataType": "Foundation",
          "fdcId": 789890,
          "id": "789890",
          "license": "Public domain (CC0 1.0)",
          "matchScore": 10.88,
          "name": "Flour, wheat, all-purpose, enriched, bleached",
          "nutrientsPer100g": {
            "carbs_g": 77.3,
            "energy_kcal": 366,
            "fat_g": 1.48,
            "fiber_g": null,
            "protein_g": 10.9,
            "sat_fat_g": null,
            "sodium_mg": 2,
            "sugars_g": null
          },
          "source": "usda_fdc",
          "sourceUrl": "https://fdc.nal.usda.gov"
        }
      ],
      "query": {
        "q": "all-purpose flour"
      },
      "unknowns": [
        "usda_fdc 790018 sat_fat_g: not published in this release",
        "usda_fdc 790018 sugars_g: not published in this release",
        "usda_fdc 789890 sat_fat_g: not published in this release",
        "usda_fdc 789890 sugars_g: not published in this release",
        "usda_fdc 789890 fiber_g: not published in this release",
        "allergens: not provided for USDA generic foods (give a barcode for Open Food Facts contributor data)"
      ],
      "whereToBuy": null
    }
  ],
  "ok": true,
  "priced": {
    "amountAtomic": "5000",
    "amountUsd": "$0.005",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "network": "base",
    "payTo": "0x5b32c973596078a967562ca652761404f19be0e9"
  },
  "source": "grocery-ingredient"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.005.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://horizonpulse.dev/api/grocery/ingredient?n=2&q=all-purpose+flour'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - 'https://horizonpulse.dev/api/grocery/ingredient?n=2&q=all-purpose+flour' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.005 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.005" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.005 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fhorizonpulse.dev%2Fapi%2Fgrocery%2Fingredient
const res = await pay("https://horizonpulse.dev/api/grocery/ingredient?n=2&q=all-purpose+flour");
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.005 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.005"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.get("https://horizonpulse.dev/api/grocery/ingredient?n=2&q=all-purpose+flour")
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
7 h agoAmount "0.005" is not in atomic token units402469 ms$0.005
15 h agoAmount "0.005" is not in atomic token units402311 ms$0.005
24 h agoAmount "0.005" is not in atomic token units402279 ms$0.005
32 h agoAmount "0.005" is not in atomic token units402334 ms$0.005
40 h agoAmount "0.005" is not in atomic token units402385 ms$0.005
Show 10 older checks
2 days agoAmount "0.005" is not in atomic token units402322 ms$0.005
2 days agoAmount "0.005" is not in atomic token units402389 ms$0.005
3 days agoAmount "0.005" is not in atomic token units402152 ms$0.005
3 days agoAmount "0.005" is not in atomic token units402303 ms$0.005
3 days agoPassed402240 ms$0.005
3 days agoPassed402283 ms$0.005
4 days agoAmount "0.005" is not in atomic token units402159 ms$0.005
4 days agoAmount "0.005" is not in atomic token units402195 ms$0.005
4 days agoAmount "0.005" is not in atomic token units402523 ms$0.005
5 days agoAmount "0.005" is not in atomic token units402310 ms$0.005