Zero to nutrition data in 3 calls
Everything is plain REST + JSON with one header. Sign up, grab your free key (100 AI credits included, no card), and paste these into a terminal.
The text path
Search → product → nutrients. This is the backbone of every food picker and tracker.
Search for a product
Full-text search across 6.1M products — any label language works, Cyrillic included. Grab the `id` from the first hit.
curl -H "X-API-Key: food_YOUR_KEY" \
"https://foodbase.dev/v1/foods/search?q=nutella&limit=1" {
"data": [{
"id": "2fc13a3b-1913-5ab6-d2c7-8c09b56f93bb",
"name_default": "Nutella",
"brand": "Ferrero",
"barcode": "3017620422003",
"category": "Sweet spreads"
}],
"total": 611
} Fetch the full product
Names in every language the label carries, ingredients, allergens, Nutri-Score, NOVA group — one GET.
curl -H "X-API-Key: food_YOUR_KEY" \
"https://foodbase.dev/v1/foods/2fc13a3b-1913-5ab6-d2c7-8c09b56f93bb" Get the nutrients
40+ nutrient fields per 100 g — macros always, vitamins and minerals where lab or manufacturer data exists.
curl -H "X-API-Key: food_YOUR_KEY" \
"https://foodbase.dev/v1/foods/2fc13a3b-1913-5ab6-d2c7-8c09b56f93bb/nutrients" {
"macros": { "energy_kcal": 539, "fat_g": 30.9, "sugars_g": 56.3, "proteins_g": 6.3 },
"vitamins": { "…": "…" },
"minerals": { "…": "…" }
} The photo path AI
Camera-first apps skip typing entirely: photo in, structured data out. Reads labels in any language, Cyrillic included. Try all of it in your browser first on the playground.
Photo → product
POST a front-of-pack photo; the AI identifies it and matches it against the catalog. 3 credits (every plan includes a monthly credit allowance — free gets 100).
curl -X POST -H "X-API-Key: food_YOUR_KEY" \
-F "[email protected]" \
"https://foodbase.dev/v1/vision/product" {
"extracted": { "name": "Кисело мляко", "brand": "Верея", "confidence": 0.95 },
"matches": [{ "id": "…", "name_default": "Кисело мляко Верея 3.6%", "…": "…" }]
} …or barcode photo → product, free
Barcode decoding is pure computer vision — it costs 0 credits and only touches your data quota. Usually the highest-volume call in a tracker app.
curl -X POST -H "X-API-Key: food_YOUR_KEY" \
-F "[email protected]" \
"https://foodbase.dev/v1/vision/barcode" AI analysis, in your user's language
Turn any product into a readable summary — highlights, warnings, diet compatibility, processing level. 1 credit; answers cached per product + language (en, fr, es, de, it, bg), and every language is translated from one canonical analysis, so verdicts never disagree.
curl -X POST -H "X-API-Key: food_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"barcode":"8000500082379","lang":"bg"}' \
"https://foodbase.dev/v1/analyze/product" Good to know
-
Rate limits answer with
429+ aRetry-Afterheader — honor it and you'll never lose a request. -
Hydrating many products?
POST /v1/foods/bulkfetches up to 100 in one call — better than a parallel loop on any plan. -
Every AI response carries
X-Credits-Remaining, so your cost model builds itself while you test.