Food Analyser

Food Analyser · Actions GPT

Nutrition Information API

API for retrieving detailed nutrition information based on food or drink items.

  • GET /nutritionGet Nutrition Information

    Retrieves detailed nutrition information for each item from a text query.

Schéma original API
{
  "openapi": "3.0.0",
  "info": {
    "title": "Nutrition Information API",
    "version": "1.0.0",
    "description": "API for retrieving detailed nutrition information based on food or drink items."
  },
  "servers": [
    {
      "url": "https://api.calorieninjas.com/v1"
    }
  ],
  "paths": {
    "/nutrition": {
      "get": {
        "summary": "Get Nutrition Information",
        "operationId": "getNutritionalValue",
        "description": "Retrieves detailed nutrition information for each item from a text query.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "A string containing food or drink items with optional quantities.",
            "schema": {
              "type": "string",
              "example": "3 tomatoes, 1lb beef brisket"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of nutrition information for the queried items.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "sugar_g": {
                            "type": "number"
                          },
                          "fiber_g": {
                            "type": "number"
                          },
                          "serving_size_g": {
                            "type": "number"
                          },
                          "sodium_mg": {
                            "type": "number"
                          },
                          "name": {
                            "type": "string"
                          },
                          "potassium_mg": {
                            "type": "number"
                          },
                          "fat_saturated_g": {
                            "type": "number"
                          },
                          "fat_total_g": {
                            "type": "number"
                          },
                          "calories": {
                            "type": "number"
                          },
                          "cholesterol_mg": {
                            "type": "number"
                          },
                          "protein_g": {
                            "type": "number"
                          },
                          "carbohydrates_total_g": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    }
  }
}

Nutrition Information API

API for retrieving detailed nutrition information based on food or drink items.

  • GET /nutritionGet Nutrition Information

    Retrieves detailed nutrition information for each item from a text query.

Schéma original API
{
  "openapi": "3.0.0",
  "info": {
    "title": "Nutrition Information API",
    "version": "1.0.0",
    "description": "API for retrieving detailed nutrition information based on food or drink items."
  },
  "servers": [
    {
      "url": "https://api.calorieninjas.com/v1"
    }
  ],
  "paths": {
    "/nutrition": {
      "get": {
        "summary": "Get Nutrition Information",
        "operationId": "getNutritionalValue",
        "description": "Retrieves detailed nutrition information for each item from a text query.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "A string containing food or drink items with optional quantities.",
            "schema": {
              "type": "string",
              "example": "3 tomatoes, 1lb beef brisket"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of nutrition information for the queried items.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "sugar_g": {
                            "type": "number"
                          },
                          "fiber_g": {
                            "type": "number"
                          },
                          "serving_size_g": {
                            "type": "number"
                          },
                          "sodium_mg": {
                            "type": "number"
                          },
                          "name": {
                            "type": "string"
                          },
                          "potassium_mg": {
                            "type": "number"
                          },
                          "fat_saturated_g": {
                            "type": "number"
                          },
                          "fat_total_g": {
                            "type": "number"
                          },
                          "calories": {
                            "type": "number"
                          },
                          "cholesterol_mg": {
                            "type": "number"
                          },
                          "protein_g": {
                            "type": "number"
                          },
                          "carbohydrates_total_g": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    }
  }
}