淘口令解析
最后更新于:2022-04-02 08:18:15
## 淘口令解析
![](https://docs.gechiui.com/gc-content/uploads/sites/kancloud/27/4a/274ad6c549269bec838e5d0da48198f0_200x200.png)
> 将淘口令解析还原成url,商品口令、券口令可完美解析出商品id
## 接口费用( [点击购买](https://market.topthink.com/product/305))
> 最低 0.0025元/次
## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086))
### 请求地址
```
GET https://api.topthink.com/taobaoke/query
```
### 请求参数
| 名称 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| appCode| string| 是|用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) |
| tkl| string | 是 | 淘口令 |
### 返回`data`参数
| 名称 | 类型 | 说明 |
| --- | --- | --- |
| num\_iid | string | 商品id, 只要口令是商品口令或券口令时才返回商品id |
| content| string | 淘口令-文案 |
| title | string | 商品标题 |
| price | string |商品价格(手淘分享的口令,才可以解析出价格)|
| pic_url | string | 口令图片|
| url | string | 跳转url(长链) |
| native_url | string | 移动端调起地址 |
| thumb\_pic\_url | string | 缩略图 |
## SDK调用
```
$client = new Client("YourAppCode");
$result = $client->taobaokeQuery()
->withTkl('¥4SKAZC8brVD¥')
->request();
```
返回示例:
~~~
{
"code":0,
"message": "成功",
"data": [
{
"content": "FANBIYA X8隐形蓝牙耳机无线迷你超小挂耳式运动开车入耳塞微型头戴式可接听电话手机男女通用适用苹果",
"native_url": "tbopen://m.taobao.com/tbopen/index.html?a.....",
"pic_url": "https://img.alicdn.com/tfscom/i2/2289894494/O1CN01IFLHLJ1j4IOYvfX3g_!!0-item_pic.jpg",
"suc": true,
"thumb_pic_url": "https://img.alicdn.com/tfscom/i2/2289894494/O1CN01IFLHLJ1j4IOYvfX3g_!!0-item_pic.jpg_170x170.jpg",
"title": "淘口令-页面",
"url": "https://uland.taobao.com/coupon/edetail?e=jTS9Uk507ZQG.......",
"request_id": "88gbusl7o1at",
"num_iid": "572096814881"
}
]
}
~~~
';