Contact Us
Back top
Current Location : APIs > 饿了么
饿了么 Transactions( 107 )

饿了么

Intro. :

Tag : 外卖 On Shelves Time : 2016-12-30

Type :

餐馆 商品 评论

Tutorials

Total invocations(updated per hour)

饿了么餐馆 2.00 yuan/100calls

API Areas

API Mark

Example

注: 该接口为实时数据接口,可能受目标平台或网络调整影响存在一定错误率,建议程序中加入出错重试机制。
iDataAPI力求每个数据产口都为您提供稳定,持久的服务,平台上所有接口按成功调用次数收费,出错不收费,请放心使用。
Error Code
-- 请求示例 url 默认请求参数已经做URL编码 curl -i "http://api02.idataapi.cn:8000/restaurant/ele?apikey=您的APIKEY&lat=30.587152&lon=114.257534"
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://api02.idataapi.cn:8000/restaurant/ele?apikey=您的APIKEY&lat=30.587152&lon=114.257534"; 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://api02.idataapi.cn:8000/restaurant/ele?apikey=您的APIKEY&lat=30.587152&lon=114.257534"; 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://api02.idataapi.cn:8000/restaurant/ele?apikey=您的APIKEY&lat=30.587152&lon=114.257534"; $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://api02.idataapi.cn:8000/restaurant/ele?apikey=您的APIKEY&lat=30.587152&lon=114.257534" 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
id string * 155860337
geo string * 116.446626,39.930412 经纬度(英文半角逗号连接),如:116.446626,39.930412
kw string
pageToken string pageToken为翻页值,从API返回结果可以拿到。
order_by string 0
getshop string
catid string

Response Fields

Property Name Type Example Description
  • hasNext boolean false false: 无下一页 true:有下一页
  • retcode string 000000 状态码(详见错误码表)
  • appCode string elez 平台代号
  • dataType string restaurant 数据类型
  • pageToken string null 翻页值 用于获取下一页数据
  • data array [...] 返回数据
  • rating number 4.7 综合评分
  • deliverTime number 28 配送时间
  • ratingDist array [...] 评分分布
  • key string 全部 其他键值对,键名
  • value number 21 其他键值对,值
  • deliverProvider string 老乡鸡(涡阳建设路店) 配送商
  • avgPrice number 32 人均消费
  • commentCount number 21 评论数
  • ratingCount number 0 评分数
  • servRating number 5 服务评分
  • id string 155294176 餐馆ID
  • minDeliverFee number 20 最低起送费
  • title string 老乡鸡(涡阳建设路店) 餐馆名
  • keyValues string null 键值对
  • location string null 不能区分具体“州”、“市”时,填写该字段
  • ratingRank number 0.379 评分排名
  • description string 老乡鸡 简介
  • tags array [...] 标签列表
  • monthSaleCount number 97 月销量
  • geoPoint object {...} 经纬度
  • lat number 33.50534 纬度
  • lon number 116.22042 经度
  • address string 涡阳县建设路南侧 街道地址
  • likeCount string null 点赞数
  • imageUrls string null 图片列表
  • deliverFee number 10 配送费
  • promotions array [...] 优惠、促销信息
  • url string https://www.ele.me/shop/155294176 原平台链接
  • qualRating number 4.343 质量评分
  • telephones array [...] 电话
  • openingHours string 06:30/22:00 营业时间

Returns The Sample

{
    "hasNext": false,
    "retcode": "000000",
    "appCode": "elez",
    "dataType": "restaurant",
    "pageToken": null,
    "data": [
        {
            "rating": 4.7,
            "deliverTime": 28,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 21
                },
                {
                    "key": "满意",
                    "value": 21
                },
                {
                    "key": "不满意",
                    "value": 0
                }
            ],
            "deliverProvider": "老乡鸡(涡阳建设路店)",
            "avgPrice": 32,
            "commentCount": 21,
            "ratingCount": 0,
            "servRating": 5,
            "id": "155294176",
            "minDeliverFee": 20,
            "title": "老乡鸡(涡阳建设路店)",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.379,
            "description": "老乡鸡",
            "tags": [
                "该商家支持开发票,开票订单金额1.0元起,请在下单时填写好发票抬头"
            ],
            "monthSaleCount": 97,
            "geoPoint": {
                "lat": 33.50534,
                "lon": 116.22042
            },
            "address": "涡阳县建设路南侧",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 10,
            "promotions": [
                "新用户立减(不与其他活动共享) 新用户下单立减17.0元",
                "全国客服电话:4007661777\n老乡鸡,全国400多家直营店。一年接待4000万人次,好吃、 干净、品质放心,越来越多人选择。吃饭,就到老乡鸡。"
            ],
            "url": "https:\/\/www.ele.me\/shop\/155294176",
            "qualRating": 4.343,
            "telephones": [
                "0558-7585517"
            ],
            "openingHours": "06:30\/22:00"
        },
        {
            "rating": 4.5,
            "deliverTime": 37,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 914
                },
                {
                    "key": "满意",
                    "value": 832
                },
                {
                    "key": "不满意",
                    "value": 82
                },
                {
                    "key": "有图",
                    "value": 88
                }
            ],
            "deliverProvider": "O满意(胜利路店)",
            "avgPrice": 17,
            "commentCount": 914,
            "ratingCount": 0,
            "servRating": 4.501,
            "id": "1193006",
            "title": "O满意(胜利路店)",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.454,
            "description": null,
            "tags": null,
            "monthSaleCount": 1118,
            "geoPoint": {
                "lat": 33.50406,
                "lon": 116.217007
            },
            "address": "涡阳县胜利路",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": null,
            "url": "https:\/\/www.ele.me\/shop\/1193006",
            "qualRating": 4.423,
            "telephones": [
                "0558-7211817"
            ],
            "openingHours": "10:30\/14:30-17:00\/21:00"
        },
        {
            "rating": 4.6,
            "deliverTime": 35,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 54
                },
                {
                    "key": "满意",
                    "value": 52
                },
                {
                    "key": "不满意",
                    "value": 2
                },
                {
                    "key": "有图",
                    "value": 4
                }
            ],
            "deliverProvider": "延庆观炸鸡汉堡",
            "avgPrice": 18,
            "commentCount": 54,
            "ratingCount": 0,
            "servRating": 4.669,
            "id": "155909660",
            "title": "延庆观炸鸡汉堡",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.646,
            "description": null,
            "tags": null,
            "monthSaleCount": 196,
            "geoPoint": {
                "lat": 33.504432,
                "lon": 116.218722
            },
            "address": "涡阳县工农南路",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": null,
            "url": "https:\/\/www.ele.me\/shop\/155909660",
            "qualRating": 4.491,
            "telephones": [
                "18355862285"
            ],
            "openingHours": "10:00\/21:10"
        },
        {
            "rating": 4.5,
            "deliverTime": 34,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 77
                },
                {
                    "key": "满意",
                    "value": 68
                },
                {
                    "key": "不满意",
                    "value": 9
                },
                {
                    "key": "有图",
                    "value": 8
                }
            ],
            "deliverProvider": "淮南正宗牛肉汤",
            "avgPrice": 19,
            "commentCount": 77,
            "ratingCount": 0,
            "servRating": 4.246,
            "id": "1429988",
            "title": "淮南正宗牛肉汤",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.318,
            "description": null,
            "tags": null,
            "monthSaleCount": 233,
            "geoPoint": {
                "lat": 33.503786,
                "lon": 116.220234
            },
            "address": "涡阳县胜利东路",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": [
                "新用户立减(不与其他活动共享) 新用户下单立减8.0元",
                "满减优惠 满20减2,满30减3",
                "淮南正宗牛肉汤馆,经济实惠,欢迎你的光临!"
            ],
            "url": "https:\/\/www.ele.me\/shop\/1429988",
            "qualRating": 4.782,
            "telephones": [
                "15956777177"
            ],
            "openingHours": "09:00\/21:45"
        },
        {
            "rating": 4.4,
            "deliverTime": 34,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 156
                },
                {
                    "key": "满意",
                    "value": 148
                },
                {
                    "key": "不满意",
                    "value": 8
                },
                {
                    "key": "有图",
                    "value": 5
                }
            ],
            "deliverProvider": "鲁味老友记黄焖鸡米饭",
            "avgPrice": 23,
            "commentCount": 156,
            "ratingCount": 0,
            "servRating": 4.676,
            "id": "1174766",
            "title": "鲁味老友记黄焖鸡米饭",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.575,
            "description": null,
            "tags": null,
            "monthSaleCount": 234,
            "geoPoint": {
                "lat": 33.505046,
                "lon": 116.218944
            },
            "address": "涡阳县工农南路",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": null,
            "url": "https:\/\/www.ele.me\/shop\/1174766",
            "qualRating": 4.188,
            "telephones": [
                "15156739697"
            ],
            "openingHours": "09:40\/22:00"
        },
        {
            "rating": 4.6,
            "deliverTime": 34,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 50
                },
                {
                    "key": "满意",
                    "value": 45
                },
                {
                    "key": "不满意",
                    "value": 5
                },
                {
                    "key": "有图",
                    "value": 2
                }
            ],
            "deliverProvider": "沙县小吃(汽车站店)",
            "avgPrice": 16,
            "commentCount": 50,
            "ratingCount": 0,
            "servRating": 4.38,
            "id": "1264580",
            "title": "沙县小吃(汽车站店)",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.725,
            "description": null,
            "tags": null,
            "monthSaleCount": 105,
            "geoPoint": {
                "lat": 33.501174,
                "lon": 116.211366
            },
            "address": "安徽省亳州市涡阳县淮东大道(西段)",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": null,
            "url": "https:\/\/www.ele.me\/shop\/1264580",
            "qualRating": 4.865,
            "telephones": [
                "15215678773"
            ],
            "openingHours": "10:00\/21:00"
        },
        {
            "rating": 4.3,
            "deliverTime": 29,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 82
                },
                {
                    "key": "满意",
                    "value": 73
                },
                {
                    "key": "不满意",
                    "value": 9
                },
                {
                    "key": "有图",
                    "value": 5
                }
            ],
            "deliverProvider": "沙县小吃(广场北店)",
            "avgPrice": 17,
            "commentCount": 82,
            "ratingCount": 0,
            "servRating": 4.675,
            "id": "1204847",
            "title": "沙县小吃(广场北店)",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.25,
            "description": null,
            "tags": null,
            "monthSaleCount": 181,
            "geoPoint": {
                "lat": 33.505214,
                "lon": 116.221046
            },
            "address": "涡阳县建设路",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": null,
            "url": "https:\/\/www.ele.me\/shop\/1204847",
            "qualRating": 3.911,
            "telephones": [
                "18259888851"
            ],
            "openingHours": "09:05\/01:00"
        },
        {
            "rating": 0,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 2
                },
                {
                    "key": "满意",
                    "value": 2
                },
                {
                    "key": "不满意",
                    "value": 0
                }
            ],
            "deliverProvider": "霸都龙虾",
            "avgPrice": null,
            "commentCount": 2,
            "ratingCount": 0,
            "id": "155249832",
            "title": "霸都龙虾",
            "keyValues": null,
            "location": null,
            "description": null,
            "tags": null,
            "monthSaleCount": 2,
            "geoPoint": {
                "lat": 33.499513,
                "lon": 116.219542
            },
            "address": "涡阳县淮中大道阳光医院西",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": null,
            "url": "https:\/\/www.ele.me\/shop\/155249832",
            "telephones": [
                "18655882229"
            ],
            "openingHours": "10:00\/14:00-17:00\/22:30"
        },
        {
            "rating": 4.2,
            "deliverTime": 29,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 39
                },
                {
                    "key": "满意",
                    "value": 38
                },
                {
                    "key": "不满意",
                    "value": 1
                },
                {
                    "key": "有图",
                    "value": 7
                }
            ],
            "deliverProvider": "农夫果园",
            "avgPrice": null,
            "commentCount": 39,
            "ratingCount": 0,
            "servRating": 4.537,
            "id": "155912568",
            "title": "农夫果园",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.482,
            "description": null,
            "tags": null,
            "monthSaleCount": 65,
            "geoPoint": {
                "lat": 33.498798,
                "lon": 116.209412
            },
            "address": "亳州市涡阳县育才路大坝街南5米",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": null,
            "url": "https:\/\/www.ele.me\/shop\/155912568",
            "qualRating": 3.869,
            "telephones": [
                "17855627303"
            ],
            "openingHours": "07:30\/00:30"
        },
        {
            "rating": 5,
            "deliverTime": 33,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 1
                },
                {
                    "key": "满意",
                    "value": 1
                },
                {
                    "key": "不满意",
                    "value": 0
                }
            ],
            "deliverProvider": "韩玲干扣面",
            "avgPrice": null,
            "commentCount": 1,
            "ratingCount": 0,
            "servRating": 5,
            "id": "156426302",
            "title": "韩玲干扣面",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.15,
            "description": "三里庄菜市街对面韩玲干扣面",
            "tags": null,
            "monthSaleCount": 16,
            "geoPoint": {
                "lat": 33.491817,
                "lon": 116.210538
            },
            "address": "安徽省亳州市涡阳县向阳南路西侧",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": [
                "新用户立减(不与其他活动共享) 新用户下单立减8.0元",
                "满减优惠 满10减1,满20减2,满30减3",
                "用餐高峰期请提前下单。"
            ],
            "url": "https:\/\/www.ele.me\/shop\/156426302",
            "qualRating": 5,
            "telephones": [
                "13805671637",
                "13505678256"
            ],
            "openingHours": "07:00\/15:00"
        },
        {
            "rating": 3.9,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 5
                },
                {
                    "key": "满意",
                    "value": 5
                },
                {
                    "key": "不满意",
                    "value": 0
                }
            ],
            "deliverProvider": "兰州拉面",
            "avgPrice": null,
            "commentCount": 5,
            "ratingCount": 0,
            "servRating": 3.5,
            "id": "1284002",
            "title": "兰州拉面",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.243,
            "description": null,
            "tags": null,
            "monthSaleCount": 30,
            "geoPoint": {
                "lat": 33.51099,
                "lon": 116.21669
            },
            "address": "涡阳县涡河中路",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": null,
            "url": "https:\/\/www.ele.me\/shop\/1284002",
            "qualRating": 3.5,
            "telephones": [
                "13042275958"
            ],
            "openingHours": "09:00\/21:00"
        },
        {
            "rating": 3.5,
            "deliverTime": 31,
            "ratingDist": [
                {
                    "key": "全部",
                    "value": 14
                },
                {
                    "key": "满意",
                    "value": 13
                },
                {
                    "key": "不满意",
                    "value": 1
                }
            ],
            "deliverProvider": "嗨啤",
            "avgPrice": null,
            "commentCount": 14,
            "ratingCount": 0,
            "servRating": 3.5,
            "id": "151071279",
            "title": "嗨啤",
            "keyValues": null,
            "location": null,
            "ratingRank": 0.389,
            "description": "自酿鲜啤,盱眙口味龙虾,美味烧烤 征服你的味蕾!",
            "tags": null,
            "monthSaleCount": 30,
            "geoPoint": {
                "lat": 33.500081,
                "lon": 116.216129
            },
            "address": "涡阳县淮中大道南122号",
            "likeCount": null,
            "imageUrls": null,
            "deliverFee": 3,
            "promotions": null,
            "url": "https:\/\/www.ele.me\/shop\/151071279",
            "qualRating": 3.5,
            "telephones": [
                "18056842000"
            ],
            "openingHours": "18:00\/22:30"
        }
    ]
}

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 when invoked successfully. 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 目标参数搜索没结果
100000 Server internal error 服务器内部错误
100001 Network error 网络错误
100004 Target server error 目标服务器错误
100005 Param error 用户输入参数错误
100301 Account not found 用户帐号不存在
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