keywordstringzorunlu
Search keyword for WeChat mini program web search.
https://api.sandbase.ai/v1/api/wechat-search/search-miniprogramSearch WeChat Mini Programs by keyword with page, offset, and continuation-state pagination. Use it to discover mini programs related to a brand, service, topic, or product.
Çıktınız burada görünecek
Girdileri tamamlayın, ardından Çalıştır'a tıklayın.
This API returns WeChat Mini Programs that match a search keyword. Each result has a short description, an icon URL, and the app ID and original ID needed to open the mini program. Send a keyword, and optionally currentPage and offset for paging.
curl -X POST "https://api.sandbase.ai/v1/api/wechat-search/search-miniprogram" \
-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 for WeChat mini program web search. |
currentPage | integer | No | Current page number starting from 1 for WeChat web search pagination. |
offset | integer | No | Search result offset returned by the previous response. Use 0 for the first page. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"category": [
{
"type": 0,
"word": "全部"
}
],
"continueFlag": 1,
"cookies": "{\"box_of…",
"data": [
{
"boxExtraInfo": {
"real_type": 262208,
"resultType": 0,
"subType": 0,
"title": "小程序"
},
"subBoxes": [
{
"boxExtraInfo": null,
"boxID": "split-0x40-0-3978567686",
"boxMergeTag": 0,
"boxMergeType": 109,
"boxMergeValue": 3,
"boxPos": 1,
"boxPosMerge": 1,
"count": 1
}
],
"type": 109
}
],
"direction": 2,
"enableQuestionClosely": false,
"experiment": [
{
"key": "mmsearch_shopping_cart_entry",
"value": "1"
}
],
"isAutoPlayVideo": 1,
"isDivide": 0,
"isHomePage": 0,
"lang": "zh_CN",
"offset": 20
}
| Field | Meaning |
|---|---|
data[].subBoxes[].items[].jumpInfo.appID | The mini program app ID, for example wxdb0efd7c7855e881. |
data[].subBoxes[].items[].jumpInfo.userName | The mini program original ID, ending in @app. |
data[].subBoxes[].items[].desc | The mini program description. Matched keywords are wrapped in <em class="highlight"> tags. |
data[].subBoxes[].items[].iconUrl | URL of the mini program icon image. |
data[].subBoxes[].items[].docID | The result document ID. It matches the number at the end of the parent boxID. |
data[].subBoxes[].boxPos | The position of the result box in the list, starting at 1. |
offset | The offset to send in the next request to get the following page. |
continueFlag | A value of 1 appears in this response. Its key name suggests more results can be fetched. |
cookies | A JSON string with the continuation state for the search, including box_offset and cookies_buffer. |
query / pageNumber / searchID | The keyword that was searched, the page number of this response, and the ID of this search. |
keyword. The example uses 人工智能.currentPage as 1 and offset as 0. For the next page, raise currentPage and send the offset value from the previous response.data[].subBoxes[] can be a box with no items. Skip boxes that have no items when you read results.$0.114286 per successful call. Failed calls are not charged.
Geliştirmeye başlayın
Birleşik kimlik doğrulama ve kullanım takibi sunan Platform API uç noktası.
curl -X POST "https://api.sandbase.ai/v1/api/wechat-search/search-miniprogram" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"offset": 0,
"keyword": "人工智能",
"currentPage": 1
}'SandBase API anahtarınızı sunucu ortamınıza ayarlayın. İstekler Bearer kimlik doğrulaması kullanır.
export SANDBASE_API_KEY="YOUR_API_KEY"Anahtarınızı sunucuda tutun. Tarayıcı kodunda açığa çıkarmayın.
keywordstringzorunluSearch keyword for WeChat mini program web search.
currentPageintegerCurrent page number starting from 1 for WeChat web search pagination.
Varsayılan: 1
offsetintegerSearch result offset returned by the previous response. Use 0 for the first page.
Varsayılan: 0
Bu API için kaydedilmiş örnek yanıt; görüntülerken canlı istek yapılmaz.
Yayınlanmış bir kaydedilmiş yanıt yok. Yanıtını incelemek için API'yi Playground'da çalıştırın.
Daha fazlasını keşfedin
| API | Fiyat | Yanıt |
|---|---|---|
WeChat Search | $0.114286 çağrı başına | JSON |
WeChat Search | $0.057143 çağrı başına | JSON |
WeChat Search | $0.114286 çağrı başına | JSON |
WeChat Search | $0.01 çağrı başına | JSON |
WeChat Search | $0.01 çağrı başına | JSON |
Sorular
SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/wechat-search/search-miniprogram adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.
çağrı başına $0.114286, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.
Gerekli: keyword (string). İsteğe bağlı: currentPage (integer) ve offset (integer). Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.
Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron). Bu sayfadaki README'de örnek bir yanıt yer alır.
Hayır. WeChat Mini Program Search, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. WeChat Search API erişimi için ayrıca başvuru yapmanız gerekmez.