keywordstringbắt buộc
Search keyword.
https://api.sandbase.ai/v1/api/jd/search/itemsSearch JD.com products by keyword with item IDs, titles, images, categories and shop names, with page-based pagination.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
Returns a page of JD.com products that match a search keyword. Each product has an item ID, an image path, category IDs, a sales count label and review tags. Send a keyword and an optional page number.
curl -X POST "https://api.sandbase.ai/v1/api/jd/search/items" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "手机壳"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Search keyword. |
page | string | No | Page number for pagination. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"currentPage": 1,
"pageSize": 0,
"products": [
{
"adSkuType": 1,
"adType": 3,
"asgAttribute": "",
"asgHighlight": "",
"asgRecReason": "",
"asgStructuredAttribute": "",
"bId": "13056",
"bybtTraffic": 0,
"cc": "10万+",
"cid1": "9987",
"cid2": "830",
"cid3": "866"
}
],
"totalCount": 7607,
"totalPages": 159
}
| Field | Meaning |
|---|---|
products[].id | Item ID of the product. Use it to look up the product in other JD.com APIs. |
products[].imageUrl | Image path of the product, such as jfs/t1/.../xxx.jpg. The response gives a relative path, not a full URL. |
products[].bId | ID of the brand or seller entry tied to the product, as a string. |
products[].cid1 / cid2 / cid3 | Category IDs at three levels, from broad to narrow. |
products[].cc | Count label shown on the listing, such as 10万+ or 5000+. |
products[].gcp | Score from 0 to 100 shown with the product. The key name and values suggest a positive-review percentage. |
products[].gcw | List of short review tags for the product, such as 手感一流. |
products[].gct | Review tags joined into one text line, starting with 推荐理由:. |
products[].foi | Installment label, such as 6期免息. It is an empty string when there is none. |
totalCount / totalPages | Total number of matching products and the number of result pages. |
keyword is required. page is a string holding the page number, and currentPage in the response shows which page you got.coupons, discounts and gifts, can be empty lists or empty strings.pageSize is 0, so count the items in products to get the real page size.$0.021429 per successful call. Failed calls are not charged.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/jd/search/items" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "蓝牙耳机"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
keywordstringbắt buộcSearch keyword.
pagestringPage number for pagination.
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
JD.com Product SearchAPI này JD.com | $0.021429 mỗi lần gọi | JSON |
JD.com | $0.028571 mỗi lần gọi | JSON |
JD.com | $0.021429 mỗi lần gọi | JSON |
JD.com | $0.028571 mỗi lần gọi | JSON |
JD.com | $0.021429 mỗi lần gọi | JSON |
JD.com | $0.028571 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/jd/search/items với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.021429 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: keyword (string). Tùy chọn: page (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. JD.com Product Search chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của JD.com.