Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

WeChat MP Article Link Conversion

Tài liệu API
https://api.sandbase.ai/v1/api/wechat-mp/convert-article-link

Expands a WeChat Official Account article link to its resolved long-form destination. Use it to normalize a short or intermediate link before article lookup or collection.

Giá
$0.014286USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 0 tùy chọn

Phòng thử nghiệm

Đầu vào
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

WeChat MP Article Link Conversion API

This API takes a WeChat Official Account article link and returns two normalized URLs for the same article. It needs one input, link, which can be a short link or an intermediate link.

Use cases

  • Normalize article links collected from chats or shares into one standard form before storing them.
  • Remove duplicate articles by comparing the returned long_url values.
  • Turn a long article link into a short mp.weixin.qq.com/s/... link for sharing or display.
  • Prepare a clean link before passing it to an article lookup API.

Request

curl -X POST "https://api.sandbase.ai/v1/api/wechat-mp/convert-article-link" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"link": "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.

Parameters

NameTypeRequiredDescription
linkstringYesWeChat Official Account article short link or intermediate link to convert.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "long_url": "https://mp.weixin.qq.com/s?__biz=MjM5NzI3NDg4MA==&mid=2659064933&idx=1&sn=c536f7…",
  "short_url": "https://mp.weixin.qq.com/s/THnBSh_vaxhLeYa2lp3d1g"
}

Response fields

FieldMeaning
long_urlThe article link in long form. It carries the __biz, mid, idx and sn query parameters that identify the account and the article.
short_urlThe short form of the article link, in the format https://mp.weixin.qq.com/s/<code>.

Notes

  • Send the link in the link field. The example input is an intermediate link that includes extra parameters such as chksm and scene.
  • In the sample response, long_url drops the chksm and scene parameters from the input link and keeps __biz, mid, idx and sn.
  • To read the article itself, pass the returned link to WeChat MP Article Detail or WeChat MP Article Detail (H5, Recommended).

Pricing

$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
WeChat MP$0.014286 mỗi lần gọiJSON
WeChat MP$0.142857 mỗi lần gọiJSON
WeChat MP$0.042857 mỗi lần gọiJSON
WeChat MP$0.028571 mỗi lần gọiJSON
WeChat MP$0.021429 mỗi lần gọiJSON
WeChat MP$0.021429 mỗi lần gọiJSON

Hướng dẫn:Best WeChat MP API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API WeChat MP Article Link Conversion?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/wechat-mp/convert-article-link với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API WeChat MP Article Link Conversion có giá bao nhiêu?

$0.014286 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.

API WeChat MP Article Link Conversion chấp nhận những tham số nào?

Bắt buộc: link (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API WeChat MP Article Link Conversion trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của WeChat MP không?

Không. WeChat MP Article Link Conversion chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của WeChat MP.