首页 生活常用 菜谱大全数据接口
菜谱大全

菜谱大全

49.0024.50/10000次
申请就送1000次
万种菜谱,包含主料、辅料,制作流程。可按分类、关键词检索。
  • 收藏数:1926
  • 使用数:2967
http://api.jisuapi.com/recipe/search
JSON,JSONP
GET POST
http://api.jisuapi.com/recipe/search?keyword=白菜&num=10&appkey=yourappkey

请求参数:

API接口测试工具
参数名称类型必填说明
keyword string 关键词
num int 获取数量

返回参数:

查看完整示例
参数名称类型说明
num int 菜谱数量
id int 菜谱ID
classid int 分类ID
name string 菜谱名称
peoplenum string 用餐人数
preparetime string 烹饪时间
cookingtime string 烹饪时间
content string 菜谱说明
pic string 菜谱图片
tag string 标签
material string 材料
mname string 材料名称
type int 材料类型 0辅料 1主料
amount string 数量
process string 步骤
pcontent string 步骤内容

请求代码:

<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$num = 10;
$keyword = '白菜';//(utf-8)
$url = "http://api.jisuapi.com/recipe/search?appkey=$appkey&keyword=$keyword&num=$num";
$result = curlOpen($url);
$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));

if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}

$result = $jsonarr['result'];
foreach($result['list'] as $val)
{
    echo $val['id'].' '.$val['classid'].' '.$val['name'].' '.$val['peoplenum'].'
'; echo $val['preparetime'].' '.$val['cookingtime'].' '.$val['content'].' '.$val['pic'].' '.$val['tag'].'
'; foreach($val['material'] as $v) { echo $v['mname'].' '.$v['type'].' '.$v['amount'].'
'; } foreach($val['process'] as $v) { echo $v['pcontent'].' '.$v['pic'].'
'; } }

JSON返回示例 :

{
    "status": "0",
    "msg": "ok",
    "result": {
        "num": "10",
        "list": [
            {
                "id": "8",
                "classid": "2",
                "name": "醋溜白菜",
                "peoplenum": "1-2人",
                "preparetime": "10-20分钟",
                "cookingtime": "10-20分钟",
                "content": "醋溜白菜,是北方人经常吃的一道菜,尤其是在多年前的冬天。那时,没有大棚菜,冬天,家家每天佐餐的基本上都是冬储大白菜,聪明的家庭主妇总是想方设法将这单调的菜变成多种菜式,于是,醋溜白菜被频繁的端上餐桌。
美食不分贵贱,用最平凡的原料、最简单的调料和最普通的手法做出美味的菜肴来才是美食的真谛。
这次,我做的醋溜白菜,近似鲁菜的做法,使个这道菜酸甜浓郁、开胃下饭、老少咸宜。", "pic": "http://api.jisuapi.com/recipe/upload/20160719/115138_46688.jpg", "tag": "减肥,家常菜,排毒,补钙", "material": [ { "mname": "油", "type": "0", "amount": "适量" }, { "mname": "盐", "type": "0", "amount": "适量" }, { "mname": "花椒", "type": "0", "amount": "适量" }, { "mname": "干红椒", "type": "0", "amount": "适量" }, { "mname": "葱", "type": "0", "amount": "适量" }, { "mname": "姜", "type": "0", "amount": "适量" }, { "mname": "蒜", "type": "0", "amount": "适量" }, { "mname": "醋", "type": "0", "amount": "适量" }, { "mname": "酱油", "type": "0", "amount": "适量" }, { "mname": "糖", "type": "0", "amount": "适量" }, { "mname": "淀粉", "type": "0", "amount": "适量" }, { "mname": "白菜", "type": "1", "amount": "380g" } ], "process": [ { "pcontent": "准备食材。", "pic": "http://api.jisuapi.com/recipe/upload/20160719/162550_84583.jpg" }, { "pcontent": "将白菜斜刀片成薄片。", "pic": "http://api.jisuapi.com/recipe/upload/20160719/162551_90620.jpg" }, { "pcontent": "片切好的白菜帮与菜叶分别入好。", "pic": "http://api.jisuapi.com/recipe/upload/20160719/162551_20925.jpg" }, { "pcontent": "盐、糖、生抽、醋淀粉加少许水调匀备用。", "pic": "http://api.jisuapi.com/recipe/upload/20160719/162552_23125.jpg" }, { "pcontent": "锅中油烧热,先入花椒炒香后捞出。再加入干红椒段略炒。", "pic": "http://api.jisuapi.com/recipe/upload/20160719/162552_57046.jpg" }, { "pcontent": "加入葱姜蒜煸炒香,然后入白菜帮翻炒。", "pic": "http://api.jisuapi.com/recipe/upload/20160719/162553_89090.jpg" }, { "pcontent": "炒至菜帮变软时,加入白菜叶。", "pic": "http://api.jisuapi.com/recipe/upload/20160719/162553_40445.jpg" }, { "pcontent": "快速翻炒至菜软,勾入碗汁", "pic": "http://api.jisuapi.com/recipe/upload/20160719/162554_92210.jpg" }, { "pcontent": "使汤汁均匀的包裹在菜帮上即可", "pic": "http://api.jisuapi.com/recipe/upload/20160719/162554_29522.jpg" } ] } ] } }

API错误码:

代号说明
201 关键词为空
202 分类ID为空
203 详情ID为空
205 没有信息

系统错误码:

代号说明
101 APPKEY为空或不存在
102 APPKEY已过期
103 APPKEY无请求此数据权限
104 请求超过次数限制
105 IP被禁止
106 IP请求超过限制
107 接口维护中
108 接口已停用
名称权限价格原价
免费套餐 1000次 免费
Level1 10000次 24.50元 49.00元
Level2 20000次 48.50元 97.00元
Level3 50000次 120.00元 240.00元
Level4 100000次 237.50元 475.00元

活动推荐ACTIVITY 更多

  • 短信

其它推荐RECOMMENDED DATA 更多