Taobao keyword search product interface, keyword search Taobao product interface API access instructions

1. Item_search-Search by keyword for Taobao product interface API access description:
Click to register to get key and secret test account.
2. Recommended usage scenarios
1. Search Taobao product list by keyword
2. Get product detail page data information
3. Mall system construction
4. Purchasing system mall construction
5. ERP system product selection
3. Public parameter description: the
name type must describe the
key String is the calling key (must be spliced ​​in the URL by GET)
secret String is the calling key
api_name String is the API interface name (Included in the request address) [item_search, item_get, item_search_shop, etc.]
cache String No [yes, no] Default yes, the cached data will be called, faster
result_type String No [json,jsonu,xml,serialize,var_export] returns Data format, the default is json, the output content of jsonu can be directly read in Chinese.
lang String No [cn,en,ru] translation language, default cn simplified Chinese
version String No API version
4. API request parameters
request parameters: q=women&start_price= 0&end_price=0&page=1&cat=0&discount_only=&sort=&page_size=&seller_info=&nick=&ppath=&imgid=&filter=
Parameter description: q: search keyword
cat: category ID
start_price: start price
end_price: end price
sort: sort [bid,_bid,bid2,_bid2,_sale, credit]
(bid: total price, bid2: commodity price, sale: sales ,credit credit, add _ prefix to sort from largest to smallest)
page: page number
5. Response parameters:
whether the name type is private or not Sample value description
title String French retro Yamamoto super fairy chic fairy Hepburn net red very fairy French niche skirt two Set product title
pic_url String //img.alicdn.com/bao/uploaded/i3/3083218865/O1CN012FMDaiwxkenJGaM
!!0-item_pic.jpg baby picture
promotion_price Float 178.00 discount
price price Float 178.00 price
sales Int 890 sales
num_iid BigintID 577437133060 baby
sample_id String Commodity style ID
seller_nick String
Chumu flagship store's nickname post_fee Float 10.00 Logistics cost
area String Shandong store location
detail_url String //detail.tmall.com/item.htm?id=586794298909&ns=1&abbucket=0 baby link
seller_info Mix {"level": 99, "shop_type": "B", "user_num_id": "2217148345", "cid ”: 0, “delivery_score”: “”, “item_score”: “”, “score_p”: “”} Seller information
6. Request example: (CURL, PHP, PHPsdk, Java, C#, Python)

<?php

// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://api.onebound.cn/taobao/demo/sdk2020/demo-sign.php
$method = "GET";
$url = "https://api-gw.onebound.cn/taobao/item_search/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&q=女装&start_price=0&end_price=0&page=1&cat=0&discount_only=&sort=&page_size=&seller_info=&nick=&ppath=&imgid=&filter=";
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
var_dump(curl_exec($curl));
?>

API tool
API SDK call sample
APISDK download
API test tool

How to activate the API test, click to activate immediately

Guess you like

Origin blog.csdn.net/wx_19970108018/article/details/112762432
Recommended