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

190 篇文章 1 订阅
187 篇文章 1 订阅

要获取店铺详情,你需要使用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"
  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值