---
title: "Xianyu (GooFish) การค้นหาสินค้า API (V1)"
description: "ค้นหาข้อมูลสินค้าขายต่อของ Xianyu (GooFish) โดยใช้คำสำคัญ พร้อมการควบคุมการแบ่งหน้าและการจัดเรียง คำนี้ใช้เพื่อค้นหาสินค้าขายต่อตามกิจกรรม ความใหม่ ความน่าเชื่อถือของผู้ขาย ราคา หรือเวลาที่มีการโพสต์"
lastUpdated: false
aiUsagePrompt: true
---

# Xianyu \(GooFish\) การค้นหาสินค้า API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/xianyu/search-item-list/v1\"")'
  :summary='JSON.parse("\"การค้นหาสินค้า (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/xianyu-goofish/product-search-v1-th.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"โทเค็นการเข้าถึงสำหรับบริการ API นี้\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"keyword\",\"in\":\"query\",\"description\":\"คำสำคัญสำหรับการค้นหา.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"page\",\"in\":\"query\",\"description\":\"หมายเลขหน้าสำหรับการแสดงผลการแสดงผล. หน้าแรกคือ 1.\",\"required\":false,\"schema\":{\"type\":\"string\"}},{\"name\":\"sort\",\"in\":\"query\",\"description\":\"ลำดับการจัดเรียงผลลัพธ์การค้นหาบน Xianyu\\n\\nค่าที่มีอยู่:\\n- `active`: รายการที่ใช้งานอยู่ก่อนหน้านี้ก่อน\\n- `recent`: รายการที่อยู่ใกล้หรือมีตำแหน่งบนสุดก่อน\\n- `credit`: ยอดคะแนนของผู้ขายก่อน\\n- `price_asc`: ราคาต่ำก่อน\\n- `price_desc`: ราคาสูงก่อน\\n- `price_drop`: รายการที่มีราคาลดลงก่อน\\n- `newest`: รายการที่เพิ่งถูกเพิ่มเข้ามาก่อน\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"active\",\"description\":\"ประเภทการจัดเรียงการค้นหาสินค้าของ Xianyu\",\"enum\":[\"active\",\"recent\",\"credit\",\"price_asc\",\"price_desc\",\"price_drop\",\"newest\"]}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"หน้าแรกของผลลัพธ์การค้นหาจาก Xianyu พร้อมข้อมูลการแสดงผลการแสดงผล\",\"properties\":{\"resultList\":{\"type\":\"array\",\"description\":\"หน้าประกาศผลที่ถูกส่งกลับมาสำหรับหน้านี้ ชุดข้อมูลอาจว่างเปล่าได้\",\"items\":{\"type\":\"object\",\"description\":\"หน้าจอหนึ่งในผลการค้นหา\",\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"รหัสประเภทของหน้าประกาศที่ถูกรายงานในผลการค้นหานี้ ในรูปแบบข้อความ\"},\"data\":{\"type\":\"object\",\"description\":\"ข้อมูลที่ถูกส่งมาพร้อมกับหน้าประกาศผล\",\"properties\":{\"item\":{\"type\":\"object\",\"description\":\"ข้อมูลรายการสินค้าที่ถูกส่งมาพร้อมกับหน้าประกาศผล\",\"properties\":{\"main\":{\"type\":\"object\",\"description\":\"ข้อมูลหลักของหน้าประกาศ\",\"properties\":{\"exContent\":{\"type\":\"object\",\"description\":\"รายละเอียดรายการสินค้าและข้อมูลผู้ขายที่แสดงบนหน้าค้นหา\",\"properties\":{\"itemId\":{\"type\":\"string\",\"description\":\"ID ของรายการสินค้าจาก Xianyu ในรูปแบบข้อความ ใช้ค่านี้ร่วมกับ Product Details เพื่อค้นหารายการสินค้า\"},\"title\":{\"type\":\"string\",\"description\":\"ชื่อเรื่องที่แสดงของรายการที่แสดง\"},\"area\":{\"type\":\"string\",\"description\":\"ป้ายพื้นที่ที่ถูกแสดงสำหรับรายการสินค้า\"},\"isAuction\":{\"type\":\"string\",\"description\":\"ตัวชี้วัดการประมูลที่ถูกรายงานในรูปแบบข้อความ\"},\"picUrl\":{\"type\":\"string\",\"description\":\"URL ของรูปภาพหลักที่แสดงบนหน้าประกาศ\"},\"picWidth\":{\"type\":\"string\",\"description\":\"ความกว้างของรูปภาพหลักที่ถูกรายงานในพิกเซล ในรูปแบบข้อความ\"},\"picHeight\":{\"type\":\"string\",\"description\":\"ความสูงของรูปภาพหลักที่ถูกรายงานในพิกเซล ในรูปแบบข้อความ\"},\"showVideoIcon\":{\"type\":\"string\",\"description\":\"ตัวอักษรที่ใช้แสดงไอคอนวิดีโอบนหน้าประกาศ\"},\"price\":{\"type\":\"array\",\"description\":\"ส่วนหนึ่งของราคาสินค้าที่แสดงในลำดับการแสดงผล ข้อความอาจมีสัญลักษณ์และจำนวนย่อ\",\"items\":{\"type\":\"object\",\"description\":\"ส่วนหนึ่งของราคาที่แสดง\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"ข้อความที่แสดงสำหรับส่วนหนึ่งของราคานี้\"},\"type\":{\"type\":\"string\",\"description\":\"รหัสประเภทที่ถูกรายงานสำหรับส่วนหนึ่งของราคานี้ ในรูปแบบข้อความ\"}}}},\"oriPrice\":{\"type\":\"string\",\"description\":\"ข้อความแสดงราคาเดิม หากมีให้แสดง\"},\"userNickName\":{\"type\":\"string\",\"description\":\"ชื่อผู้ขายที่แสดงในรายการสินค้า หากมีให้แสดง\"},\"userAvatarUrl\":{\"type\":\"string\",\"description\":\"URL ภาพประกอบของผู้ขายที่แสดงบนบัตร\"},\"userIdentityShow\":{\"type\":\"string\",\"description\":\"ป้ายกำกับของผู้ขายที่แสดงบนบัตร ซึ่งอาจว่างเปล่า\"},\"userFishShopLabel\":{\"type\":\"object\",\"description\":\"ป้ายกำกับของผู้ขายที่แสดงบนบัตรรายการ\",\"properties\":{\"tagList\":{\"type\":\"array\",\"description\":\"รายการป้ายกำกับของผู้ขายที่ให้มาพร้อมบัตร\",\"items\":{\"type\":\"object\",\"description\":\"ป้ายกำกับของผู้ขายหนึ่งรายการ\",\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"เนื้อหาที่แสดงสำหรับป้ายกำกับของผู้ขายนี้\",\"properties\":{\"content\":{\"type\":\"string\",\"description\":\"ข้อความที่แสดงสำหรับป้ายกำกับของผู้ขาย\"},\"type\":{\"type\":\"string\",\"description\":\"รหัสประเภทที่รายงานสำหรับป้ายกำกับของผู้ขายในรูปแบบข้อความ\"}}}}}}}}}},\"clickParam\":{\"type\":\"object\",\"description\":\"พารามิเตอร์ที่เกี่ยวข้องกับบัตรรายการนี้\",\"properties\":{\"args\":{\"type\":\"object\",\"description\":\"พารามิเตอร์ที่รวมถึงราคาและเวลาการเผยแพร่ของรายการที่แสดง\",\"properties\":{\"displayPrice\":{\"type\":\"string\",\"description\":\"ราคาที่แสดงสำหรับรายการในรูปแบบข้อความ\"},\"publishTime\":{\"type\":\"string\",\"description\":\"เวลาการเผยแพร่ที่รายงานในรูปแบบข้อความ ตัวอย่างเวลาที่ถูกต้องในฟิลด์นี้คือในหน่วยมิลลิวินาที\"}}}}}}}}}}}}}},\"resultInfo\":{\"type\":\"object\",\"description\":\"ข้อมูลการแสดงผลการแสดงผลการค้นหา\",\"properties\":{\"hasNextPage\":{\"type\":\"string\",\"description\":\"ตัวเลือกการแสดงผลการแสดงผลการค้นหา ในกรณีที่ค่าเป็น true จะดำเนินการต่อโดยการเพิ่มหน้า หากค่าเป็น false จะเป็นจุดสิ้นสุด\"}}}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"พารามิเตอร์หรือเนื้อหาของคำขอที่ไม่ถูกต้อง\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"ท่อนำข้อมูลหรือ access token ที่ไม่ถูกต้องหรือไม่มีการใช้งาน\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"การอนุญาตถูกปฏิเสธ\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"อัตราการขอหรือจำนวนคำสั่งที่จำกัดในแต่ละวันถูกเกิน\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"ความผิดพลาดของเซิร์ฟเวอร์ภายใน\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"บริการไม่สามารถใช้งานได้ในขณะนี้\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"API สำหรับการผลิตทั่วโลก (ค่าเริ่มต้น)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/xianyu/search-item-list/v1\"")' />

<p>ค้นหาข้อมูลสินค้าขายต่อของ Xianyu (GooFish) โดยใช้คำสำคัญ พร้อมการควบคุมการแบ่งหน้าและการจัดเรียง คำนี้ใช้เพื่อค้นหาสินค้าขายต่อตามกิจกรรม ความใหม่ ความน่าเชื่อถือของผู้ขาย ราคา หรือเวลาที่มีการโพสต์</p>

## พารามิเตอร์

<div class="api-doc-table api-doc-table--params">

| ชื่อ | ตำแหน่ง | ชนิดข้อมูล | จำเป็น | ค่าเริ่มต้น | คำอธิบาย |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | ใช่ | - | โทเค็นการเข้าถึงสำหรับบริการ API นี้ |
| <code>keyword</code> | query | <code>string</code> | ใช่ | - | คำสำคัญสำหรับการค้นหา. |
| <code>page</code> | query | <code>string</code> | ไม่ใช่ | - | หมายเลขหน้าสำหรับการแสดงผลการแสดงผล. หน้าแรกคือ 1. |
| <code>sort</code> | query | <code>string</code> | ไม่ใช่ | <code>active</code> | ลำดับการจัดเรียงผลลัพธ์การค้นหาบน Xianyu<br /><br><br>ค่าที่มีอยู่:<br /><br>- <code>active</code>: รายการที่ใช้งานอยู่ก่อนหน้านี้ก่อน<br /><br>- <code>recent</code>: รายการที่อยู่ใกล้หรือมีตำแหน่งบนสุดก่อน<br /><br>- <code>credit</code>: ยอดคะแนนของผู้ขายก่อน<br /><br>- <code>price_asc</code>: ราคาต่ำก่อน<br /><br>- <code>price_desc</code>: ราคาสูงก่อน<br /><br>- <code>price_drop</code>: รายการที่มีราคาลดลงก่อน<br /><br>- <code>newest</code>: รายการที่เพิ่งถูกเพิ่มเข้ามาก่อน |

</div>

## ตัวอย่างโค้ด

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/xianyu/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE'
```

```text [🤖 คำแนะนำสำหรับ AI]
ฉันต้องการใช้ API "การค้นหาสินค้า (V1)" จาก JustOneAPI.
URL หลัก: https://api.justoneapi.com.
เส้นทาง API: /api/xianyu/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE
เอนด์พอยต์ API: BASE_URL + /api/xianyu/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE
เมธอด HTTP: GET
การยืนยันตัวตน: เพิ่มพารามิเตอร์ "token" เข้าไปใน URL.
คำนิยาม OpenAPI: https://docs.justoneapi.com/openapi/xianyu-goofish/product-search-v1-th.json

พารามิเตอร์:
- token (query): โทเค็นการเข้าถึงสำหรับบริการ API นี้ (จำเป็น)
- keyword (query): คำสำคัญสำหรับการค้นหา. (จำเป็น)
- page (query): หมายเลขหน้าสำหรับการแสดงผลการแสดงผล. หน้าแรกคือ 1.
- sort (query): ลำดับการจัดเรียงผลลัพธ์การค้นหาบน Xianyu

ค่าที่มีอยู่:
- `active`: รายการที่ใช้งานอยู่ก่อนหน้านี้ก่อน
- `recent`: รายการที่อยู่ใกล้หรือมีตำแหน่งบนสุดก่อน
- `credit`: ยอดคะแนนของผู้ขายก่อน
- `price_asc`: ราคาต่ำก่อน
- `price_desc`: ราคาสูงก่อน
- `price_drop`: รายการที่มีราคาลดลงก่อน
- `newest`: รายการที่เพิ่งถูกเพิ่มเข้ามาก่อน

รูปแบบที่ส่งกลับ: จัดการ JSON หรือข้อความอย่างปลอดภัยตามค่า Content-Type ที่ได้รับจริง

การจัดการผลตอบกลับและรหัสข้อผิดพลาด:
1. ตรวจสอบผลการทำงานจากฟิลด์ "code" ในผลตอบกลับ (รหัส 0 หมายถึงสำเร็จ)
2. แนะนำให้ตั้งระยะเวลารอ 120 วินาที หาก 120 วินาทีนานเกินไป ให้ตั้งอย่างน้อย 60 วินาที แต่คำขอบางรายการอาจหมดเวลาก่อนได้รับผลลัพธ์
3. รหัสผลลัพธ์:
   - 0: สำเร็จ
   - 100: โทเคนไม่ถูกต้องหรือถูกปิดใช้งาน
   - 301: ดึงข้อมูลไม่สำเร็จ โปรดลองอีกครั้ง
   - 302: เกินขีดจำกัดอัตราการเรียก
   - 303: ใช้โควตารายวันครบแล้ว
   - 400: พารามิเตอร์ไม่ถูกต้อง
   - 500: ข้อผิดพลาดภายในเซิร์ฟเวอร์
   - 600: ไม่มีสิทธิ์เข้าถึง
   - 601: ยอดเงินคงเหลือไม่เพียงพอ
   - 602: ถึงวงเงินของโทเคนแล้ว
4. รหัส 601 หมายถึงยอดเงินที่ใช้ร่วมกันของบัญชีไม่เพียงพอ รหัส 602 หมายถึงโทเคน API ถึงวงเงินสะสมของตนเองแล้ว การกำหนดวงเงินโทเคนจะไม่โอนเงินออกจากยอดเงินที่ใช้ร่วมกันของบัญชี

กรุณาช่วยเขียนสคริปต์ในภาษาโปรแกรมที่ฉันชื่นชอบเพื่อเรียกใช้ API และจัดการการตอบกลับ.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # ให้โดยเซิร์ฟเวอร์ OpenAPI

url = BASE_URL + "/api/xianyu/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // ให้โดยเซิร์ฟเวอร์ OpenAPI
const url = BASE_URL + "/api/xianyu/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // ให้โดยเซิร์ฟเวอร์ OpenAPI
        final String url = BASE_URL + "/api/xianyu/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // ให้โดยเซิร์ฟเวอร์ OpenAPI

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/xianyu/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // ให้โดยเซิร์ฟเวอร์ OpenAPI
$url = $BASE_URL . '/api/xianyu/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/xianyu-goofish/product-search-v1-th.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[คำนิยาม OpenAPI (JSON)]</a>
</div>

## ฟิลด์ที่ได้รับการตอบกลับ

ฟิลด์สำคัญในผลการตอบกลับที่สำเร็จ (`code = 0`).

<div class="api-doc-table api-doc-table--response">

| เส้นทางฟิลด์ | ชนิดข้อมูล | คำอธิบาย |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | หน้าแรกของผลลัพธ์การค้นหาจาก Xianyu พร้อมข้อมูลการแสดงผลการแสดงผล |
| <code>data.resultList</code> | <code>array</code> | หน้าประกาศผลที่ถูกส่งกลับมาสำหรับหน้านี้ ชุดข้อมูลอาจว่างเปล่าได้ |
| <code>data.resultList[]</code> | <code>object</code> | หน้าจอหนึ่งในผลการค้นหา |
| <code>data.resultList[].type</code> | <code>string</code> | รหัสประเภทของหน้าประกาศที่ถูกรายงานในผลการค้นหานี้ ในรูปแบบข้อความ |
| <code>data.resultList[].data</code> | <code>object</code> | ข้อมูลที่ถูกส่งมาพร้อมกับหน้าประกาศผล |
| <code>data.resultList[].data.item</code> | <code>object</code> | ข้อมูลรายการสินค้าที่ถูกส่งมาพร้อมกับหน้าประกาศผล |
| <code>data.resultList[].data.item.main</code> | <code>object</code> | ข้อมูลหลักของหน้าประกาศ |
| <code>data.resultList[].data.item.main.exContent</code> | <code>object</code> | รายละเอียดรายการสินค้าและข้อมูลผู้ขายที่แสดงบนหน้าค้นหา |
| <code>data.resultList[].data.item.main.exContent.itemId</code> | <code>string</code> | ID ของรายการสินค้าจาก Xianyu ในรูปแบบข้อความ ใช้ค่านี้ร่วมกับ Product Details เพื่อค้นหารายการสินค้า |
| <code>data.resultList[].data.item.main.exContent.title</code> | <code>string</code> | ชื่อเรื่องที่แสดงของรายการที่แสดง |
| <code>data.resultList[].data.item.main.exContent.area</code> | <code>string</code> | ป้ายพื้นที่ที่ถูกแสดงสำหรับรายการสินค้า |
| <code>data.resultList[].data.item.main.exContent.isAuction</code> | <code>string</code> | ตัวชี้วัดการประมูลที่ถูกรายงานในรูปแบบข้อความ |
| <code>data.resultList[].data.item.main.exContent.picUrl</code> | <code>string</code> | URL ของรูปภาพหลักที่แสดงบนหน้าประกาศ |
| <code>data.resultList[].data.item.main.exContent.picWidth</code> | <code>string</code> | ความกว้างของรูปภาพหลักที่ถูกรายงานในพิกเซล ในรูปแบบข้อความ |
| <code>data.resultList[].data.item.main.exContent.picHeight</code> | <code>string</code> | ความสูงของรูปภาพหลักที่ถูกรายงานในพิกเซล ในรูปแบบข้อความ |
| <code>data.resultList[].data.item.main.exContent.showVideoIcon</code> | <code>string</code> | ตัวอักษรที่ใช้แสดงไอคอนวิดีโอบนหน้าประกาศ |
| <code>data.resultList[].data.item.main.exContent.price</code> | <code>array</code> | ส่วนหนึ่งของราคาสินค้าที่แสดงในลำดับการแสดงผล ข้อความอาจมีสัญลักษณ์และจำนวนย่อ |
| <code>data.resultList[].data.item.main.exContent.price[]</code> | <code>object</code> | ส่วนหนึ่งของราคาที่แสดง |
| <code>data.resultList[].data.item.main.exContent.price[].text</code> | <code>string</code> | ข้อความที่แสดงสำหรับส่วนหนึ่งของราคานี้ |
| <code>data.resultList[].data.item.main.exContent.price[].type</code> | <code>string</code> | รหัสประเภทที่ถูกรายงานสำหรับส่วนหนึ่งของราคานี้ ในรูปแบบข้อความ |
| <code>data.resultList[].data.item.main.exContent.oriPrice</code> | <code>string</code> | ข้อความแสดงราคาเดิม หากมีให้แสดง |
| <code>data.resultList[].data.item.main.exContent.userNickName</code> | <code>string</code> | ชื่อผู้ขายที่แสดงในรายการสินค้า หากมีให้แสดง |
| <code>data.resultList[].data.item.main.exContent.userAvatarUrl</code> | <code>string</code> | URL ภาพประกอบของผู้ขายที่แสดงบนบัตร |
| <code>data.resultList[].data.item.main.exContent.userIdentityShow</code> | <code>string</code> | ป้ายกำกับของผู้ขายที่แสดงบนบัตร ซึ่งอาจว่างเปล่า |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel</code> | <code>object</code> | ป้ายกำกับของผู้ขายที่แสดงบนบัตรรายการ |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel.tagList</code> | <code>array</code> | รายการป้ายกำกับของผู้ขายที่ให้มาพร้อมบัตร |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel.tagList[]</code> | <code>object</code> | ป้ายกำกับของผู้ขายหนึ่งรายการ |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel.tagList[].data</code> | <code>object</code> | เนื้อหาที่แสดงสำหรับป้ายกำกับของผู้ขายนี้ |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel.tagList[].data.content</code> | <code>string</code> | ข้อความที่แสดงสำหรับป้ายกำกับของผู้ขาย |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel.tagList[].data.type</code> | <code>string</code> | รหัสประเภทที่รายงานสำหรับป้ายกำกับของผู้ขายในรูปแบบข้อความ |
| <code>data.resultList[].data.item.main.clickParam</code> | <code>object</code> | พารามิเตอร์ที่เกี่ยวข้องกับบัตรรายการนี้ |
| <code>data.resultList[].data.item.main.clickParam.args</code> | <code>object</code> | พารามิเตอร์ที่รวมถึงราคาและเวลาการเผยแพร่ของรายการที่แสดง |
| <code>data.resultList[].data.item.main.clickParam.args.displayPrice</code> | <code>string</code> | ราคาที่แสดงสำหรับรายการในรูปแบบข้อความ |
| <code>data.resultList[].data.item.main.clickParam.args.publishTime</code> | <code>string</code> | เวลาการเผยแพร่ที่รายงานในรูปแบบข้อความ ตัวอย่างเวลาที่ถูกต้องในฟิลด์นี้คือในหน่วยมิลลิวินาที |
| <code>data.resultInfo</code> | <code>object</code> | ข้อมูลการแสดงผลการแสดงผลการค้นหา |
| <code>data.resultInfo.hasNextPage</code> | <code>string</code> | ตัวเลือกการแสดงผลการแสดงผลการค้นหา ในกรณีที่ค่าเป็น true จะดำเนินการต่อโดยการเพิ่มหน้า หากค่าเป็น false จะเป็นจุดสิ้นสุด |

</div>

## ตัวอย่างผลการตอบกลับ

<ApiExampleSection :api='JSON.parse("\"/api/xianyu/search-item-list/v1\"")' />

