---
title: "WeChat公式アカウント ミニプログラム検索 API (V1)"
description: "キーワードでWeChatミニプログラムを検索し、ページ、オフセット、継続状態のペダージングを使用します。ブランド、サービス、トピック、または製品に関連するミニプログラムを発見するために使用します。"
lastUpdated: false
aiUsagePrompt: true
---

# WeChat公式アカウント ミニプログラム検索 API \(V1\)

<ApiTester
  method="POST"
  :path='JSON.parse("\"/api/weixin/search-miniprogram/v1\"")'
  :summary='JSON.parse("\"ミニプログラム検索 (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/wechat-official-accounts/mini-program-search-v1-ja.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[]")'
  :requestBody='JSON.parse("{\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"token\":{\"type\":\"string\",\"description\":\"このAPIサービスのアクセストークン。\"},\"keyword\":{\"type\":\"string\",\"description\":\"WeChatミニプログラムのウェブ検索の検索キーワード。\"},\"currentPage\":{\"type\":\"integer\",\"format\":\"int32\",\"default\":1,\"description\":\"WeChatウェブ検索のページ番号、1から始まる。\"},\"offset\":{\"type\":\"integer\",\"format\":\"int32\",\"default\":0,\"description\":\"前の応答で返された検索結果のオフセット。最初のページの場合は0を使用。\"},\"cookies_buffer\":{\"type\":\"string\",\"default\":\"\",\"description\":\"前のWeChatウェブ検索応答で返された不透明なページング状態。最初のページの場合は空欄にしておく。このPOSTエンドポイントでは、application/x-www-form-urlencoded形式のボディで送信する。\"}},\"required\":[\"keyword\",\"token\"]}}},\"required\":true}")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"WeChatミニプログラムの検索結果および報告されるページ情報。続行する場合は、cookies_bufferフォームフィールド内の不透明なdata.cookies値を変更せずに渡します。続行リクエストは空の結果オブジェクトを返すことがあります。\",\"properties\":{\"pageNumber\":{\"type\":\"integer\",\"description\":\"この検索応答で報告されるページ番号。\"},\"offset\":{\"type\":\"integer\",\"description\":\"次のリクエストのオフセットフォームフィールドに返される値。これは表示されるカードの数とは異なる場合があります。\"},\"continueFlag\":{\"type\":\"integer\",\"description\":\"この検索ページでプラットフォームから報告された続行フラグ。\"},\"query\":{\"type\":\"string\",\"description\":\"この結果ページで報告された検索キーワード。\"},\"lang\":{\"type\":\"string\",\"description\":\"プラットフォームから返される検索言語コード。\"},\"ret\":{\"type\":\"integer\",\"description\":\"WeChatのネイティブ検索ステータスコード。\"},\"resultType\":{\"type\":\"integer\",\"description\":\"この検索応答のプラットフォームタイプコード。\"},\"data\":{\"type\":\"array\",\"description\":\"検索ページで返される結果グループ。\",\"items\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"integer\",\"description\":\"プラットフォームから報告されるグループタイプコード。\"},\"boxExtraInfo\":{\"type\":\"object\",\"description\":\"結果グループの表示情報。\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"この結果グループの表示タイトル。空でも可。\"},\"resultType\":{\"type\":\"integer\",\"description\":\"グループのプラットフォーム結果タイプコード。\"},\"subType\":{\"type\":\"integer\",\"description\":\"グループのプラットフォーム結果サブタイプコード。\"}}},\"subBoxes\":{\"type\":\"array\",\"description\":\"このグループ内の結果サブグループ。\",\"items\":{\"type\":\"object\",\"properties\":{\"boxPos\":{\"type\":\"integer\",\"description\":\"この結果サブグループの報告された表示位置。\"},\"count\":{\"type\":\"integer\",\"description\":\"このサブグループで報告される結果カードの数。\"},\"totalCount\":{\"type\":\"integer\",\"description\":\"サブグループで報告される合計数。項目のレコード数を超える可能性あり。\"},\"title\":{\"type\":\"string\",\"description\":\"この結果グループの表示タイトル。空でも可。\"},\"resultType\":{\"type\":\"integer\",\"description\":\"グループのプラットフォーム結果タイプコード。\"},\"subType\":{\"type\":\"integer\",\"description\":\"グループのプラットフォーム結果サブタイプコード。\"},\"boxExtraInfo\":{\"type\":[\"object\",\"null\"],\"description\":\"この結果サブグループの補足表示メタデータ。nullの場合あり。\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"この結果グループの表示タイトル。空でも可。\"},\"resultType\":{\"type\":\"integer\",\"description\":\"グループのプラットフォーム結果タイプコード。\"},\"subType\":{\"type\":\"integer\",\"description\":\"グループのプラットフォーム結果サブタイプコード。\"}}},\"items\":{\"type\":\"array\",\"description\":\"このサブグループ内のミニプログラム結果カード。\",\"items\":{\"type\":\"object\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"ミニプログラムの表示タイトル。検索ハイライトマークを含む可能性あり。\"},\"desc\":{\"type\":\"string\",\"description\":\"ミニプログラムに表示される説明テキスト。検索ハイライトマークを含む可能性あり。\"},\"iconUrl\":{\"type\":\"string\",\"description\":\"ミニプログラムに返されるアイコン画像URL。\"},\"docID\":{\"type\":\"string\",\"description\":\"この検索結果カードに割り当てられた識別子。\"},\"isMinigame\":{\"type\":\"integer\",\"description\":\"この結果で報告されるミニゲームの指標。\"},\"jumpInfo\":{\"type\":\"object\",\"description\":\"ミニプログラムの識別子と起動メタデータ。\",\"properties\":{\"appID\":{\"type\":\"string\",\"description\":\"公開WeChatミニプログラムのAppID。\"},\"userName\":{\"type\":\"string\",\"description\":\"ミニプログラムのプラットフォームアカウント識別子。チェックされた値は@appで終わる。\"},\"appVersion\":{\"type\":\"integer\",\"description\":\"リリースメタデータで報告されたアプリバージョン番号。\"},\"jumpType\":{\"type\":\"integer\",\"description\":\"ミニプログラム結果のプラットフォームリリースタイプコード。\"}}},\"source\":{\"type\":\"object\",\"description\":\"結果カードに表示される帰属情報と公開ラベル。\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"ミニプログラムで表示される帰属テキスト。\"},\"assuredBuy\":{\"type\":\"integer\",\"description\":\"利用可能な場合の結果に返される購入保証指標。\"},\"tag\":{\"type\":\"array\",\"description\":\"結果に返される公開帰属ラベル。\",\"items\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"integer\",\"description\":\"この表示ラベルに報告されたタイプコード。\"},\"title\":{\"type\":\"string\",\"description\":\"利用可能な場合のこのラベルの表示テキスト。\"},\"iconUrl\":{\"type\":\"string\",\"description\":\"利用可能な場合のこのラベルの表示アイコンURL。\"}}}}}},\"titleTag\":{\"type\":\"object\",\"description\":\"結果タイトルに表示されるラベル。\",\"properties\":{\"append\":{\"type\":\"array\",\"description\":\"ミニプログラムタイトルに追加されるラベル。\",\"items\":{\"type\":\"object\",\"properties\":{\"type\":{\"type\":\"integer\",\"description\":\"この表示ラベルに報告されたタイプコード。\"},\"title\":{\"type\":\"string\",\"description\":\"利用可能な場合のこのラベルの表示テキスト。\"},\"iconUrl\":{\"type\":\"string\",\"description\":\"利用可能な場合のこのラベルの表示アイコンURL。\"}}}}}}}}}}}}}}},\"category\":{\"type\":\"array\",\"description\":\"表示可能な検索カテゴリオプション。\",\"items\":{\"type\":\"object\",\"properties\":{\"word\":{\"type\":\"string\",\"description\":\"検索カテゴリの表示名。\"},\"type\":{\"type\":\"integer\",\"description\":\"このオプションのプラットフォームカテゴリタイプコード。\"},\"selected\":{\"type\":\"integer\",\"description\":\"提供された場合の検索カテゴリの選択マーカー。\"}}}}}}}},\"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\":\"有効でないまたは無効なアクセストークン。\",\"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/weixin/search-miniprogram/v1\"")' />

<p>キーワードでWeChatミニプログラムを検索し、ページ、オフセット、継続状態のペダージングを使用します。ブランド、サービス、トピック、または製品に関連するミニプログラムを発見するために使用します。</p>

## リクエストボディ

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

| 名前 | パラメーターの場所 | タイプ | 必須 | デフォルト | 説明 |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | form | <code>string</code> | はい | - | このAPIサービスのアクセストークン。 |
| <code>keyword</code> | form | <code>string</code> | はい | - | WeChatミニプログラムのウェブ検索の検索キーワード。 |
| <code>currentPage</code> | form | <code>integer</code> | いいえ | <code>1</code> | WeChatウェブ検索のページ番号、1から始まる。 |
| <code>offset</code> | form | <code>integer</code> | いいえ | <code>0</code> | 前の応答で返された検索結果のオフセット。最初のページの場合は0を使用。 |
| <code>cookies_buffer</code> | form | <code>string</code> | いいえ | <code></code> | 前のWeChatウェブ検索応答で返された不透明なページング状態。最初のページの場合は空欄にしておく。このPOSTエンドポイントでは、application/x-www-form-urlencoded形式のボディで送信する。 |

</div>

## コードサンプル

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X POST 'https://api.justoneapi.com/api/weixin/search-miniprogram/v1' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'token=YOUR_API_KEY&keyword=string&currentPage=1&offset=0&cookies_buffer='
```

```text [🤖 AIプロンプト]
私はJustOneAPIの"ミニプログラム検索 (V1)" APIを使用したいです。
基本URL: https://api.justoneapi.com.
APIパス: /api/weixin/search-miniprogram/v1
APIエンドポイント: BASE_URL + /api/weixin/search-miniprogram/v1
HTTPメソッド: POST
認証: "token"をapplication/x-www-form-urlencodedボディフィールドとして送信します。
OpenAPI定義: https://docs.justoneapi.com/openapi/wechat-official-accounts/mini-program-search-v1-ja.json
リクエストヘッダー:
- Content-Type: application/x-www-form-urlencoded

リクエストボディ（フォーム）：
- token (form): このAPIサービスのアクセストークン。 (必須)
- keyword (form): WeChatミニプログラムのウェブ検索の検索キーワード。 (必須)
- currentPage (form): WeChatウェブ検索のページ番号、1から始まる。
- offset (form): 前の応答で返された検索結果のオフセット。最初のページの場合は0を使用。
- cookies_buffer (form): 前のWeChatウェブ検索応答で返された不透明なページング状態。最初のページの場合は空欄にしておく。このPOSTエンドポイントでは、application/x-www-form-urlencoded形式のボディで送信する。

返信形式：実際のContent-Typeに応じて、JSONまたはテキストを安全に処理する。

レスポンスの処理とエラーコード：
1. API の処理結果はレスポンス本文の「code」フィールドで判定します。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"  # オープンAPIサーバーによって提供される

url = BASE_URL + "/api/weixin/search-miniprogram/v1"
headers = {
    "Content-Type": "application/x-www-form-urlencoded"
}
data = "token=YOUR_API_KEY&keyword=string&currentPage=1&offset=0&cookies_buffer="
response = requests.post(url, headers=headers, data=data, 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"; // オープンAPIサーバーによって提供される
const url = BASE_URL + "/api/weixin/search-miniprogram/v1";

const response = await fetch(url, {
  method: "POST",
  headers: Object.fromEntries([
    ["Content-Type", "application/x-www-form-urlencoded"],
  ]),
  body: "token=YOUR_API_KEY&keyword=string&currentPage=1&offset=0&cookies_buffer=",
  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"; // オープンAPIサーバーによって提供される
        final String url = BASE_URL + "/api/weixin/search-miniprogram/v1";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .header("Content-Type", "application/x-www-form-urlencoded")
            .method("POST", HttpRequest.BodyPublishers.ofString("token=YOUR_API_KEY&keyword=string&currentPage=1&offset=0&cookies_buffer="));

        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" // オープンAPIサーバーによって提供される

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/weixin/search-miniprogram/v1"
	var data = strings.NewReader("token=YOUR_API_KEY&keyword=string&currentPage=1&offset=0&cookies_buffer=")
	req, _ := http.NewRequest("POST", url, data)
	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	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'; // オープンAPIサーバーによって提供される
$url = $BASE_URL . '/api/weixin/search-miniprogram/v1';

$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, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, 'token=YOUR_API_KEY&keyword=string&currentPage=1&offset=0&cookies_buffer=');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/x-www-form-urlencoded',
]);
$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/wechat-official-accounts/mini-program-search-v1-ja.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> | WeChatミニプログラムの検索結果および報告されるページ情報。続行する場合は、cookies_bufferフォームフィールド内の不透明なdata.cookies値を変更せずに渡します。続行リクエストは空の結果オブジェクトを返すことがあります。 |
| <code>data.pageNumber</code> | <code>integer</code> | この検索応答で報告されるページ番号。 |
| <code>data.offset</code> | <code>integer</code> | 次のリクエストのオフセットフォームフィールドに返される値。これは表示されるカードの数とは異なる場合があります。 |
| <code>data.continueFlag</code> | <code>integer</code> | この検索ページでプラットフォームから報告された続行フラグ。 |
| <code>data.query</code> | <code>string</code> | この結果ページで報告された検索キーワード。 |
| <code>data.lang</code> | <code>string</code> | プラットフォームから返される検索言語コード。 |
| <code>data.ret</code> | <code>integer</code> | WeChatのネイティブ検索ステータスコード。 |
| <code>data.resultType</code> | <code>integer</code> | この検索応答のプラットフォームタイプコード。 |
| <code>data.data</code> | <code>array</code> | 検索ページで返される結果グループ。 |
| <code>data.data[]</code> | <code>object</code> | - |
| <code>data.data[].type</code> | <code>integer</code> | プラットフォームから報告されるグループタイプコード。 |
| <code>data.data[].boxExtraInfo</code> | <code>object</code> | 結果グループの表示情報。 |
| <code>data.data[].boxExtraInfo.title</code> | <code>string</code> | この結果グループの表示タイトル。空でも可。 |
| <code>data.data[].boxExtraInfo.resultType</code> | <code>integer</code> | グループのプラットフォーム結果タイプコード。 |
| <code>data.data[].boxExtraInfo.subType</code> | <code>integer</code> | グループのプラットフォーム結果サブタイプコード。 |
| <code>data.data[].subBoxes</code> | <code>array</code> | このグループ内の結果サブグループ。 |
| <code>data.data[].subBoxes[]</code> | <code>object</code> | - |
| <code>data.data[].subBoxes[].boxPos</code> | <code>integer</code> | この結果サブグループの報告された表示位置。 |
| <code>data.data[].subBoxes[].count</code> | <code>integer</code> | このサブグループで報告される結果カードの数。 |
| <code>data.data[].subBoxes[].totalCount</code> | <code>integer</code> | サブグループで報告される合計数。項目のレコード数を超える可能性あり。 |
| <code>data.data[].subBoxes[].title</code> | <code>string</code> | この結果グループの表示タイトル。空でも可。 |
| <code>data.data[].subBoxes[].resultType</code> | <code>integer</code> | グループのプラットフォーム結果タイプコード。 |
| <code>data.data[].subBoxes[].subType</code> | <code>integer</code> | グループのプラットフォーム結果サブタイプコード。 |
| <code>data.data[].subBoxes[].boxExtraInfo</code> | <code>object &#124; null</code> | この結果サブグループの補足表示メタデータ。nullの場合あり。 |
| <code>data.data[].subBoxes[].boxExtraInfo.title</code> | <code>string</code> | この結果グループの表示タイトル。空でも可。 |
| <code>data.data[].subBoxes[].boxExtraInfo.resultType</code> | <code>integer</code> | グループのプラットフォーム結果タイプコード。 |
| <code>data.data[].subBoxes[].boxExtraInfo.subType</code> | <code>integer</code> | グループのプラットフォーム結果サブタイプコード。 |
| <code>data.data[].subBoxes[].items</code> | <code>array</code> | このサブグループ内のミニプログラム結果カード。 |
| <code>data.data[].subBoxes[].items[]</code> | <code>object</code> | - |
| <code>data.data[].subBoxes[].items[].title</code> | <code>string</code> | ミニプログラムの表示タイトル。検索ハイライトマークを含む可能性あり。 |
| <code>data.data[].subBoxes[].items[].desc</code> | <code>string</code> | ミニプログラムに表示される説明テキスト。検索ハイライトマークを含む可能性あり。 |
| <code>data.data[].subBoxes[].items[].iconUrl</code> | <code>string</code> | ミニプログラムに返されるアイコン画像URL。 |
| <code>data.data[].subBoxes[].items[].docID</code> | <code>string</code> | この検索結果カードに割り当てられた識別子。 |
| <code>data.data[].subBoxes[].items[].isMinigame</code> | <code>integer</code> | この結果で報告されるミニゲームの指標。 |
| <code>data.data[].subBoxes[].items[].jumpInfo</code> | <code>object</code> | ミニプログラムの識別子と起動メタデータ。 |
| <code>data.data[].subBoxes[].items[].jumpInfo.appID</code> | <code>string</code> | 公開WeChatミニプログラムのAppID。 |
| <code>data.data[].subBoxes[].items[].jumpInfo.userName</code> | <code>string</code> | ミニプログラムのプラットフォームアカウント識別子。チェックされた値は@appで終わる。 |
| <code>data.data[].subBoxes[].items[].jumpInfo.appVersion</code> | <code>integer</code> | リリースメタデータで報告されたアプリバージョン番号。 |
| <code>data.data[].subBoxes[].items[].jumpInfo.jumpType</code> | <code>integer</code> | ミニプログラム結果のプラットフォームリリースタイプコード。 |
| <code>data.data[].subBoxes[].items[].source</code> | <code>object</code> | 結果カードに表示される帰属情報と公開ラベル。 |
| <code>data.data[].subBoxes[].items[].source.title</code> | <code>string</code> | ミニプログラムで表示される帰属テキスト。 |
| <code>data.data[].subBoxes[].items[].source.assuredBuy</code> | <code>integer</code> | 利用可能な場合の結果に返される購入保証指標。 |
| <code>data.data[].subBoxes[].items[].source.tag</code> | <code>array</code> | 結果に返される公開帰属ラベル。 |
| <code>data.data[].subBoxes[].items[].source.tag[]</code> | <code>object</code> | - |
| <code>data.data[].subBoxes[].items[].source.tag[].type</code> | <code>integer</code> | この表示ラベルに報告されたタイプコード。 |
| <code>data.data[].subBoxes[].items[].source.tag[].title</code> | <code>string</code> | 利用可能な場合のこのラベルの表示テキスト。 |
| <code>data.data[].subBoxes[].items[].source.tag[].iconUrl</code> | <code>string</code> | 利用可能な場合のこのラベルの表示アイコンURL。 |
| <code>data.data[].subBoxes[].items[].titleTag</code> | <code>object</code> | 結果タイトルに表示されるラベル。 |
| <code>data.data[].subBoxes[].items[].titleTag.append</code> | <code>array</code> | ミニプログラムタイトルに追加されるラベル。 |
| <code>data.data[].subBoxes[].items[].titleTag.append[]</code> | <code>object</code> | - |
| <code>data.data[].subBoxes[].items[].titleTag.append[].type</code> | <code>integer</code> | この表示ラベルに報告されたタイプコード。 |
| <code>data.data[].subBoxes[].items[].titleTag.append[].title</code> | <code>string</code> | 利用可能な場合のこのラベルの表示テキスト。 |
| <code>data.data[].subBoxes[].items[].titleTag.append[].iconUrl</code> | <code>string</code> | 利用可能な場合のこのラベルの表示アイコンURL。 |
| <code>data.category</code> | <code>array</code> | 表示可能な検索カテゴリオプション。 |
| <code>data.category[]</code> | <code>object</code> | - |
| <code>data.category[].word</code> | <code>string</code> | 検索カテゴリの表示名。 |
| <code>data.category[].type</code> | <code>integer</code> | このオプションのプラットフォームカテゴリタイプコード。 |
| <code>data.category[].selected</code> | <code>integer</code> | 提供された場合の検索カテゴリの選択マーカー。 |

</div>

## レスポンス例

<ApiExampleSection :api='JSON.parse("\"/api/weixin/search-miniprogram/v1\"")' />

