This repository shows how to call the fixed Apify Actor
apple_yang/tiktok-transcripts-scraper
from cURL, Python, Node.js, Java, Go, and Rust. Use videoUrl for one video, profile, short link, or @username, or batchTargets for up to 200 targets in one Actor Run. CSV examples can still start separate Runs per row.
Choose a starting point:
- Try without writing code: an Apify account is required. Open the Actor in Apify Console, enter a video URL in its public input, start a Run, then inspect its Dataset.
- Integrate with code: follow QuickStart or pick a language example.
- Use an AI client: configure Apify MCP using the MCP compatibility matrix and the relevant client guides.
Before running the Actor, review its current pricing. The examples make no free-use or fixed-cost promise.
You need an Apify account. Create an API token in Apify Console under
Settings → API & Integrations, then set it as APIFY_TOKEN (see Apify's
API getting-started guide); never publish, share, or commit the real token, or paste it into chats or AI assistant tools.
The default example video URL is:
https://www.tiktok.com/@carter.braydon/video/7647694374876319007
For a quick cURL run, set APIFY_TOKEN in your shell and run from the
repository root (Bash, curl, and Python 3 are required):
export APIFY_TOKEN='your_apify_token_here'
bash examples/curl/single-url-sync.shOn success, the script prints the Run ID before waiting, then displays the
transcript text and saves the complete Dataset Items to
sample-output/generated/curl-transcript-<run-id>.json.
To provide another video URL:
bash examples/curl/single-url-sync.sh --video-url 'https://www.tiktok.com/@user/video/1234567890'The cURL script reads the process environment and does not load .env.
Python, Node.js, and Java can load a repository-root .env; Go and Rust read
the process environment. See QuickStart for setup and
runtime requirements.
- Calls the fixed API ID
apple_yang~tiktok-transcripts-scraperatapi.apify.com; Actor, host, and path are not user-configurable. - Keeps
{ "videoUrl": "..." }as the backward-compatible single-target request. UsebatchTargetsfor native batching; it overridesvideoUrl. - Separates Run status, Dataset reads, and transcript checks.
SUCCEEDEDdoes not guarantee a Dataset item or non-emptytext; inspect each item’sstatus,transcriptStatus,errorCode,errorMessage, anderrMsg. A transcript status such asno_captionsis distinct from an Actor Run failure. - Writes generated examples under
sample-output/generated/, which Git ignores. No real transcript output is committed as a fixture.
Run creation uses one client-side POST attempt; that is not a server-side exactly-once guarantee. If the result is uncertain, check Apify Console before retrying. After a wait timeout, use the same Run ID to continue checking.
The Actor extracts transcript and metadata fields listed in its
public Output schema.
Optional outputs include hookText (when includeHook is enabled), srt and vtt (when enabled). The Actor returns source video, transcript, creator, and engagement data; analysis conclusions are up to your application.
Commands start at the repository root unless noted. Supply APIFY_TOKEN as
described in each language guide.
| Example | Runtime | Single-video command | Guide |
|---|---|---|---|
| cURL | Bash, curl, Python 3 | bash examples/curl/single-url-sync.sh |
cURL |
| Python | Python 3.11+ | python3 examples/python/single_url.py |
Python |
| Node.js | Node.js 20.12+ | node examples/nodejs/single-url.mjs |
Node.js |
| Java | JDK 17, Maven | mvn -f examples/java/pom.xml -Dexec.mainClass=com.apismith.tiktok.SingleUrl compile exec:java |
Java |
| Go | Go 1.22+ | cd examples/go && go run . |
Go |
| Rust | Rust 2021, Cargo lockfile v4 | cargo run --manifest-path examples/rust/Cargo.toml --bin single_url |
Rust |
Per-language guides document URL overrides and CSV processing. The Actor also exposes three Tasks: Bulk TikTok Transcript Extraction (video batch), TikTok Competitor Video Analysis (limited videos from multiple profiles), and TikTok New Videos Monitor (profile monitoring). See Task configurations.
- Apify MCP
- ChatGPT
- Claude Web/Desktop and Claude Code
- Cursor and VS Code
- Gemini CLI
- Compatibility and verification status
- QuickStart
- API reference
- Batch processing
- Troubleshooting
- AI workflows and agent use cases
- Prompt recipes
Do I need to write code to try it? No. Open the Actor in Apify Console,
provide one videoUrl or multiple batchTargets, start a Run, and inspect the Dataset. Check current
pricing before starting.
Does a SUCCEEDED Run guarantee a transcript? No. Check Run status,
Dataset availability and contents, text, and errMsg separately.
What if Run creation has an unclear result? Check Apify Console first; do not immediately send another create request.
What if waiting times out? Continue with the same Run ID using the language
guide's wait command. A timeout does not mean the Run failed.
The only credential used by the examples is APIFY_TOKEN. Do not place it in
source code, URLs, logs, committed files, or shared output. The Actor ID is
fixed in code; no example reads APIFY_ACTOR_ID.
Next: try the Actor, start with code, or choose an MCP client.