拍照购

提供商品搜索的图像检索方案:识别图像中的商品,经过处理,返回与图片中某一主体视觉相似的商品列表及购买链接。目前支持京东商城

  • 接口文档

    接口文档
  • 根据拍照图像检索商品

  • 错误码
  • 错误码列表
  • 资源下载
  • 接口文档下载
根据拍照图像检索商品
接口地址:http://apis.juhe.cn/snapshop/query
请求方式:post
返回类型:json
接口描述:识别图像中的商品,返回与图片中某一主体视觉相似的商品列表。
接口调试: API测试工具

请求Header:

名称
  Content-Type application/x-www-form-urlencoded

请求参数说明:

名称 必填 类型 说明
  image string 图片,base64编码,编码后大小不超过3M,最短边至少48px,最长边最大4096px,支持JPEG/JPG/BMP格式 。注意:图片需要base64编码、去掉编码头后再进行urlencode。
  key string 在个人中心->我的数据,接口名称上方查看

返回参数说明:

名称 类型 说明
  error_code int 返回码
  reason string 返回说明
  result string 返回结果集
  data array 返回商品结果
  skuId number 商品SKUID
  skuName string 商品名称
  skuPrice string 商品价格
  wareLabel string 是否京东自营
  similarity number 与图片相似度
  imageUrl string 商品主图
  detailUrl string 商品详情页链接,PC端
  detailAppUrl string 商品详情页链接,手机移动端
  cid1Name string 一级分类名称
  cid2Name string 二级分类名称
  cid3Name string 三级分类名称
  allImageUrls array 商品图片集

JSON返回示例:JSON在线格式化工具 >

      {
  "reason": "success",
  "result": {
    "data": [
      {
        "skuId": 30823472863,
        "skuName": "Apple iphone x 苹果X  (A1865) 全网通4G手机 银色 256GB",
        "skuPrice": "7299.00",
        "wareLabel": "非自营",
        "similarity": 0.8242081498230364,
        "imageUrl": "https://img1.360buyimg.com/img/jfs/t20149/308/2542983774/331673/102c7294/5b5bd3e4Nabe29b1b.png",
        "detailUrl": "https://item.jd.com/30823472863.html",
        "detailAppUrl": "https://item.m.jd.com/product/30823472863.html",
        "cid1Name": "手机通讯",
        "cid2Name": "手机",
        "cid3Name": "手机",
        "allImageUrls": [
          "https://img11.360buyimg.com/img/jfs/t22519/185/1348384447/356948/190e089b/5b5bd3e4N3a549f6a.png",
          "https://img20.360buyimg.com/img/jfs/t20149/308/2542983774/331673/102c7294/5b5bd3e4Nabe29b1b.png",
          "https://img30.360buyimg.com/img/jfs/t20596/277/2574909877/207086/19478758/5b5bd3e4Ndc6e7ae4.png",
          "https://img11.360buyimg.com/img/jfs/t21358/14/2542555773/66596/f38f0a5/5b5bd3e4Ncb9895a9.png",
          "https://img30.360buyimg.com/img/jfs/t22387/26/2586024488/197273/7f93a97/5b5bd3e4Nf89ea759.png",
          "https://img10.360buyimg.com/img/jfs/t22615/204/1371666391/208971/cd78feea/5b5bd3e4N682f8d60.png",
          "https://img13.360buyimg.com/img/jfs/t23143/174/1346369930/248874/f86dfdf4/5b5bd3e4N94a2a426.png"
        ]
      },
      {
        "skuId": 56616540135,
        "skuName": "Apple 苹果 iPhone X (A1865) 手机 深空灰色 全网通64GB",
        "skuPrice": "6488.00",
        "wareLabel": "非自营",
        "similarity": 0.7997576930887583,
        "imageUrl": "https://img13.360buyimg.com/img/jfs/t11368/351/847413790/269227/4a56bc50/59f977bbN17cde2da.jpg",
        "detailUrl": "https://item.jd.com/56616540135.html",
        "detailAppUrl": "https://item.m.jd.com/product/56616540135.html",
        "cid1Name": "手机通讯",
        "cid2Name": "手机",
        "cid3Name": "手机",
        "allImageUrls": [
          "https://img14.360buyimg.com/img/jfs/t9910/7/2538845028/246557/dcc015f9/59f977baN47fd9ef0.jpg",
          "https://img13.360buyimg.com/img/jfs/t11368/351/847413790/269227/4a56bc50/59f977bbN17cde2da.jpg",
          "https://img20.360buyimg.com/img/jfs/t11380/336/866985204/30009/30d2c009/59f977baN1fb73690.jpg",
          "https://img1.360buyimg.com/img/jfs/t11590/316/817109222/76119/11aec4b3/59f977acNb41d44c3.jpg",
          "https://img10.360buyimg.com/img/jfs/t11707/282/820547294/17192/fab2488/59f977baN8c483149.jpg"
        ]
      },
      {
        "skuId": 54224847991,
        "skuName": "小米9se 全网通4G手机 深空灰 6G+128G",
        "skuPrice": "2799",
        "wareLabel": "非自营",
        "similarity": 0.6127404777834777,
        "imageUrl": "https://img14.360buyimg.com/img/jfs/t1/79483/9/6536/71786/5d4a9a14Ec9a3f48f/443ee57dc15344da.jpg",
        "detailUrl": "https://item.jd.com/54224847991.html",
        "detailAppUrl": "https://item.m.jd.com/product/54224847991.html",
        "cid1Name": "手机通讯",
        "cid2Name": "手机",
        "cid3Name": "手机",
        "allImageUrls": [
          "https://img12.360buyimg.com/img/jfs/t1/53194/21/6975/120841/5d4a9a12Ee242fd33/8c1a815227d0cc12.jpg",
          "https://img11.360buyimg.com/img/jfs/t1/38899/11/13636/56941/5d4a9a14E0760a5ef/da7930fd834b6b72.jpg",
          "https://img1.360buyimg.com/img/jfs/t1/44460/16/7663/24146/5d4a9a13Ef596d3b1/28e98250745754f9.jpg",
          "https://img10.360buyimg.com/img/jfs/t1/55547/23/6972/52662/5d4a9a13Ee4361854/5f6669f2f01c5da4.jpg",
          "https://img1.360buyimg.com/img/jfs/t1/57699/6/6987/22448/5d4a9a13Ee630670d/5aed106ff5c6eeed.jpg",
          "https://img20.360buyimg.com/img/jfs/t1/72865/21/6646/40133/5d4a9a12Ec9224c80/2971cf2ab9349708.jpg",
          "https://img12.360buyimg.com/img/jfs/t1/73790/33/6604/31464/5d4a9a13Eab872653/7e6be7484d1cf4b6.jpg",
          "https://img30.360buyimg.com/img/jfs/t1/74978/10/6592/53543/5d4a9a12Ed2ee9c0a/0a89400d3b441635.jpg",
          "https://img30.360buyimg.com/img/jfs/t1/79483/9/6536/71786/5d4a9a14Ec9a3f48f/443ee57dc15344da.jpg"
        ]
      }
    ],
    "request_id": "3e1ae8ed24caa67eededd31cc15628a3"
  },
  "error_code": 0
}

服务级错误码参照(error_code):

  错误码 说明
  254701 图片内容为空/超出限制/格式不正确
  254703 网络异常,请重试
  254704 查询失败,具体可参考reason

系统级错误码参照:

  错误码 说明 旧版本(resultcode)
  10001 错误的请求KEY 101
  10002 该KEY无请求权限 102
  10003 KEY过期 103
  10004 错误的OPENID 104
  10005 应用未审核超时,请提交认证 105
  10007 未知的请求源 107
  10008 被禁止的IP 108
  10009 被禁止的KEY 109
  10011 当前IP请求超过限制 111
  10012 请求超过次数限制 112
  10013 测试KEY超过请求限制 113
  10014 系统内部异常(调用充值类业务时,请务必联系客服或通过订单查询接口检测订单,避免造成损失) 114
  10020 接口维护 120
  10021 接口停用 121

错误码格式说明(示例:200201):

  2 002 01
  服务级错误(1为系统级错误) 服务模块代码(即数据ID) 具体错误代码
拍照购
162
申请次数
547
ID
0
收藏次数

推荐API

  • 行驶证查询

    根据车牌号码、姓名、车牌类型,返回行驶证详情信息。
  • 行驶证查询简版

    输入车牌号码,返回:车牌号、品牌、车辆型号、发动机号、车辆识别码、车辆类型、营运性质、初次登记日期
  • 车辆投保日期查询

    输入车牌号码、车辆类型或车架号,返回初次投保日期、上次交强险投保年月、最近交强险投保期启、最近交强险投保期止。
  • 行驶证信息详情查询

    输入车牌号码、姓名、车牌类型,返回行驶证详情信息。
  • VIN码查车五项

    调用车管所全量数据,通过输入车辆的VIN码,可直接查询车辆的车架号、发动机号、 品牌名称、初次登记日期、品牌型号等信息。

API资讯

数 据 驱 动 未 来
Data Drives The Future
0512-88869195
数 据 驱 动 未 来
Data Drives The Future