🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 淘宝全网商品详情(含天猫) ![](https://img.kancloud.cn/3c/30/3c305c7246ac8c9ca855a630b97838fa_200x200.png) > 获取淘宝详情、商品原价、促销价、天猫销量、库存、视频主图等 本接口共包含6个接口:淘宝全网商品详情V1 V2、淘宝全网商品详情(轻量版)、阿里巴巴商品详情、淘宝全网商品详情图片和淘宝销量接口,共享调用次数。 >[danger] **由于受淘宝规则调整和封禁影响,采集类接口 没法保证百分百稳定性,介意请谨慎购买** ## 接口费用( [点击购买](https://market.topthink.com/product/308)) > 最低 0.0023元/次 ## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086)) > 接口1-1、1-2、1-3 虽然功能相同 但返回的数据格式有所区别,请悉知 ## 接口1-1:淘宝全网商品详情V1 ### 请求地址 ``` GET https://api.topthink.com/taobao/item ``` ### 请求参数 | 名称 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | id| string | 是 | 商品id | | info| string | 否 | part :返回部分数据 ,all:返回全部数据,如需更多数据请传all | | areaId| string | 否 | 地址ID,用于邮费 | ### 返回`data`参数 | 名称 | 类型 | 说明 | | --- | --- | --- | |title|string|商品标题| |categoryId|string|分类ID| |sellCount|float|实时销量| |zk\_final\_price|int|优惠价| |reserve\_price|float|原价| |rate|array|评价数据| |totalCount|number|评价数量| |keywords|string|大家印象| |seller|array|卖家信息| |shopName|string|店铺信息| |shopIcon|string|店标图片| |taoShopUrl|string|店铺地址| |evaluates|string|店铺动态评分| |video|string|商品视频| |quantity|Int|商品库存| |desc\_images|string[]|商品图片| |product\_main\_photo|string|商品主图| ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->taobaoItem() ->withId('572096814881') ->request(); ``` ## 接口1-2:淘宝全网商品详情V2(备用) > 该接口用于1-1接口不稳定的情况下备用 ### 请求地址 ``` GET https://api.topthink.com/taobao/good ``` ### 请求参数 | 名称 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | id| string | 是 | 商品id | ### 返回`data`参数 参考返回示例 ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->taobaoGood() ->withId('572096814881') ->request(); ``` ## 接口1-3:淘宝全网商品信息V3(轻量版) ### 请求地址 ``` GET https://api.topthink.com/taobao/info ``` ### 请求参数 | 名称 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | id| string | 是 | 商品id | ### 返回`data`参数 参考返回示例 ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->taobaoInfo() ->withId('572096814881') ->request(); ``` ## 接口2:淘宝全网商品销量(实时) ### 请求地址 ``` GET https://api.topthink.com/taobao/sale ``` ### 请求参数 | 名称 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | id| string | 是 | 商品id | ### 返回`data`参数 | 名称 | 类型 | 说明 | | --- | --- | --- | |count|number|交易成功销量,商品交易成功后计数| |sale|number|实时月销量,商品被拍下后计数| |stock|number|剩余库存| ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->taobaoSale() ->withId('572096814881') ->request(); ``` 返回示例 ~~~ { "code":0, "message":"请求成功【success】", "data":{ "cout":"19217", "sale":"20299", "stock":"262" } } ~~~ ## 接口3:淘宝全网商品详情图片 ### 请求地址 ``` GET https://api.topthink.com/taobao/image ``` ### 请求参数 | 名称 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | id| string | 是 | 商品id | ### 返回`data`参数 参考返回示例 ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->taobaoImage() ->withId('572096814881') ->request(); ``` 返回示例: ~~~ { "code": 0, "message": "请求成功【success】", "data": [ "https://assets.alicdn.com/kissy/1.0.0/build/imglazyload/spaceball.gif", "https://img.alicdn.com/imgextra/i2/3167975604/O1CN01qxNP9c1rGg7Yy78CL_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i4/3167975604/O1CN01FMZ9Ws1rGg70YgVrH_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i4/3167975604/O1CN01bcPVcB1rGg73IurYW_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i1/3167975604/O1CN01tATMX31rGg73IunPb_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i2/3167975604/O1CN01aCi83w1rGg73IsaBS_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i4/3167975604/O1CN016lyGfg1rGg6zrR1N2_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i3/3167975604/O1CN01xj3oW11rGg70Qcwy1_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i4/3167975604/O1CN01UFvxrG1rGg6yX1t0h_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i1/3167975604/O1CN01JpPPpx1rGg72n1PmJ_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i1/3167975604/O1CN01UZqTHa1rGg71q6l8Z_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i3/3167975604/O1CN01y831i71rGg73mO83n_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i4/3167975604/O1CN01ZDAMgB1rGg74DkgcC_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i1/3167975604/O1CN017eLAys1rGg73IwwfI_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i4/3167975604/O1CN01tkn43h1rGg722Bqts_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i3/3167975604/O1CN01YrMVUZ1rGg73Iztg8_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i1/3167975604/O1CN01oXz5ct1rGg72n15Ay_!!3167975604.jpg", "https://img.alicdn.com/imgextra/i3/3167975604/O1CN0133p1wA1rGg70QgZhh_!!3167975604.jpg" ] } ~~~ ## 接口4:阿里巴巴商品信息 ### 请求地址 ``` GET https://api.topthink.com/taobao/alibaba_info ``` ### 请求参数 | 名称 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | itemId| string | 是 | 商品id | ### 返回`data`参数 参考返回示例 ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->taobaoAlibabaInfo() ->withItemId('572096814881') ->request(); ```