# TikTok Video Downloader API - Direct Video URLs (`spider_studio/video-resolver`) Actor

Convert public TikTok video links and short URLs into direct playback/download URLs and structured metadata. Bulk-process up to 1,000 links through the Apify API with no TikTok login or user-supplied cookies. Pay only for successfully resolved videos.

- **URL**: https://apify.com/spider\_studio/video-resolver.md
- **Developed by:** [NewLai](https://apify.com/spider_studio) (community)
- **Categories:** Videos, Social media, Developer tools
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$1.20 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

**Language:** [English](#english) | [中文](#中文)

### English

### TikTok video download URL API

**TikTok Video Downloader API - Direct Video URLs** converts public [TikTok](https://www.tiktok.com/)
video links, mobile share links, and TikTok short URLs into **direct video
playback/download URLs** and structured metadata. It is a lightweight TikTok
video downloader API for developers, no-code automations, and data pipelines
that need the media URL without storing the video on an additional file host.

Paste up to 1,000 links, click **Start**, and receive one Dataset row per unique
TikTok video. No TikTok login, API key, or user-supplied cookies are required.
Run it from Apify Console or integrate it through the Apify API, webhooks,
schedules, MCP, and automation tools such as Make or n8n.

> This Actor returns media URLs and metadata. It does not download or permanently
> store the video file. TikTok CDN URLs are signed and can expire, so consume or
> save the media soon after a run.

### Why use this TikTok video URL extractor?

- **Bulk TikTok URL processing:** resolve up to 1,000 unique links per run.
- **Short-link expansion:** support `vm.tiktok.com` and other TikTok-owned share links.
- **Direct video URLs:** receive the best available playback/download URL and
  additional bitrate variants.
- **Useful metadata:** get the video ID, caption, creator, cover image,
  resolution, and bitrate.
- **No browser automation:** browser-impersonating HTTP requests keep runs
  lightweight and suitable for API workflows.
- **Built for automation:** export results or connect them to Apify schedules,
  webhooks, cloud storage, Make, n8n, and your own application.
- **Success-based pricing:** failed, private, deleted, or unavailable videos are
  returned with an error and are not charged.

Typical use cases include sending TikTok videos into transcription or video
analysis pipelines, expanding mobile share links, refreshing expired TikTok CDN
URLs, selecting a video quality, and collecting public metadata for videos that
you are authorized to process.

### What TikTok video data can the API extract?

| Field | Type | Description |
| --- | --- | --- |
| `sourceUrl` | string | Original TikTok video or short link supplied as input. |
| `resolvedUrl` | string | Canonical URL after a TikTok short link is expanded. |
| `success` | boolean | Whether the video URL and metadata were resolved. |
| `videoId` | string | Stable public TikTok video identifier. |
| `title` | string | Public TikTok caption or video description. |
| `author` | object | Public creator ID, username, and display name. |
| `coverUrl` | string | TikTok video cover image URL. |
| `downloadUrl` | string | Best available direct playback/download URL. |
| `width`, `height` | integer | Dimensions of the selected video stream. |
| `bitrate` | integer | Bitrate of the selected video stream. |
| `variants` | array | Other discovered video URLs, resolutions, and bitrates. |
| `error` | string | Safe explanation when `success` is `false`. |

### How to get a TikTok video download URL

1. Open the Actor's **Input** tab.
2. Paste a public TikTok video URL, mobile share link, or `vm.tiktok.com` short link.
3. Add more links if you want to resolve them in bulk.
4. Click **Start**.
5. Open the Dataset and use `downloadUrl`, or export the results as JSON, CSV,
   Excel, or HTML.

For programmatic use, open the **API** tab for generated JavaScript, Python,
CLI, HTTP, OpenAPI, and MCP examples.

### How much does the TikTok downloader API cost?

The Actor costs **$1.20 per 1,000 successfully resolved TikTok videos**
(`$0.0012` per success). A run with 100 successful videos costs `$0.12`.
Invalid, private, deleted, unavailable, or otherwise failed links still receive
a Dataset row with `success: false`, but they are **not charged**.

The event price includes platform usage during the run. Dataset reads and
long-term storage after the run remain subject to Apify's standard platform
pricing.

### TikTok Video Download URL API input

The public input contains one field, `urls`. It accepts normal TikTok video
links and TikTok-owned short links. Duplicate links are removed while their
original order is preserved.

```json
{
  "urls": [
    "https://www.tiktok.com/@gordonramsayofficial/video/6965506622420471045",
    "https://vm.tiktok.com/example/"
  ]
}
```

See the **Input** tab for the interactive form. Networking, concurrency, and
retry settings are managed by the Actor so the public input stays simple.

### TikTok direct video URL output

Each unique input link produces one Dataset row. You can download the Dataset
in formats such as JSON, HTML, CSV, or Excel.

```json
{
  "sourceUrl": "https://www.tiktok.com/@gordonramsayofficial/video/6965506622420471045",
  "resolvedUrl": "https://www.tiktok.com/@gordonramsayofficial/video/6965506622420471045",
  "success": true,
  "videoId": "6965506622420471045",
  "title": "Add some #Spanish flair to your toast this week...",
  "author": {
    "id": "6747935906352907269",
    "uniqueId": "gordonramsayofficial",
    "nickname": "Gordon Ramsay"
  },
  "coverUrl": "https://...",
  "downloadUrl": "https://...",
  "width": 720,
  "height": 1280,
  "bitrate": 904177,
  "variants": [
    { "width": 720, "height": 1280, "bitrate": 904177, "url": "https://..." }
  ],
  "error": null
}
```

#### TikTok downloader API example with HTTP

Use the generated examples in the **API** tab, or call the synchronous Dataset
endpoint from your application:

```bash
curl --request POST \
  "https://api.apify.com/v2/acts/spider_studio~video-resolver/run-sync-get-dataset-items" \
  --header "Authorization: Bearer YOUR_APIFY_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"urls":["https://www.tiktok.com/@gordonramsayofficial/video/6965506622420471045"]}'
```

### Tips for reliable TikTok video URL extraction

- Consume or copy `downloadUrl` soon after the run because TikTok CDN signatures
  can expire.
- Re-run an old link whenever you need a fresh direct video URL.
- Check `success` and `error` instead of assuming every public-looking URL is available.
- Split very large workflows into separate runs when you need independent progress tracking.
- Try the URLs in `variants` if your application needs a different resolution or bitrate.
- Invalid TikTok URLs are rejected immediately; temporary upstream failures use
  bounded retries and proxy-session rotation.

### TikTok downloader API FAQ, legality, and support

#### Does this Actor download or store TikTok videos?

No. It extracts direct media URLs and public metadata. Your application decides
whether to stream, download, or store the media. This avoids duplicate hosting
costs but means the returned URL is not permanent.

#### Does it return TikTok videos without a watermark?

The Actor selects the best video stream exposed by TikTok, but it does not
promise that every result is watermark-free. Check the returned media before
building a workflow that requires a specific watermark state.

#### Can it resolve private, deleted, or region-blocked TikTok videos?

No. The video must be publicly available from the Actor's network location.
Unavailable inputs return `success: false` and are not charged.

#### Do I need a TikTok account, cookie, or official TikTok API key?

No TikTok login, user cookie, or TikTok API key is required. An Apify account is
needed to run the Actor through Console or API.

This Actor extracts only information publicly exposed by TikTok. Results can
still contain personal data that users chose to publish. Personal data is
protected by the GDPR and other laws. Process it only with a legitimate reason,
respect TikTok's terms and copyright rules, and consult legal counsel if you are
unsure whether your use case is lawful.

Use the Actor's **Issues** tab for reproducible bug reports and the **API** tab
for integration examples. Include the failed URL shape and run ID, but never
publish Apify tokens or proxy credentials.

***

### 中文

### TikTok 视频下载直链 API

**TikTok Video Downloader API - Direct Video URLs** 可以把公开 TikTok 作品链接、
移动端分享链接和 `vm.tiktok.com` 短链接转换成**直接播放/下载地址**与结构化元数据。它适合需要在
Python、JavaScript、n8n、Make 或自有应用中批量获取 TikTok 视频地址的开发者，
不需要 TikTok 登录、官方 API Key 或用户提供 Cookie。

每次 Run 最多处理 1,000 个不重复链接，每条输入生成一条 Dataset 结果。Actor 只
返回媒体地址，不会下载或永久保存视频文件；TikTok CDN 地址可能过期，建议运行完成
后尽快使用或保存视频。

### 为什么使用 TikTok 视频直链提取器？

- 支持标准作品链接、移动端分享链接和 TikTok 短链接。
- 批量返回视频 ID、文案、作者、封面、分辨率、码率和直接视频 URL。
- 返回多个清晰度与码率变体，便于下游选择格式。
- 可通过 Apify API、Webhook、定时任务、MCP、Make 和 n8n 自动化调用。
- 每 1,000 条成功结果 `$1.20`；失败结果不收费。

### 如何获取 TikTok 视频下载地址？

1. 打开 Actor 的 **Input** 页面。
2. 粘贴一个或多个公开 TikTok 视频链接或短链接。
3. 点击 **Start**。
4. 在 Dataset 中读取 `downloadUrl`，或导出 JSON、CSV、Excel、HTML。

如需程序化调用，请打开 **API** 页面查看 JavaScript、Python、CLI、HTTP、OpenAPI
和 MCP 示例。

### TikTok API 输入

```json
{
  "urls": [
    "https://www.tiktok.com/@gordonramsayofficial/video/6965506622420471045"
  ]
}
```

重复链接会自动去重并保留原顺序。并发、网络与重试策略由 Actor 管理，不需要用户配置。

### TikTok 视频直链输出

核心字段包括：

| 字段 | 说明 |
| --- | --- |
| `resolvedUrl` | 短链接展开后的标准 TikTok 地址。 |
| `videoId` | 稳定的公开作品 ID。 |
| `title` | 视频公开文案。 |
| `author` | 作者 ID、用户名与昵称。 |
| `coverUrl` | 视频封面地址。 |
| `downloadUrl` | 当前最佳的直接播放/下载地址。 |
| `variants` | 其他分辨率、码率和视频地址。 |
| `success`, `error` | 解析状态与安全错误说明。 |

### TikTok 视频链接解析价格

Actor 按成功结果收费：**每 1,000 条 `$1.20`**，即每条 `$0.0012`。无效、私密、
已删除或暂时不可用的视频仍会输出 `success: false`，但不会收费。Run 期间的平台用量
已包含在事件价格中。

### 常见问题、合规与支持

#### Actor 会下载或永久存储视频吗？

不会。它只返回 TikTok 当前公开的媒体 URL 和元数据，下载或存储由下游应用决定。

#### 返回的视频一定无水印吗？

不保证。Actor 会选择 TikTok 暴露的最佳视频流，但不会承诺所有结果都没有水印。

#### 可以解析私密或已删除的视频吗？

不可以。视频必须能够从 Actor 当前网络位置公开访问。

本 Actor 只提取 TikTok 公开展示的信息，但结果仍可能包含用户主动公开的个人数据。
你有责任遵守 TikTok 服务条款、版权规定及适用法律；如果无法判断使用场景是否合法，
请咨询法律专业人士。

如需反馈问题，请使用 Actor 的 **Issues** 页面；集成示例位于 **API** 页面。提交问题
时可以提供失败链接格式和 Run ID，但不要公开 Apify Token 或代理凭据。

# Actor input Schema

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

Paste public TikTok video URLs, mobile share links, or vm.tiktok.com short links. The API accepts up to 1,000 unique links per run and returns a direct video URL plus metadata for each one.

## Actor input object example

```json
{
  "urls": [
    "https://www.tiktok.com/@gordonramsayofficial/video/6965506622420471045"
  ]
}
```

# Actor output Schema

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

No description

# 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://www.tiktok.com/@gordonramsayofficial/video/6965506622420471045"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("spider_studio/video-resolver").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://www.tiktok.com/@gordonramsayofficial/video/6965506622420471045"] }

# Run the Actor and wait for it to finish
run = client.actor("spider_studio/video-resolver").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://www.tiktok.com/@gordonramsayofficial/video/6965506622420471045"
  ]
}' |
apify call spider_studio/video-resolver --silent --output-dataset

```

## MCP server setup

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

```

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/Gj5y5gX1bfErKocp4/builds/MCinGemhYbTngN2cl/openapi.json
