仿美团(1)--接口分析

这篇博客详细分析了美团接口,包括美食列表、美食详情、推荐菜、评论标签等,涵盖了从获取列表到查看详情的一系列操作。通过POST请求和特定参数,可以获取到包括地铁列表、区域列表、位置信息和城市列表等数据。
摘要由CSDN通过智能技术生成

1.美食列表

  • 地址:http://meishi.meituan.com/i/api/channel/deal/list
  • 请求方式: POST
  • 请求header:
    • User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1
    • Content-Type: application/json
    • Referer: http://meishi.meituan.com/i/?ci=59&stid_b=1&cevent=imt%2Fhomepage%2Fcategory1%2F1
    • Cookie: latlng=30.635904,104.048749,1569814551777;cityid=59
  • 请求参数:
    • offset(偏移量<1000):0
    • limit(每页数量<=50):2
    • cateId(分类id):1
    • lineId(地铁线id):0
    • stationId:0
    • areaId(区域id):0
    • sort(排序):“default(默认)|distance(离我最近)|avgscore(好评优先)|solds(人气最高)”
  • 响应Body:
{
   
   "status": 0,
   "data": {
   
       "poiList": {
   
           "totalCount": 30500,
           "poiInfos": [
               {
   
                   "avgPrice": 39,
                   "avgScore": 4.5,
                   "cateName": "川菜",
                   "channel": "food",
                   "showType": "",
                   "frontImg": "//p0.meituan.net/deal/b6d0915c1b76655ddb1366d5aa5c6648551695.jpg",
                   "lat": 30.636004,
                   "lng": 104.049179,
                   "name": "回味居土菜馆",
                   "poiid": "4853484",
                   "areaName": "高升桥",
                   "poiImgExtra": {
   },
                   "extraServiceTags": [
                       {
   
                           "icon": "",
                           "text": {
   
                               "content": "支持买单",
                               "color": "#6cbab2",
                               "backgroundColor": ""
                           }
                       },
                       {
   
                           "icon": "",
                           "text": {
   
                               "content": "预订",
                               "color": "#6cbab2",
                               "backgroundColor": ""
                           }
                       }
                   ],
                   "rotationTags": [],
                   "openHours": {
   
                       "icon": "http://p1.meituan.net/codeman/f7b9ae2c385a03e4a61beb2f4a1e082b1213.png",
                       "text": {
   
                           "content": "客流指数65",
                           "color": "",
                           "backgroundColor": "",
                           "borderColor": ""
                       }
                   },
                   "preferentialInfo": {
   
                       "hiddenNumber": 0,
                       "maidan": {
   
                           "defaultShowNum": 1,
                           "entries": [
                               {
   
                                   "discount": "",
                                   "discountColor": "#38c2aa",
                                   "content": "双人餐58元,3-4人餐139元,6人餐188元",
                                   "icon": "http://p1.meituan.net/codeman/93231059874052e97c0976c8a6e30dbe910.png",
                                   "promotion": "",
                                   "hasBorder": 0,
                                   "borderColor": ""
                               }
                           ]
                       },
                       "combo": {
   
                           "defaultShowNum": 0,
                           "entries": []
                       }
                   },
                   "ctPoi": "338762913505018570306833719295608281522_a4853484_c0_e5137299198222442320",
                   "extraServiceIcons": [],
                   "distance": "<100m"
               },
               {
   
                   "avgPrice": 14,
                   "avgScore": 4,
                   "cateName": "快餐",
                   "channel": "food",
                   "showType": "",
                   "frontImg": "//p0.meituan.net/mogu/c1db1f1d6ec10af9caf47fa14118a8de307690.jpg",
                   "lat": 30.634791,
                   "lng": 104.050357,
                   "name": "老盐边羊肉米线",
                   "poiid": "152778960",
                   "areaName": "高升桥",
                   "poiImgExtra": {
   },
                   "extraServiceTags": [
                       {
   
                           "icon": "",
                           "text": {
   
                               "content": "支持买单",
                               "color": "#6cbab2",
                               "backgroundColor": ""
                           }
                       }
                   ],
                   "rotationTags": [],
                   "ctPoi": "338762913505018570306833719295608281522_a152778960_c1_e5137299198222442320",
                   "extraServiceIcons": [],
                   "distance": "197m"
               }
           ]
       },
       "notification": "",
       "picassoViews": [],
       "traceData": {
   
           "_apimeishi_rerank_report_data": ""
       }
   }
}

2.美食详情

  • 地址:http://meishi.meituan.com/i/api/poi/deallist
  • 请求方式:POST
  • 请求Header:
    • User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1
    • Content-Type: application/json
  • 请求参数:
    • poiId:165471148
  • 响应Body:
{
   
    "status": 0,
    "error": null,
    "data": {
   
        "voucherArr": [
            {
   
                "dealId": 54543617,
                "title": "100 元代金券",
                "imgUrl": "//p0.meituan.net/deal/631d0e9296d15b1a3865ce8290d07d3e55992.jpg",
                "price": 78,
                "originPrice": 100,
                "campaignTag": "",
                "solds": 608,
                "stid": "083916931355786928446926784235836000260",
                "taglist": [
                    {
   
                        "name": "周一至周日11:00-22:00"
                    },
                    {
   
                        "name": "部分商品可用"
                    },
                    {
   
                        "name": "免预约"
                    },
                    {
   
                        "name": "不限张数"
                    }
                ]
            }
        ],
        "dealArr": [
            {
   
                "dealId": 608404409,
                "title": "得福 2 人餐",
                "imgUrl": "//p0.meituan.net/deal/10a6d9ae18e5baa7e96933fc65880f9e316159.jpg",
                "price": 99.9,
                "originPrice": 162,
                "campaignTag": "",
                "solds": 160,
                "stid": "083916931355786928446926784235836000260",
                "taglist": [
                    {
   
                        "name": "周一至周日"
                    },
                    {
   
                        "name": "免预约"
                    }
                ]
            },
            {
   
                "dealId": 56017429,
                "title": "得福 4 人餐",
                "imgUrl": "//p0.meituan.net/deal/10a6d9ae18e5baa7e96933fc65880f9e316159.jpg",
                "price": 199.9,
                "originPrice": 288,
                "campaignTag": "",
                "solds": 190,
                "stid": "083916931355786928446926784235836000260",
                "taglist": [
                    {
   
                        "name": "周一至周日"
                    },
                    {
   
                        "name": "免预约"
                    }
                ]
            },
            {
   
                "dealId": 51373512,
                "title": "得福 6 人餐",
                "imgUrl": "//p0.meituan.net/deal/10a6d9ae18e5baa7e96933fc65880f9e316159.jpg",
                "price": 299.9,
                "originPrice": 404,
                "campaignTag": "",
                "solds": 116,
                "stid": "083916931355786928446926784235836000260",
                "taglist": [
                    {
   
                        "name": "周一至周日"
                    },
                    {
   
                        "name": "免预约"
                    }
                ]
            }
        ]
    }
}

3.推荐菜

  • 地址: http://meishi.meituan.com/i/api/dish/poi
  • 请求方式:POST
  • 请求Header:
    • Content-Type: application/json
  • 请求参数:
    • poiId:165471148
  • 响应Body:
{
   
    "status": 0,
    "error": null,
    "data": {
   
        "list": [
            {
   
                "id": 62969064,
                "name": "榴莲王披萨",
                "price": 9800,
                "recCount": 28,
                "frontImgUrl": "http://p1.meituan.net/wmproduct/461996f9c0d47447420523623745fa4c452594.jpg",
                "isShowAdd": false,
                "maxUpload": 0
            },
            {
   
                "id": 94416685,
                "name": "新奥尔良烤鸡肉披萨",
                "price": 5900,
                "recCount": 19,
                "frontImgUrl": "http://qcloud.dpfile.com/pc/wIqjokEsrFi86C6oWYcAeU4xbOeJMFZjF0AyBr93CjGNYwEnpeWcM6hFgOMWn74xZSUjBikR5Ecy-DoGYkMhlg.jpg",
                "isShowAdd": false,
                "maxUpload": 0
            },
            {
   
                "id": 71544951,
                "name": "劲爆鸡米花",
                "price": 1400,
                "recCount": 18,
                "frontImgUrl": "http://p0.meituan.net/wmproduct/f9cbba9f020541639cfaae651399841f423076.jpg",
                "isShowAdd": false,
                "maxUpload": 0
            },
            {
   
                "id"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值