• 阿里巴巴中国站按图搜索1688商品(拍立淘) API 返回值说明


    item_search_img-按图搜索1688商品(拍立淘)

    1688.item_search_img

    公共参数

    名称类型必须描述
    keyString调用key(必须以GET方式拼接在URL中)
    secretString调用密钥
    api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
    cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
    result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
    langString[cn,en,ru]翻译语言,默认cn简体中文
    versionStringAPI版本

    请求参数

    请求参数:imgid=http://g-search3.alicdn.com/img/bao/uploaded/i4/O1CN01IDpcD81zHbpHs1YgT_!!2200811456689.jpg

    参数说明:imgid:图片地址(使用淘宝upload_img接口上传图片,返回图片地址)
    如:https://img.alicdn.com/imgextra/i3/15353738/TB2HDHAqN9YBuNjy0FfXXXIsVXa_!!15353738-0-beehive-scenes.jpg

    响应参数

    Version: Date:

    名称类型必须示例值描述

    items

    items[]0按图搜索1688商品

    real_total_results

    Int080宝贝真实数量

    total_results

    Int043搜索数量

    pagecount

    Int01总页数

    error

    String0错误代码

    data_from

    String0

    item

    item[]0宝贝详情数据

    title

    String0外贸儿童短袖T恤 夏季热销套装 时尚儿童T宝贝标题

    pic_url

    String0https://cbu01.alicdn.com/img/ibank/2016/998/799/2913997899_1588191881.jpg宝贝图片

    price

    Float07.00价格

    sales

    Int05销量

    num_iid

    Bigint0529502304128宝贝ID

    turnHead

    String023.5%回头率

    seller_nick

    String0中山市汇锦制衣有限公司卖家昵称

    area

    String0广东中山市店铺所在地

    detail_url

    String0https://detail.1688.com/offer/529502304128.html宝贝链接

     请求示例

    1. // 请求示例 url 默认请求参数已经URL编码处理
    2. // 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.onebound.cn/help/demo/sdk/demo-sign.php
    3. $method = "GET";
    4. $url = "https://api-服务器.cn/1688/item_search_img/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&imgid=http://g-search3.alicdn.com/img/bao/uploaded/i4/O1CN01IDpcD81zHbpHs1YgT_!!2200811456689.jpg";
    5. $curl = curl_init();
    6. curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
    7. curl_setopt($curl, CURLOPT_URL, $url);
    8. curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);
    9. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE);
    10. curl_setopt($curl, CURLOPT_FAILONERROR, false);
    11. curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    12. curl_setopt($curl, CURLOPT_HEADER, true);
    13. curl_setopt($curl, CURLOPT_ENCODING, "gzip");
    14. var_dump(curl_exec($curl));
    15. ?>

     

  • 相关阅读:
    Py之yellowbrick:yellowbrick的简介、安装、使用方法之详细攻略
    D. Tournament Countdown(交互题)
    微信小程序测试策略和注意事项?
    pytorch笔记:自动混合精度(AMP)
    第二篇------Virtual I/O Device (VIRTIO) Version 1.1
    分布式锁之 redis & redisson (你学了 synchronized 真的有用吗?)
    HackTheBox-Starting Point--Tier 1---Crocodile
    设计模式:享元模式
    Linux常用命令解析
    SpringSecurity Oauth2实战 - 06 拦截器获取用户登录信息并存储到本地线程ThreadLocal
  • 原文地址:https://blog.csdn.net/Jernnifer_mao/article/details/132939433