# Douyin AI Transcript Scraper (`hgservices/douyin-ai-transcript-scraper`) Actor

Scrape and transcribe Douyin (抖音) video audio into speaker-labeled text transcripts. Supports automatic language detection, multilingual speech-to-text, and smart formatting for every video URL.

- **URL**: https://apify.com/hgservices/douyin-ai-transcript-scraper.md
- **Developed by:** [Harish Garg](https://apify.com/hgservices) (community)
- **Categories:** Videos, Social media, AI
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 video seconds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Douyin AI Transcript Scraper 🎙️

**Scrape and transcribe Douyin (抖音) videos** into accurate, speaker-labeled text. Paste one or more video URLs, and get full text transcripts — with automatic language detection, speaker identification, and smart formatting.

### What does Douyin AI Transcript Scraper do?

This Actor takes one or more **Douyin video URLs** and returns a **full text transcript** of the spoken audio in each video. It automatically detects the spoken language (Chinese, English, or any of 30+ supported languages), identifies different speakers, and formats numbers, dates, and punctuation.

Only **Douyin video URLs** are accepted — non-Douyin links (YouTube, TikTok, etc.) are rejected before any processing starts. Each video produces one dataset row with the transcript and key video metadata such as the caption, creator name, and engagement stats.

You can access results through the **Apify API**, schedule runs on a timer, or connect them to tools like Google Sheets, Slack, Zapier, and Make.

### Why scrape Douyin video transcripts?

- **Content repurposing** — Turn Douyin video content into blog posts, articles, or social media text.
- **Market research** — Analyze spoken content from Chinese social media at scale.
- **Accessibility** — Generate subtitles and captions for Douyin videos.
- **Competitive intelligence** — Monitor what competitors or influencers say in their videos.
- **Translation prep** — Get the original spoken text before you translate it to other languages.
- **SEO and content indexing** — Make video content searchable by extracting the spoken words.
- **Trend analysis** — Track popular topics and keywords across Douyin creators.

### How to scrape Douyin video transcripts

1. Go to the Actor's **Input** tab on the Apify Console.
2. Paste one or more Douyin video URLs into the **Douyin Video URLs** field.
3. (Optional) Turn **Speaker Diarization** on or off. It is on by default.
4. (Optional) Turn **Smart Formatting** on or off. It is on by default.
5. Click **Start** and wait for the run to finish.
6. Open the **Dataset** tab to view or download your transcripts.

### Accepted URL formats

The Actor accepts **only Douyin video URLs**. Non-Douyin links are rejected immediately — no network call is made and no charge is incurred.

| Format | Example | Where you find it |
|---|---|---|
| **Standard video page** | `https://www.douyin.com/video/7045159024525905183` | Browser address bar on douyin.com |
| **Standard video page (no www)** | `https://douyin.com/video/7045159024525905183` | Same page, some browsers drop the `www` |
| **Share link** | `https://v.douyin.com/iYRfMBam/` | Douyin app → Share → Copy Link |
| **Legacy share link** | `https://www.iesdouyin.com/share/video/7045159024525905183` | Older Douyin app versions |

**Not accepted:**

- URLs from other sites (YouTube, TikTok, Bilibili, etc.)
- Douyin user profile pages (`douyin.com/user/...`)
- Douyin search or hashtag pages
- Douyin image/photo posts (detected and skipped with a clear error message)
- Plain text that is not a URL

Query parameters and trailing slashes in the URL are fine — the Actor strips them automatically.

### Input parameters

| Field | Type | Description | Default |
|---|---|---|---|
| `urls` | string\[] | Douyin video URLs or share links to transcribe (see accepted formats above) | *(required)* |
| `maxAudioMinutes` | integer | Maximum audio length in minutes (1–600) | 600 |
| `diarize` | boolean | Label different speakers in the transcript | true |
| `smartFormat` | boolean | Format dates, times, numbers, and punctuation | true |

#### Example input

```json
{
    "urls": [
        "https://www.douyin.com/video/7045159024525905183",
        "https://v.douyin.com/iYRfMBam/"
    ],
    "diarize": true,
    "smartFormat": true
}
```

### Output — Douyin video transcript data

Each video produces one dataset row with the transcript and video metadata. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

For single-URL runs, the transcript is also saved as a plain-text file in the key-value store.

#### Example output

```json
{
    "videoUrl": "https://www.douyin.com/video/7045159024525905183",
    "desc": "Video caption text",
    "authorName": "Creator Name",
    "createTime": "2024-01-15T10:30:00+00:00",
    "durationSeconds": 45.2,
    "language": "zh",
    "transcript": "[Speaker 0] 大家好，欢迎来到我的频道...",
    "transcriptLength": 1250,
    "transcriptStatus": "ok",
    "speakerCount": 2
}
```

### Douyin transcript data fields

| Field | Description |
|---|---|
| `videoUrl` | The Douyin video URL |
| `desc` | Video caption and description |
| `authorName` | Creator's display name |
| `createTime` | Upload date and time (ISO 8601) |
| `cover` | Thumbnail image URL |
| `durationSeconds` | Video length in seconds |
| `transcript` | Full transcript text with speaker labels |
| `transcriptLength` | Character count of the transcript |
| `transcriptStatus` | Result status: `ok`, `empty`, or an error code |
| `language` | Auto-detected spoken language code (e.g. `zh`, `en`) |
| `speakerCount` | Number of speakers detected |
| `model` | AI model used for transcription (e.g. `nova-3`) |
| `diarize` | Whether speaker diarization was enabled |

### How much does it cost to transcribe Douyin videos?

The Actor uses **Pay Per Event** pricing with two charge events:

1. **Video processed** ($0.005) — A flat fee charged once per video when processing starts.
2. **Second of video transcribed** ($0.00025/second) — Charged per second of audio, with a 30-second minimum. Only charged when a transcript is delivered.

**Example costs:**

| Video length | Cost |
|---|---|
| 30 seconds | **$0.0125** |
| 2 minutes | **$0.035** |
| 10 minutes | **$0.155** |

Invalid URLs are rejected before any charge. Videos that cannot be fetched incur only the flat per-video fee.

### Tips for better Douyin transcripts

- **Batch processing** — Paste multiple URLs at once. Each video gets its own dataset row.
- **Language detection is automatic** — The Actor detects the spoken language. You do not need to specify it.
- **Share links work** — Both `v.douyin.com/xxx/` share links and full `douyin.com/video/ID` URLs are accepted. See the [Accepted URL formats](#accepted-url-formats) section for the full list.
- **Invalid URLs are caught early** — Non-Douyin URLs are rejected before any network call. No charge is incurred for rejected URLs.
- **Empty transcripts** — If the result is empty, the audio likely has no spoken words (for example, music, sound effects, or silence). The Actor retries automatically before it reports an empty result.
- **Long videos** — You can transcribe videos up to 10 hours long. Use the **Max Audio Minutes** setting to set a cap.

### FAQ

**Is it legal to scrape Douyin?**
This Actor accesses publicly available data. Always review Douyin's Terms of Service for your use case.

**What languages does the transcription support?**
The Actor supports 30+ languages with automatic detection. Chinese (Mandarin) and English produce the best results.

**Why is my transcript empty?**
The video audio likely has no spoken words — for example, pure music, singing, or silence. Speech-to-text does not transcribe sung lyrics.

**Can I schedule automatic runs?**
Yes. Use the Apify Console scheduler to run the Actor on a timer with the same input.

**Need help or have feedback?**
Open an issue on the [Issues tab](https://console.apify.com/actors/issues) or contact the developer.

# Actor input Schema

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

One or more Douyin video URLs or share links to transcribe. Accepted formats: https://www.douyin.com/video/<id>, https://v.douyin.com/<code> (share link), or https://www.iesdouyin.com/share/video/<id> (legacy). Non-Douyin URLs are rejected immediately. Each URL produces its own dataset row with its transcript.

## `maxAudioMinutes` (type: `integer`):

Maximum length (in minutes) of audio to transcribe. Longer videos fail before any per-second cost is incurred. Default is 600 (10 hours).

## `diarize` (type: `boolean`):

Identify and label different speakers in the audio. Useful for interviews and duet videos.

## `smartFormat` (type: `boolean`):

Apply formatting to dates, times, numbers, and punctuation.

## Actor input object example

```json
{
  "urls": [
    "https://www.douyin.com/video/7045159024525905183"
  ],
  "maxAudioMinutes": 600,
  "diarize": true,
  "smartFormat": true
}
```

# Actor output Schema

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

No description

## `transcriptFiles` (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.douyin.com/video/7045159024525905183"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hgservices/douyin-ai-transcript-scraper").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.douyin.com/video/7045159024525905183"] }

# Run the Actor and wait for it to finish
run = client.actor("hgservices/douyin-ai-transcript-scraper").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.douyin.com/video/7045159024525905183"
  ]
}' |
apify call hgservices/douyin-ai-transcript-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hgservices/douyin-ai-transcript-scraper"
        }
    }
}

```

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/GHbpNYOCJaCrLKFka/builds/cEHj4F2PKYig57qzj/openapi.json
