keywordstringobligatoire
Keyword used to fetch WeChat search suggestions.
https://api.sandbase.ai/v1/api/wechat-mp/search-suggestionsGet WeChat search suggestions for a keyword, optionally scoped by a supported business type. Use it to expand or refine a query before a targeted WeChat search.
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
Returns a list of WeChat search suggestion words for a keyword. It needs a keyword and accepts an optional businessType to scope the suggestions to one WeChat search area, such as ARTICLE or MINI_PROGRAM.
人工智能 into longer related search phrases for content research.businessType values such as ARTICLE, ACCOUNT and MINI_PROGRAM to see how the same keyword is searched in each area.curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/search-suggestions" \
-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 | Keyword used to fetch WeChat search suggestions. |
businessType | string | No | WeChat search business type used to scope suggestion results. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"sug_words": [
"人工智能"
]
}
}
| Field | Meaning |
|---|---|
data | Object that wraps the suggestion result. |
data.sug_words | List of suggested search phrases for the keyword, in the order the API returns them. |
data.sug_words[] | One suggested phrase as a plain string. In the sample, the first item repeats the keyword and the next items are longer related phrases such as 人工智能训练师. |
businessType to one of ALL, ACCOUNT, ARTICLE, CHANNEL, MOMENTS, LIVE, EMOJI, AUDIO, BOOK, WECHAT_INDEX, NEWS, MINI_PROGRAM or ENCYCLOPEDIA. The default is ALL.$0.114286 per successful call. Failed calls are not charged.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/search-suggestions" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "人工智能",
"businessType": "ALL"
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
keywordstringobligatoireKeyword used to fetch WeChat search suggestions.
businessTypestringWeChat search business type used to scope suggestion results.
Par défaut : "ALL"
Valeurs possibles : ALL, ACCOUNT, ARTICLE, CHANNEL, MOMENTS, LIVE, EMOJI, AUDIO, BOOK, WECHAT_INDEX, NEWS, MINI_PROGRAM, ENCYCLOPEDIA
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
| API | Prix | Réponse |
|---|---|---|
WeChat MP Search SuggestionsCette API WeChat MP | $0.114286 par appel | JSON |
WeChat MP | $0.142857 par appel | JSON |
WeChat MP | $0.042857 par appel | JSON |
WeChat MP | $0.028571 par appel | JSON |
WeChat MP | $0.021429 par appel | JSON |
WeChat MP | $0.021429 par appel | JSON |
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/wechat-mp/search-suggestions avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
$0.114286 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Obligatoire : keyword (string). Facultatif : businessType (l’un de ALL, ACCOUNT, ARTICLE, CHANNEL, MOMENTS, LIVE, EMOJI, AUDIO, BOOK, WECHAT_INDEX, NEWS, MINI_PROGRAM, ENCYCLOPEDIA). Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.
Non. WeChat MP Search Suggestions fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API WeChat MP séparément.