WeChat Get Article Ads
Retrieve embedded ads and ad-slot information from a WeChat Official Account article. Inputs: - request_body (required): an object containing the article URL and optional response mode. - request_body.url (required): an article URL on mp.weixin.qq.com, such as https://mp.weixin.qq.com/s/… or a /s link with query parameters including __biz. Maximum length: 2048 characters; it must match the URL format defined in the input schema. - request_body.raw (optional, default true): true returns full raw responses; false returns a flattened ad list. Results: - raw=false: data.count gives the number of ads merged from advertisement_info and ad_slot_data; data.ads contains the ad items. For an article without ads, data.ads is []. - raw=true: data.pages gives the number of captured response pages; data.results contains the full raw response for each page, including the advertisement_info / ad_slot_data fields that supply the flattened ad list. This retrieves ad information, not the article body. Responses may be slow; set the client request timeout to 30 seconds. The timeout is a client setting, not a tool parameter.
Pricing
| Condition | Charge |
|---|---|
| Each call | 20.65 credits/call |
20.65 credits/call Charges are per query. A successful query is billed even if it returns no results.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | 用于查询微信公众号文章内嵌广告及广告位信息的请求体对象:url 指定文章链接;raw 为可选返回模式,默认 true 返回完整原始响应,false 返回拍平后的广告列表。 | — |
request_body.raw | boolean | No | True=原始响应;False=精简解析结构/True=raw response; False=simplified parsed structure | true |
request_body.url | string | Yes | 公众号文章链接(https://mp.weixin.qq.com/s/… 或带 __biz 的长链)/WeChat MP article URL (https://mp.weixin.qq.com/s/… or long URL with __biz) | — |
Invocation example
Parameter templateGenerated from the parameter configuration. Replace the sample values before use.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_wechat_get_article_ads' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"url": "https://mp.weixin.qq.com/s/TSNQKkRpN1qbKsT7BvzqIw"
}
}
}'No response example available yet.


