API接口开发1688阿里巴巴官方API接口获得店铺详情1688.seller_info-API接入演示

要获取店铺详情,你需要使用1688API接口。以下是一个简单的Python示例,展示了如何使用requests库调用阿里巴巴API并解析返回的数据:

# coding:utf-8
"""
Compatible for python2.x and python3.x
requirement: pip install requests
"""
from __future__ import print_function
import requests
# 请求示例 url 默认请求参数已经做URL编码
url = "https://seller_info/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&sid=b2b-2206619673102e9470"
headers = {
    "Accept-Encoding": "gzip",
    "Connection": "close"
}
if __name__ == "__main__":
    r = requests.get(url, headers=headers)
    json_obj = r.json()
    print(json_obj)

请注意,你需要先获取Api Key和Api Secret。此外,你还需要根据1688阿里巴巴文档生成签名(sign)。

这个示例仅用于演示目的,实际使用时请参考1688阿里巴巴API文档以获取更多详细信息和正确处理错误。

API接口请求响应示例

{
	"user": {
		"id": "37405963",
		"nick": "深圳市多亲科技有限公司",
		"good_num": "",
		"level": "",
		"created": "",
		"shop_type": "",
		"user_num_id": "b2b-2206619673102e9470",
		"company_id": "",
		"company_dj": "深圳市多亲科技有限公司",
		"company_time": "",
		"company_info": null,
		"cid": "-1",
		"sid": "b2b-2206619673102e9470",
		"title": "深圳市多亲科技有限公司",
		"address": "广东 深圳",
		"zhuy": "https://m.1688.com/winport/b2b-2206619673102e9470.html",
		"fh_score": "5.0",
		"hm_score": "5.0",
		"xy_score": "2.0",
		"ht_score": "5.0",
		"qe_score": "0.0",
		"menu": "",
		"tplogo": "//cbu01.alicdn.com/cms/upload/2016/790/696/2696097_1254399316.png",
		"ratelogourl": "https://img.alicdn.com/imgextra/i2/O1CN01AUrNmz1Mb3n1wG6Z1_!!6000000001452-2-tps-48-48.png",
		"tpyear": "4",
		"star": "3.5",
		"bsrdata": "",
		"_ddf": "cdy"
	},
	"secache": "b4cb1839f4d75b3991d8e7ed9ab1f3e6",
	"secache_time": 1695279142,
	"secache_date": "2023-09-21 14:52:22",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"reason": "",
	"error_code": "0000"

最近更新

  1. TCP协议是安全的吗?

    2024-03-31 03:46:02       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-31 03:46:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-31 03:46:02       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-31 03:46:02       20 阅读

热门阅读

  1. antdp | 解决问题tcp 8080 bind address already in use

    2024-03-31 03:46:02       17 阅读
  2. Android SystemUI关机和重启的UI

    2024-03-31 03:46:02       17 阅读
  3. ElasticSearch之优化篇

    2024-03-31 03:46:02       18 阅读
  4. 智慧工地整体解决方案(1)

    2024-03-31 03:46:02       22 阅读
  5. sort和priority_queue的自定义比较函数

    2024-03-31 03:46:02       21 阅读
  6. 智能合约测试例子

    2024-03-31 03:46:02       24 阅读
  7. vector快速入门

    2024-03-31 03:46:02       20 阅读
  8. 【MySQL】MySQL中SQL语句的索引分析

    2024-03-31 03:46:02       18 阅读
  9. QT5.14.2 码上热浪,用Qt5狂暴轰入多媒体狂潮

    2024-03-31 03:46:02       20 阅读
  10. IMBoy项目的缓存机制:高效数据处理的秘诀

    2024-03-31 03:46:02       12 阅读