{
    "openapi": "3.0.0",
    "info": {
        "title": "菜谱查询 - API文档",
        "version": "1.0.0",
        "description": "菜谱查询，生活类厨房类应用必备API，不传word参数时，默认返回不同的菜品及品类和特性，可通过page参数随机值来获取随机菜品。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/caipu\/index": {
            "get": {
                "summary": "查询菜谱列表",
                "tags": [
                    "菜谱查询"
                ],
                "description": "根据关键词查询菜谱列表支持翻页检索",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "num",
                        "in": "query",
                        "description": "返回数量",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 10,
                            "description": "返回数量"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "description": "翻页",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": 1,
                            "description": "翻页"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "食材或菜名",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "黄瓜",
                            "description": "食材或菜名"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "int",
                                            "example": 4836,
                                            "description": "菜谱ID"
                                        },
                                        "tishi": {
                                            "type": "string",
                                            "example": "必须等糖醋汁凉透后再浸泡黄瓜，这样黄瓜会更脆爽。",
                                            "description": "提示"
                                        },
                                        "zuofa": {
                                            "type": "string",
                                            "example": "1.将黄瓜洗净，切成蓑衣花刀，用盐腌10分钟，再用清水冲洗后沥干水分装盘.....",
                                            "description": "做法"
                                        },
                                        "texing": {
                                            "type": "string",
                                            "example": "清淡爽口，酸甜稍辣。",
                                            "description": "菜肴特性"
                                        },
                                        "cp_name": {
                                            "type": "string",
                                            "example": "蓑衣黄瓜",
                                            "description": "菜肴名称"
                                        },
                                        "type_id": {
                                            "type": "int",
                                            "example": 439,
                                            "description": "类型ID"
                                        },
                                        "tiaoliao": {
                                            "type": "string",
                                            "example": "食用油30克；香醋1小匙(3克)；精盐3小匙(9克)；白糖1\/2小匙(1.5克)；味精1\/2小匙(1.5克)",
                                            "description": "调料"
                                        },
                                        "yuanliao": {
                                            "type": "string",
                                            "example": "黄瓜250克；香菇25克；胡萝卜25克；冬笋25克；大葱1根；生姜1小块",
                                            "description": "原料"
                                        },
                                        "type_name": {
                                            "type": "string",
                                            "example": "凉菜类",
                                            "description": "类型名称"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": 4836,
                                                "tishi": "必须等糖醋汁凉透后再浸泡黄瓜，这样黄瓜会更脆爽。",
                                                "zuofa": "1.将黄瓜洗净，切成蓑衣花刀，用盐腌10分钟，再用清水冲洗后沥干水分装盘；2.将香菇、胡萝卜、冬笋、葱、姜洗净切丝；3.锅内放油，油烧至六成热时放入葱丝、姜丝，炒出香味后再倒入香菇丝、胡萝卜丝、冬笋丝翻炒，加入白糖、醋、精盐、味精，烧开；4.将糖醋汁放凉后倒入装黄瓜的盘中，浸泡几小时后即可食用。",
                                                "texing": "清淡爽口，酸甜稍辣。",
                                                "cp_name": "蓑衣黄瓜",
                                                "type_id": 439,
                                                "tiaoliao": "食用油30克；香醋1小匙(3克)；精盐3小匙(9克)；白糖1\/2小匙(1.5克)；味精1\/2小匙(1.5克)",
                                                "yuanliao": "黄瓜250克；香菇25克；胡萝卜25克；冬笋25克；大葱1根；生姜1小块",
                                                "type_name": "凉菜类"
                                            },
                                            {
                                                "id": 4649,
                                                "tishi": "",
                                                "zuofa": "1.用清水将黄瓜洗净，切成2寸长的段，片下黄瓜皮，卷成卷，放入盆中，撒些精盐，腌10分钟，捞出，挤出水，码在盆中。2.用刀将姜刮去皮，洗净，切成细丝，放在黄瓜皮上。3.锅中注入适量清水，加入醋精、白糖，上火熬化后晾凉，倒在黄瓜皮上，再放入桂花酱，用盘子盖上腌十小时。4.将黄瓜皮卷取出，切成小段，断面朝上，码在盘中即可食用。",
                                                "texing": "",
                                                "cp_name": "炝黄瓜衣",
                                                "type_id": 429,
                                                "tiaoliao": "精盐1克，醋精20克，白糖50克，桂花酱10克，姜15克。",
                                                "yuanliao": "黄瓜750克(约6条)。",
                                                "type_name": "第二道菜"
                                            },
                                            {
                                                "id": 4630,
                                                "tishi": "",
                                                "zuofa": "1.用清水将黄瓜洗净，顺长切成4条，片去黄瓜子，切成3分见方的丁，放入碗中，加入少许精盐，拌匀，腌3分钟，滗去水。2.用刀将猪肉片成3分厚的大片，剞上十字花刀，切成3分见方的丁。3.坐煸锅，注入熟猪油，烧至六成热，放入肉丁煸炒；待肉丁内的水分炒出来时，锅内响声加大，随即放入葱姜末、黄酱继续煸炒；待黄酱裹匀肉丁并散发出酱香味时，加入料酒、精盐继续煸炒均匀，再加入黄瓜丁，淋上香油翻炒均匀，即可出锅。",
                                                "texing": "",
                                                "cp_name": "炒黄瓜酱",
                                                "type_id": 429,
                                                "tiaoliao": "料酒10克，精盐1克，黄酱10克，葱姜末各少许，熟猪油15克，香油5克。",
                                                "yuanliao": "主料：瘦猪肉150克。配料：嫩黄瓜1条(约100克)。",
                                                "type_name": "第二道菜"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询菜谱列表",
                "tags": [
                    "菜谱查询"
                ],
                "description": "根据关键词查询菜谱列表支持翻页检索",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "num": {
                                        "type": "int",
                                        "example": 10,
                                        "description": "返回数量"
                                    },
                                    "page": {
                                        "type": "string",
                                        "example": 1,
                                        "description": "翻页"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "黄瓜",
                                        "description": "食材或菜名"
                                    }
                                },
                                "required": [
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "int",
                                            "example": 4836,
                                            "description": "菜谱ID"
                                        },
                                        "tishi": {
                                            "type": "string",
                                            "example": "必须等糖醋汁凉透后再浸泡黄瓜，这样黄瓜会更脆爽。",
                                            "description": "提示"
                                        },
                                        "zuofa": {
                                            "type": "string",
                                            "example": "1.将黄瓜洗净，切成蓑衣花刀，用盐腌10分钟，再用清水冲洗后沥干水分装盘.....",
                                            "description": "做法"
                                        },
                                        "texing": {
                                            "type": "string",
                                            "example": "清淡爽口，酸甜稍辣。",
                                            "description": "菜肴特性"
                                        },
                                        "cp_name": {
                                            "type": "string",
                                            "example": "蓑衣黄瓜",
                                            "description": "菜肴名称"
                                        },
                                        "type_id": {
                                            "type": "int",
                                            "example": 439,
                                            "description": "类型ID"
                                        },
                                        "tiaoliao": {
                                            "type": "string",
                                            "example": "食用油30克；香醋1小匙(3克)；精盐3小匙(9克)；白糖1\/2小匙(1.5克)；味精1\/2小匙(1.5克)",
                                            "description": "调料"
                                        },
                                        "yuanliao": {
                                            "type": "string",
                                            "example": "黄瓜250克；香菇25克；胡萝卜25克；冬笋25克；大葱1根；生姜1小块",
                                            "description": "原料"
                                        },
                                        "type_name": {
                                            "type": "string",
                                            "example": "凉菜类",
                                            "description": "类型名称"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": 4836,
                                                "tishi": "必须等糖醋汁凉透后再浸泡黄瓜，这样黄瓜会更脆爽。",
                                                "zuofa": "1.将黄瓜洗净，切成蓑衣花刀，用盐腌10分钟，再用清水冲洗后沥干水分装盘；2.将香菇、胡萝卜、冬笋、葱、姜洗净切丝；3.锅内放油，油烧至六成热时放入葱丝、姜丝，炒出香味后再倒入香菇丝、胡萝卜丝、冬笋丝翻炒，加入白糖、醋、精盐、味精，烧开；4.将糖醋汁放凉后倒入装黄瓜的盘中，浸泡几小时后即可食用。",
                                                "texing": "清淡爽口，酸甜稍辣。",
                                                "cp_name": "蓑衣黄瓜",
                                                "type_id": 439,
                                                "tiaoliao": "食用油30克；香醋1小匙(3克)；精盐3小匙(9克)；白糖1\/2小匙(1.5克)；味精1\/2小匙(1.5克)",
                                                "yuanliao": "黄瓜250克；香菇25克；胡萝卜25克；冬笋25克；大葱1根；生姜1小块",
                                                "type_name": "凉菜类"
                                            },
                                            {
                                                "id": 4649,
                                                "tishi": "",
                                                "zuofa": "1.用清水将黄瓜洗净，切成2寸长的段，片下黄瓜皮，卷成卷，放入盆中，撒些精盐，腌10分钟，捞出，挤出水，码在盆中。2.用刀将姜刮去皮，洗净，切成细丝，放在黄瓜皮上。3.锅中注入适量清水，加入醋精、白糖，上火熬化后晾凉，倒在黄瓜皮上，再放入桂花酱，用盘子盖上腌十小时。4.将黄瓜皮卷取出，切成小段，断面朝上，码在盘中即可食用。",
                                                "texing": "",
                                                "cp_name": "炝黄瓜衣",
                                                "type_id": 429,
                                                "tiaoliao": "精盐1克，醋精20克，白糖50克，桂花酱10克，姜15克。",
                                                "yuanliao": "黄瓜750克(约6条)。",
                                                "type_name": "第二道菜"
                                            },
                                            {
                                                "id": 4630,
                                                "tishi": "",
                                                "zuofa": "1.用清水将黄瓜洗净，顺长切成4条，片去黄瓜子，切成3分见方的丁，放入碗中，加入少许精盐，拌匀，腌3分钟，滗去水。2.用刀将猪肉片成3分厚的大片，剞上十字花刀，切成3分见方的丁。3.坐煸锅，注入熟猪油，烧至六成热，放入肉丁煸炒；待肉丁内的水分炒出来时，锅内响声加大，随即放入葱姜末、黄酱继续煸炒；待黄酱裹匀肉丁并散发出酱香味时，加入料酒、精盐继续煸炒均匀，再加入黄瓜丁，淋上香油翻炒均匀，即可出锅。",
                                                "texing": "",
                                                "cp_name": "炒黄瓜酱",
                                                "type_id": 429,
                                                "tiaoliao": "料酒10克，精盐1克，黄酱10克，葱姜末各少许，熟猪油15克，香油5克。",
                                                "yuanliao": "主料：瘦猪肉150克。配料：嫩黄瓜1条(约100克)。",
                                                "type_name": "第二道菜"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/caipu\/cpinfo": {
            "get": {
                "summary": "查询菜谱详情",
                "tags": [
                    "菜谱查询"
                ],
                "description": "根据返回ID查询菜谱详细内容",
                "parameters": [
                    {
                        "name": "id",
                        "in": "query",
                        "description": "菜品ID",
                        "required": true,
                        "schema": {
                            "type": "int",
                            "example": 4836,
                            "description": "菜品ID"
                        }
                    },
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "int",
                                            "example": 4836,
                                            "description": "菜谱ID"
                                        },
                                        "tishi": {
                                            "type": "string",
                                            "example": "必须等糖醋汁凉透后再浸泡黄瓜，这样黄瓜会更脆爽。",
                                            "description": "提示"
                                        },
                                        "zuofa": {
                                            "type": "string",
                                            "example": "1.将黄瓜洗净，切成蓑衣花刀，用盐腌10分钟，再用清水冲洗后沥干水分装盘.....",
                                            "description": "做法"
                                        },
                                        "texing": {
                                            "type": "string",
                                            "example": "清淡爽口，酸甜稍辣。",
                                            "description": "菜肴特性"
                                        },
                                        "cp_name": {
                                            "type": "string",
                                            "example": "蓑衣黄瓜",
                                            "description": "菜肴名称"
                                        },
                                        "type_id": {
                                            "type": "int",
                                            "example": 439,
                                            "description": "类型ID"
                                        },
                                        "tiaoliao": {
                                            "type": "string",
                                            "example": "食用油30克；香醋1小匙(3克)；精盐3小匙(9克)；白糖1\/2小匙(1.5克)；味精1\/2小匙(1.5克)",
                                            "description": "调料"
                                        },
                                        "yuanliao": {
                                            "type": "string",
                                            "example": "黄瓜250克；香菇25克；胡萝卜25克；冬笋25克；大葱1根；生姜1小块",
                                            "description": "原料"
                                        },
                                        "type_name": {
                                            "type": "string",
                                            "example": "凉菜类",
                                            "description": "类型名称"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": 4836,
                                                "tishi": "必须等糖醋汁凉透后再浸泡黄瓜，这样黄瓜会更脆爽。",
                                                "zuofa": "1.将黄瓜洗净，切成蓑衣花刀，用盐腌10分钟，再用清水冲洗后沥干水分装盘；2.将香菇、胡萝卜、冬笋、葱、姜洗净切丝；3.锅内放油，油烧至六成热时放入葱丝、姜丝，炒出香味后再倒入香菇丝、胡萝卜丝、冬笋丝翻炒，加入白糖、醋、精盐、味精，烧开；4.将糖醋汁放凉后倒入装黄瓜的盘中，浸泡几小时后即可食用。",
                                                "texing": "清淡爽口，酸甜稍辣。",
                                                "cp_name": "蓑衣黄瓜",
                                                "type_id": 439,
                                                "tiaoliao": "食用油30克；香醋1小匙(3克)；精盐3小匙(9克)；白糖1\/2小匙(1.5克)；味精1\/2小匙(1.5克)",
                                                "yuanliao": "黄瓜250克；香菇25克；胡萝卜25克；冬笋25克；大葱1根；生姜1小块",
                                                "type_name": "凉菜类"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询菜谱详情",
                "tags": [
                    "菜谱查询"
                ],
                "description": "根据返回ID查询菜谱详细内容",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "int",
                                        "example": 4836,
                                        "description": "菜品ID"
                                    },
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    }
                                },
                                "required": [
                                    "id",
                                    "key"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "int",
                                            "example": 4836,
                                            "description": "菜谱ID"
                                        },
                                        "tishi": {
                                            "type": "string",
                                            "example": "必须等糖醋汁凉透后再浸泡黄瓜，这样黄瓜会更脆爽。",
                                            "description": "提示"
                                        },
                                        "zuofa": {
                                            "type": "string",
                                            "example": "1.将黄瓜洗净，切成蓑衣花刀，用盐腌10分钟，再用清水冲洗后沥干水分装盘.....",
                                            "description": "做法"
                                        },
                                        "texing": {
                                            "type": "string",
                                            "example": "清淡爽口，酸甜稍辣。",
                                            "description": "菜肴特性"
                                        },
                                        "cp_name": {
                                            "type": "string",
                                            "example": "蓑衣黄瓜",
                                            "description": "菜肴名称"
                                        },
                                        "type_id": {
                                            "type": "int",
                                            "example": 439,
                                            "description": "类型ID"
                                        },
                                        "tiaoliao": {
                                            "type": "string",
                                            "example": "食用油30克；香醋1小匙(3克)；精盐3小匙(9克)；白糖1\/2小匙(1.5克)；味精1\/2小匙(1.5克)",
                                            "description": "调料"
                                        },
                                        "yuanliao": {
                                            "type": "string",
                                            "example": "黄瓜250克；香菇25克；胡萝卜25克；冬笋25克；大葱1根；生姜1小块",
                                            "description": "原料"
                                        },
                                        "type_name": {
                                            "type": "string",
                                            "example": "凉菜类",
                                            "description": "类型名称"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "id": 4836,
                                                "tishi": "必须等糖醋汁凉透后再浸泡黄瓜，这样黄瓜会更脆爽。",
                                                "zuofa": "1.将黄瓜洗净，切成蓑衣花刀，用盐腌10分钟，再用清水冲洗后沥干水分装盘；2.将香菇、胡萝卜、冬笋、葱、姜洗净切丝；3.锅内放油，油烧至六成热时放入葱丝、姜丝，炒出香味后再倒入香菇丝、胡萝卜丝、冬笋丝翻炒，加入白糖、醋、精盐、味精，烧开；4.将糖醋汁放凉后倒入装黄瓜的盘中，浸泡几小时后即可食用。",
                                                "texing": "清淡爽口，酸甜稍辣。",
                                                "cp_name": "蓑衣黄瓜",
                                                "type_id": 439,
                                                "tiaoliao": "食用油30克；香醋1小匙(3克)；精盐3小匙(9克)；白糖1\/2小匙(1.5克)；味精1\/2小匙(1.5克)",
                                                "yuanliao": "黄瓜250克；香菇25克；胡萝卜25克；冬笋25克；大葱1根；生姜1小块",
                                                "type_name": "凉菜类"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}