# TikTok Profile Videos/Photos Backup Archiver (`thejoshualab/tiktok-profile-videos-photos-backup-archiver`) Actor

Scrapes and downloads TikTok posts (videos and photo slideshows) watermark-free from any public profile. Stitches slideshows into MP4 with FFmpeg, bundles everything into a ZIP for easy bulk download.

- **URL**: https://apify.com/thejoshualab/tiktok-profile-videos-photos-backup-archiver.md
- **Developed by:** [The Joshua Lab](https://apify.com/thejoshualab) (community)
- **Categories:** Automation, Social media, Videos
- **Stats:** 1 total users, 0 monthly users, 16.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 downloaded-items

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/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

## 📹 TikTok Profile Backup & Archiver (Watermark-Free)

> **Multi-post TikTok scraper and batch video/slideshow downloader.**
>
> **Note**: TikTok's anti-bot measures change periodically — if scraping starts failing, check for an actor update or open an issue.

Scrapes and bulk-downloads all videos from a profile with just a username and photo slideshows **watermark-free**. Photo slideshows are automatically stitched into MP4 videos using FFmpeg with the original audio. Downloads are bundled into a single ZIP archive stored in the Apify Key-Value Store for easy retrieval.

***

### 📸 Product Screenshots & Console Views

| 1️⃣ Input Configuration Form | 2️⃣ Live Run Execution Console |
| :---: | :---: |
| ![Input Screen](https://raw.githubusercontent.com/Joshualeexy/apify-tiktok-suite/main/tiktok-profile-archiver/screenshots/input.png) | ![Run Status](https://raw.githubusercontent.com/Joshualeexy/apify-tiktok-suite/main/tiktok-profile-archiver/screenshots/run.png) |

| 3️⃣ Dataset Table Export View | 4️⃣ Key-Value Store Zip Vault |
| :---: | :---: |
| ![Dataset Results](https://raw.githubusercontent.com/Joshualeexy/apify-tiktok-suite/main/tiktok-profile-archiver/screenshots/dataset.png) | ![Key-Value Store](https://raw.githubusercontent.com/Joshualeexy/apify-tiktok-suite/main/tiktok-profile-archiver/screenshots/kvs.png) |

***

### Prerequisites

- **FFmpeg** must be installed and available in your system PATH. The actor will throw an error on startup if FFmpeg is missing. On the Apify platform, FFmpeg is pre-installed in the Docker image.

***

### Input Parameters

To run this actor, you only need to provide the **TikTok Username**. All other settings are optional configurations.

#### 🟢 Basic Input

- **`username`** (String): TikTok username (without the `@` symbol) to scrape and download (e.g. `tiktok`).

#### ⚙️ Advanced Configurations (Optional)

<details>
<summary><b>Click to expand advanced configuration options</b></summary>

| Parameter | Type | Default | Description |
|---|---|---|---|
| `targetCount` | Integer | `50` | Maximum number of recent posts to scrape and download. |
| `downloadOnly` | Boolean | `false` | Skip profile scraping entirely. Instead, download directly from the URLs in `postLinks`. |
| `postLinks` | String\[] | `[]` | List of direct TikTok video/photo URLs to download. Only used when `downloadOnly` is `true`. |
| `shouldZip` | Boolean | `true` | Bundle all downloads into a single ZIP archive. If `false`, files are uploaded individually to the Key-Value Store. |
| `useAuthentication` | Boolean | `false` | Enable cookie-based authentication for the browser session. **You must set this to `true` for cookies to take effect.** |
| `cookies` | JSON Array | `[]` | Your TikTok session cookies in JSON format. |

</details>

***

### Output

- **Dataset**: Each downloaded post is logged as a dataset entry with `url`, `filename`, `status` (`downloaded` or `failed`), and `sizeBytes`.
- **Key-Value Store**: If `shouldZip` is `true`, a `downloads.zip` file is saved. If `false`, individual video files are saved under `downloads/<username>/<filename>`.

***

### Download Only Mode

If you already have a list of TikTok video/photo URLs, you can skip profile scraping entirely:

1. Set `downloadOnly` to `true`.
2. Paste your URLs into the `postLinks` array.
3. The actor will download each URL directly without opening a browser.

***

### Running Locally

```bash
cd tiktok-profile-archiver
apify run
```

The actor reads input from `storage/key_value_stores/default/INPUT.json`.

# Actor input Schema

## `username` (type: `string`):

TikTok username (without @) to scrape and download (ignored if Download Only is active).

## `targetCount` (type: `integer`):

Number of videos or photo posts to download.

## `downloadOnly` (type: `boolean`):

If enabled, bypasses profile scraping and downloads directly from the Post Links list below.

## `postLinks` (type: `array`):

List of direct TikTok video/photo links to download (used if Download Only is enabled).

## `shouldZip` (type: `boolean`):

If enabled, compiles all downloaded files into a single zip archive stored in Key-Value Store.

## `useAuthentication` (type: `boolean`):

Toggle cookie-based authentication for scraping profile.

## `cookies` (type: `array`):

Paste session cookies array here (JSON format) if utilizing authentication.

## Actor input object example

```json
{
  "targetCount": 50,
  "downloadOnly": false,
  "postLinks": [],
  "shouldZip": true,
  "useAuthentication": false,
  "cookies": []
}
```

# 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 = {
    "postLinks": [],
    "cookies": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("thejoshualab/tiktok-profile-videos-photos-backup-archiver").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 = {
    "postLinks": [],
    "cookies": [],
}

# Run the Actor and wait for it to finish
run = client.actor("thejoshualab/tiktok-profile-videos-photos-backup-archiver").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 '{
  "postLinks": [],
  "cookies": []
}' |
apify call thejoshualab/tiktok-profile-videos-photos-backup-archiver --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thejoshualab/tiktok-profile-videos-photos-backup-archiver"
        }
    }
}

```

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/RhaT8c1wAEyAz2VEX/builds/mpIoUTe04TZBcdhqX/openapi.json
