# TikTok Video Downloader API - Direct Video URLs (`spider_studio/tiktok-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/tiktok-video-resolver.md
- **Developed by:** [Tarique](https://apify.com/spider_studio) (community)
- **Categories:** Videos, Social media, Developer tools
- **Features:** Limited permissions
- **Stats:** 43 total users, 9 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.20 / 1,000 tiktok video resolveds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### TikTok video download URL API

**TikTok Video Downloader API - Direct Video URLs** converts public [TikTok](https://www.tiktok.com/)
video IDs, 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 IDs or links, click **Start**, and receive one Dataset row per
unique input. You can mix IDs and links in the same run. 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 input processing:** resolve up to 1,000 unique IDs or links per run.
- **Direct video ID input:** resolve numeric TikTok video IDs without constructing a URL.
- **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.
- **Request-and-result pricing:** every accepted input produces a visible result;
  successful resolutions add a separate success charge.

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 ID, video link, 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 numeric TikTok video ID, public video URL, mobile share link, or `vm.tiktok.com` short link.
3. Add more IDs or 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 charges `$0.001` when a run starts, `$0.0002` for each accepted video
ID or TikTok URL processed into a visible Dataset result, and `$0.0012` for each
successful resolution. A run with one successful video costs `$0.0024`; a run
with 100 successful videos costs `$0.141`.

Private, deleted, unavailable, or otherwise failed links still receive a
Dataset row with `success: false` and incur the request charge, but not the
success charge. Event prices include platform usage during the run. Dataset
reads and long-term storage after the run remain subject to Apify's standard
platform pricing. During a pricing transition, the request event is charged
only after it appears in the run's effective pricing.

### TikTok Video Download URL API input

The public input contains one backward-compatible field, `urls`. Each array item
can be a numeric TikTok video ID, a normal TikTok video link, or a TikTok-owned
short link. IDs and links can be mixed. Duplicate inputs are removed while their
original order is preserved.

```json
{
  "urls": [
    "6965506622420471045",
    "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 environment variables so the public input stays
simple. The defaults use a US Apify Proxy, a 10-second timeout, one HTTP retry,
and one full-resolution retry.

### TikTok direct video URL output

Each unique input link produces one Dataset row. Results are written as each
input finishes, in completion order. Saved rows remain available if the run
stops early. Use `sourceUrl` to match each row to its input.

Billing and run progress are updated as rows are written, and pending work is
stopped when the run charge limit is reached. 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~tiktok-video-resolver/run-sync-get-dataset-items" \
  --header "Authorization: Bearer YOUR_APIFY_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"urls":["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
  one bounded retry through a new US proxy connection with automatic IP selection.

### Related TikTok Actors

- [TikTok Profile & Public Videos Scraper](https://apify.com/spider_studio/tiktok-profile-scraper) resolves public TikTok profiles and retrieves a paginated page of their public videos.
- [TikTok Bulk Video Search](https://apify.com/spider_studio/tiktok-video-search) searches public TikTok videos by keyword and returns structured video records.

### 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`, incur the request charge, and do not
incur the successful-resolution charge.

#### 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.

# Actor input Schema

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

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

## Actor input object example

```json
{
  "urls": [
    "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": [
        "6965506622420471045"
    ]
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,spider_studio/tiktok-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/vafRADDhoxRMq3sw8/openapi.json
