接口获取数据响应参数接入 pinduoduo.item_search_suggest-获得搜索词推荐 公共参数
名称 | 类型 | 必须 | 描述 |
---|---|---|---|
key | String | 是 | 调用key(必须以GET方式拼接在URL中) |
secret | String | 是 | 调用密钥 |
api_name | String | 是 | API接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等] |
cache | String | 否 | [yes,no]默认yes,将调用缓存的数据,速度比较快 |
result_type | String | 否 | [json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读 |
lang | String | 否 | [cn,en,ru]翻译语言,默认cn简体中文 |
version | String | 否 | API版本 |
请求参数:q=女装 参数说明:q:搜索关键字请求示例 响应示例
{ "items": { "keyword": "女装", "result": [ [ "女装2021新款潮" ], [ "女装摩托车" ], [ "女装三件套洋气" ], [ "女装卫衣春秋" ], [ "女装套装" ], [ "女装春装" ], [ "女装小个子" ], [ "女装2021新款外套" ], [ "女装衬衫长袖洋气" ], [ "女装羽绒服外套长款" ], [ "女装t恤新款时尚" ], [ "女装内裤" ], [ "女装上衣" ], [ "女装春秋装" ], [ "女装衣服外套" ], [ "女装羽绒服" ], [ "女装睡衣" ], [ "女装运动套装" ], [ "女装卫衣" ], [ "女装马甲外套" ] ] }, "secache": "11d2656d59b74f2c8ea26f48e8a00827", "secache_time": 1615362713, "secache_date": "2021-03-10 15:51:53", "translate_status": "", "translate_time": 0, "language": { "default_lang": "cn", "current_lang": "cn" }, "error": "", "reason": "", "error_code": "0000", "cache": 0, "api_info": "today:31 max:10000", "execution_time": 0.098, "server_time": "Beijing/2021-03-10 15:51:53", "client_ip": "106.6.35.144", "call_args": { "q": "女装" }, "api_type": "pinduoduo", "translate_language": "zh-CN", "translate_engine": "baidu", "server_memory": "2.85MB", "request_id": "gw-1.60487a996c711" }异常示例
{ "error": "item-not-found", "reason": "商品没找到", "error_code": "2000", "success": 0, "cache": 0, "api_info": "today:0 max:10000", "execution_time": 0.081, "server_time": "Beijing/2020-06-10 23:44:00", "call_args": [], "api_type": "taobao", "request_id": "15ee0ffc041242"}标签:String,接口技术,示例,搜索词,案例,api,item,time,女装 From: https://www.cnblogs.com/Cris20230328/p/17554036.html