当前位置: 首页 > article >正文

DY按图搜索商品API:解锁电商新趋势

在电商领域,抖音作为一个新兴的流量入口,其商品搜索功能尤其重要。douyin提供了按图搜索商品的API接口,允许用户通过上传图片来搜索商品,极大地提升了用户体验和购物效率。本文将详细介绍如何使用douyin按图搜索商品API,并解析其返回值。

douyin按图搜索商品API概述

按图搜索商品API允许用户通过上传商品图片,系统会自动匹配并返回相似商品的详细信息。这项服务对于希望利用抖音平台进行商品推广和销售的商家来说非常有价值。

API返回值说明

douyin按图搜索商品API返回的数据通常包括以下字段:

  • 商品ID(num_iid):商品的唯一标识符。
  • 标题(title):商品的标题,通常包含关键字。
  • 价格(price):商品的价格信息。
  • 销量(sales):商品的销售数量。
  • 描述(description):商品的详细描述。
  • 图片URL(image_url):商品图片的URL地址。
  • SKU信息(skus):商品的不同规格和价格。

示例返回值

以下是一个示例的API返回值,展示了获取商品详情的结构:

item_search_img-按图搜索商品

douyin.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&cat=

参数说明:imgid: 支持本地图片、URL图片地址

响应参数

Version: Date:

名称类型必须示例值描述

items

items[]0按图搜索商品

响应示例

{
    "items": {
        "item": [
            {
                "title": "卫生纸5斤24卷5层加厚干湿两用卷纸家用纸巾厕纸卷筒纸家庭装实惠",
                "pic_url": "https://p3-item.ecombdimg.com/img/ecom-shop-material/AgvBPXkH_m_538c7c5f021e459f37fba139dbdf9c5d_sx_335493_www800-800~tplv-5mmsx3fupr-image.jpeg",
                "price": 23.99,
                "num_iid": "3631161001782720257",
                "shop_name": "大龙疆选纸品",
                "shop_id": 100128852,
                "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3631161001782720257"
            },
            {
                "title": "悬挂式抽纸家用实惠装卫生纸亲肤柔软面巾纸原生木浆餐巾纸可代发",
                "pic_url": "https://p3-item.ecombdimg.com/img/ecom-shop-material/qKHuWrBe_m_e0e401bcd2550de0274adc34712efe05_sx_551953_www1024-1024~tplv-5mmsx3fupr-image.jpeg",
                "price": 19.9,
                "num_iid": "3670328250808271281",
                "shop_name": "阳光6666",
                "shop_id": 17258773,
                "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3670328250808271281"
            },
            {
                "title": "(新疆包邮)24卷卫生纸加厚款家用厕纸干湿两用家庭装亲肤无芯卷纸",
                "pic_url": "https://p3-item.ecombdimg.com/img/ecom-shop-material/QEcpSEf_m_a576e98fc8a75de180e7a3a054e38360_sx_173665_www800-800~tplv-5mmsx3fupr-image.jpeg",
                "price": 26.9,
                "num_iid": "3678228600483610707",
                "shop_name": "新疆一姐百货",
                "shop_id": 208512,
                "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3678228600483610707"
            },
            {
                "title": "欣蜜儿挂抽悬挂式大包纸巾原木抽纸宿舍卫生纸母婴家用加厚餐巾纸",
                "pic_url": "https://p26-item.ecombdimg.com/img/ecom-shop-material/VglVXHkX_m_7e6ac8498c47348f6cd36f78b6d7f86f_sx_409553_www800-800~tplv-5mmsx3fupr-image.jpeg",
                "price": 9.9,
                "num_iid": "3611090293241330285",
                "shop_name": "欣蜜儿纸品湿巾旗舰店",
                "shop_id": 8812388,
                "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3611090293241330285"
            },
            {
                "title": "【宠粉福利】爱马橙悬挂式抽纸家用卫生纸原生木浆纸巾亲肤柔韧母婴",
                "pic_url": "https://p26-item.ecombdimg.com/img/ecom-shop-material/xdQwlnYD_m_44b9cb64bac181c9a11173e802f1ca0b_sx_235946_www800-800~tplv-5mmsx3fupr-image.jpeg",
                "price": 2.7,
                "num_iid": "3685855208195358733",
                "shop_name": "敏宝宝百货",
                "shop_id": 173918159,
                "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3685855208195358733"
            },
            {
                "title": "欣蜜儿加大加厚壁挂式抽纸原生木浆家用抽取式卫生纸提装整箱批发",
                "pic_url": "https://p26-item.ecombdimg.com/img/ecom-shop-material/VglVXHkX_m_ce8a34021d96489790351478ae7c319c_sx_164337_www720-720~tplv-5mmsx3fupr-image.jpeg",
                "price": 25.4,
                "num_iid": "3628852005704999740",
                "shop_name": "欣蜜儿纸品湿巾旗舰店",
                "shop_id": 8812388,
                "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3628852005704999740"
            },
            {
                "title": "明柔悬挂式绵柔亲肤面巾纸家用大包装餐巾纸抽取式纸巾卫生抽纸",
                "pic_url": "https://p3-item.ecombdimg.com/img/ecom-shop-material/qXXRaYM_m_352172ab196ac016616c2b875f35118d_sx_214321_www790-1471~tplv-5mmsx3fupr-image.jpeg",
                "price": 79.2,
                "num_iid": "3637075582052865691",
                "shop_name": "南安康美环宇纸品厂",
                "shop_id": 4901975,
                "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3637075582052865691"
            },
            {
                "title": "5斤24大卷无芯卷纸卫生间厕纸五层加厚干湿两用家用卫生纸实惠装",
                "pic_url": "https://p3-item.ecombdimg.com/img/ecom-shop-material/zLxzdsIk_m_538c7c5f021e459f37fba139dbdf9c5d_sx_335493_www800-800~tplv-5mmsx3fupr-image.jpeg",
                "price": 23.99,
                "num_iid": "3626875528318978928",
                "shop_name": "羽护纸品",
                "shop_id": 88061824,
                "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3626875528318978928"
            },
            {
                "title": "【欣蜜儿】大包壁挂式抽纸巾1280张家用悬挂式底部抽纸厕所卫生纸巾",
                "pic_url": "https://p26-item.ecombdimg.com/img/ecom-shop-material/fmeXXyNI_m_02636ba97f5d721c572a8feab3716517_sx_134856_www800-800~tplv-5mmsx3fupr-image.jpeg",
                "price": 5.9,
                "num_iid": "3622604863894080073",
                "shop_name": "九零壹零雲梦优选店",
                "shop_id": 9173240,
                "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3622604863894080073"
            },
            {
                "title": "【加量3000张】3大提悬挂式实惠装整箱批发壁挂纸抽纸面巾纸家用",
                "pic_url": "https://p3-item.ecombdimg.com/img/ecom-shop-material/DJDUQXqO_m_adb9d1451f5057111c3ae611e0931998_sx_460353_www800-800~tplv-5mmsx3fupr-image.jpeg",
                "price": 9.9,
                "num_iid": "3652843337016300604",
                "shop_name": "津洁生活官方旗舰店",
                "shop_id": 86365609,
                "detail_url": "https://haohuo.jinritemai.com/ecommerce/trade/detail/index.html?id=3652843337016300604"
            }
        ],
        "total_results": 200,
        "real_total_results": 200,
        "page_size": 10,
        "pagecount": 20,
        "has_more": true,
        "page": "2",
        "data_from": "leo"
    },
    "error_code": "0000",
    "reason": "ok",
    "secache": "786a853f4c64d321050d68e6fa74e1bf",
    "secache_time": 1717745342,
    "secache_date": "2024-06-07 15:29:02",
    "translate_status": "",
    "translate_time": 0,
    "language": {
        "default_lang": "cn",
        "current_lang": "cn"
    },
    "error": "",
    "cache": 0,
    "api_info": "today: max:15000 all[=++];expires:2031-01-01",
    "execution_time": "1.965",
    "server_time": "Beijing/2024-06-07 15:29:02",
    "client_ip": "127.0.0.1",
    "call_args": {
        "imgid": "http://gw.alicdn.com/imgextra/i2/3937219703/O1CN01J6n5m42LY1r1rdGUv_!!3937219703-0-C2M.jpg_Q75.jpg"
    },
    "api_type": "douyin",
    "server_memory": "3.31MB",
    "last_id": false
}


http://www.kler.cn/news/319167.html

相关文章:

  • LeetCode 257. 二叉树的所有路径,dfs
  • 29. RabbitMQ队列模型
  • 多用户自定义商城小程序源码系统 独立部署 到源代码包以及搭建部署教程
  • 根据源码解析Vue2中对于对象的变化侦测
  • 搭建HAproxy----7层负载均衡集群
  • FDA辅料数据库在线免费查询-药用辅料
  • 灵当CRM multipleUpload.php 文件上传致RCE漏洞复现
  • 双11好物推荐有哪些?五大双十一好货推荐!
  • PHP如何从字符串中删除转义字符
  • 抽奖拼团卷轴模式系统开发小程序源代码解析
  • Flask 第十二课 -- 错误处理
  • 下水道内缺陷识别检测数据集 yolo数据集 共2300张
  • LeetCode2207解题思路
  • 双十一买什么好?五款数码好物推荐!
  • 毕业设计选题:基于ssm+vue+uniapp的面向企事业单位的项目申报小程序
  • 1.3 MySql的用户管理
  • 电脑如何录屏?无水印、高清晰度电脑录屏教程
  • 『功能项目』QFrameWork道具栏物品生成【64】
  • thinkphp8 从入门到放弃(后面会完善用到哪里写到哪)
  • C#图像爬虫实战:从Walmart网站下载图片
  • python常见的魔术方法
  • 对FPGA加载过程中不同寄存器初始化方式现象的分析
  • 基于PHP的CRM管理系统源码/客户关系管理CRM系统源码/php源码/附安装教程
  • 免费分享必看!AI合规常见问题解答(二)
  • java之斗地主部分功能的实现
  • 修改Linux服务器系统语言
  • 深入解析Debian与Ubuntu:技术特点与用户使用指南
  • Git 详细安装教程(详解 Git 安装过程的每一个步骤)
  • Python 课程19-FastAPI
  • 开源 AI 智能名片与 S2B2C 商城小程序:嫁接权威实现信任与增长