RecipeMate: Search real recipes by ingredients

RecipeMate: Search real recipes by ingredients · GPT アクション

Recipe Action

An action that allows the user to search for a recipe using tags or keywords and pantry ingredients.

  • GET /api/openai/recipesSearches items based on tags and pantry contents.

    Retrieves items filtered by tags and available pantry contents.

  • GET /api/openai/recipe/{uuid}Retrieves a recipe by its UUID.

    Returns details of a single recipe identified by its UUID.

元の API スキーマ
{
  "openapi": "3.1.0",
  "info": {
    "title": "Recipe Action",
    "description": "An action that allows the user to search for a recipe using tags or keywords and pantry ingredients.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://recipemate.app",
      "description": "Production server"
    }
  ],
  "paths": {
    "/api/openai/recipes": {
      "get": {
        "operationId": "searchItems",
        "summary": "Searches items based on tags and pantry contents.",
        "description": "Retrieves items filtered by tags and available pantry contents.",
        "parameters": [
          {
            "name": "tags",
            "in": "query",
            "description": "Tags to filter the search.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pantry",
            "in": "query",
            "description": "Comma-separated list of pantry items to include in the search.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of items matching the search criteria",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "example": "Instant Pot Buffalo Chicken Pasta"
                      },
                      "image": {
                        "type": "string",
                        "format": "uri",
                        "example": "https://img.recipemate.app/insecure/plain/local:/b07e52fb-17c4-4a1e-ad0a-8f3cf24617f7.webp"
                      },
                      "source": {
                        "type": "string",
                        "format": "uri",
                        "example": "https://www.allrecipes.com/recipe/283199/instant-pot-buffalo-chicken-pasta"
                      },
                      "uuid": {
                        "type": "string",
                        "format": "uuid",
                        "example": "b07e52fb-17c4-4a1e-ad0a-8f3cf24617f7"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/openai/recipe/{uuid}": {
      "get": {
        "operationId": "getRecipeByUuid",
        "summary": "Retrieves a recipe by its UUID.",
        "description": "Returns details of a single recipe identified by its UUID.",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "description": "UUID of the recipe to retrieve.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Details of the recipe",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "image": {
                      "type": "string",
                      "format": "uri",
                      "example": "https://img.recipemate.app/insecure/plain/local:/8718d226-87f4-4d2a-b2f6-f8625908eff2.webp"
                    },
                    "title": {
                      "type": "string",
                      "example": "Instant Pot® Shoyu Chicken"
                    },
                    "source": {
                      "type": "string",
                      "format": "uri",
                      "example": "https://www.allrecipes.com/recipe/272631/instant-pot-shoyu-chicken/"
                    },
                    "instructions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "In a high-powered blender (such as Vitamix®), blend pineapple slices to create 1/2 cup pureed pineapple.",
                        "Combine 1/2 cup pureed pineapple, soy sauce, brown sugar, ginger, and garlic in a multi-functional pressure cooker (such as Instant Pot®). Place chicken breast on top. Turn on Saute function and cook for about 8 minutes, stirring occasionally. Cancel saute function. Close and lock the lid. Select high pressure according to manufacturer's instructions; set timer for 10 minutes. Allow 10 to 15 minutes for pressure to build.",
                        "Release pressure carefully using the quick-release method according to manufacturer's instructions, about 5 minutes. Unlock and remove the lid."
                      ]
                    },
                    "ingredients": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "½ pineapple, peeled and sliced, or as needed",
                        "1 cup low-sodium soy sauce",
                        "2 tablespoons brown sugar",
                        "1 piece fresh ginger root, minced",
                        "2 cloves garlic, minced",
                        "2 pounds skinless, boneless chicken breasts, cut into pieces"
                      ]
                    },
                    "nutrition": {
                      "type": "object",
                      "properties": {
                        "calories": {
                          "type": "string",
                          "example": "288 kcal"
                        },
                        "carbohydrateContent": {
                          "type": "string",
                          "example": "24 g"
                        },
                        "fatContent": {
                          "type": "string",
                          "example": "5 g"
                        },
                        "fiberContent": {
                          "type": "string",
                          "example": "2 g"
                        },
                        "proteinContent": {
                          "type": "string",
                          "example": "37 g"
                        },
                        "sugarContent": {
                          "type": "string",
                          "example": "16 g"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {}
  }
}