---
title: "Xianyu (GooFish) Pencarian Produk API (V1)"
description: "Menyelidiki daftar barang second-hand Xianyu (GooFish) berdasarkan kata kunci dengan kontrol halaman dan sort. Digunakan untuk menemukan barang second-hand berdasarkan aktivitas, keterkaitan, kredit penjual, harga, atau waktu penayangan."
lastUpdated: false
aiUsagePrompt: true
---

# Xianyu \(GooFish\) Pencarian Produk API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/xianyu/search-item-list/v1\"")'
  :summary='JSON.parse("\"Pencarian Produk (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/xianyu-goofish/product-search-v1-id.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"Token akses untuk layanan API ini.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"keyword\",\"in\":\"query\",\"description\":\"Kata kunci pencarian.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"page\",\"in\":\"query\",\"description\":\"Nomor halaman untuk paginasi. Halaman pertama adalah 1.\",\"required\":false,\"schema\":{\"type\":\"string\"}},{\"name\":\"sort\",\"in\":\"query\",\"description\":\"Urutan pengurutan hasil pencarian Xianyu.\\n\\nNilai yang tersedia:\\n- `active`: Daftar yang aktif terlebih dahulu.\\n- `recent`: Hasil yang terbaru terlebih dahulu.\\n- `credit`: Kredit penjual terlebih dahulu.\\n- `price_asc`: Harga terendah terlebih dahulu.\\n- `price_desc`: Harga tertinggi terlebih dahulu.\\n- `price_drop`: Daftar dengan harga lebih murah terlebih dahulu.\\n- `newest`: Barang yang baru terdaftar terlebih dahulu.\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"active\",\"description\":\"Jenis sort pencarian produk 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\":\"Satu halaman hasil pencarian Xianyu beserta informasi paginasi.\",\"properties\":{\"resultList\":{\"type\":\"array\",\"description\":\"Kartu hasil yang dikembalikan untuk halaman ini. Daftar ini bisa kosong.\",\"items\":{\"type\":\"object\",\"description\":\"Satu kartu dalam hasil pencarian.\",\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"Kode jenis kartu yang dilaporkan dengan hasil pencarian ini, sebagai teks.\"},\"data\":{\"type\":\"object\",\"description\":\"Data yang dibawa oleh kartu hasil.\",\"properties\":{\"item\":{\"type\":\"object\",\"description\":\"Informasi listing yang dibawa oleh kartu hasil.\",\"properties\":{\"main\":{\"type\":\"object\",\"description\":\"Data kartu listing utama.\",\"properties\":{\"exContent\":{\"type\":\"object\",\"description\":\"Detail listing dan penjual yang ditampilkan pada kartu pencarian.\",\"properties\":{\"itemId\":{\"type\":\"string\",\"description\":\"ID listing Xianyu sebagai teks. Gunakan nilai ini bersama dengan Detail Produk untuk memeriksa listing.\"},\"title\":{\"type\":\"string\",\"description\":\"Judul tampilan listing.\"},\"area\":{\"type\":\"string\",\"description\":\"Label area yang ditampilkan untuk listing.\"},\"isAuction\":{\"type\":\"string\",\"description\":\"Indikator lelang yang dilaporkan sebagai teks.\"},\"picUrl\":{\"type\":\"string\",\"description\":\"URL gambar utama yang ditampilkan pada kartu listing.\"},\"picWidth\":{\"type\":\"string\",\"description\":\"Lebar gambar utama yang dilaporkan dalam piksel, sebagai teks.\"},\"picHeight\":{\"type\":\"string\",\"description\":\"Tinggi gambar utama yang dilaporkan dalam piksel, sebagai teks.\"},\"showVideoIcon\":{\"type\":\"string\",\"description\":\"Flag teks untuk menampilkan ikon video pada kartu.\"},\"price\":{\"type\":\"array\",\"description\":\"Fragmen harga listing yang ditampilkan dalam urutan tampilan. Teks ini bisa termasuk simbol dan jumlah yang disingkat.\",\"items\":{\"type\":\"object\",\"description\":\"Satu fragmen dari harga yang ditampilkan.\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"Teks yang ditampilkan untuk fragmen ini.\"},\"type\":{\"type\":\"string\",\"description\":\"Kode jenis yang dilaporkan untuk fragmen harga ini sebagai teks.\"}}}},\"oriPrice\":{\"type\":\"string\",\"description\":\"Teks tampilan harga asli, jika diberikan.\"},\"userNickName\":{\"type\":\"string\",\"description\":\"Nama panggilan penjual yang ditampilkan untuk listing, jika diberikan.\"},\"userAvatarUrl\":{\"type\":\"string\",\"description\":\"URL avatar penjual yang ditampilkan pada kartu.\"},\"userIdentityShow\":{\"type\":\"string\",\"description\":\"Label identitas penjual yang ditampilkan pada kartu, yang mungkin kosong.\"},\"userFishShopLabel\":{\"type\":\"object\",\"description\":\"Label penjual yang ditampilkan pada kartu listing.\",\"properties\":{\"tagList\":{\"type\":\"array\",\"description\":\"Daftar label penjual yang disertakan dengan kartu.\",\"items\":{\"type\":\"object\",\"description\":\"Satu label penjual.\",\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"Menampilkan konten untuk label penjual ini.\",\"properties\":{\"content\":{\"type\":\"string\",\"description\":\"Teks yang ditampilkan untuk label penjual.\"},\"type\":{\"type\":\"string\",\"description\":\"Kode jenis yang dilaporkan untuk label penjual sebagai teks.\"}}}}}}}}}},\"clickParam\":{\"type\":\"object\",\"description\":\"Parameter yang terkait dengan kartu penjualan ini.\",\"properties\":{\"args\":{\"type\":\"object\",\"description\":\"Parameter yang berisi harga dan waktu publikasi yang ditampilkan untuk penjualan.\",\"properties\":{\"displayPrice\":{\"type\":\"string\",\"description\":\"Harga yang ditampilkan untuk penjualan sebagai teks.\"},\"publishTime\":{\"type\":\"string\",\"description\":\"Waktu publikasi yang dilaporkan sebagai teks. Nilai Unix timestamp yang valid di bidang ini adalah dalam milidetik.\"}}}}}}}}}}}}}},\"resultInfo\":{\"type\":\"object\",\"description\":\"Informasi paginasi untuk hasil pencarian.\",\"properties\":{\"hasNextPage\":{\"type\":\"string\",\"description\":\"Flag paginasi sebagai teks. Lanjutkan dengan meningkatkan halaman ketika nilainya true. Nilai false menandakan akhir.\"}}}}}}},\"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\":\"Parameter atau isi permintaan yang tidak valid\",\"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\":\"Token akses yang tidak valid atau tidak aktif\",\"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\":\"Izin ditolak\",\"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\":\"Laju permintaan atau batas kuota harian terlampaui\",\"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\":\"Kesalahan server internal\",\"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\":\"Layanan sementara tidak tersedia\",\"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 produksi global (default)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

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

<p>Menyelidiki daftar barang second-hand Xianyu (GooFish) berdasarkan kata kunci dengan kontrol halaman dan sort. Digunakan untuk menemukan barang second-hand berdasarkan aktivitas, keterkaitan, kredit penjual, harga, atau waktu penayangan.</p>

## Parameter

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

| Nama | Lokasi | Jenis | Wajib | Bawaan | Deskripsi |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | Ya | - | Token akses untuk layanan API ini. |
| <code>keyword</code> | query | <code>string</code> | Ya | - | Kata kunci pencarian. |
| <code>page</code> | query | <code>string</code> | Tidak | - | Nomor halaman untuk paginasi. Halaman pertama adalah 1. |
| <code>sort</code> | query | <code>string</code> | Tidak | <code>active</code> | Urutan pengurutan hasil pencarian Xianyu.<br /><br><br>Nilai yang tersedia:<br /><br>- <code>active</code>: Daftar yang aktif terlebih dahulu.<br /><br>- <code>recent</code>: Hasil yang terbaru terlebih dahulu.<br /><br>- <code>credit</code>: Kredit penjual terlebih dahulu.<br /><br>- <code>price_asc</code>: Harga terendah terlebih dahulu.<br /><br>- <code>price_desc</code>: Harga tertinggi terlebih dahulu.<br /><br>- <code>price_drop</code>: Daftar dengan harga lebih murah terlebih dahulu.<br /><br>- <code>newest</code>: Barang yang baru terdaftar terlebih dahulu. |

</div>

## Contoh Kode

::: 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 [🤖 Prompt AI]
Saya ingin menggunakan API "Pencarian Produk (V1)" dari JustOneAPI.
URL dasar: https://api.justoneapi.com.
Jalur API: /api/xianyu/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE
Endpoint API: BASE_URL + /api/xianyu/search-item-list/v1?token=YOUR_API_KEY&keyword=VALUE
Metode HTTP: GET
Autentikasi: Tambahkan parameter query "token" ke URL.
Definisi OpenAPI: https://docs.justoneapi.com/openapi/xianyu-goofish/product-search-v1-id.json

Parameter:
- token (query): Token akses untuk layanan API ini. (Wajib)
- keyword (query): Kata kunci pencarian. (Wajib)
- page (query): Nomor halaman untuk paginasi. Halaman pertama adalah 1.
- sort (query): Urutan pengurutan hasil pencarian Xianyu.

Nilai yang tersedia:
- `active`: Daftar yang aktif terlebih dahulu.
- `recent`: Hasil yang terbaru terlebih dahulu.
- `credit`: Kredit penjual terlebih dahulu.
- `price_asc`: Harga terendah terlebih dahulu.
- `price_desc`: Harga tertinggi terlebih dahulu.
- `price_drop`: Daftar dengan harga lebih murah terlebih dahulu.
- `newest`: Barang yang baru terdaftar terlebih dahulu.

Format Kembalian: tangani dengan aman JSON atau teks sesuai dengan Content-Type yang sebenarnya.

Penanganan respons dan kode kesalahan:
1. Tentukan hasil pemrosesan dari kolom "code" dalam isi respons (code 0 berarti berhasil).
2. Batas waktu yang disarankan: Atur batas waktu permintaan menjadi 120 detik. Jika 120 detik terlalu lama untuk kebutuhan Anda, gunakan setidaknya 60 detik. Sebagian kecil permintaan mungkin mencapai batas waktu sebelum hasil diterima.
3. Kode hasil:
   - 0: Berhasil
   - 100: Token tidak valid atau tidak aktif
   - 301: Gagal mengambil data. Silakan coba lagi.
   - 302: Batas frekuensi permintaan terlampaui
   - 303: Kuota harian terlampaui
   - 400: Parameter tidak valid
   - 500: Kesalahan internal server
   - 600: Akses ditolak
   - 601: Saldo tidak mencukupi
   - 602: Batas anggaran token tercapai
4. Kode 601 berarti saldo bersama akun tidak mencukupi. Kode 602 berarti token API yang digunakan telah mencapai batas anggaran kumulatifnya sendiri. Menetapkan batas anggaran token tidak memindahkan dana dari saldo bersama akun.

Tolong bantu saya menulis skrip dalam bahasa pemrograman favorit saya untuk memanggil API ini dan menangani responsnya.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # Diberikan oleh server 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"; // Diberikan oleh server 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"; // Diberikan oleh server 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" // Diberikan oleh server 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'; // Diberikan oleh server 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-id.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[Definisi OpenAPI (JSON)]</a>
</div>

## Field Respons

Field Kunci dalam respons yang sukses (`code = 0`).

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

| Jalur Field | Jenis | Deskripsi |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | Satu halaman hasil pencarian Xianyu beserta informasi paginasi. |
| <code>data.resultList</code> | <code>array</code> | Kartu hasil yang dikembalikan untuk halaman ini. Daftar ini bisa kosong. |
| <code>data.resultList[]</code> | <code>object</code> | Satu kartu dalam hasil pencarian. |
| <code>data.resultList[].type</code> | <code>string</code> | Kode jenis kartu yang dilaporkan dengan hasil pencarian ini, sebagai teks. |
| <code>data.resultList[].data</code> | <code>object</code> | Data yang dibawa oleh kartu hasil. |
| <code>data.resultList[].data.item</code> | <code>object</code> | Informasi listing yang dibawa oleh kartu hasil. |
| <code>data.resultList[].data.item.main</code> | <code>object</code> | Data kartu listing utama. |
| <code>data.resultList[].data.item.main.exContent</code> | <code>object</code> | Detail listing dan penjual yang ditampilkan pada kartu pencarian. |
| <code>data.resultList[].data.item.main.exContent.itemId</code> | <code>string</code> | ID listing Xianyu sebagai teks. Gunakan nilai ini bersama dengan Detail Produk untuk memeriksa listing. |
| <code>data.resultList[].data.item.main.exContent.title</code> | <code>string</code> | Judul tampilan listing. |
| <code>data.resultList[].data.item.main.exContent.area</code> | <code>string</code> | Label area yang ditampilkan untuk listing. |
| <code>data.resultList[].data.item.main.exContent.isAuction</code> | <code>string</code> | Indikator lelang yang dilaporkan sebagai teks. |
| <code>data.resultList[].data.item.main.exContent.picUrl</code> | <code>string</code> | URL gambar utama yang ditampilkan pada kartu listing. |
| <code>data.resultList[].data.item.main.exContent.picWidth</code> | <code>string</code> | Lebar gambar utama yang dilaporkan dalam piksel, sebagai teks. |
| <code>data.resultList[].data.item.main.exContent.picHeight</code> | <code>string</code> | Tinggi gambar utama yang dilaporkan dalam piksel, sebagai teks. |
| <code>data.resultList[].data.item.main.exContent.showVideoIcon</code> | <code>string</code> | Flag teks untuk menampilkan ikon video pada kartu. |
| <code>data.resultList[].data.item.main.exContent.price</code> | <code>array</code> | Fragmen harga listing yang ditampilkan dalam urutan tampilan. Teks ini bisa termasuk simbol dan jumlah yang disingkat. |
| <code>data.resultList[].data.item.main.exContent.price[]</code> | <code>object</code> | Satu fragmen dari harga yang ditampilkan. |
| <code>data.resultList[].data.item.main.exContent.price[].text</code> | <code>string</code> | Teks yang ditampilkan untuk fragmen ini. |
| <code>data.resultList[].data.item.main.exContent.price[].type</code> | <code>string</code> | Kode jenis yang dilaporkan untuk fragmen harga ini sebagai teks. |
| <code>data.resultList[].data.item.main.exContent.oriPrice</code> | <code>string</code> | Teks tampilan harga asli, jika diberikan. |
| <code>data.resultList[].data.item.main.exContent.userNickName</code> | <code>string</code> | Nama panggilan penjual yang ditampilkan untuk listing, jika diberikan. |
| <code>data.resultList[].data.item.main.exContent.userAvatarUrl</code> | <code>string</code> | URL avatar penjual yang ditampilkan pada kartu. |
| <code>data.resultList[].data.item.main.exContent.userIdentityShow</code> | <code>string</code> | Label identitas penjual yang ditampilkan pada kartu, yang mungkin kosong. |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel</code> | <code>object</code> | Label penjual yang ditampilkan pada kartu listing. |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel.tagList</code> | <code>array</code> | Daftar label penjual yang disertakan dengan kartu. |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel.tagList[]</code> | <code>object</code> | Satu label penjual. |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel.tagList[].data</code> | <code>object</code> | Menampilkan konten untuk label penjual ini. |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel.tagList[].data.content</code> | <code>string</code> | Teks yang ditampilkan untuk label penjual. |
| <code>data.resultList[].data.item.main.exContent.userFishShopLabel.tagList[].data.type</code> | <code>string</code> | Kode jenis yang dilaporkan untuk label penjual sebagai teks. |
| <code>data.resultList[].data.item.main.clickParam</code> | <code>object</code> | Parameter yang terkait dengan kartu penjualan ini. |
| <code>data.resultList[].data.item.main.clickParam.args</code> | <code>object</code> | Parameter yang berisi harga dan waktu publikasi yang ditampilkan untuk penjualan. |
| <code>data.resultList[].data.item.main.clickParam.args.displayPrice</code> | <code>string</code> | Harga yang ditampilkan untuk penjualan sebagai teks. |
| <code>data.resultList[].data.item.main.clickParam.args.publishTime</code> | <code>string</code> | Waktu publikasi yang dilaporkan sebagai teks. Nilai Unix timestamp yang valid di bidang ini adalah dalam milidetik. |
| <code>data.resultInfo</code> | <code>object</code> | Informasi paginasi untuk hasil pencarian. |
| <code>data.resultInfo.hasNextPage</code> | <code>string</code> | Flag paginasi sebagai teks. Lanjutkan dengan meningkatkan halaman ketika nilainya true. Nilai false menandakan akhir. |

</div>

## Contoh Respons

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

