DietGPT AI

DietGPT AI · GPT アクション

Edamam Food Database Parser API

API for parsing the Edamam food database to extract food entities and nutritional facts.

  • GET /api/food-database/v2/parserFood Database Parser

    Parses the Edamam food database to extract food entities, nutrition facts, and search by nutrients or brand.

  • GET /auto-completeAutocomplete for Food Search

    Provides autocomplete suggestions for food search queries.

  • POST /api/nutrition-detailsFull Recipe Analysis

    Returns the nutritional information based on a POST request of the recipe content.

  • GET /api/nutrition-dataIndividual Text Line Analysis

    Returns the nutritional analysis for the specified food text.

元の API スキーマ
{
  "openapi": "3.0.0",
  "info": {
    "title": "Edamam Food Database Parser API",
    "version": 2,
    "description": "API for parsing the Edamam food database to extract food entities and nutritional facts."
  },
  "servers": [
    {
      "url": "https://api.edamam.com/",
      "description": "Edamam Food Database Parser API"
    }
  ],
  "tags": [
    {
      "name": "Food Request Step 1 - Parser"
    }
  ],
  "paths": {
    "/api/food-database/v2/parser": {
      "get": {
        "tags": [
          "Food Request Step 1 - Parser"
        ],
        "summary": "Food Database Parser",
        "description": "Parses the Edamam food database to extract food entities, nutrition facts, and search by nutrients or brand.",
        "operationId": "parseFoodDatabase",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "app_id",
            "in": "query",
            "description": "The application ID.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "a4eecf0e"
            }
          },
          {
            "name": "app_key",
            "in": "query",
            "description": "The application key.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "b04de010c87645fd54894f8cf87b2207"
            }
          },
          {
            "name": "ingr",
            "in": "query",
            "description": "Keyword search parameter to be found in the food name. REQUIRED if 'upc' and 'brand' are not specified.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "brand",
            "in": "query",
            "description": "Keyword search parameter to be found in the food's brand. REQUIRED if 'ingr' and 'upc' are not specified.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "upc",
            "in": "query",
            "description": "Valid UPC, EAN, or PLU code. REQUIRED if neither 'ingr' nor 'brand' are specified.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nutrition-type",
            "in": "query",
            "description": "Select between cooking and food logging processor.",
            "schema": {
              "type": "string",
              "default": "cooking",
              "enum": [
                "cooking",
                "logging"
              ]
            }
          },
          {
            "name": "health",
            "in": "query",
            "description": "Health label",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "alcohol-free",
                  "celery-free",
                  "crustacean-free",
                  "dairy-free",
                  "egg-free",
                  "fish-free",
                  "fodmap-free",
                  "gluten-free",
                  "immuno-supportive",
                  "keto-friendly",
                  "kidney-friendly",
                  "kosher",
                  "low-fat-abs",
                  "low-potassium",
                  "low-sugar",
                  "lupine-free",
                  "mustard-free",
                  "no-oil-added",
                  "paleo",
                  "peanut-free",
                  "pescatarian",
                  "pork-free",
                  "red-meat-free",
                  "sesame-free",
                  "shellfish-free",
                  "soy-free",
                  "sugar-conscious",
                  "tree-nut-free",
                  "vegan",
                  "vegetarian",
                  "wheat-free"
                ]
              }
            }
          },
          {
            "name": "calories",
            "in": "query",
            "description": "The format is calories=RANGE where RANGE is replaced by the value in kcal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Categories",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "generic-foods",
                  "generic-meals",
                  "packaged-foods",
                  "fast-foods"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of food objects, with detailed information."
          },
          "404": {
            "description": "URL not found or could not be retrieved."
          }
        }
      }
    },
    "/auto-complete": {
      "get": {
        "tags": [
          "Food Search Autocomplete"
        ],
        "summary": "Autocomplete for Food Search",
        "description": "Provides autocomplete suggestions for food search queries.",
        "operationId": "foodSearchAutocomplete",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "app_id",
            "in": "query",
            "description": "The application ID.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "a4eecf0e"
            }
          },
          {
            "name": "app_key",
            "in": "query",
            "description": "The application key.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "b04de010c87645fd54894f8cf87b2207"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "Query text for the autocomplete search.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of autocomplete suggestions to return.",
            "schema": {
              "type": "integer",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Autocomplete suggestions for the query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/nutrition-details": {
      "post": {
        "tags": [
          "Full Recipe Analysis"
        ],
        "summary": "Full Recipe Analysis",
        "description": "Returns the nutritional information based on a POST request of the recipe content.",
        "operationId": "analyzeFullRecipe",
        "x-openai-isConsequential": true,
        "parameters": [
          {
            "name": "app_id",
            "in": "query",
            "description": "App ID for Edamam API.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "e33ce226"
            }
          },
          {
            "name": "app_key",
            "in": "query",
            "description": "App key for Edamam API.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "3c8af65de324a32484d5d601c1553d7b"
            }
          },
          {
            "name": "beta",
            "in": "query",
            "description": "Allow beta features in the request and response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "force",
            "in": "query",
            "description": "Forces the re-evaluation of the recipe. The value, if any, is ignored.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title",
                  "ingr"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "ingr": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "url": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "yield": {
                    "type": "string"
                  },
                  "time": {
                    "type": "string"
                  },
                  "img": {
                    "type": "string"
                  },
                  "prep": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/nutrition-data": {
      "get": {
        "tags": [
          "Individual Text Line Analysis"
        ],
        "summary": "Individual Text Line Analysis",
        "description": "Returns the nutritional analysis for the specified food text.",
        "operationId": "analyzeTextLine",
        "x-openai-isConsequential": false,
        "parameters": [
          {
            "name": "app_id",
            "in": "query",
            "description": "App ID for Edamam API.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "e33ce226"
            }
          },
          {
            "name": "app_key",
            "in": "query",
            "description": "App key for Edamam API.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "3c8af65de324a32484d5d601c1553d7b"
            }
          },
          {
            "name": "nutrition-type",
            "in": "query",
            "description": "Select between the cooking and food logging processor.",
            "schema": {
              "type": "string",
              "default": "cooking",
              "enum": [
                "cooking",
                "logging"
              ]
            }
          },
          {
            "name": "ingr",
            "in": "query",
            "description": "The ingredient.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}