Contact Us
Back top
Current Location : APIs > 餐饮数据接口
餐饮数据接口 Transactions( 86 )

餐饮数据接口

1685

Intro. : Multiple Catering platform data collection, detailed restaurant data

Tag : 餐饮

On Shelves Time : 2019-08-19

Type :

Total invocations(updated per hour)

餐饮数据接口 ¥ 3.00 yuan/100calls 辅助工具 每天免费测试 30

接口服务

接口延迟等级: - 平台反爬等级: -
平台升级频率: -

数据指标

最大数据量: 无限制 最大页数: 无限制
每页数据量: 10 数据实时性: 实时
数据回溯性: 全部 数据排序项: 平台默认
缺失的数据字段: 暂无 备注:

API Mark

Example

Error Code
-- 请求示例 url 默认请求参数已经做URL编码 curl -i "http://api01.idataapi.cn:8000/restaurant/idataapi?apikey={Your apikey}&"
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.net.URL; import java.nio.charset.Charset; import org.json.JSONException; import org.json.JSONObject; import java.io.PrintWriter; import java.net.URLConnection; public class Example { private static String readAll(Reader rd) throws IOException { StringBuilder sb = new StringBuilder(); int cp; while ((cp = rd.read()) != -1) { sb.append((char) cp); } return sb.toString(); } public static JSONObject postRequestFromUrl(String url, String body) throws IOException, JSONException { URL realUrl = new URL(url); URLConnection conn = realUrl.openConnection(); conn.setDoOutput(true); conn.setDoInput(true); PrintWriter out = new PrintWriter(conn.getOutputStream()); out.print(body); out.flush(); InputStream instream = conn.getInputStream(); try { BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8"))); String jsonText = readAll(rd); JSONObject json = new JSONObject(jsonText); return json; } finally { instream.close(); } } public static JSONObject getRequestFromUrl(String url) throws IOException, JSONException { URL realUrl = new URL(url); URLConnection conn = realUrl.openConnection(); InputStream instream = conn.getInputStream(); try { BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8"))); String jsonText = readAll(rd); JSONObject json = new JSONObject(jsonText); return json; } finally { instream.close(); } } public static void main(String[] args) throws IOException, JSONException { // 请求示例 url 默认请求参数已经做URL编码 String url = "http://api01.idataapi.cn:8000/restaurant/idataapi?apikey={Your apikey}&"; JSONObject json = getRequestFromUrl(url);; System.out.println(json.toString()); } }
//using System.Net.Security; //using System.Security.Cryptography.X509Certificates; private const String method = "GET"; static void Main(string[] args) { String bodys = ""; // 请求示例 url 默认请求参数已经做URL编码 String url = "http://api01.idataapi.cn:8000/restaurant/idataapi?apikey={Your apikey}&"; HttpWebRequest httpRequest = null; HttpWebResponse httpResponse = null; if (url.Contains("https://")) { ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult); httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url)); } else { httpRequest = (HttpWebRequest)WebRequest.Create(url); } httpRequest.Method = method; if (0 < bodys.Length) { byte[] data = Encoding.UTF8.GetBytes(bodys); using (Stream stream = httpRequest.GetRequestStream()) { stream.Write(data, 0, data.Length); } } try { httpResponse = (HttpWebResponse)httpRequest.GetResponse(); } catch (WebException ex) { httpResponse = (HttpWebResponse)ex.Response; } Console.WriteLine(httpResponse.StatusCode); Console.WriteLine(httpResponse.Method); Console.WriteLine(httpResponse.Headers); Stream st = httpResponse.GetResponseStream(); StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8")); Console.WriteLine(reader.ReadToEnd()); Console.WriteLine("\n"); } public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) { return true; }
<?php $method = "GET"; // 请求示例 url 默认请求参数已经做URL编码 $url = "http://api01.idataapi.cn:8000/restaurant/idataapi?apikey={Your apikey}&"; $curl = curl_init(); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_FAILONERROR, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HEADER, true); curl_setopt($curl, CURLOPT_ENCODING, "gzip"); var_dump(curl_exec($curl)); ?>
# coding:utf-8 """ Compatible for python2.x and python3.x requirement: pip install requests """ from __future__ import print_function import requests # 请求示例 url 默认请求参数已经做URL编码 url = "http://api01.idataapi.cn:8000/restaurant/idataapi?apikey={Your apikey}&" headers = { "Accept-Encoding": "gzip", "Connection": "close" } if __name__ == "__main__": r = requests.get(url, headers=headers) json_obj = r.json() print(json_obj)

Request Field( Params marked* means users should choose one from the each marked items to fill in.)

Property Name Type Mandatory Example Description
sortBy string commentCount|monthSaleCount (使用经纬度+距离查询时,先按距离排序)
city string 武汉
kw string
tags string 例子:"小吃" 查询tags字段是否包含输入参数
hasTakeaway string 1:有外卖业务 (注:查询单一平台数据时,不生效)
pageToken string
lon string 114.346 根据经纬度+距离搜索
lat string 30.507 根据经纬度+距离搜索
distance string 2km km千米,m米,必须搭配纬度以及距离一起使用才能生效,根据经纬度+距离搜索
appCode string 为空则查询融合数据。输入具体平台代码则查询对应平台数据

Response Fields

Property Name Type Example Description
  • -
    data array [...] 数据内容列表
    • +
      externalIds array [...] 分组关联的外部ids列表
      • appCode string ele 平台代码
      • id string E11238046811353049531 合作者id
    • ratingRank number 0 评分排名,0到1,如0.88表示超过88%的周边商家
    • ratingCount number 7 评分次数
    • catId3 string 050118 3级分类ID
    • coverUrl string xxxx 封面url
    • catId2 string 100244 2级分类ID
    • tipInfo string null 提示信息
    • subtitle string null 优惠券标题2
    • description string 临街 抵押物详情
    • openingHours array [...] 营业时间
    • createDate number 1560539516 采集时间
    • deliverTime number 25 配送时间
    • cityPinyin string shanghai 中文城市拼音
    • +
      ratingDist array [...] 评分分布
      • key string 6星 评论者属性
      • value number 3 年产值
    • title string 山东水饺 抵押物名称
    • imageUrls array [...] 图片链接列表
    • state string 上海 州、省
    • appCode string idataapi 平台代码
    • catName1 array [...] 产品类别
    • catName4 string null 4级分类名
    • +
      recommendDishes array [...] 推荐菜
      • price number 3 价格
      • name string 咸鸭蛋 合作者名称
      • value number 1 年产值
    • country string 中国 代理商国别
    • coupons string null 团购、代金券、优惠券列表
    • city string 上海 城市
    • bulletin string null 公告信息
    • businessDistrict string 普陀区 商圈名
    • catName5 string null 5级分类名
    • commentCount number 34 评论数
    • unifiedId number 158545665 分组id
    • catId4 string null 4级分类ID
    • goodTagDist string null 正面标签列表
    • price number 16 价格
    • telephones array [...] 代理商联系电话列表
    • address string 上海市普陀区桃浦镇金鼎路1800号A 街道地址
    • deliverProvider string 蜂鸟快送 配送服务提供商
    • isShutdown number 0 是否关店
    • catPathKey string 小吃馆_饺子馄饨 分类路径
    • minDeliver number 15 最低配送金额,单位元
    • keyValues string null 其他键值对列表
    • url string https://www.ele.me/shop/E11238046811353049531 菜的url
    • otherIds array [...] 其他id列表,例如平台的旧id
    • lastCommentDate string 2019-05-24 10:47:29 最后评论时间
    • id string 158545665 合作者id
    • avgPrice number 16 平均价格
    • catId5 string null 5级分类ID
    • minDeliverFee number 15 最低配送费,单位元
    • deliverFee number 3 配送费,单位元
    • logiRating number 4 物流评分
    • district string 普陀区
    • rating number 3.98 评分
    • qualRating number 5 质量评分
    • tags array [...] 标签列表
    • +
      geoPoint object {...} 经纬度
      • lon number 121.367634 经度
      • lat number 31.258968 纬度
    • catName2 array [...] 实体二级级类型:文化人物,娱乐人物
    • branchTitle string null 分店名 如:福田店 南山店
    • isChainStore number 0 是否连锁店
    • hasTakeaway number 1 是否可以外卖
    • visitCount string null 兴趣点的访问数、以及看房数
    • likeCount string null 点赞数
    • monthSaleCount number 164 月销量
    • location string null 办公位置
    • saleStatus string null 销售状态
    • promotions array [...] 优惠、促销信息
    • servRating number 5 服务评分
    • catName3 string 特色/地方风味餐厅 3级分类名
    • catId1 string 100180 1级分类ID
    • assistServices array [...] 辅助服务列表:订座,团购,外卖
    • badTagDist string null 负面标签列表
    • idVerified number 0 账号是否认证
    • hasBooking number 0 是否可以预约
    • enviRating number 6 周边环境评分
  • total number 543085 数据条目总数
  • dataType string hotel 数据类型
  • hasNext boolean true 是否有下一页
  • pageToken string xxxx 翻页值
  • retcode string 000000 返回状态码

Returns The Sample

{
    "data": [
        {
            "externalIds": [
                {
                    "appCode": "ele",
                    "id": "E11238046811353049531"
                },
                {
                    "appCode": "meituanwm",
                    "id": "6592476"
                },
                {
                    "appCode": "dianping",
                    "id": "41085461"
                },
                {
                    "appCode": "amap",
                    "id": "B0FFGWUWV5"
                },
                {
                    "appCode": "baidumap",
                    "id": "13c343a96adda236b5147fe7"
                }
            ],
            "ratingRank": 0,
            "ratingCount": 7,
            "catId3": "050118",
            "coverUrl": "xxxx",
            "catId2": "100244",
            "tipInfo": null,
            "subtitle": null,
            "description": "临街",
            "openingHours": [
                "09:30\/23:00"
            ],
            "createDate": 1560539516,
            "deliverTime": 25,
            "cityPinyin": "shanghai",
            "ratingDist": [
                {
                    "key": "6星",
                    "value": 3
                },
                {
                    "key": "2星",
                    "value": 1
                },
                {
                    "key": "5星",
                    "value": 1
                },
                {
                    "key": "4星",
                    "value": 0
                },
                {
                    "key": "1星",
                    "value": 0
                },
                {
                    "key": "0星",
                    "value": 0
                },
                {
                    "key": "3星",
                    "value": 1
                }
            ],
            "title": "山东水饺",
            "imageUrls": [
                "xxxxxxx"
            ],
            "state": "上海",
            "appCode": "idataapi",
            "catName1": [
                "美食",
                "早餐",
                "快餐便当"
            ],
            "catName4": null,
            "recommendDishes": [
                {
                    "price": 3,
                    "name": "咸鸭蛋",
                    "value": 1
                },
                {
                    "price": 14,
                    "name": "凉菜拼盘",
                    "value": 0
                },
                {
                    "price": 32,
                    "name": "虾仁肉",
                    "value": 0
                },
                {
                    "price": 25,
                    "name": "凉拌猪头肉",
                    "value": 0
                },
                {
                    "price": 30,
                    "name": "香菇肉水饺",
                    "value": 0
                },
                {
                    "price": 30,
                    "name": "牛肉水饺",
                    "value": 0
                },
                {
                    "price": 12,
                    "name": "凉拌黄瓜",
                    "value": 0
                },
                {
                    "price": 12,
                    "name": "芹菜牛肉",
                    "value": 0
                },
                {
                    "price": 12,
                    "name": "白菜猪肉",
                    "value": 0
                },
                {
                    "price": 12,
                    "name": "凉拌花生米",
                    "value": 0
                },
                {
                    "price": 12,
                    "name": "凉拌海带丝",
                    "value": 0
                },
                {
                    "price": 12,
                    "name": "凉拌腐竹",
                    "value": 0
                },
                {
                    "price": 12,
                    "name": "凉拌干丝",
                    "value": 0
                },
                {
                    "price": 25,
                    "name": "凉拌猪耳朵",
                    "value": 0
                },
                {
                    "price": 25,
                    "name": "鲜肉水饺",
                    "value": 0
                },
                {
                    "price": 34,
                    "name": "饺子全家福",
                    "value": 0
                },
                {
                    "price": 8,
                    "name": "热干面",
                    "value": 0
                },
                {
                    "price": 30,
                    "name": "玉米肉",
                    "value": 0
                },
                {
                    "price": 35,
                    "name": "香菇肉",
                    "value": 0
                },
                {
                    "price": 25,
                    "name": "韭菜鸡蛋",
                    "value": 0
                },
                {
                    "price": 25,
                    "name": "韭菜肉",
                    "value": 0
                },
                {
                    "price": 30,
                    "name": "荠菜肉",
                    "value": 0
                },
                {
                    "price": 12,
                    "name": "凉拌香辣土豆丝",
                    "value": 0
                },
                {
                    "price": 12,
                    "name": "凉拌藕片",
                    "value": 0
                }
            ],
            "country": "中国",
            "coupons": null,
            "city": "上海",
            "bulletin": null,
            "businessDistrict": "普陀区",
            "catName5": null,
            "commentCount": 34,
            "unifiedId": 158545665,
            "catId4": null,
            "goodTagDist": null,
            "price": 16,
            "telephones": [
                "13681867579",
                "17621878826",
                "15026960451"
            ],
            "address": "上海市普陀区桃浦镇金鼎路1800号A",
            "deliverProvider": "蜂鸟快送",
            "isShutdown": 0,
            "catPathKey": "小吃馆_饺子馄饨",
            "minDeliver": 15,
            "keyValues": null,
            "url": "https:\/\/www.ele.me\/shop\/E11238046811353049531",
            "otherIds": [
                152269332
            ],
            "lastCommentDate": "2019-05-24 10:47:29",
            "id": "158545665",
            "avgPrice": 16,
            "catId5": null,
            "minDeliverFee": 15,
            "deliverFee": 3,
            "logiRating": 4,
            "district": "普陀区",
            "rating": 3.98,
            "qualRating": 5,
            "tags": [
                "快餐",
                "其他快餐"
            ],
            "geoPoint": {
                "lon": 121.367634,
                "lat": 31.258968
            },
            "catName2": [
                "粥面饺子",
                "饺子",
                "面食粥点",
                "饺子馄饨",
                "小吃快餐店",
                "中餐厅"
            ],
            "branchTitle": null,
            "isChainStore": 0,
            "hasTakeaway": 1,
            "visitCount": null,
            "likeCount": null,
            "monthSaleCount": 164,
            "location": null,
            "saleStatus": null,
            "promotions": [
                "限时秒杀-19.9午餐 特价商品19.9元起",
                "超级会员专享红包 超级会员领8元无门槛红包",
                "自营销复杂满减活动 满25减6,满35减10,满50减15"
            ],
            "servRating": 5,
            "catName3": "特色\/地方风味餐厅",
            "catId1": "100180",
            "assistServices": [
                "外卖"
            ],
            "badTagDist": null,
            "idVerified": 0,
            "hasBooking": 0,
            "enviRating": 6
        }
    ],
    "total": 543085,
    "dataType": "hotel",
    "hasNext": true,
    "pageToken": "xxxx",
    "retcode": "000000"
}

Detailed Data

No Details

状态码

Status Code Return Value Format : JSON

{

message:"API rate limit exceeded",

retcode:100703

}

The API in our platform is only paid on number of calls. For the detail, please refer to the below table.

Status Code Code Meaning Detailed Description Need paid or not?
000000 invoke successfully(data is not null) 成功调用并返回数据
100002 Search no result 目标参数搜索没结果
100301 Account not found 用户帐号不存在
100303 Search no result 账号未收录
100000 Server internal error 服务器内部错误
100001 Network error 网络错误
100004 Target server error 目标服务器错误
100005 Param error 用户输入参数错误
100700 Invalid authentication credentials 授权失败
100701 API stopped 您的当前API已停用
100702 Account stopped 您的账户已停用
100703 API rate limit exceeded 并发已达上限
100704 API maintenance API维护中
100705 API not found with these values API不存在
100706 Please add api first 请先添加api
100707 Number of calls exceeded 调用次数超限
100802 Missing url param 'time' or uri path is not equal to 2 请求路径错误或者缺少"time"参数
100803 Wrong pageToken 参数pageToken有误

Often With The Purchase Of Data