从技术角度:淘宝店铺商品 API(TOP 开放平台)除 JSON 外,官方固定支持 XML,无其他格式(如 CSV/HTML/protobuf)。
一、支持格式(技术)
JSON(常用,默认推荐):
format=jsonXML(原生支持,默认):
format=xml
二、公共参数控制
调用时通过
format参数指定:plaintext
&format=json 或 &format=xml
缺省时默认返回XML。
三、XML 返回示例(精简)
xml
<items_get_response>
<total_results>215</total_results> <page_no>1</page_no> <page_size>20</page_size> <items> <item> <num_iid>680123456789</num_iid> <title>夏季宽松纯棉T恤</title> <price>49.9</price> <pic_url>https://img.taobao.com/xxx.jpg</pic_url> <sales>1230</sales> <status>onsale</status> </item> </items> <request_id>req_abc123456</request_id></items_get_response>
四、技术说明
无 CSV/Excel/protobuf 等格式,需自行转换。
官方 SDK(Java/PHP/Python)自动适配 XML/JSON 解析。
接口权限、签名、限流规则与格式无关。
需要我把 XML 和 JSON 的完整返回字段做一个对照清单吗?