# Send TikTok Crawling (yt-dlp) to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "tiktok-crawling",
    "name": "TikTok Crawling (yt-dlp)",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/RomneyDa/tiktok-crawling",
    "canonicalUrl": "https://clawhub.ai/RomneyDa/tiktok-crawling",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/tiktok-crawling",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=tiktok-crawling",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "tiktok-crawling",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-10T00:08:33.746Z",
      "expiresAt": "2026-05-17T00:08:33.746Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=tiktok-crawling",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=tiktok-crawling",
        "contentDisposition": "attachment; filename=\"tiktok-crawling-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "tiktok-crawling"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/tiktok-crawling"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/tiktok-crawling",
    "downloadUrl": "https://openagent3.xyz/downloads/tiktok-crawling",
    "agentUrl": "https://openagent3.xyz/skills/tiktok-crawling/agent",
    "manifestUrl": "https://openagent3.xyz/skills/tiktok-crawling/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/tiktok-crawling/agent.md"
  }
}
```
## Documentation

### TikTok Scraping with yt-dlp

yt-dlp is a CLI for downloading video/audio from TikTok and many other sites.

### Setup

# macOS
brew install yt-dlp ffmpeg

# pip (any platform)
pip install yt-dlp
# Also install ffmpeg separately for merging/post-processing

### Single Video

yt-dlp "https://www.tiktok.com/@handle/video/1234567890"

### Entire Profile

yt-dlp "https://www.tiktok.com/@handle" \\
  -P "./tiktok/data" \\
  -o "%(uploader)s/%(upload_date)s-%(id)s/video.%(ext)s" \\
  --write-info-json

Creates:

tiktok/data/
  handle/
    20260220-7331234567890/
      video.mp4
      video.info.json

### Multiple Profiles

for handle in handle1 handle2 handle3; do
  yt-dlp "https://www.tiktok.com/@$handle" \\
    -P "./tiktok/data" \\
    -o "%(uploader)s/%(upload_date)s-%(id)s/video.%(ext)s" \\
    --write-info-json \\
    --download-archive "./tiktok/downloaded.txt"
done

### Search, Hashtags & Sounds

# Search by keyword
yt-dlp "tiktoksearch:cooking recipes" --playlist-end 20

# Hashtag page
yt-dlp "https://www.tiktok.com/tag/booktok" --playlist-end 50

# Videos using a specific sound
yt-dlp "https://www.tiktok.com/music/original-sound-1234567890" --playlist-end 30

### Format Selection

# List available formats
yt-dlp -F "https://www.tiktok.com/@handle/video/1234567890"

# Download specific format (e.g., best video without watermark if available)
yt-dlp -f "best" "https://www.tiktok.com/@handle/video/1234567890"

### By Date

# On or after a date
--dateafter 20260215

# Before a date
--datebefore 20260220

# Exact date
--date 20260215

# Date range
--dateafter 20260210 --datebefore 20260220

# Relative dates (macOS / Linux)
--dateafter "$(date -u -v-7d +%Y%m%d)"           # macOS: last 7 days
--dateafter "$(date -u -d '7 days ago' +%Y%m%d)" # Linux: last 7 days

### By Metrics & Content

# 100k+ views
--match-filters "view_count >= 100000"

# Duration between 30-60 seconds
--match-filters "duration >= 30 & duration <= 60"

# Title contains "recipe" (case-insensitive)
--match-filters "title ~= (?i)recipe"

# Combine: 50k+ views from Feb 2026
yt-dlp "https://www.tiktok.com/@handle" \\
  --match-filters "view_count >= 50000" \\
  --dateafter 20260201

### Preview What Would Download

yt-dlp "https://www.tiktok.com/@handle" \\
  --simulate \\
  --print "%(upload_date)s | %(view_count)s views | %(title)s"

### Export to JSON

# Single JSON array
yt-dlp "https://www.tiktok.com/@handle" --simulate --dump-json > handle_videos.json

# JSONL (one object per line, better for large datasets)
yt-dlp "https://www.tiktok.com/@handle" --simulate -j > handle_videos.jsonl

### Export to CSV

yt-dlp "https://www.tiktok.com/@handle" \\
  --simulate \\
  --print-to-file "%(uploader)s,%(id)s,%(upload_date)s,%(view_count)s,%(like_count)s,%(webpage_url)s" \\
  "./tiktok/analysis/metadata.csv"

### Analyze with jq

# Top 10 videos by views from downloaded .info.json files
jq -s 'sort_by(.view_count) | reverse | .[:10] | .[] | {title, view_count, url: .webpage_url}' \\
  tiktok/data/*/*.info.json

# Total views across all videos
jq -s 'map(.view_count) | add' tiktok/data/*/*.info.json

# Videos grouped by upload date
jq -s 'group_by(.upload_date) | map({date: .[0].upload_date, count: length})' \\
  tiktok/data/*/*.info.json

Tip: For deeper analysis and visualization, load JSONL/CSV exports into Python with pandas. Useful for engagement scatter plots, posting frequency charts, or comparing metrics across creators.

### Archive (Skip Already Downloaded)

The --download-archive flag tracks downloaded videos, enabling incremental updates:

yt-dlp "https://www.tiktok.com/@handle" \\
  -P "./tiktok/data" \\
  -o "%(uploader)s/%(upload_date)s-%(id)s/video.%(ext)s" \\
  --write-info-json \\
  --download-archive "./tiktok/downloaded.txt"

Run the same command later—it skips videos already in downloaded.txt.

### Authentication (Private/Restricted Content)

# Use cookies from browser (recommended)
yt-dlp --cookies-from-browser chrome "https://www.tiktok.com/@handle"

# Or export cookies to a file first
yt-dlp --cookies tiktok_cookies.txt "https://www.tiktok.com/@handle"

### Scheduled Scraping (Cron)

# crontab -e
# Run daily at 2 AM, log output
0 2 * * * cd /path/to/project && ./scripts/scrape-tiktok.sh >> ./tiktok/logs/cron.log 2>&1

Example scripts/scrape-tiktok.sh:

#!/bin/bash
set -e

HANDLES="handle1 handle2 handle3"
DATA_DIR="./tiktok/data"
ARCHIVE="./tiktok/downloaded.txt"

for handle in $HANDLES; do
  echo "[$(date)] Scraping @$handle"
  yt-dlp "https://www.tiktok.com/@$handle" \\
    -P "$DATA_DIR" \\
    -o "%(uploader)s/%(upload_date)s-%(id)s/video.%(ext)s" \\
    --write-info-json \\
    --download-archive "$ARCHIVE" \\
    --cookies-from-browser chrome \\
    --dateafter "$(date -u -v-7d +%Y%m%d)" \\
    --sleep-interval 2 \\
    --max-sleep-interval 5
done
echo "[$(date)] Done"

### Troubleshooting

ProblemSolutionEmpty results / no videos foundAdd --cookies-from-browser chrome — TikTok rate-limits anonymous requests403 Forbidden errorsRate limited. Wait 10-15 min, or use cookies/different IP"Video unavailable"Region-locked. Try --geo-bypass or a VPNWatermarked videosCheck -F for alternative formats; some may lack watermarkSlow downloadsAdd --concurrent-fragments 4 for faster downloadsProfile shows fewer videos than expectedTikTok API limits. Use --playlist-end N explicitly, try with cookies

### Debug Mode

# Verbose output to diagnose issues
yt-dlp -v "https://www.tiktok.com/@handle" 2>&1 | tee debug.log

### Key Options

OptionDescription-o TEMPLATEOutput filename template-P PATHBase download directory--dateafter DATEVideos on/after date (YYYYMMDD)--datebefore DATEVideos on/before date--playlist-end NStop after N videos--match-filters EXPRFilter by metadata (views, duration, title)--write-info-jsonSave metadata JSON per video--download-archive FILETrack downloads, skip duplicates--simulate / -sDry run, no download-j / --dump-jsonOutput metadata as JSON--cookies-from-browser NAMEUse cookies from browser--sleep-interval SECWait between downloads (avoid rate limits)

### Output Template Variables

VariableExample Output%(id)s7331234567890%(uploader)shandle%(upload_date)s20260215%(title).50sFirst 50 chars of title%(view_count)s1500000%(like_count)s250000%(ext)smp4

Full template reference →
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: RomneyDa
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-10T00:08:33.746Z
- Expires at: 2026-05-17T00:08:33.746Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/tiktok-crawling)
- [Send to Agent page](https://openagent3.xyz/skills/tiktok-crawling/agent)
- [JSON manifest](https://openagent3.xyz/skills/tiktok-crawling/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/tiktok-crawling/agent.md)
- [Download page](https://openagent3.xyz/downloads/tiktok-crawling)