Qidiruv API
Global qidiruv, autocomplete, trend so‘rovlar va kategoriyalar.
Qidiruv
Global qidiruv, autocomplete, trend so‘rovlar va kategoriyalar. suggestions va trending qidiruv maydonini boyitish uchun juda tez ishlaydi.
GET
https://kitobchi.com/api/v1/client/search
cache read
Global qidiruv
Nom, muallif, kategoriya va turga qarab natija qaytaradi.
| Parametr | Turi | Joy | Majburiy | Izoh |
|---|---|---|---|---|
| q | string | query | ha | Qidiruv matni. |
| page | integer | query | yo‘q | Sahifa raqami. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/search?q=python&page=1' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/search?q=python&page=1", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/search?q=python&page=1");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/search?q=python&page=1",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
Javob namunasi 200 OK
{
"status": "success",
"data": [
{
"id": 128,
"name": "Python bilan dasturlash",
"type": "book",
"price": 120000,
"image": "https://kitobchi.com/storage/books/128.jpg"
}
],
"meta": {
"page": 1,
"total": 37
}
}Sinab ko‘rish
GET
https://kitobchi.com/api/v1/client/search/suggestions
cache read
Autocomplete takliflari
Qidiruv maydoni uchun tezkor takliflar (nom, muallif, teg).
| Parametr | Turi | Joy | Majburiy | Izoh |
|---|---|---|---|---|
| q | string | query | ha | Qidiruv boshlanmasi. |
| seller_id | integer | query | yo‘q | Bitta do‘kon ichida cheklash. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/search/suggestions?q=pyth' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/search/suggestions?q=pyth", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/search/suggestions?q=pyth");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/search/suggestions?q=pyth",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
Javob namunasi 200 OK
{
"status": "success",
"data": [
"Python",
"Python bilan dasturlash",
"Pythonic"
]
}Sinab ko‘rish
GET
https://kitobchi.com/api/v1/client/search/trending
cache read
Trend so‘rovlar
Oxirgi 7 kunda eng ko‘p qidirilgan so‘rovlar.
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/search/trending' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/search/trending", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/search/trending");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/search/trending",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
Javob namunasi 200 OK
{
"status": "success",
"data": [
{
"text": "atomic habits",
"result_name": "Atomic Habits",
"total_count": 512
}
]
}Sinab ko‘rish
GET
https://kitobchi.com/api/v1/client/search/categories
cache read
Kategoriyalar
Katalog menyusi va filtr paneli uchun kategoriyalar ro‘yxati.
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/search/categories' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/search/categories", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/search/categories");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/search/categories",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
Javob namunasi 200 OK
{
"status": "success",
"data": [
{
"id": 3,
"name": "Biznes",
"type": "book",
"children": []
}
]
}Sinab ko‘rish
GET
https://kitobchi.com/api/v1/client/search/category/{cat_id}/{type}
cache read
Kategoriya mahsulotlari
Bitta kategoriya ichidagi mahsulotlarni turi bo‘yicha qaytaradi.
| Parametr | Turi | Joy | Majburiy | Izoh |
|---|---|---|---|---|
| cat_id | integer | path | ha | Kategoriya ID. |
| type | string | path | ha | Mahsulot turi: book yoki stationery. |
| page | integer | query | yo‘q | Sahifa raqami. |
curl --request GET \
--url 'https://kitobchi.com/api/v1/client/search/category/3/book?page=1' \
--header 'Accept: application/json' \
--header 'X-App-ID: app_xxxxxxxxxxxx' \
--header 'X-App-Secret: your-secret'
const res = await fetch("https://kitobchi.com/api/v1/client/search/category/3/book?page=1", {
headers: {
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": process.env.KITOBCHI_APP_SECRET,
},
});
const data = await res.json();
<?php
$ch = curl_init("https://kitobchi.com/api/v1/client/search/category/3/book?page=1");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'X-App-ID: app_xxxxxxxxxxxx',
'X-App-Secret: ' . getenv('KITOBCHI_APP_SECRET'),
],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
res = requests.get(
"https://kitobchi.com/api/v1/client/search/category/3/book?page=1",
headers={
"Accept": "application/json",
"X-App-ID": "app_xxxxxxxxxxxx",
"X-App-Secret": os.environ["KITOBCHI_APP_SECRET"],
},
)
data = res.json()
Javob namunasi 200 OK
{
"status": "success",
"data": [],
"meta": {
"page": 1,
"total": 96
}
}