FatSecret · Schema

FatSecret Food

A food item in the FatSecret Platform database, including identification, brand, and per-serving nutrition data.

Barcode ScanningCaloriesDietsExerciseFitnessFood DiaryHealthMacronutrientsNutritionRecipesWeight Tracking

Properties

Name Type Description
food_id string Unique identifier for the food.
food_name string Display name of the food.
brand_name string Brand name when food_type is Brand.
food_type string
food_url string
servings object
View JSON Schema on GitHub

JSON Schema

fatsecret-food-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/fatsecret/refs/heads/main/json-schema/fatsecret-food-schema.json",
  "title": "FatSecret Food",
  "description": "A food item in the FatSecret Platform database, including identification, brand, and per-serving nutrition data.",
  "type": "object",
  "required": ["food_id", "food_name", "food_type"],
  "properties": {
    "food_id": {
      "type": "string",
      "description": "Unique identifier for the food."
    },
    "food_name": {
      "type": "string",
      "description": "Display name of the food."
    },
    "brand_name": {
      "type": "string",
      "description": "Brand name when food_type is Brand."
    },
    "food_type": {
      "type": "string",
      "enum": ["Generic", "Brand"]
    },
    "food_url": {
      "type": "string",
      "format": "uri"
    },
    "servings": {
      "type": "object",
      "properties": {
        "serving": {
          "oneOf": [
            { "$ref": "#/$defs/Serving" },
            {
              "type": "array",
              "items": { "$ref": "#/$defs/Serving" }
            }
          ]
        }
      }
    }
  },
  "$defs": {
    "Serving": {
      "type": "object",
      "properties": {
        "serving_id": { "type": "string" },
        "serving_description": { "type": "string" },
        "serving_url": { "type": "string", "format": "uri" },
        "metric_serving_amount": { "type": "string" },
        "metric_serving_unit": { "type": "string" },
        "calories": { "type": "string" },
        "carbohydrate": { "type": "string" },
        "protein": { "type": "string" },
        "fat": { "type": "string" },
        "saturated_fat": { "type": "string" },
        "polyunsaturated_fat": { "type": "string" },
        "monounsaturated_fat": { "type": "string" },
        "trans_fat": { "type": "string" },
        "cholesterol": { "type": "string" },
        "sodium": { "type": "string" },
        "potassium": { "type": "string" },
        "fiber": { "type": "string" },
        "sugar": { "type": "string" },
        "vitamin_a": { "type": "string" },
        "vitamin_c": { "type": "string" },
        "calcium": { "type": "string" },
        "iron": { "type": "string" }
      }
    }
  }
}