# How to export WeChat Channels video comments and replies

> Search WeChat Channels by keyword, turn the search IDs into video IDs, then pull comments and the replies under them into one table: steps, parameters, Python and cost.

Canonical page: https://okdata.online/guides/wechat-channels-video-comments/

Four endpoints, in this order: WeChat Channels video search, video detail (it turns the search result's export/… ID into the numeric video ID), video comments, then comment replies. The worked example below is 14 calls and costs $0.24; a failed call is not charged.

Updated 2026-11-12

The job: a product or topic is being discussed on WeChat Channels (视频号), and you want what viewers wrote under those videos, not only what the creators said. WeChat gives Channels videos no web page and no public comment feed, so the usual way is scrolling the app with a phone in hand. Here you search, resolve each video you keep, read its comments a page at a time and open the reply threads that matter. You end with one table of comments and replies, each with its text, the commenter's name, likes, time and the IP location WeChat shows next to it.

There is one detail that trips people up: search results and the comment endpoints use different IDs. Search hands out an encrypted `export/…` ID; comments want the numeric video ID. Video detail converts one into the other, which is why it sits between search and comments below.

## Step by step

### Step 1: search for videos

Call [WeChat Channels video search](https://okdata.online/apis/wechat_channels/videos/search/) with `query` set to what you would type into WeChat Search (搜一搜). `sort` takes `relevance` (the default), `latest` or `popular`, and `published_within` takes `day`, `week` or `half_year` if you only want recent videos. One call returns up to about 10 videos for $0.02.

```bash
curl -G "https://api.okdata.online/v1/wechat_channels/videos/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=露营装备' \
  --data-urlencode 'sort=popular' \
  --data-urlencode 'published_within=half_year'
```

Each result has the description in `text`, `published_at`, the account's name and avatar under `author`, `metrics.likes` and a cover image in `url`. Comment counts are null at this stage, and `author.id` is empty: WeChat Search does not give them. The `id` looks like `export/UzFfBgAAigSMv7F8h8d7wY6qhwxyunx6wtIhB9zjKomRhS82ch`. It expires, so resolve it in the same run instead of saving it for next week.

### Step 2: resolve each video

Pass the `export/…` ID as `id` to [WeChat Channels video detail](https://okdata.online/apis/wechat_channels/videos/get/) ($0.02 per call). A share link from the app works too, as `url=https://weixin.qq.com/sph/AqR7tLm2Kd`. The answer carries the numeric video `id` (such as `14987320651142873906`), the account ID in `author.id`, and `metrics.likes`, `metrics.comments`, `metrics.shares` and `metrics.favorites`. Now you can see which videos have enough comments to be worth reading. Keep the numeric ID: it does not expire.

```bash
curl -G "https://api.okdata.online/v1/wechat_channels/videos/get" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'id=export/UzFfBgAAigSMv7F8h8d7wY6qhwxyunx6wtIhB9zjKomRhS82ch' \
  --data-urlencode 'fields=id,text,author.id,author.name,metrics'
```

### Step 3: read the comments

[WeChat Channels video comments](https://okdata.online/apis/wechat_channels/videos/comments/list/) takes the numeric video ID as `id`. It returns about 25 top-level comments a page, hottest first, for $0.015. Each has `id`, `text`, `author.name`, `likes`, `replies`, `published_at` and `ip_location`. For more, send `page.next_cursor` back as `cursor`, unchanged, and stop when `page.has_more` is `false`.

```bash
curl -G "https://api.okdata.online/v1/wechat_channels/videos/comments/list" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'id=14987320651142873906'
```

### Step 4: open the reply threads

[WeChat Channels comment replies](https://okdata.online/apis/wechat_channels/comments/replies/list/) needs two IDs: `id` is the top-level comment's ID and `post_id` is the numeric ID of its video. About 20 replies come back per page for $0.015, each with `parent_id` set to the comment it answers.

```bash
curl -G "https://api.okdata.online/v1/wechat_channels/comments/replies/list" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'id=14987411208833651275' \
  --data-urlencode 'post_id=14987320651142873906'
```

### Step 5: put it together in Python

The script runs the four steps and writes one CSV, with a `level` column that says whether a row is a comment or a reply. `MAX_PAGES` caps the comment pages per video, which also caps the bill.

```python
import csv
import os
import requests

API = "https://api.okdata.online"
HEADERS = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}
MAX_PAGES = 1   # comment pages per video; each page is one call
VIDEOS = 5      # videos to read
THREADS = 3     # reply threads to open in total


def get(path, **params):
    body = requests.get(API + path, headers=HEADERS, params=params, timeout=60).json()
    if body["code"] == "not_found":
        return None  # deleted or private: not charged
    if body["code"] != "ok":
        raise RuntimeError(f"{body['code']}: {body['message']} (charged: {body['charged']})")
    return body


hits = get("/v1/wechat_channels/videos/search", query="露营装备", sort="popular")["data"]["items"]
hits = sorted(hits, key=lambda h: h["metrics"]["likes"] or 0, reverse=True)[:VIDEOS]

videos = []
for h in hits:
    body = get("/v1/wechat_channels/videos/get", id=h["id"])  # export/... -> numeric ID
    if body:
        videos.append(body["data"]["item"])

rows, top = [], []
for v in videos:
    cursor = None
    for _ in range(MAX_PAGES):
        body = get("/v1/wechat_channels/videos/comments/list", id=v["id"], **({"cursor": cursor} if cursor else {}))
        if not body:
            break
        for c in body["data"]["items"]:
            rows.append([v["id"], "comment", c["id"], c["text"], c["author"]["name"], c["likes"], c["ip_location"], c["published_at"]])
            top.append((c["likes"] or 0, c["id"], v["id"]))
        if not body["page"]["has_more"]:
            break
        cursor = body["page"]["next_cursor"]

for _, comment_id, video_id in sorted(top, reverse=True)[:THREADS]:
    body = get("/v1/wechat_channels/comments/replies/list", id=comment_id, post_id=video_id)
    for r in (body["data"]["items"] if body else []):
        rows.append([video_id, "reply", r["id"], r["text"], r["author"]["name"], r["likes"], r["ip_location"], r["published_at"]])

with open("channels_comments.csv", "w", newline="", encoding="utf-8-sig") as f:
    out = csv.writer(f)
    out.writerow(["video_id", "level", "id", "text", "user", "likes", "ip_location", "published_at"])
    out.writerows(rows)
```

With the defaults that is 1 search, 5 details, 5 comment pages and 3 reply pages: the worked example above. Three comment pages under each video would add 10 more comment calls, $0.15.

## Good to know

- **Search IDs expire.** An `export/…` ID is only good for a short while. Resolve it with video detail right away and store the numeric `id` instead.
- **Reply counts can be missing.** WeChat does not always send a reply count, so `replies` can be null. That is why the script picks threads by likes; a comment without replies just comes back as an empty page.
- **No play counts.** WeChat does not show how many times a Channels video was played, so `metrics.views` is null and `meta.unavailable` says `platform`.
- **Commenter IDs.** A commenter's `author.id` ends in `@finder` when it is a Channels account. Some end in `@stranger` instead; the account endpoints do not take those.
- **Order.** Comments come hottest first. There is no newest-first option, so sort by `published_at` yourself if time matters.
- **Retries and missing videos.** Send an `Idempotency-Key` header with each call: a repeat of the same request within 24 hours returns the stored result with `meta.replayed: true` and no new charge. A video deleted since the search answers `not_found`, which is free.

To follow one account instead of a keyword, start from [WeChat Channels account videos](https://okdata.online/apis/wechat_channels/users/videos/list/). For turning comments into findings across platforms, see [word of mouth](https://okdata.online/solutions/word-of-mouth/).

## What the example costs

One page of search results for 露营装备 (camping gear), the detail of 5 videos, the first page of comments under each, then the replies under the 3 most-liked comments

| Endpoint | Calls | Price | Subtotal |
|---|---|---|---|
| [WeChat Channels video search](https://okdata.online/apis/wechat_channels/videos/search/) | 1 | $0.02 | $0.02 |
| [WeChat Channels video detail](https://okdata.online/apis/wechat_channels/videos/get/) | 5 | $0.02 | $0.10 |
| [WeChat Channels video comments](https://okdata.online/apis/wechat_channels/videos/comments/list/) | 5 | $0.015 | $0.075 |
| [WeChat Channels comment replies](https://okdata.online/apis/wechat_channels/comments/replies/list/) | 3 | $0.015 | $0.045 |
| Total | 14 |  | $0.24 |

Prices in force when this page was built. A failed call costs nothing.

## In your AI (MCP)

Connect the MCP server once, then say what you want. The agent finds these endpoints, reads their prices and calls them on your balance.

Say: Search WeChat Channels for 露营装备, look up the 5 videos with the most likes, get the first page of comments under each, then the replies under the 3 most-liked comments. Give me one table: video, comment or reply, likes, IP location, time.

```json
{
  "endpoint": "wechat_channels.videos.search",
  "params": {
    "query": "露营装备推荐"
  },
  "idempotency_key": "<a new UUID>"
}
```

MCP: `https://api.okdata.online/mcp`

## Endpoints in this guide

- [WeChat Channels video search](https://okdata.online/apis/wechat_channels/videos/search/) `wechat_channels.videos.search`: $0.02 per call · about 10 videos per page
- [WeChat Channels video detail](https://okdata.online/apis/wechat_channels/videos/get/) `wechat_channels.videos.get`: $0.02 per call
- [WeChat Channels video comments](https://okdata.online/apis/wechat_channels/videos/comments/list/) `wechat_channels.videos.comments.list`: $0.015 per call · about 25 comments per page
- [WeChat Channels comment replies](https://okdata.online/apis/wechat_channels/comments/replies/list/) `wechat_channels.comments.replies.list`: $0.015 per call · about 20 comments per page

## More about WeChat Channels

- [WeChat Channels API](https://okdata.online/apis/wechat_channels/)
- [WeChat Channels API in Python: videos and comments (2026)](https://okdata.online/guides/wechat-channels-api-python/)
- [How to get every video a WeChat Channels account has posted](https://okdata.online/guides/wechat-channels-user-videos/)
- [What is a WeChat Channels account ID (v2_…@finder), and why doesn't the sph ID work?](https://okdata.online/answers/wechat-channels-finder-id/)
- [Comments API](https://okdata.online/roles/posts-comments-list/)
- [Comment replies API](https://okdata.online/roles/comments-replies-list/)
- [Post detail API](https://okdata.online/roles/posts-get/)
- [Post search API](https://okdata.online/roles/posts-search/)
