# Video Downloader & Post Info | 视频号·抖音·小红书·TikTok (`doliz/video-downloader`) Actor

视频下载链接与帖子信息 API。Get video download links and post info from WeChat Channels (视频号/Shipinhao), Douyin (抖音), TikTok and Xiaohongshu (小红书/RedNote, preview). Batch 1–20 public share URLs; original JSON and per-item status. Pay only for success. No full media hosting.

- **URL**: https://apify.com/doliz/video-downloader.md
- **Developed by:** [doliz](https://apify.com/doliz) (community)
- **Features:** Limited permissions
- **Stats:** 13 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 video resolveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Video Downloader — Douyin, TikTok, WeChat Channels & Xiaohongshu

Resolve up to 20 mixed public share links in one run. The Actor detects the platform automatically and returns a unified result containing the complete original platform JSON and available media links. Full media files are not downloaded or stored.

| Platform | Availability |
| --- | --- |
| WeChat Channels / 视频号 | Built-in video resolver |
| Xiaohongshu / 小红书 (preview) | Built-in public video and image-post resolver; no user cookies or login required |
| Douyin / 抖音 | Built-in anonymous public video and image-post resolver |
| TikTok | Built-in anonymous public video and image-post resolver; optional maintainer backend override |

Xiaohongshu is a preview: public visibility does not guarantee anonymous access. Login/App-only restrictions, share-token expiry and platform rate limits can prevent retrieval. Multi-day validation is still in progress; no long-term success rate is promised.

### Input

Use the single **Public share links** (`urls`) array, with 1–20 non-empty entries. Platforms can be mixed; no platform selector is needed. Use one post per entry.

```json
{
  "urls": [
    "https://weixin.qq.com/sph/EXAMPLE",
    "Post title, author and emoji https://www.xiaohongshu.com/explore/aaaaaaaaaaaaaaaaaaaaaaaa?xsec_token=EXAMPLE&xsec_source=pc_share"
  ]
}
```

These are format examples, not working links. For Xiaohongshu, paste the entire share text, a Markdown link or the URL. For other platforms, paste only the URL.

Accepted Xiaohongshu forms:

- `xiaohongshu.com` or `rednote.com`: `/explore/<noteId>`, `/discovery/item/<noteId>`, `/user/profile/<authorId>/<noteId>`.
- `xhslink.com` or `xhslink.cn` short links, including `/o/`, `/a/` and older short codes.
- Recognized hostnames without a protocol are given HTTPS; common `www` aliases are normalized.

Keep all share parameters, especially `xsec_token`. Bare note IDs and author/search pages are not supported. Recognition of a link form does not guarantee it is anonymously accessible; older or expired short links may still fail.

Identical trimmed inputs are processed once. Xiaohongshu text and URL entries that normalize to the exact same URL are also processed once, preserving first-seen order. Different tokens, query parameters or path variants remain separate inputs; short and long links are not merged by note ID. Multiple different URLs in one share-text entry produce an uncharged item failure. Larger batches must be split; the 20-item bound is checked before deduplication.

### Results

Every emitted item has the same five fields:

```json
{
  "platform": "wechat_channels",
  "sourceUrl": "https://weixin.qq.com/sph/EXAMPLE",
  "status": "succeeded",
  "data": {"errCode": 0, "data": {"feedInfo": {"videoUrl": "https://cdn.example.com/video.mp4"}}},
  "error": null
}
```

`data` is the complete original platform object; no original fields are removed, renamed or flattened.
A failed item has `status: "failed"` and `error: {"code": "...", "message": "..."}`. Its `data` contains the
original response when available, otherwise `null`. A failed response with media-looking fields is not a success.
`sourceUrl` is the normalized URL submitted to the resolver, preserving share parameters; a short link stays a short
link. If normalization fails, it contains the trimmed submitted entry. `platform` is `unsupported` when unidentified.
Results retain deduplicated input order. Spending limits or internal incidents can stop processing early.

| Platform | Paths in a result |
| --- | --- |
| WeChat Channels | `data.data.feedInfo.videoUrl`, `data.data.feedInfo.description`, `data.data.authorInfo` |
| Xiaohongshu | `data.noteId`, `data.type`, `data.title`, `data.desc`, `data.user`, `data.interactInfo` |
| Xiaohongshu video addresses | `data.video.media.stream.<codec>[].masterUrl` / `backupUrls[]` |
| Xiaohongshu image addresses | `data.imageList[].urlDefault`, `urlPre`, `url` or `infoList[].url`, when present |

The Output tab offers Overview, Media and post details, and Complete records views. These are display projections;
the stored JSON and `data` remain unchanged. The Media view shows first returned image/stream candidates; all candidates
remain in Complete records. Fields absent on a platform are empty in shared views.

**Migration from unwrapped output:** move former platform field paths under `data`. WeChat's `data.data` is intentional:
the inner `data` belongs to the original response. Check `status` rather than inferring success from fields. Historical
Datasets remain unchanged; pin an older build while updating integrations. There is no legacy-output input switch.

Xiaohongshu places the matching page's `note` object in `data`, not the entire webpage or all comments. Fields vary by post. Quoted text is preserved; outside strings, JS `undefined`/non-finite numbers become JSON `null`, empty Map becomes `{}`, and empty Set becomes `[]`. Unknown expressions are rejected rather than executed. A `mediaV2` string remains a string.

A video must have a verified video address; its cover alone is not success. An image post needs at least one verified image. Up to three primary-media candidates are sampled; this does not verify every image or promise permanent links, highest quality, no watermarks or complete-file integrity. Verification reads only a small in-memory byte range. Use media URLs promptly. WeChat files may require platform-specific decoding; no conversion/audio extraction is provided.

### Pricing and failures

The configured rate is **$5 per 1,000 successful results** ($0.005 each); check the Store Pricing tab for the current rate. One successful Xiaohongshu post uses **one** `successful-result` event, regardless of image count or video encodings. Twenty successful entries cost $0.10 at this rate. Repeating a result in another run can be charged again.

A failure or retry is not charged. Invalid, unsupported, inaccessible links and expected HTTP/network/timeouts produce
failed items while the Run is `SUCCEEDED`, even if every item fails. An empty or temporarily busy anonymous pool is also an uncharged expected outcome.

Internal faults (invalid configured endpoints, missing required native credentials, parser/response contract drift)
pause the affected platform and fail the Run after other platforms finish. Unexpected bugs and storage/billing failures
stop execution. Existing results remain available. The Actor stops new work once the SDK reports the spending limit.
`SUCCEEDED` describes Run execution; always check each item's `status`.

Malformed whole input (missing/empty/non-array `urls`, blank/non-string entries, over 20 entries or undeclared fields)
is rejected before item processing, without Dataset items or charges. This differs from an invalid URL string.

```json
{"platform":"xiaohongshu","sourceUrl":"https://xhslink.com/o/EXAMPLE","status":"failed","data":null,"error":{"code":"XHS_UNAVAILABLE","message":"..."}}
```

A platform response without usable media is retained in `data` with `RESOLVER_REJECTED`; it is not charged.

XHS-specific outcomes include `XHS_LOGIN_REQUIRED`, `XHS_APP_ONLY`, `XHS_UNAVAILABLE` and `XHS_MEDIA_UNAVAILABLE`; timeouts, challenges and rate limits use resolver error codes. `RESOLVER_CONTRACT_ERROR` indicates an internal extraction/response-contract problem, not proof the post was deleted. Use a fresh complete share link, then retry temporary failures later. Do not repeatedly submit challenged links.

### Local setup and integrations

Use Python 3.14, install `requirements.txt`, provide an Apify local `INPUT.json`, and run `python -m my_actor` (or `apify run`). The Dockerfile uses the same Python version. Xiaohongshu needs no account, cookie, proxy, browser or external resolver setting. It runs sequentially with a 60-second per-item deadline and at least three seconds between XHS items.

WeChat Channels uses the configured maintainer resolver (`WECHAT_CHANNELS_RESOLVER_URL`) when present; its built-in path requires maintainer CookieCanary configuration. Douyin and native TikTok use maintainer CookieCanary configuration; `TIKTOK_RESOLVER_URL` is an optional override. Optional `RESOLVER_API_TOKEN` authenticates configured external resolvers; never place maintainer secrets in `urls`. Supported platforms do not require the user to select a resolver. Use the Apify API tab to connect your application or workflow.

For support, provide the run ID and a short description in Issues. This source includes modified GPL-3.0 XHS-Downloader code; see [third-party notices](THIRD_PARTY_NOTICES.md) and the included source/license before redistributing it.

### Douyin and TikTok

Paste an HTTPS URL only. Douyin supports video/note links, mobile share video/slides pages, v.douyin.com
short links and modal_id links. TikTok supports /@user/video/ID, /@user/photo/ID and vm/vt or /t/ short
links. Profile, search, live and private/login-only content are outside this single-post interface.

No user Cookie is required. Anonymous sessions are maintained by the service; successful retrieval is not
guaranteed for every public post or region. Historical short links may stop resolving.

Douyin data is the matching original aweme object: data.aweme_id, desc, author, statistics, video.play_addr.url_list
or images\[].url_list. TikTok data is the original itemStruct: data.id, desc, author, stats, video.playAddr
or imagePost.images\[].imageURL.urlList. Unknown fields are retained. External TikTok overrides retain their existing response shape.

Each verified video or gallery charges once regardless of image count. The first primary media is probed;
this does not verify every gallery image or the full file. TikTok media URLs may require their anonymous
session and may expire; they are not guaranteed cookie-free download links. Cookie values are never returned.
Maintainers: see [native adapter operations](docs/anonymous-platforms.md).

# Actor input Schema

## `urls` (type: `array`):

Paste 1–20 links from supported platforms; platforms are detected automatically and may be mixed. Xiaohongshu entries may contain the complete share text. Use one post per entry; for other platforms paste the URL only. Exact normalized duplicates are processed once; sharing parameters are preserved.

## Actor input object example

```json
{
  "urls": [
    "https://weixin.qq.com/sph/AE7l6VpVA9"
  ]
}
```

# Actor output Schema

## `dataset` (type: `string`):

Unified results in deduplicated input order. Inspect item status; an all-expected-failure run can succeed. Full original platform data is nested in data.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://weixin.qq.com/sph/AE7l6VpVA9"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("doliz/video-downloader").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": ["https://weixin.qq.com/sph/AE7l6VpVA9"] }

# Run the Actor and wait for it to finish
run = client.actor("doliz/video-downloader").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://weixin.qq.com/sph/AE7l6VpVA9"
  ]
}' |
apify call doliz/video-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,doliz/video-downloader"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/oATDeEZ9mdWJUUIu4/builds/X07Y2guuokeZMyMEC/openapi.json
