articleUrlstringจำเป็น
WeChat Official Account article URL used to fetch article detail content and metadata.
https://api.sandbase.ai/v1/api/wechat-mp/article-detailGet a WeChat Official Account article by URL with selectable plain-text or rich-text content mode. Use it to collect a known article in the preferred representation for reading, extraction, or storage.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns the content and metadata of one WeChat Official Account article. It needs the article URL as articleUrl, and an optional mode of TEXT or RICH_TEXT to choose the body format.
nick_name, alias and biz values.curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/article-detail" \
-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 article detail content and metadata. |
mode | string | No | Article body format. TEXT returns plain text, and RICH_TEXT returns rich text when supported. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"alias": "people_rmw",
"app_id": "wx020d85a0aef80286",
"appmsg_link": "",
"author": "人民网",
"biz": "MjM5NzI3NDg4MA==",
"cdn_url": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/XvpojIRrhdsyicO44PY4KBDO38CdYO8ibR6G1vDpBibT3…",
"cdn_url_16_9": "",
"cdn_url_1_1": "https://mmbiz.qpic.cn/mmbiz_jpg/XvpojIRrhdtYoKJAt9gpOfEewclvkplGicoF0BKYP99k961i…",
"cdn_url_235_1": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/XvpojIRrhdsyicO44PY4KBDO38CdYO8ibR6G1vDpBibT3…",
"claim_source_info": {
"aigc_type": "",
"aigc_wording": "",
"claim_source": "1",
"claim_source_type": "",
"media_source_type_info": {
"biz_headimgurl": "",
"biz_link_url": "",
"biz_nickname": "",
"media_source_from": "",
"news_position_info": {
"city": "",
"country": "",
"province": ""
},
"news_time": "",
"other_from_account": ""
}
},
"collect_count": -1,
"comment_count": -1
}
| Field | Meaning |
|---|---|
content | Article body. In the sample response it holds HTML-style markup with <p> and <img> tags. |
content_multi_text | Another form of the article body, with inline styles and links in HTML-style markup. |
author | Author name shown on the article. |
nick_name / alias / biz / app_id | Identifiers of the Official Account that published the article: display name, account alias, biz ID and app ID. |
create_time / create_time_str / pubtime | Publish time of the article. create_time and pubtime use the format YYYY-MM-DD HH:MM:SS. create_time_str stops at minutes. |
mid / idx / hashid | Article identifiers. mid is the message ID, idx is the article position in that message, and hashid matches the sn value in the URL. |
picture_page_info_list[].cdn_url | Image URL for each picture found in the article. |
picture_page_info_list[].width / picture_page_info_list[].height | Dimensions of each picture. |
cdn_url / cdn_url_1_1 / cdn_url_235_1 | Cover image URLs in different aspect ratios. Some ratios can be empty strings. |
ip_wording / provinceName / countryName | Location text shown for the article, such as province and country. |
read / comment_count / share_count / collect_count / looking | Engagement counters. The sample returns -1 for all of them, so use the metrics API for these numbers. |
articleUrl from a WeChat article link. The sample URL contains the __biz, mid, idx and sn parameters, which match biz, mid, idx and hashid in the response.mode to RICH_TEXT to ask for rich text. The default is TEXT.$0.021429 per successful call. Failed calls are not charged.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/article-detail" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "TEXT",
"articleUrl": "http://mp.weixin.qq.com/s?__biz=MjM5NzI3NDg4MA==&mid=2659064933&idx=1&sn=c536f78d7358bc2dfe90cde700e21d55&chksm=bc881cb3f28a27f35e0711803b28d8110305cfc1b8beb651674e1aa7870ddf963c658f4dc19a&scene=7#rd"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
articleUrlstringจำเป็นWeChat Official Account article URL used to fetch article detail content and metadata.
modestringArticle body format. TEXT returns plain text, and RICH_TEXT returns rich text when supported.
ค่าเริ่มต้น: "TEXT"
ค่าที่เป็นไปได้: TEXT, RICH_TEXT
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
WeChat MP Article DetailsAPI นี้ WeChat MP | $0.021429 ต่อการเรียก | JSON |
WeChat MP | $0.142857 ต่อการเรียก | JSON |
WeChat MP | $0.042857 ต่อการเรียก | JSON |
WeChat MP | $0.028571 ต่อการเรียก | JSON |
WeChat MP | $0.021429 ต่อการเรียก | JSON |
WeChat MP | $0.014286 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/wechat-mp/article-detail โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.021429 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: articleUrl (string). ตัวเลือก: mode (หนึ่งใน TEXT, RICH_TEXT). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น WeChat MP Article Details ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง WeChat MP API แยกต่างหาก