# How do I convert a Weibo mid to the short code in its link (bid)? (2026)

A Weibo post has a numeric mid, such as 3521821288490611, and a short code in its link, the bid, such as z99FCzCNl; the bid is the mid in base 62. Split the mid from the right into 7-digit groups, write each group in base 62 with the alphabet 0-9a-zA-Z, pad every group but the first to 4 characters, and join them. XTikAPI's `weibo.posts.detail` takes the numeric ID, $0.002. XTikAPI reads Weibo with 12 endpoints from $0.002 a call. A failed call is not charged, and a verified account gets $0.50 of trial balance.

Updated 2026-11-20

## The conversion

| Step | 3521821288490611 → z99FCzCNl |
| Split from the right in 7s | 35 / 2182128 / 8490611 |
| Each to base 62 (0-9a-zA-Z) | z / 99FC / zCNl |
| Pad all but the first to 4 | z + 99FC + zCNl |

The reverse: split the bid from the right in 4s, decode each, pad all but the first to 7 digits. We checked the example above with this method; the weibo_mid library does the same.

## What XTikAPI returns

`weibo.posts.detail` takes `status_id` (the numeric mid) and returns text, author, time and counts; `weibo.comments.list` takes the same ID and returns comments.

## Why XTikAPI

- See before you pay: 192 of 229 endpoints show a recorded real response on their page (12 of 12 for Weibo).
- One shape: posts, comments and accounts from 19 platforms come back as the same objects, author in author and counts in metrics, so another platform needs no new parser.
- Spending you control: a failed call or a timeout is not charged (charged: false), X-Max-Price caps one call, and the same Idempotency-Key within 24 hours is never billed twice.
- Prepaid balance, no subscription. Balance never expires, and unused top-up money can be refunded within 14 days.
- Made for AI: every page has a Markdown twin, plus llms.txt and OpenAPI, so ChatGPT, Claude and Cursor can read it directly.

## Endpoints

- [Weibo post details API](https://xtikapi.com/apis/weibo/posts/detail) ($0.002 a call): Get post detail
- [Weibo comments API](https://xtikapi.com/apis/weibo/comments/list) ($0.002 a call): Get post comments

## More about Weibo

- [Weibo API](https://xtikapi.com/apis/weibo)
- [How do I export the comments on a Weibo post?](https://xtikapi.com/answers/weibo-comments-export)
- [weiboSpider says "Failed to obtain weibo.cn cookie from Chrome browser": what now?](https://xtikapi.com/answers/weibospider-chrome-cookie-error)
- [Is there an API for the Weibo hot search list?](https://xtikapi.com/answers/weibo-hot-search-api)
- [Can I search Weibo posts with the Weibo open platform API?](https://xtikapi.com/answers/weibo-open-platform-search-api)
- [Why does Weibo return 432 to my scraper?](https://xtikapi.com/answers/weibo-432-error)
- [Is there a hosted alternative to MediaCrawler for Xiaohongshu, Douyin and other Chinese platforms?](https://xtikapi.com/answers/mediacrawler-alternative)

## Sources

What this page says about other products comes from their own pages and docs, read on 2026-11-20.

- rryqszq4/weibo_mid (mid to base62 converter)
- CodeIgniter China forum: Weibo mid and short-link example

---

XTikAPI: one API key for public social media data, prepaid per call. [HTML version](https://xtikapi.com/answers/weibo-mid-to-bid) · [llms.txt](https://xtikapi.com/llms.txt) · [OpenAPI](https://xtikapi.com/openapi.json)
