articleUrlstringobrigatório
WeChat Official Account article URL used to fetch basic interaction metrics such as reads and likes. It must end with #rd or #wechat_redirect.
https://api.sandbase.ai/v1/api/wechat-mp/article-metricsGet basic interaction metrics for a WeChat Official Account article URL that ends with #rd or #wechat_redirect. Use it to perform a lightweight popularity check for a known article.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
This API returns basic interaction counts for one WeChat Official Account article. It needs the article URL in articleUrl, and the URL must end with #rd or #wechat_redirect.
curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/article-metrics" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"articleUrl": "http://mp.weixin.qq.com/s?__biz=MjM5NzI3NDg4MA==&mid=2659064933&idx=1&sn=c536f78d7358bc2dfe90cde700e21d55&chksm=bc881cb3f28a27f35e0711803b28d8110305cfc1b8beb651674e1aa7870ddf963c658f4dc19a&scene=7#rd"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
articleUrl | string | Yes | WeChat Official Account article URL used to fetch basic interaction metrics such as reads and likes. It must end with #rd or #wechat_redirect. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"looking": 188,
"read": 73413,
"zan": 440
}
}
| Field | Meaning |
|---|---|
data.read | Number of reads for the article. The sample article shows 73413. |
data.zan | Number of likes (zan) for the article. The sample article shows 440. |
data.looking | Count of the article's looking (在看) reactions. The sample article shows 188. |
#rd or #wechat_redirect ending. The articleUrl value in the example ends with #rd.#rd or #wechat_redirect, try WeChat MP Article Link Conversion.$0.021429 per successful call. Failed calls are not charged.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/article-metrics" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"articleUrl": "http://mp.weixin.qq.com/s?__biz=MjM5NzI3NDg4MA==&mid=2659064933&idx=1&sn=c536f78d7358bc2dfe90cde700e21d55&chksm=bc881cb3f28a27f35e0711803b28d8110305cfc1b8beb651674e1aa7870ddf963c658f4dc19a&scene=7#rd"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
articleUrlstringobrigatórioWeChat Official Account article URL used to fetch basic interaction metrics such as reads and likes. It must end with #rd or #wechat_redirect.
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
WeChat MP Article MetricsEsta API WeChat MP | $0.021429 por chamada | JSON |
WeChat MP | $0.142857 por chamada | JSON |
WeChat MP | $0.042857 por chamada | JSON |
WeChat MP | $0.028571 por chamada | JSON |
WeChat MP | $0.021429 por chamada | JSON |
WeChat MP | $0.014286 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/wechat-mp/article-metrics com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
$0.021429 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: articleUrl (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. WeChat MP Article Metrics funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do WeChat MP separadamente.