Taobao & Tmall APIs - Product Search (V1)
Searches Taobao/Tmall products by keyword and optional filters, returning a paginated result set with basic product metadata (e.g., item ID, title, price, images when available) and listing status.
Typical use cases:
- Discovering products for analysis or monitoring
- Building watchlists by keyword/category
- Market and competitor research
- Feeding downstream pipelines (detail collection, price tracking)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | Yes | Access token for this API service. |
keyword | query | string | Yes | Search keyword. |
sort | query | string | No | Sort order for the result set. Available Values: - _sale: Sales- _bid: Price: High to Low- bid: Price: Low to High- _coefp: General |
tmall | query | boolean | No | Whether to filter results to Tmall only. |
startPrice | query | string | No | Minimum price filter (inclusive). |
endPrice | query | string | No | Maximum price filter (inclusive). |
page | query | integer | No | Page number for pagination. |
Code Samples
💡 Environment Note
Default samples use https://api.justoneapi.com (prod-global). For users in Mainland China, it is recommended to replace it with http://47.117.133.51:30015 (prod-cn) for better performance. See Environment Guide.
bash
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/taobao/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE"text
I want to use the "Product Search (V1)" API from Just One API.
API Endpoint: https://api.justoneapi.com/api/taobao/search-item-list/v1
HTTP Method: GET
Authentication: Append "?token=YOUR_API_KEY" to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/taobao-tmall-apis/product-search-v1-en.json
Parameters:
- token (query): Access token for this API service. (Required)
- keyword (query): Search keyword. (Required)
- sort (query): Sort order for the result set.
Available Values:
- `_sale`: Sales
- `_bid`: Price: High to Low
- `bid`: Price: Low to High
- `_coefp`: General
- tmall (query): Whether to filter results to Tmall only.
- startPrice (query): Minimum price filter (inclusive).
- endPrice (query): Maximum price filter (inclusive).
- page (query): Page number for pagination.
Return format: JSON
Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set request timeout to at least 60 seconds.
3. Business Code Reference:
- 0: Success
- 100: Invalid or Inactive Token
- 301: Collection Failed. Please Retry.
- 302: Rate Limit Exceeded
- 303: Daily Quota Exceeded
- 400: Invalid Parameters
- 500: Internal Server Error
- 600: Permission Denied
- 601: Insufficient Balance
Please help me write a script in my preferred programming language to call this API and handle the response.python
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import requests
url = "https://api.justoneapi.com/api/taobao/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE"
response = requests.get(url)
print(response.json())js
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/taobao/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE", {
method: "GET"
});
const data = await response.json();
console.log(data);java
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.justoneapi.com/api/taobao/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}go
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
url := "https://api.justoneapi.com/api/taobao/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE"
req, _ := http.NewRequest("GET", url, nil)
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}php
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/taobao/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;Responses
json
{
"code": 0,
"data": {
"code": "SUCCESS",
"extraMap": {
"MtopCostMillis": 72
},
"model": {
"brandList": [
{
"brandId": 1116992510,
"brandName": "徽味和",
"count": 12
}
],
"costMillis": 71,
"extraMap": {
"WorldsearchIP": "33.44.173.30",
"WorldsearchName": "worldsearch033044173030.center.na620",
"EndpointHost": "33.69.77.30",
"sp_status": "OK",
"Endpoint": "taobao_item",
"afterSearchCostMillis": 0
},
"itemList": [
{
"cityEn": "",
"commentCount": "",
"discntPriceYuan": 13.9,
"discntRate": 348,
"discntType": "活动价",
"extraMap": {},
"fahuoDsr": "487",
"frontStock": 92034,
"fuwuDsr": "486",
"hasTongkuan": false,
"hasXiangsi": false,
"itemGradeAvg": 0,
"itemId": 638549822878,
"itemLoc": "湖南 长沙",
"itemName": "皇家小虎手抓饼面饼皮正品旗舰店早餐半成品美食葱油煎饼卷饼商用",
"itemNameEn": "",
"itemSubName": "猪油起酥 千层酥脆 无需解冻 3分钟营养早餐",
"itemSubNameEn": "",
"itemType": "b",
"miaoshuDsr": "483",
"options": 17750295040,
"orderPayUV": "1万+",
"picUrl": "i2/3578271683/O1CN013v45XU1OIrg7zeMMP_!!4611686018427385795-0-item_pic.jpg",
"picUrlFull": "https://g.search.alicdn.com/img/bao/uploaded/i4/i2/3578271683/O1CN013v45XU1OIrg7zeMMP_!!461168601842...",
"picUrlList": [
"i1/3578271683/O1CN01HjLE5T1OIrYaObHf5_!!3578271683.jpg"
],
"priceFen": 39900,
"priceYuanDouble": 399,
"priceZKFen": 1390,
"priceZKYuanDouble": 13.9,
"prodId": 104492152,
"provEn": "",
"sellerGoodrat": 10000,
"sellerLevel": 18,
"sellerLoc": "上海 上海",
"serviceList": [],
"shopId": 3578271683,
"shopName": "皇家小虎旗舰店",
"spuId": 8750681503,
"tagList": [],
"tmcTagList": [
"47109"
],
"userTag": 18014535948435464,
"userType": 1,
"vidname": ""
}
],
"page": {
"nextNo": 2,
"pageNo": 1,
"pageSize": 10,
"prevNo": 1,
"showBegin": 1,
"showEnd": 3,
"totalItems": 176338,
"totalPages": 17634
},
"propertyList": [
{
"flag": "qp_commend",
"pid": 122450261,
"pname": "省份",
"valueList": [
{
"count": 1381,
"flag": "qp_commend",
"vid": 52863,
"vname": "福建省"
}
]
}
],
"responseStatus": 0,
"success": true,
"traceList": []
}
}
}💡 Note: For list data, the example shows only 1-2 items for simplicity. The actual count depends on the API response.
