TempoLife › Open-source and the food API › food-api
Food & nutrition API
A read-only HTTP API for searching foods and reading their nutrition per 100 g.
This is in beta. It works, but exact fields may change until a stable, versioned release is announced.
What it is
The food API lets you search a food database and read back energy and macronutrients per 100 g as JSON. It is read-only — there is no write access and no personal data of any kind — which keeps it safe to call from a static site or a hobby project. It is currently in beta: the shape below is stable in intent, but treat exact fields as subject to change until a versioned 1.0 is announced, and do not build anything mission-critical on it yet. There is a fair-use rate limit; heavy or commercial use should get in touch first.
Examples
Search for a food
GET https://open.tempolife.app/v1/foods?q=banana&lang=en
{
"query": "banana",
"results": [
{ "id": "banana-raw", "name": "Banana, raw", "kcal_100g": 89 }
]
}Read one food by id
GET https://open.tempolife.app/v1/foods/banana-raw
{
"id": "banana-raw",
"name": "Banana, raw",
"per_100g": { "kcal": 89, "protein_g": 1.1, "carbs_g": 22.8, "fat_g": 0.3 }
}Call it from the shell
curl -s 'https://open.tempolife.app/v1/foods?q=oat+milk'Other packages
Open nutrition dataset
A downloadable CSV/JSON snapshot of common foods and their per-100 g nutrition.
unit-convert (JS)
The tiny, dependency-free converter behind units.tempolife.app, as an open package.
Source: TempoLife open-source and API docs. Status is current as of the check date; a beta or planned status means the interface can still change. · checked 2026-09-04
Frequently asked questions
Is Food & nutrition API ready to use?
It is in beta: usable for prototypes and side projects, but treat exact fields as subject to change until a stable 1.0.
What does it cost?
Nothing within fair use. The released code is open source under a permissive licence with attribution; the beta API is free within a rate limit.
Or just use the app
TempoLife gives you the whole food database plus calculators and trackers, free, no code required.