Twinkle HubTwinkle Hub

食品營養成分查詢

tw_query_food_nutrition

Santé & alimentation · 9 outils🇹🇼 Taïwanlecture seule

關鍵字 / Keywords: 食品營養 成分 熱量 蛋白質 food nutrition composition calories protein 台灣食品

衛福部 台灣食品營養成分資料 (data.gov.tw 8543, 226,825 行).

每筆 = 1 個食材 × 1 個營養素分析項. 同食材通常有 20+ 筆 (一營養素一筆). 含 每 100g + 每單位 (e.g. 一份/一顆/一片) 含量, 樣本數, 標準差. 至少要給 food_name 或 nutrient 其一.

Args: food_name: 樣品名稱 / 俗名 / 英文名 substring (e.g. "雞蛋", "rice", "豆腐", "mackerel") nutrient: 分析項 substring (e.g. "蛋白質", "鈉", "鐵", "維生素C", "膽固醇", "脂肪酸組成", "膳食纖維") limit: max 結果 (1..500, default 20)

Returns: {n_corpus, n_returned, query, hits: [{category, food, alias, name_en, nutrient_category, nutrient, unit, per_100g, sample_n, per_serving, per_serving_g, integration_id}, ...]}

典型用例: 「雞蛋有多少蛋白質」 → tw_query_food_nutrition(food_name="雞蛋", nutrient="蛋白質") 「鈉含量最高的食物」 → tw_query_food_nutrition(nutrient="鈉", limit=50) 後 client sort

Paramètres

NomTypeDescription
food_namestring
nutrientstring
limitinteger
Schéma JSON brut
{
  "properties": {
    "food_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Food Name"
    },
    "nutrient": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Nutrient"
    },
    "limit": {
      "default": 20,
      "title": "Limit",
      "type": "integer"
    }
  },
  "title": "tw_query_food_nutritionArguments",
  "type": "object"
}

Comment appeler

Amorce — paramètres dans le tableau
tw_query_food_nutrition({ food_name: "…" })