@tikomni/skills 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.skill-package-allowlist.txt +4 -0
- package/LICENSE +21 -0
- package/README.md +167 -0
- package/README.zh-CN.md +167 -0
- package/bin/tikomni-skills.js +127 -0
- package/env.example +160 -0
- package/lib/installer.js +176 -0
- package/package.json +44 -0
- package/skills/creator-analysis/SKILL.md +71 -0
- package/skills/creator-analysis/agents/openai.yaml +4 -0
- package/skills/creator-analysis/env.example +36 -0
- package/skills/creator-analysis/references/api-capability-index.md +92 -0
- package/skills/creator-analysis/references/api-contracts/asr-api.md +130 -0
- package/skills/creator-analysis/references/api-contracts/bilibili-app-api.md +776 -0
- package/skills/creator-analysis/references/api-contracts/bilibili-web-api.md +2017 -0
- package/skills/creator-analysis/references/api-contracts/demo-api.md +717 -0
- package/skills/creator-analysis/references/api-contracts/douyin-app-v3-api.md +3594 -0
- package/skills/creator-analysis/references/api-contracts/douyin-billboard-api.md +2274 -0
- package/skills/creator-analysis/references/api-contracts/douyin-creator-api.md +1575 -0
- package/skills/creator-analysis/references/api-contracts/douyin-creator-v2-api.md +3254 -0
- package/skills/creator-analysis/references/api-contracts/douyin-search-api.md +4118 -0
- package/skills/creator-analysis/references/api-contracts/douyin-web-api.md +5544 -0
- package/skills/creator-analysis/references/api-contracts/douyin-xingtu-api.md +1916 -0
- package/skills/creator-analysis/references/api-contracts/douyin-xingtu-v2-api.md +1540 -0
- package/skills/creator-analysis/references/api-contracts/health-check.md +69 -0
- package/skills/creator-analysis/references/api-contracts/hybrid-parsing.md +78 -0
- package/skills/creator-analysis/references/api-contracts/instagram-v1-api.md +2256 -0
- package/skills/creator-analysis/references/api-contracts/instagram-v2-api.md +2011 -0
- package/skills/creator-analysis/references/api-contracts/instagram-v3-api.md +2630 -0
- package/skills/creator-analysis/references/api-contracts/ios-shortcut.md +44 -0
- package/skills/creator-analysis/references/api-contracts/kuaishou-app-api.md +1518 -0
- package/skills/creator-analysis/references/api-contracts/kuaishou-web-api.md +1242 -0
- package/skills/creator-analysis/references/api-contracts/lemon8-app-api.md +1088 -0
- package/skills/creator-analysis/references/api-contracts/linkedin-web-api.md +1949 -0
- package/skills/creator-analysis/references/api-contracts/media-ingest-api.md +126 -0
- package/skills/creator-analysis/references/api-contracts/pipixia-app-api.md +1142 -0
- package/skills/creator-analysis/references/api-contracts/reddit-app-api.md +2025 -0
- package/skills/creator-analysis/references/api-contracts/sora2-api.md +2266 -0
- package/skills/creator-analysis/references/api-contracts/temp-mail-api.md +208 -0
- package/skills/creator-analysis/references/api-contracts/threads-web-api.md +897 -0
- package/skills/creator-analysis/references/api-contracts/tikhub-downloader-api.md +134 -0
- package/skills/creator-analysis/references/api-contracts/tikhub-user-api.md +494 -0
- package/skills/creator-analysis/references/api-contracts/tiktok-ads-api.md +5947 -0
- package/skills/creator-analysis/references/api-contracts/tiktok-analytics-api.md +968 -0
- package/skills/creator-analysis/references/api-contracts/tiktok-app-v3-api.md +5735 -0
- package/skills/creator-analysis/references/api-contracts/tiktok-creator-api.md +1951 -0
- package/skills/creator-analysis/references/api-contracts/tiktok-interaction-api.md +742 -0
- package/skills/creator-analysis/references/api-contracts/tiktok-shop-web-api.md +1890 -0
- package/skills/creator-analysis/references/api-contracts/tiktok-web-api.md +4448 -0
- package/skills/creator-analysis/references/api-contracts/toutiao-app-api.md +342 -0
- package/skills/creator-analysis/references/api-contracts/toutiao-web-api.md +143 -0
- package/skills/creator-analysis/references/api-contracts/twitter-web-api.md +989 -0
- package/skills/creator-analysis/references/api-contracts/wechat-channels-api.md +809 -0
- package/skills/creator-analysis/references/api-contracts/wechat-media-platform-web-api.md +677 -0
- package/skills/creator-analysis/references/api-contracts/weibo-app-api.md +1547 -0
- package/skills/creator-analysis/references/api-contracts/weibo-web-api.md +798 -0
- package/skills/creator-analysis/references/api-contracts/weibo-web-v2-api.md +2459 -0
- package/skills/creator-analysis/references/api-contracts/xiaohongshu-app-api.md +1291 -0
- package/skills/creator-analysis/references/api-contracts/xiaohongshu-app-v2-api.md +1683 -0
- package/skills/creator-analysis/references/api-contracts/xiaohongshu-web-api.md +1324 -0
- package/skills/creator-analysis/references/api-contracts/xiaohongshu-web-v2-api.md +1209 -0
- package/skills/creator-analysis/references/api-contracts/xigua-app-v2-api.md +489 -0
- package/skills/creator-analysis/references/api-contracts/youtube-web-api.md +2636 -0
- package/skills/creator-analysis/references/api-contracts/youtube-web-v2-api.md +2660 -0
- package/skills/creator-analysis/references/api-contracts/zhihu-web-api.md +2315 -0
- package/skills/creator-analysis/references/api-tags/asr-api.md +100 -0
- package/skills/creator-analysis/references/api-tags/bilibili-app-api.md +482 -0
- package/skills/creator-analysis/references/api-tags/bilibili-web-api.md +1267 -0
- package/skills/creator-analysis/references/api-tags/demo-api.md +365 -0
- package/skills/creator-analysis/references/api-tags/douyin-app-v3-api.md +2012 -0
- package/skills/creator-analysis/references/api-tags/douyin-billboard-api.md +1428 -0
- package/skills/creator-analysis/references/api-tags/douyin-creator-api.md +694 -0
- package/skills/creator-analysis/references/api-tags/douyin-creator-v2-api.md +694 -0
- package/skills/creator-analysis/references/api-tags/douyin-search-api.md +1059 -0
- package/skills/creator-analysis/references/api-tags/douyin-web-api.md +3314 -0
- package/skills/creator-analysis/references/api-tags/douyin-xingtu-api.md +935 -0
- package/skills/creator-analysis/references/api-tags/douyin-xingtu-v2-api.md +925 -0
- package/skills/creator-analysis/references/api-tags/health-check.md +40 -0
- package/skills/creator-analysis/references/api-tags/hybrid-parsing.md +57 -0
- package/skills/creator-analysis/references/api-tags/instagram-v1-api.md +1224 -0
- package/skills/creator-analysis/references/api-tags/instagram-v2-api.md +1147 -0
- package/skills/creator-analysis/references/api-tags/instagram-v3-api.md +1123 -0
- package/skills/creator-analysis/references/api-tags/ios-shortcut.md +45 -0
- package/skills/creator-analysis/references/api-tags/kuaishou-app-api.md +846 -0
- package/skills/creator-analysis/references/api-tags/kuaishou-web-api.md +551 -0
- package/skills/creator-analysis/references/api-tags/lemon8-app-api.md +687 -0
- package/skills/creator-analysis/references/api-tags/linkedin-web-api.md +1105 -0
- package/skills/creator-analysis/references/api-tags/media-ingest-api.md +112 -0
- package/skills/creator-analysis/references/api-tags/pipixia-app-api.md +721 -0
- package/skills/creator-analysis/references/api-tags/reddit-app-api.md +1057 -0
- package/skills/creator-analysis/references/api-tags/sora2-api.md +737 -0
- package/skills/creator-analysis/references/api-tags/temp-mail-api.md +136 -0
- package/skills/creator-analysis/references/api-tags/threads-web-api.md +472 -0
- package/skills/creator-analysis/references/api-tags/tikhub-downloader-api.md +65 -0
- package/skills/creator-analysis/references/api-tags/tikhub-user-api.md +253 -0
- package/skills/creator-analysis/references/api-tags/tiktok-ads-api.md +1393 -0
- package/skills/creator-analysis/references/api-tags/tiktok-analytics-api.md +179 -0
- package/skills/creator-analysis/references/api-tags/tiktok-app-v3-api.md +3264 -0
- package/skills/creator-analysis/references/api-tags/tiktok-creator-api.md +709 -0
- package/skills/creator-analysis/references/api-tags/tiktok-interaction-api.md +366 -0
- package/skills/creator-analysis/references/api-tags/tiktok-shop-web-api.md +663 -0
- package/skills/creator-analysis/references/api-tags/tiktok-web-api.md +2516 -0
- package/skills/creator-analysis/references/api-tags/toutiao-app-api.md +220 -0
- package/skills/creator-analysis/references/api-tags/toutiao-web-api.md +96 -0
- package/skills/creator-analysis/references/api-tags/twitter-web-api.md +562 -0
- package/skills/creator-analysis/references/api-tags/wechat-channels-api.md +405 -0
- package/skills/creator-analysis/references/api-tags/wechat-media-platform-web-api.md +431 -0
- package/skills/creator-analysis/references/api-tags/weibo-app-api.md +851 -0
- package/skills/creator-analysis/references/api-tags/weibo-web-api.md +470 -0
- package/skills/creator-analysis/references/api-tags/weibo-web-v2-api.md +1405 -0
- package/skills/creator-analysis/references/api-tags/xiaohongshu-app-api.md +534 -0
- package/skills/creator-analysis/references/api-tags/xiaohongshu-app-v2-api.md +934 -0
- package/skills/creator-analysis/references/api-tags/xiaohongshu-web-api.md +757 -0
- package/skills/creator-analysis/references/api-tags/xiaohongshu-web-v2-api.md +762 -0
- package/skills/creator-analysis/references/api-tags/xigua-app-v2-api.md +308 -0
- package/skills/creator-analysis/references/api-tags/youtube-web-api.md +934 -0
- package/skills/creator-analysis/references/api-tags/youtube-web-v2-api.md +717 -0
- package/skills/creator-analysis/references/api-tags/zhihu-web-api.md +1384 -0
- package/skills/creator-analysis/references/asr-orchestration.md +33 -0
- package/skills/creator-analysis/references/config-templates/defaults.yaml +60 -0
- package/skills/creator-analysis/references/contracts/creator-card-fields.md +23 -0
- package/skills/creator-analysis/references/contracts/work-card-fields.md +32 -0
- package/skills/creator-analysis/references/platform-guides/douyin.md +49 -0
- package/skills/creator-analysis/references/platform-guides/generic.md +46 -0
- package/skills/creator-analysis/references/platform-guides/xiaohongshu.md +54 -0
- package/skills/creator-analysis/references/prompt-contracts/asr-clean.md +28 -0
- package/skills/creator-analysis/references/prompt-contracts/author-analysis-v2.md +46 -0
- package/skills/creator-analysis/references/prompt-contracts/author-analysis.md +49 -0
- package/skills/creator-analysis/references/prompt-contracts/cta.md +24 -0
- package/skills/creator-analysis/references/prompt-contracts/hook.md +25 -0
- package/skills/creator-analysis/references/prompt-contracts/insight.md +47 -0
- package/skills/creator-analysis/references/prompt-contracts/sampled-work-batch-explanations.md +30 -0
- package/skills/creator-analysis/references/prompt-contracts/structure.md +25 -0
- package/skills/creator-analysis/references/prompt-contracts/style.md +27 -0
- package/skills/creator-analysis/references/prompt-contracts/summary.md +29 -0
- package/skills/creator-analysis/references/prompt-contracts/topic.md +29 -0
- package/skills/creator-analysis/references/schemas/author-analysis-input-v1.schema.json +325 -0
- package/skills/creator-analysis/references/schemas/author-analysis-v2.schema.json +158 -0
- package/skills/creator-analysis/references/schemas/sampled-work-batch-explanations.schema.json +41 -0
- package/skills/creator-analysis/references/service-guides/asr-u2-u3-fallback.md +75 -0
- package/skills/creator-analysis/references/workflow.md +18 -0
- package/skills/creator-analysis/scripts/__init__.py +0 -0
- package/skills/creator-analysis/scripts/author_home/__init__.py +0 -0
- package/skills/creator-analysis/scripts/author_home/adapters/__init__.py +0 -0
- package/skills/creator-analysis/scripts/author_home/adapters/platform_adapters.py +299 -0
- package/skills/creator-analysis/scripts/author_home/analyzers/__init__.py +0 -0
- package/skills/creator-analysis/scripts/author_home/analyzers/author_analysis_v2_support.py +1122 -0
- package/skills/creator-analysis/scripts/author_home/analyzers/prompt_first_analyzers.py +260 -0
- package/skills/creator-analysis/scripts/author_home/analyzers/sampled_work_batch_explainer.py +260 -0
- package/skills/creator-analysis/scripts/author_home/asr/__init__.py +5 -0
- package/skills/creator-analysis/scripts/author_home/asr/home_asr.py +961 -0
- package/skills/creator-analysis/scripts/author_home/builders/__init__.py +0 -0
- package/skills/creator-analysis/scripts/author_home/builders/home_builders.py +149 -0
- package/skills/creator-analysis/scripts/author_home/collectors/__init__.py +0 -0
- package/skills/creator-analysis/scripts/author_home/collectors/homepage_collectors.py +636 -0
- package/skills/creator-analysis/scripts/author_home/orchestrator/__init__.py +0 -0
- package/skills/creator-analysis/scripts/author_home/orchestrator/run_author_analysis.py +491 -0
- package/skills/creator-analysis/scripts/author_home/orchestrator/work_analysis_artifacts.py +553 -0
- package/skills/creator-analysis/scripts/author_home/schema.py +417 -0
- package/skills/creator-analysis/scripts/core/__init__.py +0 -0
- package/skills/creator-analysis/scripts/core/analysis_pipeline.py +133 -0
- package/skills/creator-analysis/scripts/core/bootstrap_env.py +35 -0
- package/skills/creator-analysis/scripts/core/config_loader.py +418 -0
- package/skills/creator-analysis/scripts/core/extract_pipeline.py +173 -0
- package/skills/creator-analysis/scripts/core/progress_report.py +111 -0
- package/skills/creator-analysis/scripts/core/storage_router.py +253 -0
- package/skills/creator-analysis/scripts/core/tikomni_common.py +588 -0
- package/skills/creator-analysis/scripts/pipeline/__init__.py +0 -0
- package/skills/creator-analysis/scripts/pipeline/asr/__init__.py +0 -0
- package/skills/creator-analysis/scripts/pipeline/asr/asr_pipeline.py +1189 -0
- package/skills/creator-analysis/scripts/pipeline/asr/poll_u2_task.py +95 -0
- package/skills/creator-analysis/scripts/platform/__init__.py +0 -0
- package/skills/creator-analysis/scripts/platform/douyin/__init__.py +0 -0
- package/skills/creator-analysis/scripts/platform/douyin/douyin_video_type_matrix.py +224 -0
- package/skills/creator-analysis/scripts/platform/douyin/run_douyin_single_video.py +1208 -0
- package/skills/creator-analysis/scripts/platform/douyin/select_low_quality_video_url.py +200 -0
- package/skills/creator-analysis/scripts/platform/xiaohongshu/__init__.py +0 -0
- package/skills/creator-analysis/scripts/platform/xiaohongshu/run_xiaohongshu_extract.py +2128 -0
- package/skills/creator-analysis/scripts/writers/__init__.py +0 -0
- package/skills/creator-analysis/scripts/writers/write_author_homepage_samples.py +106 -0
- package/skills/creator-analysis/scripts/writers/write_benchmark_card.py +1402 -0
- package/skills/meta-capability/SKILL.md +69 -0
- package/skills/meta-capability/agents/openai.yaml +4 -0
- package/skills/meta-capability/env.example +42 -0
- package/skills/meta-capability/references/api-capability-index.md +92 -0
- package/skills/meta-capability/references/api-contracts/asr-api.md +130 -0
- package/skills/meta-capability/references/api-contracts/bilibili-app-api.md +776 -0
- package/skills/meta-capability/references/api-contracts/bilibili-web-api.md +2017 -0
- package/skills/meta-capability/references/api-contracts/demo-api.md +717 -0
- package/skills/meta-capability/references/api-contracts/douyin-app-v3-api.md +3594 -0
- package/skills/meta-capability/references/api-contracts/douyin-billboard-api.md +2274 -0
- package/skills/meta-capability/references/api-contracts/douyin-creator-api.md +1575 -0
- package/skills/meta-capability/references/api-contracts/douyin-creator-v2-api.md +3254 -0
- package/skills/meta-capability/references/api-contracts/douyin-search-api.md +4118 -0
- package/skills/meta-capability/references/api-contracts/douyin-web-api.md +5544 -0
- package/skills/meta-capability/references/api-contracts/douyin-xingtu-api.md +1916 -0
- package/skills/meta-capability/references/api-contracts/douyin-xingtu-v2-api.md +1540 -0
- package/skills/meta-capability/references/api-contracts/health-check.md +69 -0
- package/skills/meta-capability/references/api-contracts/hybrid-parsing.md +78 -0
- package/skills/meta-capability/references/api-contracts/instagram-v1-api.md +2256 -0
- package/skills/meta-capability/references/api-contracts/instagram-v2-api.md +2011 -0
- package/skills/meta-capability/references/api-contracts/instagram-v3-api.md +2630 -0
- package/skills/meta-capability/references/api-contracts/ios-shortcut.md +44 -0
- package/skills/meta-capability/references/api-contracts/kuaishou-app-api.md +1518 -0
- package/skills/meta-capability/references/api-contracts/kuaishou-web-api.md +1242 -0
- package/skills/meta-capability/references/api-contracts/lemon8-app-api.md +1088 -0
- package/skills/meta-capability/references/api-contracts/linkedin-web-api.md +1949 -0
- package/skills/meta-capability/references/api-contracts/media-ingest-api.md +126 -0
- package/skills/meta-capability/references/api-contracts/pipixia-app-api.md +1142 -0
- package/skills/meta-capability/references/api-contracts/reddit-app-api.md +2025 -0
- package/skills/meta-capability/references/api-contracts/sora2-api.md +2266 -0
- package/skills/meta-capability/references/api-contracts/temp-mail-api.md +208 -0
- package/skills/meta-capability/references/api-contracts/threads-web-api.md +897 -0
- package/skills/meta-capability/references/api-contracts/tikhub-downloader-api.md +134 -0
- package/skills/meta-capability/references/api-contracts/tikhub-user-api.md +494 -0
- package/skills/meta-capability/references/api-contracts/tiktok-ads-api.md +5947 -0
- package/skills/meta-capability/references/api-contracts/tiktok-analytics-api.md +968 -0
- package/skills/meta-capability/references/api-contracts/tiktok-app-v3-api.md +5735 -0
- package/skills/meta-capability/references/api-contracts/tiktok-creator-api.md +1951 -0
- package/skills/meta-capability/references/api-contracts/tiktok-interaction-api.md +742 -0
- package/skills/meta-capability/references/api-contracts/tiktok-shop-web-api.md +1890 -0
- package/skills/meta-capability/references/api-contracts/tiktok-web-api.md +4448 -0
- package/skills/meta-capability/references/api-contracts/toutiao-app-api.md +342 -0
- package/skills/meta-capability/references/api-contracts/toutiao-web-api.md +143 -0
- package/skills/meta-capability/references/api-contracts/twitter-web-api.md +989 -0
- package/skills/meta-capability/references/api-contracts/wechat-channels-api.md +809 -0
- package/skills/meta-capability/references/api-contracts/wechat-media-platform-web-api.md +677 -0
- package/skills/meta-capability/references/api-contracts/weibo-app-api.md +1547 -0
- package/skills/meta-capability/references/api-contracts/weibo-web-api.md +798 -0
- package/skills/meta-capability/references/api-contracts/weibo-web-v2-api.md +2459 -0
- package/skills/meta-capability/references/api-contracts/xiaohongshu-app-api.md +1291 -0
- package/skills/meta-capability/references/api-contracts/xiaohongshu-app-v2-api.md +1683 -0
- package/skills/meta-capability/references/api-contracts/xiaohongshu-web-api.md +1324 -0
- package/skills/meta-capability/references/api-contracts/xiaohongshu-web-v2-api.md +1209 -0
- package/skills/meta-capability/references/api-contracts/xigua-app-v2-api.md +489 -0
- package/skills/meta-capability/references/api-contracts/youtube-web-api.md +2636 -0
- package/skills/meta-capability/references/api-contracts/youtube-web-v2-api.md +2660 -0
- package/skills/meta-capability/references/api-contracts/zhihu-web-api.md +2315 -0
- package/skills/meta-capability/references/api-tags/asr-api.md +100 -0
- package/skills/meta-capability/references/api-tags/bilibili-app-api.md +482 -0
- package/skills/meta-capability/references/api-tags/bilibili-web-api.md +1267 -0
- package/skills/meta-capability/references/api-tags/demo-api.md +365 -0
- package/skills/meta-capability/references/api-tags/douyin-app-v3-api.md +2012 -0
- package/skills/meta-capability/references/api-tags/douyin-billboard-api.md +1428 -0
- package/skills/meta-capability/references/api-tags/douyin-creator-api.md +694 -0
- package/skills/meta-capability/references/api-tags/douyin-creator-v2-api.md +694 -0
- package/skills/meta-capability/references/api-tags/douyin-search-api.md +1059 -0
- package/skills/meta-capability/references/api-tags/douyin-web-api.md +3314 -0
- package/skills/meta-capability/references/api-tags/douyin-xingtu-api.md +935 -0
- package/skills/meta-capability/references/api-tags/douyin-xingtu-v2-api.md +925 -0
- package/skills/meta-capability/references/api-tags/health-check.md +40 -0
- package/skills/meta-capability/references/api-tags/hybrid-parsing.md +57 -0
- package/skills/meta-capability/references/api-tags/instagram-v1-api.md +1224 -0
- package/skills/meta-capability/references/api-tags/instagram-v2-api.md +1147 -0
- package/skills/meta-capability/references/api-tags/instagram-v3-api.md +1123 -0
- package/skills/meta-capability/references/api-tags/ios-shortcut.md +45 -0
- package/skills/meta-capability/references/api-tags/kuaishou-app-api.md +846 -0
- package/skills/meta-capability/references/api-tags/kuaishou-web-api.md +551 -0
- package/skills/meta-capability/references/api-tags/lemon8-app-api.md +687 -0
- package/skills/meta-capability/references/api-tags/linkedin-web-api.md +1105 -0
- package/skills/meta-capability/references/api-tags/media-ingest-api.md +112 -0
- package/skills/meta-capability/references/api-tags/pipixia-app-api.md +721 -0
- package/skills/meta-capability/references/api-tags/reddit-app-api.md +1057 -0
- package/skills/meta-capability/references/api-tags/sora2-api.md +737 -0
- package/skills/meta-capability/references/api-tags/temp-mail-api.md +136 -0
- package/skills/meta-capability/references/api-tags/threads-web-api.md +472 -0
- package/skills/meta-capability/references/api-tags/tikhub-downloader-api.md +65 -0
- package/skills/meta-capability/references/api-tags/tikhub-user-api.md +253 -0
- package/skills/meta-capability/references/api-tags/tiktok-ads-api.md +1393 -0
- package/skills/meta-capability/references/api-tags/tiktok-analytics-api.md +179 -0
- package/skills/meta-capability/references/api-tags/tiktok-app-v3-api.md +3264 -0
- package/skills/meta-capability/references/api-tags/tiktok-creator-api.md +709 -0
- package/skills/meta-capability/references/api-tags/tiktok-interaction-api.md +366 -0
- package/skills/meta-capability/references/api-tags/tiktok-shop-web-api.md +663 -0
- package/skills/meta-capability/references/api-tags/tiktok-web-api.md +2516 -0
- package/skills/meta-capability/references/api-tags/toutiao-app-api.md +220 -0
- package/skills/meta-capability/references/api-tags/toutiao-web-api.md +96 -0
- package/skills/meta-capability/references/api-tags/twitter-web-api.md +562 -0
- package/skills/meta-capability/references/api-tags/wechat-channels-api.md +405 -0
- package/skills/meta-capability/references/api-tags/wechat-media-platform-web-api.md +431 -0
- package/skills/meta-capability/references/api-tags/weibo-app-api.md +851 -0
- package/skills/meta-capability/references/api-tags/weibo-web-api.md +470 -0
- package/skills/meta-capability/references/api-tags/weibo-web-v2-api.md +1405 -0
- package/skills/meta-capability/references/api-tags/xiaohongshu-app-api.md +534 -0
- package/skills/meta-capability/references/api-tags/xiaohongshu-app-v2-api.md +934 -0
- package/skills/meta-capability/references/api-tags/xiaohongshu-web-api.md +757 -0
- package/skills/meta-capability/references/api-tags/xiaohongshu-web-v2-api.md +762 -0
- package/skills/meta-capability/references/api-tags/xigua-app-v2-api.md +308 -0
- package/skills/meta-capability/references/api-tags/youtube-web-api.md +934 -0
- package/skills/meta-capability/references/api-tags/youtube-web-v2-api.md +717 -0
- package/skills/meta-capability/references/api-tags/zhihu-web-api.md +1384 -0
- package/skills/meta-capability/references/config-templates/defaults.yaml +18 -0
- package/skills/meta-capability/references/dispatch.md +27 -0
- package/skills/meta-capability/references/execution-guidelines.md +25 -0
- package/skills/meta-capability/references/implemented-route-map.md +177 -0
- package/skills/meta-capability/references/service-guides/asr-u2-u3-fallback.md +75 -0
- package/skills/meta-capability/scripts/__init__.py +1 -0
- package/skills/meta-capability/scripts/call_route.py +141 -0
- package/skills/meta-capability/scripts/core/__init__.py +1 -0
- package/skills/meta-capability/scripts/core/bootstrap_env.py +32 -0
- package/skills/meta-capability/scripts/core/config_loader.py +204 -0
- package/skills/meta-capability/scripts/core/tikomni_common.py +443 -0
- package/skills/meta-capability/scripts/test_auth.py +98 -0
- package/skills/single-work-analysis/SKILL.md +62 -0
- package/skills/single-work-analysis/agents/openai.yaml +4 -0
- package/skills/single-work-analysis/env.example +36 -0
- package/skills/single-work-analysis/references/api-capability-index.md +92 -0
- package/skills/single-work-analysis/references/api-contracts/asr-api.md +130 -0
- package/skills/single-work-analysis/references/api-contracts/bilibili-app-api.md +776 -0
- package/skills/single-work-analysis/references/api-contracts/bilibili-web-api.md +2017 -0
- package/skills/single-work-analysis/references/api-contracts/demo-api.md +717 -0
- package/skills/single-work-analysis/references/api-contracts/douyin-app-v3-api.md +3594 -0
- package/skills/single-work-analysis/references/api-contracts/douyin-billboard-api.md +2274 -0
- package/skills/single-work-analysis/references/api-contracts/douyin-creator-api.md +1575 -0
- package/skills/single-work-analysis/references/api-contracts/douyin-creator-v2-api.md +3254 -0
- package/skills/single-work-analysis/references/api-contracts/douyin-search-api.md +4118 -0
- package/skills/single-work-analysis/references/api-contracts/douyin-web-api.md +5544 -0
- package/skills/single-work-analysis/references/api-contracts/douyin-xingtu-api.md +1916 -0
- package/skills/single-work-analysis/references/api-contracts/douyin-xingtu-v2-api.md +1540 -0
- package/skills/single-work-analysis/references/api-contracts/health-check.md +69 -0
- package/skills/single-work-analysis/references/api-contracts/hybrid-parsing.md +78 -0
- package/skills/single-work-analysis/references/api-contracts/instagram-v1-api.md +2256 -0
- package/skills/single-work-analysis/references/api-contracts/instagram-v2-api.md +2011 -0
- package/skills/single-work-analysis/references/api-contracts/instagram-v3-api.md +2630 -0
- package/skills/single-work-analysis/references/api-contracts/ios-shortcut.md +44 -0
- package/skills/single-work-analysis/references/api-contracts/kuaishou-app-api.md +1518 -0
- package/skills/single-work-analysis/references/api-contracts/kuaishou-web-api.md +1242 -0
- package/skills/single-work-analysis/references/api-contracts/lemon8-app-api.md +1088 -0
- package/skills/single-work-analysis/references/api-contracts/linkedin-web-api.md +1949 -0
- package/skills/single-work-analysis/references/api-contracts/media-ingest-api.md +126 -0
- package/skills/single-work-analysis/references/api-contracts/pipixia-app-api.md +1142 -0
- package/skills/single-work-analysis/references/api-contracts/reddit-app-api.md +2025 -0
- package/skills/single-work-analysis/references/api-contracts/sora2-api.md +2266 -0
- package/skills/single-work-analysis/references/api-contracts/temp-mail-api.md +208 -0
- package/skills/single-work-analysis/references/api-contracts/threads-web-api.md +897 -0
- package/skills/single-work-analysis/references/api-contracts/tikhub-downloader-api.md +134 -0
- package/skills/single-work-analysis/references/api-contracts/tikhub-user-api.md +494 -0
- package/skills/single-work-analysis/references/api-contracts/tiktok-ads-api.md +5947 -0
- package/skills/single-work-analysis/references/api-contracts/tiktok-analytics-api.md +968 -0
- package/skills/single-work-analysis/references/api-contracts/tiktok-app-v3-api.md +5735 -0
- package/skills/single-work-analysis/references/api-contracts/tiktok-creator-api.md +1951 -0
- package/skills/single-work-analysis/references/api-contracts/tiktok-interaction-api.md +742 -0
- package/skills/single-work-analysis/references/api-contracts/tiktok-shop-web-api.md +1890 -0
- package/skills/single-work-analysis/references/api-contracts/tiktok-web-api.md +4448 -0
- package/skills/single-work-analysis/references/api-contracts/toutiao-app-api.md +342 -0
- package/skills/single-work-analysis/references/api-contracts/toutiao-web-api.md +143 -0
- package/skills/single-work-analysis/references/api-contracts/twitter-web-api.md +989 -0
- package/skills/single-work-analysis/references/api-contracts/wechat-channels-api.md +809 -0
- package/skills/single-work-analysis/references/api-contracts/wechat-media-platform-web-api.md +677 -0
- package/skills/single-work-analysis/references/api-contracts/weibo-app-api.md +1547 -0
- package/skills/single-work-analysis/references/api-contracts/weibo-web-api.md +798 -0
- package/skills/single-work-analysis/references/api-contracts/weibo-web-v2-api.md +2459 -0
- package/skills/single-work-analysis/references/api-contracts/xiaohongshu-app-api.md +1291 -0
- package/skills/single-work-analysis/references/api-contracts/xiaohongshu-app-v2-api.md +1683 -0
- package/skills/single-work-analysis/references/api-contracts/xiaohongshu-web-api.md +1324 -0
- package/skills/single-work-analysis/references/api-contracts/xiaohongshu-web-v2-api.md +1209 -0
- package/skills/single-work-analysis/references/api-contracts/xigua-app-v2-api.md +489 -0
- package/skills/single-work-analysis/references/api-contracts/youtube-web-api.md +2636 -0
- package/skills/single-work-analysis/references/api-contracts/youtube-web-v2-api.md +2660 -0
- package/skills/single-work-analysis/references/api-contracts/zhihu-web-api.md +2315 -0
- package/skills/single-work-analysis/references/api-tags/asr-api.md +100 -0
- package/skills/single-work-analysis/references/api-tags/bilibili-app-api.md +482 -0
- package/skills/single-work-analysis/references/api-tags/bilibili-web-api.md +1267 -0
- package/skills/single-work-analysis/references/api-tags/demo-api.md +365 -0
- package/skills/single-work-analysis/references/api-tags/douyin-app-v3-api.md +2012 -0
- package/skills/single-work-analysis/references/api-tags/douyin-billboard-api.md +1428 -0
- package/skills/single-work-analysis/references/api-tags/douyin-creator-api.md +694 -0
- package/skills/single-work-analysis/references/api-tags/douyin-creator-v2-api.md +694 -0
- package/skills/single-work-analysis/references/api-tags/douyin-search-api.md +1059 -0
- package/skills/single-work-analysis/references/api-tags/douyin-web-api.md +3314 -0
- package/skills/single-work-analysis/references/api-tags/douyin-xingtu-api.md +935 -0
- package/skills/single-work-analysis/references/api-tags/douyin-xingtu-v2-api.md +925 -0
- package/skills/single-work-analysis/references/api-tags/health-check.md +40 -0
- package/skills/single-work-analysis/references/api-tags/hybrid-parsing.md +57 -0
- package/skills/single-work-analysis/references/api-tags/instagram-v1-api.md +1224 -0
- package/skills/single-work-analysis/references/api-tags/instagram-v2-api.md +1147 -0
- package/skills/single-work-analysis/references/api-tags/instagram-v3-api.md +1123 -0
- package/skills/single-work-analysis/references/api-tags/ios-shortcut.md +45 -0
- package/skills/single-work-analysis/references/api-tags/kuaishou-app-api.md +846 -0
- package/skills/single-work-analysis/references/api-tags/kuaishou-web-api.md +551 -0
- package/skills/single-work-analysis/references/api-tags/lemon8-app-api.md +687 -0
- package/skills/single-work-analysis/references/api-tags/linkedin-web-api.md +1105 -0
- package/skills/single-work-analysis/references/api-tags/media-ingest-api.md +112 -0
- package/skills/single-work-analysis/references/api-tags/pipixia-app-api.md +721 -0
- package/skills/single-work-analysis/references/api-tags/reddit-app-api.md +1057 -0
- package/skills/single-work-analysis/references/api-tags/sora2-api.md +737 -0
- package/skills/single-work-analysis/references/api-tags/temp-mail-api.md +136 -0
- package/skills/single-work-analysis/references/api-tags/threads-web-api.md +472 -0
- package/skills/single-work-analysis/references/api-tags/tikhub-downloader-api.md +65 -0
- package/skills/single-work-analysis/references/api-tags/tikhub-user-api.md +253 -0
- package/skills/single-work-analysis/references/api-tags/tiktok-ads-api.md +1393 -0
- package/skills/single-work-analysis/references/api-tags/tiktok-analytics-api.md +179 -0
- package/skills/single-work-analysis/references/api-tags/tiktok-app-v3-api.md +3264 -0
- package/skills/single-work-analysis/references/api-tags/tiktok-creator-api.md +709 -0
- package/skills/single-work-analysis/references/api-tags/tiktok-interaction-api.md +366 -0
- package/skills/single-work-analysis/references/api-tags/tiktok-shop-web-api.md +663 -0
- package/skills/single-work-analysis/references/api-tags/tiktok-web-api.md +2516 -0
- package/skills/single-work-analysis/references/api-tags/toutiao-app-api.md +220 -0
- package/skills/single-work-analysis/references/api-tags/toutiao-web-api.md +96 -0
- package/skills/single-work-analysis/references/api-tags/twitter-web-api.md +562 -0
- package/skills/single-work-analysis/references/api-tags/wechat-channels-api.md +405 -0
- package/skills/single-work-analysis/references/api-tags/wechat-media-platform-web-api.md +431 -0
- package/skills/single-work-analysis/references/api-tags/weibo-app-api.md +851 -0
- package/skills/single-work-analysis/references/api-tags/weibo-web-api.md +470 -0
- package/skills/single-work-analysis/references/api-tags/weibo-web-v2-api.md +1405 -0
- package/skills/single-work-analysis/references/api-tags/xiaohongshu-app-api.md +534 -0
- package/skills/single-work-analysis/references/api-tags/xiaohongshu-app-v2-api.md +934 -0
- package/skills/single-work-analysis/references/api-tags/xiaohongshu-web-api.md +757 -0
- package/skills/single-work-analysis/references/api-tags/xiaohongshu-web-v2-api.md +762 -0
- package/skills/single-work-analysis/references/api-tags/xigua-app-v2-api.md +308 -0
- package/skills/single-work-analysis/references/api-tags/youtube-web-api.md +934 -0
- package/skills/single-work-analysis/references/api-tags/youtube-web-v2-api.md +717 -0
- package/skills/single-work-analysis/references/api-tags/zhihu-web-api.md +1384 -0
- package/skills/single-work-analysis/references/asr-and-fallback.md +20 -0
- package/skills/single-work-analysis/references/config-templates/defaults.yaml +58 -0
- package/skills/single-work-analysis/references/contracts/work-card-fields.md +41 -0
- package/skills/single-work-analysis/references/platform-guides/douyin.md +47 -0
- package/skills/single-work-analysis/references/platform-guides/generic.md +43 -0
- package/skills/single-work-analysis/references/platform-guides/xiaohongshu.md +54 -0
- package/skills/single-work-analysis/references/prompt-contracts/asr-clean.md +28 -0
- package/skills/single-work-analysis/references/prompt-contracts/cta.md +24 -0
- package/skills/single-work-analysis/references/prompt-contracts/hook.md +25 -0
- package/skills/single-work-analysis/references/prompt-contracts/insight.md +47 -0
- package/skills/single-work-analysis/references/prompt-contracts/structure.md +25 -0
- package/skills/single-work-analysis/references/prompt-contracts/style.md +27 -0
- package/skills/single-work-analysis/references/prompt-contracts/summary.md +29 -0
- package/skills/single-work-analysis/references/prompt-contracts/topic.md +29 -0
- package/skills/single-work-analysis/references/schemas/work-card.schema.json +39 -0
- package/skills/single-work-analysis/references/service-guides/asr-u2-u3-fallback.md +75 -0
- package/skills/single-work-analysis/scripts/__init__.py +0 -0
- package/skills/single-work-analysis/scripts/core/__init__.py +0 -0
- package/skills/single-work-analysis/scripts/core/analysis_pipeline.py +133 -0
- package/skills/single-work-analysis/scripts/core/bootstrap_env.py +35 -0
- package/skills/single-work-analysis/scripts/core/config_loader.py +418 -0
- package/skills/single-work-analysis/scripts/core/extract_pipeline.py +173 -0
- package/skills/single-work-analysis/scripts/core/progress_report.py +111 -0
- package/skills/single-work-analysis/scripts/core/storage_router.py +253 -0
- package/skills/single-work-analysis/scripts/core/tikomni_common.py +588 -0
- package/skills/single-work-analysis/scripts/pipeline/__init__.py +0 -0
- package/skills/single-work-analysis/scripts/pipeline/asr/__init__.py +0 -0
- package/skills/single-work-analysis/scripts/pipeline/asr/asr_pipeline.py +1189 -0
- package/skills/single-work-analysis/scripts/pipeline/asr/poll_u2_task.py +95 -0
- package/skills/single-work-analysis/scripts/platform/__init__.py +0 -0
- package/skills/single-work-analysis/scripts/platform/douyin/__init__.py +0 -0
- package/skills/single-work-analysis/scripts/platform/douyin/douyin_video_type_matrix.py +224 -0
- package/skills/single-work-analysis/scripts/platform/douyin/run_douyin_single_video.py +1233 -0
- package/skills/single-work-analysis/scripts/platform/douyin/select_low_quality_video_url.py +200 -0
- package/skills/single-work-analysis/scripts/platform/xiaohongshu/__init__.py +0 -0
- package/skills/single-work-analysis/scripts/platform/xiaohongshu/run_xiaohongshu_extract.py +2156 -0
- package/skills/single-work-analysis/scripts/writers/__init__.py +0 -0
- package/skills/single-work-analysis/scripts/writers/write_benchmark_card.py +1402 -0
|
@@ -0,0 +1,2660 @@
|
|
|
1
|
+
# YouTube-Web-V2-API Full Contract
|
|
2
|
+
|
|
3
|
+
- Back to index: [`api-capability-index.md`](../api-capability-index.md)
|
|
4
|
+
- Back to route summary: [`api-tags/youtube-web-v2-api.md`](../api-tags/youtube-web-v2-api.md)
|
|
5
|
+
- Current contract file: `api-contracts/youtube-web-v2-api.md`
|
|
6
|
+
- Source: `https://app.tikomni.com/openapi/tikomni-openapi.full.with-u2.public.latest.json`
|
|
7
|
+
- Fetched at: `2026-03-08T06:54:04+00:00`
|
|
8
|
+
- Route count: `16`
|
|
9
|
+
- Default auth: Header `Authorization` Bearer
|
|
10
|
+
- Read this file only when you need precise auth notes, parameter descriptions, defaults, examples, or success-response fields.
|
|
11
|
+
- Tag description: **(YouTube Web V2数据接口/YouTube-Web-V2-API endpoints)**
|
|
12
|
+
|
|
13
|
+
## Route Contracts
|
|
14
|
+
|
|
15
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-channel-description"></a>
|
|
16
|
+
### `GET /api/u1/v1/youtube/web_v2/get_channel_description`
|
|
17
|
+
|
|
18
|
+
- Summary: 获取频道描述信息/Get channel description
|
|
19
|
+
- Capabilities: profiles / accounts
|
|
20
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
21
|
+
- operationId: `get_channel_description_api_v1_youtube_web_v2_get_channel_description_get`
|
|
22
|
+
|
|
23
|
+
#### Notes
|
|
24
|
+
|
|
25
|
+
> # [中文]
|
|
26
|
+
> ### 用途:
|
|
27
|
+
> - 获取YouTube频道的介绍信息(订阅数、视频数、观看次数、注册时间、社交链接等)
|
|
28
|
+
>
|
|
29
|
+
> ### 重要提示 - 需要两次请求获取完整数据:
|
|
30
|
+
> - **第一次请求**(使用channel_id): 返回基本信息(频道名称、描述、订阅数、视频数、头像、横幅等)
|
|
31
|
+
> - **第二次请求**(使用continuation_token): 返回高级信息(**注册时间、社交媒体链接、国家、观看次数**等)
|
|
32
|
+
>
|
|
33
|
+
> ### 如何获取channel_id:
|
|
34
|
+
> - 如果你只有频道URL(如 `https://www.youtube.com/@CozyCraftYT`),请先调用 **get_channel_id** 接口获取channel_id
|
|
35
|
+
> - 该接口会返回类似 `UCeu6U67OzJhV1KwBansH3Dg` 的频道ID
|
|
36
|
+
>
|
|
37
|
+
> ### 参数详解:
|
|
38
|
+
>
|
|
39
|
+
> #### 📌 必选参数(二选一):
|
|
40
|
+
> **channel_id** (string)
|
|
41
|
+
> - **作用**: 频道ID,用于第一次请求获取频道基本信息
|
|
42
|
+
> - **格式**: 通常以 `UC` 开头的24位字符串
|
|
43
|
+
> - **示例**: `"UCeu6U67OzJhV1KwBansH3Dg"`
|
|
44
|
+
> - **获取方式**: 调用 **get_channel_id** 接口,传入频道URL即可获取
|
|
45
|
+
>
|
|
46
|
+
> **continuation_token** (string)
|
|
47
|
+
> - **作用**: 翻页标志,用于第二次请求获取频道的高级信息
|
|
48
|
+
> - **获取方式**: 从第一次请求的响应中获取 `continuation_token` 字段
|
|
49
|
+
> - **注意**: `channel_id` 和 `continuation_token` 必须提供其中一个
|
|
50
|
+
>
|
|
51
|
+
> #### ⚙️ 可选参数:
|
|
52
|
+
> **language_code** (string, 可选)
|
|
53
|
+
> - **作用**: 设置显示语言偏好
|
|
54
|
+
> - **默认值**: `"zh-CN"`
|
|
55
|
+
> - **可用值**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"` 等
|
|
56
|
+
>
|
|
57
|
+
> **country_code** (string, 可选)
|
|
58
|
+
> - **作用**: 设置地区代码
|
|
59
|
+
> - **默认值**: `"US"`
|
|
60
|
+
> - **可用值**: `"US"`, `"JP"`, `"GB"` 等
|
|
61
|
+
>
|
|
62
|
+
> **need_format** (boolean, 可选)
|
|
63
|
+
> - **作用**: 是否返回清洗后的精简数据
|
|
64
|
+
> - **默认值**: `false`
|
|
65
|
+
> - **可用值**:
|
|
66
|
+
> - `false` - 返回原始完整数据
|
|
67
|
+
> - `true` - 返回清洗后的精简数据(推荐)
|
|
68
|
+
>
|
|
69
|
+
> ### 使用流程(三步获取完整数据):
|
|
70
|
+
> 1. **获取channel_id**: 如果只有频道URL,先调用 `get_channel_id?channel_url=https://www.youtube.com/@CozyCraftYT`
|
|
71
|
+
> 2. **第一次请求**: 使用 `channel_id` 参数获取频道基本信息,同时获取 `continuation_token`
|
|
72
|
+
> 3. **第二次请求**: 使用 `continuation_token` 获取高级信息(注册时间、社交链接等)
|
|
73
|
+
>
|
|
74
|
+
> ### 返回数据结构 (need_format=true):
|
|
75
|
+
>
|
|
76
|
+
> #### 第一次请求返回(使用channel_id):
|
|
77
|
+
> ```json
|
|
78
|
+
> {
|
|
79
|
+
> "channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
|
|
80
|
+
> "title": "CozyCraft",
|
|
81
|
+
> "handle": "CozyCraftYT",
|
|
82
|
+
> "description": "频道介绍...",
|
|
83
|
+
> "subscriber_count": "9.84万位订阅者",
|
|
84
|
+
> "video_count": "181 个视频",
|
|
85
|
+
> "view_count": null,
|
|
86
|
+
> "country": null,
|
|
87
|
+
> "creation_date": null,
|
|
88
|
+
> "links": [],
|
|
89
|
+
> "avatar": [{"url": "...", "width": 900, "height": 900}],
|
|
90
|
+
> "banner": [{"url": "...", "width": 2560, "height": 424}],
|
|
91
|
+
> "keywords": "Minecraft Ambience...",
|
|
92
|
+
> "channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg",
|
|
93
|
+
> "vanity_url": "http://www.youtube.com/@CozyCraftYT",
|
|
94
|
+
> "rss_url": "https://www.youtube.com/feeds/videos.xml?channel_id=UCeu6U67OzJhV1KwBansH3Dg",
|
|
95
|
+
> "is_family_safe": true,
|
|
96
|
+
> "verified": false,
|
|
97
|
+
> "has_business_email": false,
|
|
98
|
+
> "has_membership": true,
|
|
99
|
+
> "continuation_token": "4qmFsgJg..."
|
|
100
|
+
> }
|
|
101
|
+
> ```
|
|
102
|
+
>
|
|
103
|
+
> #### 第二次请求返回(使用continuation_token):
|
|
104
|
+
> ```json
|
|
105
|
+
> {
|
|
106
|
+
> "channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
|
|
107
|
+
> "title": null,
|
|
108
|
+
> "handle": "CozyCraftYT",
|
|
109
|
+
> "description": "完整频道介绍...",
|
|
110
|
+
> "subscriber_count": "98.4K subscribers",
|
|
111
|
+
> "video_count": "181 videos",
|
|
112
|
+
> "view_count": "53,218,926 views",
|
|
113
|
+
> "country": "United States",
|
|
114
|
+
> "creation_date": "Oct 28, 2022",
|
|
115
|
+
> "links": [
|
|
116
|
+
> {"name": "Discord", "url": "https://discord.gg/tvuxxcsgSS"},
|
|
117
|
+
> {"name": "Twitter", "url": "https://twitter.com/..."}
|
|
118
|
+
> ],
|
|
119
|
+
> "avatar": [],
|
|
120
|
+
> "banner": [],
|
|
121
|
+
> "verified": false,
|
|
122
|
+
> "has_business_email": true,
|
|
123
|
+
> "continuation_token": null
|
|
124
|
+
> }
|
|
125
|
+
> ```
|
|
126
|
+
>
|
|
127
|
+
> ### 注意事项:
|
|
128
|
+
> - **必须进行两次请求才能获取完整的频道信息**
|
|
129
|
+
> - 第一次请求: 获取基本信息(title、avatar、banner、keywords、rss_url等)和 continuation_token
|
|
130
|
+
> - 第二次请求: 获取高级信息(creation_date、links、view_count、country等)
|
|
131
|
+
> - 建议两次请求都设置 `need_format=true` 获取清洗后的数据
|
|
132
|
+
> - 可以合并两次请求的结果来获得完整的频道信息
|
|
133
|
+
>
|
|
134
|
+
> # [English]
|
|
135
|
+
> ### Purpose:
|
|
136
|
+
> - Get YouTube channel description information (subscribers, videos, views, creation date, social links, etc.)
|
|
137
|
+
>
|
|
138
|
+
> ### Important - Two requests required for complete data:
|
|
139
|
+
> - **First request** (with channel_id): Returns basic info (title, description, subscribers, videos, avatar, banner, etc.)
|
|
140
|
+
> - **Second request** (with continuation_token): Returns advanced info (**creation date, social media links, country, view count**, etc.)
|
|
141
|
+
>
|
|
142
|
+
> ### How to get channel_id:
|
|
143
|
+
> - If you only have channel URL (e.g., `https://www.youtube.com/@CozyCraftYT`), call **get_channel_id** endpoint first
|
|
144
|
+
> - It will return channel_id like `UCeu6U67OzJhV1KwBansH3Dg`
|
|
145
|
+
>
|
|
146
|
+
> ### Parameters:
|
|
147
|
+
>
|
|
148
|
+
> #### 📌 Required (choose one):
|
|
149
|
+
> **channel_id** (string)
|
|
150
|
+
> - **Purpose**: Channel ID for first request to get basic channel info
|
|
151
|
+
> - **Format**: Usually starts with `UC`, 24 characters
|
|
152
|
+
> - **Example**: `"UCeu6U67OzJhV1KwBansH3Dg"`
|
|
153
|
+
> - **How to get**: Call **get_channel_id** endpoint with channel URL
|
|
154
|
+
>
|
|
155
|
+
> **continuation_token** (string)
|
|
156
|
+
> - **Purpose**: Pagination token for second request to get advanced info
|
|
157
|
+
> - **How to get**: Get `continuation_token` field from first request response
|
|
158
|
+
> - **Note**: Must provide either `channel_id` or `continuation_token`
|
|
159
|
+
>
|
|
160
|
+
> #### ⚙️ Optional:
|
|
161
|
+
> **language_code** (string, optional)
|
|
162
|
+
> - **Purpose**: Set language preference
|
|
163
|
+
> - **Default**: `"zh-CN"`
|
|
164
|
+
> - **Values**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"`, etc.
|
|
165
|
+
>
|
|
166
|
+
> **country_code** (string, optional)
|
|
167
|
+
> - **Purpose**: Set region code
|
|
168
|
+
> - **Default**: `"US"`
|
|
169
|
+
> - **Values**: `"US"`, `"JP"`, `"GB"`, etc.
|
|
170
|
+
>
|
|
171
|
+
> **need_format** (boolean, optional)
|
|
172
|
+
> - **Purpose**: Whether to return cleaned simplified data
|
|
173
|
+
> - **Default**: `false`
|
|
174
|
+
> - **Values**:
|
|
175
|
+
> - `false` - Return raw complete data
|
|
176
|
+
> - `true` - Return cleaned simplified data (recommended)
|
|
177
|
+
>
|
|
178
|
+
> ### Usage Flow (3 steps for complete data):
|
|
179
|
+
> 1. **Get channel_id**: If you only have URL, call `get_channel_id?channel_url=https://www.youtube.com/@CozyCraftYT`
|
|
180
|
+
> 2. **First request**: Use `channel_id` parameter to get basic info and `continuation_token`
|
|
181
|
+
> 3. **Second request**: Use `continuation_token` to get advanced info (creation date, social links, etc.)
|
|
182
|
+
>
|
|
183
|
+
> ### Response Structure (need_format=true):
|
|
184
|
+
>
|
|
185
|
+
> #### First request response (with channel_id):
|
|
186
|
+
> ```json
|
|
187
|
+
> {
|
|
188
|
+
> "channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
|
|
189
|
+
> "title": "CozyCraft",
|
|
190
|
+
> "handle": "CozyCraftYT",
|
|
191
|
+
> "description": "Channel description...",
|
|
192
|
+
> "subscriber_count": "98.4K subscribers",
|
|
193
|
+
> "video_count": "181 videos",
|
|
194
|
+
> "view_count": null,
|
|
195
|
+
> "country": null,
|
|
196
|
+
> "creation_date": null,
|
|
197
|
+
> "links": [],
|
|
198
|
+
> "avatar": [{"url": "...", "width": 900, "height": 900}],
|
|
199
|
+
> "banner": [{"url": "...", "width": 2560, "height": 424}],
|
|
200
|
+
> "keywords": "Minecraft Ambience...",
|
|
201
|
+
> "channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg",
|
|
202
|
+
> "vanity_url": "http://www.youtube.com/@CozyCraftYT",
|
|
203
|
+
> "rss_url": "https://www.youtube.com/feeds/videos.xml?channel_id=UCeu6U67OzJhV1KwBansH3Dg",
|
|
204
|
+
> "is_family_safe": true,
|
|
205
|
+
> "verified": false,
|
|
206
|
+
> "has_business_email": false,
|
|
207
|
+
> "has_membership": true,
|
|
208
|
+
> "continuation_token": "4qmFsgJg..."
|
|
209
|
+
> }
|
|
210
|
+
> ```
|
|
211
|
+
>
|
|
212
|
+
> #### Second request response (with continuation_token):
|
|
213
|
+
> ```json
|
|
214
|
+
> {
|
|
215
|
+
> "channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
|
|
216
|
+
> "title": null,
|
|
217
|
+
> "handle": "CozyCraftYT",
|
|
218
|
+
> "description": "Full channel description...",
|
|
219
|
+
> "subscriber_count": "98.4K subscribers",
|
|
220
|
+
> "video_count": "181 videos",
|
|
221
|
+
> "view_count": "53,218,926 views",
|
|
222
|
+
> "country": "United States",
|
|
223
|
+
> "creation_date": "Oct 28, 2022",
|
|
224
|
+
> "links": [
|
|
225
|
+
> {"name": "Discord", "url": "https://discord.gg/tvuxxcsgSS"},
|
|
226
|
+
> {"name": "Twitter", "url": "https://twitter.com/..."}
|
|
227
|
+
> ],
|
|
228
|
+
> "avatar": [],
|
|
229
|
+
> "banner": [],
|
|
230
|
+
> "verified": false,
|
|
231
|
+
> "has_business_email": true,
|
|
232
|
+
> "continuation_token": null
|
|
233
|
+
> }
|
|
234
|
+
> ```
|
|
235
|
+
>
|
|
236
|
+
> ### Notes:
|
|
237
|
+
> - **Two requests are required to get complete channel information**
|
|
238
|
+
> - First request: Get basic info (title, avatar, banner, keywords, rss_url, etc.) and continuation_token
|
|
239
|
+
> - Second request: Get advanced info (creation_date, links, view_count, country, etc.)
|
|
240
|
+
> - Recommend setting `need_format=true` for both requests
|
|
241
|
+
> - You can merge results from both requests for complete channel info
|
|
242
|
+
>
|
|
243
|
+
> # [示例/Examples]
|
|
244
|
+
> ## 步骤1 - 获取channel_id(如果只有URL)
|
|
245
|
+
> GET /youtube_web/get_channel_id?channel_url=https://www.youtube.com/@CozyCraftYT
|
|
246
|
+
>
|
|
247
|
+
> ## 步骤2 - 第一次请求获取基本信息和continuation_token
|
|
248
|
+
> GET /youtube_web/get_channel_description?channel_id=UCeu6U67OzJhV1KwBansH3Dg&need_format=true
|
|
249
|
+
>
|
|
250
|
+
> ## 步骤3 - 第二次请求获取高级信息(使用返回的continuation_token)
|
|
251
|
+
> GET /youtube_web/get_channel_description?continuation_token=xxx&need_format=true
|
|
252
|
+
|
|
253
|
+
#### Parameters
|
|
254
|
+
|
|
255
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
256
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
257
|
+
| channel_id | query | string | No | 频道ID(格式如:UCeu6U67OzJhV1KwBansH3Dg),可通过get_channel_id接口从频道URL获取/Channel ID, can be obtained from channel URL via get_channel_id endpoint | None | UCeu6U67OzJhV1KwBansH3Dg | None |
|
|
258
|
+
| continuation_token | query | string | No | 翻页标志(用于获取频道注册时间等高级信息)/Continuation token for getting advanced info like channel creation date | None | None | None |
|
|
259
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | zh-CN | zh-CN | None |
|
|
260
|
+
| country_code | query | string | No | 国家代码(如US, JP等)/Country code | US | US | None |
|
|
261
|
+
| need_format | query | boolean | No | 是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the data | true | None | None |
|
|
262
|
+
|
|
263
|
+
#### Request Body
|
|
264
|
+
|
|
265
|
+
None
|
|
266
|
+
|
|
267
|
+
#### Success Response
|
|
268
|
+
|
|
269
|
+
##### `200 application/json`
|
|
270
|
+
|
|
271
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
272
|
+
|
|
273
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
274
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
275
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
276
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
277
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
278
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
279
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
280
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
281
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
282
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
283
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
284
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
285
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
286
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
287
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
288
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
289
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
290
|
+
|
|
291
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-channel-id"></a>
|
|
292
|
+
### `GET /api/u1/v1/youtube/web_v2/get_channel_id`
|
|
293
|
+
|
|
294
|
+
- Summary: 从频道URL获取频道ID /Get channel ID from URL
|
|
295
|
+
- Capabilities: profiles / accounts
|
|
296
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
297
|
+
- operationId: `get_channel_id_api_v1_youtube_web_v2_get_channel_id_get`
|
|
298
|
+
|
|
299
|
+
#### Notes
|
|
300
|
+
|
|
301
|
+
> # [中文]
|
|
302
|
+
> ### 用途:
|
|
303
|
+
> - 从YouTube频道URL转换获取频道ID(channel_id)。
|
|
304
|
+
> - 支持多种URL格式,包括@用户名格式、/channel/格式、/c/格式、/user/格式。
|
|
305
|
+
> ### 参数:
|
|
306
|
+
> - channel_url: 频道URL。
|
|
307
|
+
> ### 返回:
|
|
308
|
+
> - channel_id: 频道ID(如:UCeu6U67OzJhV1KwBansH3Dg)
|
|
309
|
+
> - channel_url: 标准化的频道URL
|
|
310
|
+
> - source: 数据来源(url_parse表示直接从URL解析,page_parse表示从页面解析)
|
|
311
|
+
>
|
|
312
|
+
> # [English]
|
|
313
|
+
> ### Purpose:
|
|
314
|
+
> - Convert YouTube channel URL to channel ID.
|
|
315
|
+
> - Supports multiple URL formats including @username, /channel/, /c/, /user/ formats.
|
|
316
|
+
> ### Parameters:
|
|
317
|
+
> - channel_url: Channel URL.
|
|
318
|
+
> ### Returns:
|
|
319
|
+
> - channel_id: Channel ID (e.g., UCeu6U67OzJhV1KwBansH3Dg)
|
|
320
|
+
> - channel_url: Normalized channel URL
|
|
321
|
+
> - source: Data source (url_parse means parsed from URL directly, page_parse means parsed from page)
|
|
322
|
+
>
|
|
323
|
+
> # [示例/Example]
|
|
324
|
+
> channel_url = "https://www.youtube.com/@CozyCraftYT"
|
|
325
|
+
|
|
326
|
+
#### Parameters
|
|
327
|
+
|
|
328
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
329
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
330
|
+
| channel_url | query | string | Yes | 频道URL/Channel URL,支持多种格式如:https://www.youtube.com/@username, https://www.youtube.com/channel/UCxxxxxx, https://www.youtube.com/c/channelname | None | https://www.youtube.com/@CozyCraftYT | None |
|
|
331
|
+
|
|
332
|
+
#### Request Body
|
|
333
|
+
|
|
334
|
+
None
|
|
335
|
+
|
|
336
|
+
#### Success Response
|
|
337
|
+
|
|
338
|
+
##### `200 application/json`
|
|
339
|
+
|
|
340
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
341
|
+
|
|
342
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
343
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
344
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
345
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
346
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
347
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
348
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
349
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
350
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
351
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
352
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
353
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
354
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
355
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
356
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
357
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
358
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
359
|
+
|
|
360
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-channel-shorts"></a>
|
|
361
|
+
### `GET /api/u1/v1/youtube/web_v2/get_channel_shorts`
|
|
362
|
+
|
|
363
|
+
- Summary: 获取频道短视频列表/Get channel shorts
|
|
364
|
+
- Capabilities: profiles / accounts
|
|
365
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
366
|
+
- operationId: `get_channel_shorts_api_v1_youtube_web_v2_get_channel_shorts_get`
|
|
367
|
+
|
|
368
|
+
#### Notes
|
|
369
|
+
|
|
370
|
+
> # [中文]
|
|
371
|
+
> ### 用途:
|
|
372
|
+
> - 获取YouTube频道的短视频(Shorts)列表
|
|
373
|
+
> - 支持分页获取更多短视频
|
|
374
|
+
>
|
|
375
|
+
> ### 参数:
|
|
376
|
+
> - channel_id: 频道ID(推荐,如 UCuAXFkgsw1L7xaCfnd5JJOw)
|
|
377
|
+
> - channel_url: 频道URL(可选,如果提供channel_id则忽略)
|
|
378
|
+
> - continuation_token: 分页token(可选,用于获取下一页)
|
|
379
|
+
> - need_format: 是否格式化数据(默认 true)
|
|
380
|
+
> - true: 返回格式化的结构化数据(推荐)
|
|
381
|
+
> - false: 返回原始的 YouTube API 结构(用于调试)
|
|
382
|
+
>
|
|
383
|
+
> ### 返回数据包含:
|
|
384
|
+
> #### 当 need_format=true 时:
|
|
385
|
+
> - channel_id: 频道ID
|
|
386
|
+
> - shorts: 短视频列表
|
|
387
|
+
> - video_id: 短视频的ID
|
|
388
|
+
> - title: 标题
|
|
389
|
+
> - view_count_text: 观看次数文本(如 "1.2M views")
|
|
390
|
+
> - thumbnails: 缩略图列表
|
|
391
|
+
> - accessibility_text: 无障碍文本描述
|
|
392
|
+
> - video_url: 短视频链接
|
|
393
|
+
> - continuation_token: 下一页的分页token
|
|
394
|
+
> - has_more: 是否还有更多短视频
|
|
395
|
+
> - total_count: 当前页短视频数量
|
|
396
|
+
>
|
|
397
|
+
> #### 当 need_format=false 时:
|
|
398
|
+
> - channel_id: 频道ID
|
|
399
|
+
> - shorts: 原始的 reelItemRenderer 对象列表
|
|
400
|
+
> - continuation_token: 下一页的分页token
|
|
401
|
+
> - has_more: 是否还有更多短视频
|
|
402
|
+
> - total_count: 当前页短视频数量
|
|
403
|
+
>
|
|
404
|
+
> ### 使用流程:
|
|
405
|
+
> 1. 首次请求:只传 channel_id 参数
|
|
406
|
+
> 2. 获取响应中的 continuation_token
|
|
407
|
+
> 3. 下次请求:传入 channel_id 和 continuation_token
|
|
408
|
+
> 4. 重复步骤 2-3 直到 has_more 为 false
|
|
409
|
+
>
|
|
410
|
+
> ### 注意事项:
|
|
411
|
+
> - 每页通常返回 30 个左右的短视频
|
|
412
|
+
> - ⚠️ 目前暂不支持 @username 格式,请使用频道ID(UCxxxx 格式)
|
|
413
|
+
>
|
|
414
|
+
> ### 价格:
|
|
415
|
+
> - $0.001 USD / 请求
|
|
416
|
+
>
|
|
417
|
+
> # [English]
|
|
418
|
+
> ### Purpose:
|
|
419
|
+
> - Get YouTube channel's Shorts (short videos) list
|
|
420
|
+
> - Supports pagination to get more shorts
|
|
421
|
+
>
|
|
422
|
+
> ### Parameters:
|
|
423
|
+
> - channel_id: Channel ID (recommended, e.g., UCuAXFkgsw1L7xaCfnd5JJOw)
|
|
424
|
+
> - channel_url: Channel URL (optional, ignored if channel_id is provided)
|
|
425
|
+
> - continuation_token: Pagination token (optional, for next page)
|
|
426
|
+
> - need_format: Whether to format data (default true)
|
|
427
|
+
> - true: Return formatted structured data (recommended)
|
|
428
|
+
> - false: Return raw YouTube API structure (for debugging)
|
|
429
|
+
>
|
|
430
|
+
> ### Returns:
|
|
431
|
+
> #### When need_format=true:
|
|
432
|
+
> - channel_id: Channel ID
|
|
433
|
+
> - shorts: Shorts list
|
|
434
|
+
> - video_id: Short video ID
|
|
435
|
+
> - title: Title
|
|
436
|
+
> - view_count_text: View count text (e.g., "1.2M views")
|
|
437
|
+
> - thumbnails: Thumbnail list
|
|
438
|
+
> - accessibility_text: Accessibility description text
|
|
439
|
+
> - video_url: Short video URL
|
|
440
|
+
> - continuation_token: Next page pagination token
|
|
441
|
+
> - has_more: Whether there are more shorts
|
|
442
|
+
> - total_count: Current page shorts count
|
|
443
|
+
>
|
|
444
|
+
> #### When need_format=false:
|
|
445
|
+
> - channel_id: Channel ID
|
|
446
|
+
> - shorts: Raw reelItemRenderer object list
|
|
447
|
+
> - continuation_token: Next page pagination token
|
|
448
|
+
> - has_more: Whether there are more shorts
|
|
449
|
+
> - total_count: Current page shorts count
|
|
450
|
+
>
|
|
451
|
+
> ### Usage Flow:
|
|
452
|
+
> 1. First request: Only pass channel_id parameter
|
|
453
|
+
> 2. Get continuation_token from response
|
|
454
|
+
> 3. Next request: Pass channel_id and continuation_token
|
|
455
|
+
> 4. Repeat steps 2-3 until has_more is false
|
|
456
|
+
>
|
|
457
|
+
> ### Notes:
|
|
458
|
+
> - Each page typically returns around 30 shorts
|
|
459
|
+
> - ⚠️ Currently does not support @username format, please use channel ID (UCxxxx format)
|
|
460
|
+
>
|
|
461
|
+
> ### Price:
|
|
462
|
+
> - $0.001 USD / request
|
|
463
|
+
>
|
|
464
|
+
> ### [示例/Example]
|
|
465
|
+
> #### 获取短视频列表: channel_id = "UCuAXFkgsw1L7xaCfnd5JJOw"
|
|
466
|
+
|
|
467
|
+
#### Parameters
|
|
468
|
+
|
|
469
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
470
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
471
|
+
| channel_id | query | string | No | 频道ID/Channel ID (e.g., UCuAXFkgsw1L7xaCfnd5JJOw) | None | UCuAXFkgsw1L7xaCfnd5JJOw | None |
|
|
472
|
+
| channel_url | query | string | No | 频道URL/Channel URL (如果提供channel_id则忽略/Ignored if channel_id is provided) | None | https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw | None |
|
|
473
|
+
| continuation_token | query | string | No | 分页token/Pagination token | None | None | None |
|
|
474
|
+
| need_format | query | boolean | No | 是否格式化数据/Whether to format data | true | None | None |
|
|
475
|
+
|
|
476
|
+
#### Request Body
|
|
477
|
+
|
|
478
|
+
None
|
|
479
|
+
|
|
480
|
+
#### Success Response
|
|
481
|
+
|
|
482
|
+
##### `200 application/json`
|
|
483
|
+
|
|
484
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
485
|
+
|
|
486
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
487
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
488
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
489
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
490
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
491
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
492
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
493
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
494
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
495
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
496
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
497
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
498
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
499
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
500
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
501
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
502
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
503
|
+
|
|
504
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-channel-url"></a>
|
|
505
|
+
### `GET /api/u1/v1/youtube/web_v2/get_channel_url`
|
|
506
|
+
|
|
507
|
+
- Summary: 从频道ID获取频道URL/Get channel URL from channel ID
|
|
508
|
+
- Capabilities: profiles / accounts
|
|
509
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
510
|
+
- operationId: `get_channel_url_api_v1_youtube_web_v2_get_channel_url_get`
|
|
511
|
+
|
|
512
|
+
#### Notes
|
|
513
|
+
|
|
514
|
+
> # [中文]
|
|
515
|
+
> ### 用途:
|
|
516
|
+
> - 从YouTube频道ID转换获取频道Handle (@用户名)
|
|
517
|
+
> - 与 get_channel_id 接口互为反向操作
|
|
518
|
+
>
|
|
519
|
+
> ### 参数:
|
|
520
|
+
> - channel_id: 频道ID(如:UCeu6U67OzJhV1KwBansH3Dg)
|
|
521
|
+
>
|
|
522
|
+
> ### 返回:
|
|
523
|
+
> - channel_id: 频道ID
|
|
524
|
+
> - handle: 频道Handle(如:CozyCraftYT)
|
|
525
|
+
> - title: 频道名称
|
|
526
|
+
> - channel_url: 标准频道URL(/channel/格式)
|
|
527
|
+
> - vanity_url: 个性化URL(/@用户名格式)
|
|
528
|
+
>
|
|
529
|
+
> ### 使用场景:
|
|
530
|
+
> - 当你有频道ID但需要获取@用户名格式的URL时
|
|
531
|
+
> - 需要展示用户友好的频道链接时
|
|
532
|
+
>
|
|
533
|
+
> # [English]
|
|
534
|
+
> ### Purpose:
|
|
535
|
+
> - Convert YouTube channel ID to channel handle (@username)
|
|
536
|
+
> - Reverse operation of get_channel_id endpoint
|
|
537
|
+
>
|
|
538
|
+
> ### Parameters:
|
|
539
|
+
> - channel_id: Channel ID (e.g., UCeu6U67OzJhV1KwBansH3Dg)
|
|
540
|
+
>
|
|
541
|
+
> ### Returns:
|
|
542
|
+
> - channel_id: Channel ID
|
|
543
|
+
> - handle: Channel handle (e.g., CozyCraftYT)
|
|
544
|
+
> - title: Channel name
|
|
545
|
+
> - channel_url: Standard channel URL (/channel/ format)
|
|
546
|
+
> - vanity_url: Vanity URL (/@username format)
|
|
547
|
+
>
|
|
548
|
+
> ### Use Cases:
|
|
549
|
+
> - When you have channel ID but need @username format URL
|
|
550
|
+
> - When you need to display user-friendly channel links
|
|
551
|
+
>
|
|
552
|
+
> # [示例/Example]
|
|
553
|
+
> channel_id = "UCeu6U67OzJhV1KwBansH3Dg"
|
|
554
|
+
|
|
555
|
+
#### Parameters
|
|
556
|
+
|
|
557
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
558
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
559
|
+
| channel_id | query | string | Yes | 频道ID/Channel ID (格式如:UCeu6U67OzJhV1KwBansH3Dg) | None | UCeu6U67OzJhV1KwBansH3Dg | None |
|
|
560
|
+
|
|
561
|
+
#### Request Body
|
|
562
|
+
|
|
563
|
+
None
|
|
564
|
+
|
|
565
|
+
#### Success Response
|
|
566
|
+
|
|
567
|
+
##### `200 application/json`
|
|
568
|
+
|
|
569
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
570
|
+
|
|
571
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
572
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
573
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
574
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
575
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
576
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
577
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
578
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
579
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
580
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
581
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
582
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
583
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
584
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
585
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
586
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
587
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
588
|
+
|
|
589
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-channel-videos"></a>
|
|
590
|
+
### `GET /api/u1/v1/youtube/web_v2/get_channel_videos`
|
|
591
|
+
|
|
592
|
+
- Summary: 获取频道视频 /Get channel videos
|
|
593
|
+
- Capabilities: profiles / accounts / content details
|
|
594
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
595
|
+
- operationId: `get_channel_videos_api_v1_youtube_web_v2_get_channel_videos_get`
|
|
596
|
+
|
|
597
|
+
#### Notes
|
|
598
|
+
|
|
599
|
+
> # [中文]
|
|
600
|
+
> ### 用途:
|
|
601
|
+
> - 获取YouTube频道的视频列表
|
|
602
|
+
> - 支持分页获取,可通过 continuation_token 获取更多视频
|
|
603
|
+
>
|
|
604
|
+
> ### 参数详解:
|
|
605
|
+
>
|
|
606
|
+
> #### 📌 必选参数:
|
|
607
|
+
> **channel_id** (string)
|
|
608
|
+
> - **作用**: 频道ID
|
|
609
|
+
> - **获取方式**:
|
|
610
|
+
> - 从频道URL中提取,例如 `https://www.youtube.com/channel/UCJHBJ7F-nAIlMGolm0Hu4vg`
|
|
611
|
+
> - 或从 `@用户名` 格式的URL中,先访问频道页面获取真实的频道ID
|
|
612
|
+
> - **示例**: `"UCJHBJ7F-nAIlMGolm0Hu4vg"`
|
|
613
|
+
>
|
|
614
|
+
> #### ⚙️ 可选参数:
|
|
615
|
+
> **language_code** (string, 可选)
|
|
616
|
+
> - **作用**: 设置语言偏好
|
|
617
|
+
> - **默认值**: `"zh-CN"`
|
|
618
|
+
> - **可用值**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"` 等
|
|
619
|
+
>
|
|
620
|
+
> **country_code** (string, 可选)
|
|
621
|
+
> - **作用**: 设置地区代码
|
|
622
|
+
> - **默认值**: `"US"`
|
|
623
|
+
> - **可用值**: `"US"`, `"JP"`, `"GB"` 等
|
|
624
|
+
>
|
|
625
|
+
> **continuation_token** (string, 可选)
|
|
626
|
+
> - **作用**: 分页token,用于获取下一页视频
|
|
627
|
+
> - **获取方式**: 从上一次请求的响应中提取
|
|
628
|
+
> - **首次请求**: 不传此参数或传 `null`
|
|
629
|
+
>
|
|
630
|
+
> **need_format** (boolean, 可选)
|
|
631
|
+
> - **作用**: 是否返回清洗后的精简数据
|
|
632
|
+
> - **默认值**: `false`
|
|
633
|
+
> - **可用值**:
|
|
634
|
+
> - `false` - 返回原始完整数据
|
|
635
|
+
> - `true` - 返回清洗后的精简数据(推荐)
|
|
636
|
+
>
|
|
637
|
+
> ### 返回数据结构 (need_format=true):
|
|
638
|
+
> ```json
|
|
639
|
+
> {
|
|
640
|
+
> "videos": [
|
|
641
|
+
> {
|
|
642
|
+
> "video_id": "zd3yCa1bJCM",
|
|
643
|
+
> "title": "Minecraft: DREAM! - Asleep Custom Map",
|
|
644
|
+
> "thumbnail": "https://i.ytimg.com/vi/zd3yCa1bJCM/hqdefault.jpg",
|
|
645
|
+
> "thumbnails": [
|
|
646
|
+
> {"url": "...", "width": 168, "height": 94},
|
|
647
|
+
> {"url": "...", "width": 336, "height": 188}
|
|
648
|
+
> ],
|
|
649
|
+
> "moving_thumbnail": "https://i.ytimg.com/an_webp/zd3yCa1bJCM/mqdefault_6s.webp?...",
|
|
650
|
+
> "duration": "16:57",
|
|
651
|
+
> "duration_accessibility": "16分钟57秒钟",
|
|
652
|
+
> "view_count": "343,369次观看",
|
|
653
|
+
> "short_view_count": "34万次观看",
|
|
654
|
+
> "published_time": "18小时前",
|
|
655
|
+
> "description": "Today, we're trapped in a super weird dream...",
|
|
656
|
+
> "is_live": false,
|
|
657
|
+
> "is_verified": true,
|
|
658
|
+
> "url": "https://www.youtube.com/watch?v=zd3yCa1bJCM",
|
|
659
|
+
> "playback_url": "https://rr5---sn-ogueln67.googlevideo.com/initplayback?..."
|
|
660
|
+
> }
|
|
661
|
+
> ],
|
|
662
|
+
> "continuation_token": "下一页token"
|
|
663
|
+
> }
|
|
664
|
+
> ```
|
|
665
|
+
>
|
|
666
|
+
> ### 清洗后的字段说明:
|
|
667
|
+
> - `video_id`: 视频ID
|
|
668
|
+
> - `title`: 视频标题
|
|
669
|
+
> - `thumbnail`: 最高清晰度缩略图URL
|
|
670
|
+
> - `thumbnails`: 所有分辨率的缩略图列表
|
|
671
|
+
> - `moving_thumbnail`: 动态缩略图URL(webp格式,鼠标悬停预览)
|
|
672
|
+
> - `duration`: 视频时长(如"16:57")
|
|
673
|
+
> - `duration_accessibility`: 时长无障碍文本(如"16分钟57秒钟")
|
|
674
|
+
> - `view_count`: 完整观看次数(如"343,369次观看")
|
|
675
|
+
> - `short_view_count`: 简短观看次数(如"34万次观看")
|
|
676
|
+
> - `published_time`: 发布时间(如"18小时前")
|
|
677
|
+
> - `description`: 视频描述片段
|
|
678
|
+
> - `is_live`: 是否为直播
|
|
679
|
+
> - `is_verified`: 频道是否已认证
|
|
680
|
+
> - `url`: 视频播放页URL
|
|
681
|
+
> - `playback_url`: 视频播放初始化URL(googlevideo.com,可能为空)
|
|
682
|
+
> - `continuation_token`: 下一页的分页token
|
|
683
|
+
>
|
|
684
|
+
> # [English]
|
|
685
|
+
> ### Purpose:
|
|
686
|
+
> - Get YouTube channel video list
|
|
687
|
+
> - Supports pagination via continuation_token
|
|
688
|
+
>
|
|
689
|
+
> ### Parameters:
|
|
690
|
+
>
|
|
691
|
+
> #### 📌 Required:
|
|
692
|
+
> **channel_id** (string)
|
|
693
|
+
> - **Purpose**: Channel ID
|
|
694
|
+
> - **How to get**:
|
|
695
|
+
> - Extract from channel URL, e.g., `https://www.youtube.com/channel/UCJHBJ7F-nAIlMGolm0Hu4vg`
|
|
696
|
+
> - Or visit the channel page to get the real channel ID from `@username` format URLs
|
|
697
|
+
> - **Example**: `"UCJHBJ7F-nAIlMGolm0Hu4vg"`
|
|
698
|
+
>
|
|
699
|
+
> #### ⚙️ Optional:
|
|
700
|
+
> **language_code** (string, optional)
|
|
701
|
+
> - **Purpose**: Set language preference
|
|
702
|
+
> - **Default**: `"zh-CN"`
|
|
703
|
+
> - **Values**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"`, etc.
|
|
704
|
+
>
|
|
705
|
+
> **country_code** (string, optional)
|
|
706
|
+
> - **Purpose**: Set region code
|
|
707
|
+
> - **Default**: `"US"`
|
|
708
|
+
> - **Values**: `"US"`, `"JP"`, `"GB"`, etc.
|
|
709
|
+
>
|
|
710
|
+
> **continuation_token** (string, optional)
|
|
711
|
+
> - **Purpose**: Pagination token for next page
|
|
712
|
+
> - **How to get**: Extract from previous response
|
|
713
|
+
> - **First request**: Omit or set to `null`
|
|
714
|
+
>
|
|
715
|
+
> **need_format** (boolean, optional)
|
|
716
|
+
> - **Purpose**: Whether to return cleaned simplified data
|
|
717
|
+
> - **Default**: `false`
|
|
718
|
+
> - **Values**:
|
|
719
|
+
> - `false` - Return raw complete data
|
|
720
|
+
> - `true` - Return cleaned simplified data (recommended)
|
|
721
|
+
>
|
|
722
|
+
> ### Response Structure (need_format=true):
|
|
723
|
+
> ```json
|
|
724
|
+
> {
|
|
725
|
+
> "videos": [
|
|
726
|
+
> {
|
|
727
|
+
> "video_id": "zd3yCa1bJCM",
|
|
728
|
+
> "title": "Minecraft: DREAM! - Asleep Custom Map",
|
|
729
|
+
> "thumbnail": "https://i.ytimg.com/vi/zd3yCa1bJCM/hqdefault.jpg",
|
|
730
|
+
> "thumbnails": [
|
|
731
|
+
> {"url": "...", "width": 168, "height": 94},
|
|
732
|
+
> {"url": "...", "width": 336, "height": 188}
|
|
733
|
+
> ],
|
|
734
|
+
> "moving_thumbnail": "https://i.ytimg.com/an_webp/zd3yCa1bJCM/mqdefault_6s.webp?...",
|
|
735
|
+
> "duration": "16:57",
|
|
736
|
+
> "duration_accessibility": "16 minutes, 57 seconds",
|
|
737
|
+
> "view_count": "343,369 views",
|
|
738
|
+
> "short_view_count": "343K views",
|
|
739
|
+
> "published_time": "18 hours ago",
|
|
740
|
+
> "description": "Today, we're trapped in a super weird dream...",
|
|
741
|
+
> "is_live": false,
|
|
742
|
+
> "is_verified": true,
|
|
743
|
+
> "url": "https://www.youtube.com/watch?v=zd3yCa1bJCM",
|
|
744
|
+
> "playback_url": "https://rr5---sn-ogueln67.googlevideo.com/initplayback?..."
|
|
745
|
+
> }
|
|
746
|
+
> ],
|
|
747
|
+
> "continuation_token": "next page token"
|
|
748
|
+
> }
|
|
749
|
+
> ```
|
|
750
|
+
>
|
|
751
|
+
> ### Cleaned Data Field Descriptions:
|
|
752
|
+
> - `video_id`: Video ID
|
|
753
|
+
> - `title`: Video title
|
|
754
|
+
> - `thumbnail`: Highest resolution thumbnail URL
|
|
755
|
+
> - `thumbnails`: List of all resolution thumbnails
|
|
756
|
+
> - `moving_thumbnail`: Moving thumbnail URL (webp format, hover preview)
|
|
757
|
+
> - `duration`: Video duration (e.g., "16:57")
|
|
758
|
+
> - `duration_accessibility`: Duration accessibility text (e.g., "16 minutes, 57 seconds")
|
|
759
|
+
> - `view_count`: Full view count (e.g., "343,369 views")
|
|
760
|
+
> - `short_view_count`: Short view count (e.g., "343K views")
|
|
761
|
+
> - `published_time`: Published time (e.g., "18 hours ago")
|
|
762
|
+
> - `description`: Video description snippet
|
|
763
|
+
> - `is_live`: Whether it's a live stream
|
|
764
|
+
> - `is_verified`: Whether the channel is verified
|
|
765
|
+
> - `url`: Video playback page URL
|
|
766
|
+
> - `playback_url`: Video playback initialization URL (googlevideo.com, may be empty)
|
|
767
|
+
> - `continuation_token`: Pagination token for next page
|
|
768
|
+
>
|
|
769
|
+
> # [示例/Examples]
|
|
770
|
+
> ## 获取频道首页视频 / Get first page of channel videos
|
|
771
|
+
> GET /youtube_web/get_channel_videos?channel_id=UCJHBJ7F-nAIlMGolm0Hu4vg
|
|
772
|
+
>
|
|
773
|
+
> ## 获取清洗后的数据(推荐)/ Get cleaned data (recommended)
|
|
774
|
+
> GET /youtube_web/get_channel_videos?channel_id=UCJHBJ7F-nAIlMGolm0Hu4vg&need_format=true
|
|
775
|
+
>
|
|
776
|
+
> ## 获取下一页 / Get next page
|
|
777
|
+
> GET /youtube_web/get_channel_videos?channel_id=UCJHBJ7F-nAIlMGolm0Hu4vg&continuation_token=xxxxx&need_format=true
|
|
778
|
+
|
|
779
|
+
#### Parameters
|
|
780
|
+
|
|
781
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
782
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
783
|
+
| channel_id | query | string | Yes | 频道ID/Channel ID | None | UCJHBJ7F-nAIlMGolm0Hu4vg | None |
|
|
784
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | zh-CN | zh-CN | None |
|
|
785
|
+
| country_code | query | string | No | 国家代码(如US, JP等)/Country code | US | US | None |
|
|
786
|
+
| continuation_token | query | string | No | 分页token,用于获取下一页/Pagination token for next page | None | None | None |
|
|
787
|
+
| need_format | query | boolean | No | 是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the data | true | None | None |
|
|
788
|
+
|
|
789
|
+
#### Request Body
|
|
790
|
+
|
|
791
|
+
None
|
|
792
|
+
|
|
793
|
+
#### Success Response
|
|
794
|
+
|
|
795
|
+
##### `200 application/json`
|
|
796
|
+
|
|
797
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
798
|
+
|
|
799
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
800
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
801
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
802
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
803
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
804
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
805
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
806
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
807
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
808
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
809
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
810
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
811
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
812
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
813
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
814
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
815
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
816
|
+
|
|
817
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-general-search"></a>
|
|
818
|
+
### `GET /api/u1/v1/youtube/web_v2/get_general_search`
|
|
819
|
+
|
|
820
|
+
- Summary: 综合搜索(支持过滤条件)/General search with filters
|
|
821
|
+
- Capabilities: search
|
|
822
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
823
|
+
- operationId: `get_general_search_api_v1_youtube_web_v2_get_general_search_get`
|
|
824
|
+
|
|
825
|
+
#### Notes
|
|
826
|
+
|
|
827
|
+
> # [中文]
|
|
828
|
+
> ### 用途:
|
|
829
|
+
> - YouTube综合搜索,支持多种过滤条件,可以精确筛选搜索结果
|
|
830
|
+
>
|
|
831
|
+
> ### 参数详解:
|
|
832
|
+
> - **search_query**: 搜索关键字
|
|
833
|
+
> - **language_code**: 语言代码,推荐使用zh-CN(中文)或en-US(英文)
|
|
834
|
+
> - **country_code**: 国家代码,影响搜索结果的地区相关性
|
|
835
|
+
> - **time_zone**: 时区设置
|
|
836
|
+
>
|
|
837
|
+
> ### 过滤条件 (选择一个值即可):
|
|
838
|
+
> #### 上传时间 (upload_time):
|
|
839
|
+
> - `hour`: 过去1小时内上传
|
|
840
|
+
> - `today`: 今天上传
|
|
841
|
+
> - `week`: 本周上传
|
|
842
|
+
> - `month`: 本月上传
|
|
843
|
+
> - `year`: 今年上传
|
|
844
|
+
>
|
|
845
|
+
> #### 视频时长 (duration):
|
|
846
|
+
> - `short`: 短视频(少于4分钟)
|
|
847
|
+
> - `medium`: 中等时长(4-20分钟)
|
|
848
|
+
> - `long`: 长视频(超过20分钟)
|
|
849
|
+
>
|
|
850
|
+
> #### 内容类型 (content_type):
|
|
851
|
+
> - `video`: 视频
|
|
852
|
+
> - `channel`: 频道
|
|
853
|
+
> - `playlist`: 播放列表
|
|
854
|
+
> - `movie`: 电影
|
|
855
|
+
>
|
|
856
|
+
> #### 特征 (feature):
|
|
857
|
+
> - `hd`: 高清视频
|
|
858
|
+
> - `4k`: 4K视频
|
|
859
|
+
> - `subtitles`: 包含字幕
|
|
860
|
+
> - `live`: 直播
|
|
861
|
+
> - `creative_commons`: 知识共享许可
|
|
862
|
+
> - `360`: 360度视频
|
|
863
|
+
> - `vr180`: VR180视频
|
|
864
|
+
> - `3d`: 3D视频
|
|
865
|
+
> - `hdr`: HDR视频
|
|
866
|
+
> - `location`: 包含位置信息
|
|
867
|
+
> - `purchased`: 已购买内容
|
|
868
|
+
>
|
|
869
|
+
> #### 排序方式 (sort_by):
|
|
870
|
+
> - `relevance`: 相关性(默认)
|
|
871
|
+
> - `upload_date`: 上传日期
|
|
872
|
+
> - `view_count`: 观看次数
|
|
873
|
+
> - `rating`: 评分
|
|
874
|
+
>
|
|
875
|
+
> ### 返回:
|
|
876
|
+
> - 包含过滤条件的搜索结果
|
|
877
|
+
>
|
|
878
|
+
> # [English]
|
|
879
|
+
> ### Purpose:
|
|
880
|
+
> - YouTube comprehensive search with multiple filter options for precise result filtering
|
|
881
|
+
>
|
|
882
|
+
> ### Parameters:
|
|
883
|
+
> - **search_query**: Search keyword
|
|
884
|
+
> - **language_code**: Language code (zh-CN for Chinese, en-US for English)
|
|
885
|
+
> - **country_code**: Country code affecting regional relevance
|
|
886
|
+
> - **time_zone**: Time zone setting
|
|
887
|
+
>
|
|
888
|
+
> ### Filter Options (select one value for each):
|
|
889
|
+
> #### Upload Time (upload_time):
|
|
890
|
+
> - `hour`: Uploaded in the past hour
|
|
891
|
+
> - `today`: Uploaded today
|
|
892
|
+
> - `week`: Uploaded this week
|
|
893
|
+
> - `month`: Uploaded this month
|
|
894
|
+
> - `year`: Uploaded this year
|
|
895
|
+
>
|
|
896
|
+
> #### Duration (duration):
|
|
897
|
+
> - `short`: Short videos (under 4 minutes)
|
|
898
|
+
> - `medium`: Medium length (4-20 minutes)
|
|
899
|
+
> - `long`: Long videos (over 20 minutes)
|
|
900
|
+
>
|
|
901
|
+
> #### Content Type (content_type):
|
|
902
|
+
> - `video`: Videos
|
|
903
|
+
> - `channel`: Channels
|
|
904
|
+
> - `playlist`: Playlists
|
|
905
|
+
> - `movie`: Movies
|
|
906
|
+
>
|
|
907
|
+
> #### Features (feature):
|
|
908
|
+
> - `hd`: High definition
|
|
909
|
+
> - `4k`: 4K videos
|
|
910
|
+
> - `subtitles`: With subtitles
|
|
911
|
+
> - `live`: Live streams
|
|
912
|
+
> - `creative_commons`: Creative Commons licensed
|
|
913
|
+
> - `360`: 360-degree videos
|
|
914
|
+
> - `vr180`: VR180 videos
|
|
915
|
+
> - `3d`: 3D videos
|
|
916
|
+
> - `hdr`: HDR videos
|
|
917
|
+
> - `location`: With location info
|
|
918
|
+
> - `purchased`: Purchased content
|
|
919
|
+
>
|
|
920
|
+
> #### Sort By (sort_by):
|
|
921
|
+
> - `relevance`: Relevance (default)
|
|
922
|
+
> - `upload_date`: Upload date
|
|
923
|
+
> - `view_count`: View count
|
|
924
|
+
> - `rating`: Rating
|
|
925
|
+
>
|
|
926
|
+
> ### Returns:
|
|
927
|
+
> - Filtered search results
|
|
928
|
+
>
|
|
929
|
+
> # [示例/Examples]
|
|
930
|
+
> ## 基础搜索
|
|
931
|
+
> GET /youtube_web/get_general_search?search_query=Python编程
|
|
932
|
+
>
|
|
933
|
+
> ## 搜索本周上传的Python编程短视频
|
|
934
|
+
> GET /youtube_web/get_general_search?search_query=Python编程&upload_time=week&duration=short
|
|
935
|
+
>
|
|
936
|
+
> ## 搜索高清的Python教程视频,按观看次数排序
|
|
937
|
+
> GET /youtube_web/get_general_search?search_query=Python tutorial&feature=hd&sort_by=view_count
|
|
938
|
+
>
|
|
939
|
+
> ## 搜索今天上传的4K编程直播
|
|
940
|
+
> GET /youtube_web/get_general_search?search_query=programming&upload_time=today&feature=4k&content_type=video
|
|
941
|
+
|
|
942
|
+
#### Parameters
|
|
943
|
+
|
|
944
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
945
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
946
|
+
| search_query | query | string | Yes | 搜索关键字/Search keyword | None | Python编程 | None |
|
|
947
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | zh-CN | None | None |
|
|
948
|
+
| country_code | query | string | No | 国家代码(如US, CN等)/Country code | US | None | None |
|
|
949
|
+
| time_zone | query | string | No | 时区(如America/Los_Angeles, Asia/Shanghai等)/Time zone | America/Los_Angeles | None | None |
|
|
950
|
+
| upload_time | query | string enum[hour, today, week, month, year] | No | 上传时间过滤 \| Upload time filter | None | None | None |
|
|
951
|
+
| duration | query | string enum[short, medium, long] | No | 视频时长过滤 \| Duration filter | None | None | None |
|
|
952
|
+
| content_type | query | string enum[video, channel, playlist, movie] | No | 内容类型过滤 \| Content type filter | None | None | None |
|
|
953
|
+
| feature | query | string enum[live, 4k, hd, subtitles, creative_commons, 360, ...] | No | 特征过滤 \| Feature filter | None | None | None |
|
|
954
|
+
| sort_by | query | string enum[relevance, upload_date, view_count, rating] | No | 排序方式 \| Sort by | None | None | None |
|
|
955
|
+
| continuation_token | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
956
|
+
|
|
957
|
+
#### Request Body
|
|
958
|
+
|
|
959
|
+
None
|
|
960
|
+
|
|
961
|
+
#### Success Response
|
|
962
|
+
|
|
963
|
+
##### `200 application/json`
|
|
964
|
+
|
|
965
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
966
|
+
|
|
967
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
968
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
969
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
970
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
971
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
972
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
973
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
974
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
975
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
976
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
977
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
978
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
979
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
980
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
981
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
982
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
983
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
984
|
+
|
|
985
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-related-videos"></a>
|
|
986
|
+
### `GET /api/u1/v1/youtube/web_v2/get_related_videos`
|
|
987
|
+
|
|
988
|
+
- Summary: 获取视频相似内容/Get related videos
|
|
989
|
+
- Capabilities: content details
|
|
990
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
991
|
+
- operationId: `get_related_videos_api_v1_youtube_web_v2_get_related_videos_get`
|
|
992
|
+
|
|
993
|
+
#### Notes
|
|
994
|
+
|
|
995
|
+
> # [中文]
|
|
996
|
+
> ### 用途:
|
|
997
|
+
> - 获取YouTube视频的相似内容推荐(推荐视频列表)
|
|
998
|
+
> - 类似于视频播放页面右侧的相关视频
|
|
999
|
+
> - 一次性返回所有推荐视频(通常20-30个)
|
|
1000
|
+
>
|
|
1001
|
+
> ### 参数:
|
|
1002
|
+
> - video_id: 视频ID(推荐)
|
|
1003
|
+
> - video_url: 完整的视频URL(可选,如果提供video_id则忽略)
|
|
1004
|
+
> - need_format: 是否格式化数据(默认 true)
|
|
1005
|
+
> - true: 返回格式化的结构化数据(推荐)
|
|
1006
|
+
> - false: 返回原始的 YouTube API 结构(用于调试或自定义解析)
|
|
1007
|
+
>
|
|
1008
|
+
> ### 返回数据包含:
|
|
1009
|
+
> #### 当 need_format=true 时:
|
|
1010
|
+
> - video_id: 当前视频ID
|
|
1011
|
+
> - related_videos: 相关视频列表(格式化后的数据)
|
|
1012
|
+
> - video_id: 相关视频的ID
|
|
1013
|
+
> - title: 视频标题
|
|
1014
|
+
> - author: 作者名称
|
|
1015
|
+
> - author_id: 作者频道ID
|
|
1016
|
+
> - author_url: 作者频道链接
|
|
1017
|
+
> - length_text: 视频时长文本(如 "3:45")
|
|
1018
|
+
> - length_seconds: 视频时长(秒数)
|
|
1019
|
+
> - view_count_text: 观看次数文本(如 "1.2M views")
|
|
1020
|
+
> - short_view_count_text: 简短观看次数文本(如 "1.2M")
|
|
1021
|
+
> - published_time_text: 发布时间文本(如 "2 days ago")
|
|
1022
|
+
> - thumbnails: 所有分辨率的缩略图列表
|
|
1023
|
+
> - rich_thumbnail: 动态缩略图(如果有)
|
|
1024
|
+
> - badges: 视频徽章(如 NEW、LIVE 等)
|
|
1025
|
+
> - owner_badges: 作者徽章(如验证标识)
|
|
1026
|
+
> - video_url: 视频链接
|
|
1027
|
+
> - navigation_endpoint: 导航端点
|
|
1028
|
+
> - total_count: 推荐视频总数
|
|
1029
|
+
>
|
|
1030
|
+
> #### 当 need_format=false 时:
|
|
1031
|
+
> - video_id: 当前视频ID
|
|
1032
|
+
> - related_videos: 原始的 lockupViewModel 对象列表
|
|
1033
|
+
> - total_count: 推荐视频总数
|
|
1034
|
+
>
|
|
1035
|
+
> ### 注意事项:
|
|
1036
|
+
> - 每个视频的推荐内容由 YouTube 算法生成,可能会变化
|
|
1037
|
+
> - 推荐列表通常包含 20-30 个视频
|
|
1038
|
+
> - ⚠️ **此接口不支持分页**,一次性返回所有推荐视频
|
|
1039
|
+
>
|
|
1040
|
+
> ### 价格:
|
|
1041
|
+
> - $0.001 USD / 请求
|
|
1042
|
+
>
|
|
1043
|
+
> # [English]
|
|
1044
|
+
> ### Purpose:
|
|
1045
|
+
> - Get YouTube video's related content recommendations (recommended videos list)
|
|
1046
|
+
> - Similar to the related videos shown on the right side of video playback page
|
|
1047
|
+
> - Returns all recommended videos at once (typically 20-30 videos)
|
|
1048
|
+
>
|
|
1049
|
+
> ### Parameters:
|
|
1050
|
+
> - video_id: Video ID (recommended)
|
|
1051
|
+
> - video_url: Full video URL (optional, ignored if video_id is provided)
|
|
1052
|
+
> - need_format: Whether to format data (default true)
|
|
1053
|
+
> - true: Return formatted structured data (recommended)
|
|
1054
|
+
> - false: Return raw YouTube API structure (for debugging or custom parsing)
|
|
1055
|
+
>
|
|
1056
|
+
> ### Returns:
|
|
1057
|
+
> #### When need_format=true:
|
|
1058
|
+
> - video_id: Current video ID
|
|
1059
|
+
> - related_videos: Related videos list
|
|
1060
|
+
> - video_id: Related video's ID
|
|
1061
|
+
> - title: Video title
|
|
1062
|
+
> - author: Author name
|
|
1063
|
+
> - author_id: Author channel ID
|
|
1064
|
+
> - author_url: Author channel URL
|
|
1065
|
+
> - length_text: Video duration text (e.g., "3:45")
|
|
1066
|
+
> - length_seconds: Video duration in seconds
|
|
1067
|
+
> - view_count_text: View count text (e.g., "1.2M views")
|
|
1068
|
+
> - short_view_count_text: Short view count text (e.g., "1.2M")
|
|
1069
|
+
> - published_time_text: Published time text (e.g., "2 days ago")
|
|
1070
|
+
> - thumbnails: All resolution thumbnails
|
|
1071
|
+
> - rich_thumbnail: Moving thumbnail (if available)
|
|
1072
|
+
> - badges: Video badges (e.g., NEW, LIVE)
|
|
1073
|
+
> - owner_badges: Channel verification badges
|
|
1074
|
+
> - video_url: Video URL
|
|
1075
|
+
> - navigation_endpoint: Navigation endpoint
|
|
1076
|
+
> - total_count: Total number of recommended videos
|
|
1077
|
+
>
|
|
1078
|
+
> #### When need_format=false:
|
|
1079
|
+
> - video_id: Current video ID
|
|
1080
|
+
> - related_videos: Raw lockupViewModel object list
|
|
1081
|
+
> - total_count: Total number of recommended videos
|
|
1082
|
+
>
|
|
1083
|
+
> ### Notes:
|
|
1084
|
+
> - Each video's recommendations are generated by YouTube's algorithm and may change
|
|
1085
|
+
> - Recommendation list typically contains 20-30 videos
|
|
1086
|
+
> - ⚠️ **This API does not support pagination**, returns all recommendations at once
|
|
1087
|
+
>
|
|
1088
|
+
> ### Price:
|
|
1089
|
+
> - $0.001 USD / request
|
|
1090
|
+
>
|
|
1091
|
+
> ### [示例/Example]
|
|
1092
|
+
> #### 获取推荐视频: video_id = "dQw4w9WgXcQ"
|
|
1093
|
+
|
|
1094
|
+
#### Parameters
|
|
1095
|
+
|
|
1096
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
1097
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1098
|
+
| video_id | query | string | No | 视频ID/Video ID | None | dQw4w9WgXcQ | None |
|
|
1099
|
+
| video_url | query | string | No | 视频URL/Video URL (如果提供video_id则忽略此参数/Ignored if video_id is provided) | None | https://www.youtube.com/watch?v=dQw4w9WgXcQ | None |
|
|
1100
|
+
| need_format | query | boolean | No | 是否格式化数据。true: 返回格式化的结构化数据,false: 返回原始API结构/Whether to format data. true: return formatted structured data, false: return raw API structure | true | None | None |
|
|
1101
|
+
|
|
1102
|
+
#### Request Body
|
|
1103
|
+
|
|
1104
|
+
None
|
|
1105
|
+
|
|
1106
|
+
#### Success Response
|
|
1107
|
+
|
|
1108
|
+
##### `200 application/json`
|
|
1109
|
+
|
|
1110
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
1111
|
+
|
|
1112
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
1113
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
1114
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
1115
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
1116
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
1117
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
1118
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
1119
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
1120
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
1121
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
1122
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
1123
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
1124
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
1125
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
1126
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
1127
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
1128
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
1129
|
+
|
|
1130
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-search-suggestions"></a>
|
|
1131
|
+
### `GET /api/u1/v1/youtube/web_v2/get_search_suggestions`
|
|
1132
|
+
|
|
1133
|
+
- Summary: 获取搜索推荐词/Get search suggestions
|
|
1134
|
+
- Capabilities: search
|
|
1135
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
1136
|
+
- operationId: `get_search_suggestions_api_v1_youtube_web_v2_get_search_suggestions_get`
|
|
1137
|
+
|
|
1138
|
+
#### Notes
|
|
1139
|
+
|
|
1140
|
+
> # [中文]
|
|
1141
|
+
> ### 用途:
|
|
1142
|
+
> - 获取YouTube搜索推荐词(自动补全)
|
|
1143
|
+
> - 类似于在YouTube搜索框输入时显示的推荐词
|
|
1144
|
+
>
|
|
1145
|
+
> ### 参数:
|
|
1146
|
+
> - keyword: 搜索关键词(必填)
|
|
1147
|
+
> - language: 语言代码(可选,默认 en)
|
|
1148
|
+
> - en: 英语
|
|
1149
|
+
> - zh-cn: 简体中文
|
|
1150
|
+
> - ja: 日语
|
|
1151
|
+
> - ko: 韩语
|
|
1152
|
+
> - region: 地区代码(可选,默认 US)
|
|
1153
|
+
> - US: 美国
|
|
1154
|
+
> - SG: 新加坡
|
|
1155
|
+
> - CN: 中国
|
|
1156
|
+
> - JP: 日本
|
|
1157
|
+
> - KR: 韩国
|
|
1158
|
+
>
|
|
1159
|
+
> ### 返回数据包含:
|
|
1160
|
+
> - keyword: 搜索关键词
|
|
1161
|
+
> - suggestions: 推荐词列表(字符串数组)
|
|
1162
|
+
> - total_count: 推荐词数量
|
|
1163
|
+
>
|
|
1164
|
+
> ### 注意事项:
|
|
1165
|
+
> - 推荐词会根据语言和地区有所不同
|
|
1166
|
+
> - 通常返回 10-20 个推荐词
|
|
1167
|
+
> - 响应速度非常快(< 1秒)
|
|
1168
|
+
>
|
|
1169
|
+
> ### 价格:
|
|
1170
|
+
> - $0.0001 USD / 请求
|
|
1171
|
+
>
|
|
1172
|
+
> # [English]
|
|
1173
|
+
> ### Purpose:
|
|
1174
|
+
> - Get YouTube search suggestions (autocomplete)
|
|
1175
|
+
> - Similar to suggestions shown when typing in YouTube search box
|
|
1176
|
+
>
|
|
1177
|
+
> ### Parameters:
|
|
1178
|
+
> - keyword: Search keyword (required)
|
|
1179
|
+
> - language: Language code (optional, default en)
|
|
1180
|
+
> - en: English
|
|
1181
|
+
> - zh-cn: Simplified Chinese
|
|
1182
|
+
> - ja: Japanese
|
|
1183
|
+
> - ko: Korean
|
|
1184
|
+
> - region: Region code (optional, default US)
|
|
1185
|
+
> - US: United States
|
|
1186
|
+
> - SG: Singapore
|
|
1187
|
+
> - CN: China
|
|
1188
|
+
> - JP: Japan
|
|
1189
|
+
> - KR: Korea
|
|
1190
|
+
>
|
|
1191
|
+
> ### Returns:
|
|
1192
|
+
> - keyword: Search keyword
|
|
1193
|
+
> - suggestions: Suggestions list (array of strings)
|
|
1194
|
+
> - total_count: Number of suggestions
|
|
1195
|
+
>
|
|
1196
|
+
> ### Notes:
|
|
1197
|
+
> - Suggestions vary by language and region
|
|
1198
|
+
> - Typically returns 10-20 suggestions
|
|
1199
|
+
> - Very fast response (< 1 second)
|
|
1200
|
+
>
|
|
1201
|
+
> ### Price:
|
|
1202
|
+
> - $0.0001 USD / request
|
|
1203
|
+
>
|
|
1204
|
+
> ### [示例/Example]
|
|
1205
|
+
> #### 获取推荐词: keyword = "Rick Astley"
|
|
1206
|
+
|
|
1207
|
+
#### Parameters
|
|
1208
|
+
|
|
1209
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
1210
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1211
|
+
| keyword | query | string | Yes | 搜索关键词/Search keyword | None | Rick Astley | None |
|
|
1212
|
+
| language | query | string | No | 语言代码/Language code (e.g., en, zh-cn, ja) | en | en | None |
|
|
1213
|
+
| region | query | string | No | 地区代码/Region code (e.g., US, SG, CN, JP) | US | US | None |
|
|
1214
|
+
|
|
1215
|
+
#### Request Body
|
|
1216
|
+
|
|
1217
|
+
None
|
|
1218
|
+
|
|
1219
|
+
#### Success Response
|
|
1220
|
+
|
|
1221
|
+
##### `200 application/json`
|
|
1222
|
+
|
|
1223
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
1224
|
+
|
|
1225
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
1226
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
1227
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
1228
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
1229
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
1230
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
1231
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
1232
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
1233
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
1234
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
1235
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
1236
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
1237
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
1238
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
1239
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
1240
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
1241
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
1242
|
+
|
|
1243
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-shorts-search"></a>
|
|
1244
|
+
### `GET /api/u1/v1/youtube/web_v2/get_shorts_search`
|
|
1245
|
+
|
|
1246
|
+
- Summary: YouTube Shorts短视频搜索/YouTube Shorts search
|
|
1247
|
+
- Capabilities: search
|
|
1248
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
1249
|
+
- operationId: `get_shorts_search_api_v1_youtube_web_v2_get_shorts_search_get`
|
|
1250
|
+
|
|
1251
|
+
#### Notes
|
|
1252
|
+
|
|
1253
|
+
> # [中文]
|
|
1254
|
+
> ### 用途:
|
|
1255
|
+
> - YouTube Shorts短视频专门搜索,使用原生YouTube API接口
|
|
1256
|
+
>
|
|
1257
|
+
> ### 特点:
|
|
1258
|
+
> - 🎬 专门搜索YouTube Shorts短视频(<60秒)
|
|
1259
|
+
> - 🔍 支持多种过滤条件和排序方式
|
|
1260
|
+
> - 📱 优化的移动端短视频内容
|
|
1261
|
+
> - ⚡ 智能过滤:首次请求可能返回混合内容(长视频+短视频),默认自动过滤长视频
|
|
1262
|
+
>
|
|
1263
|
+
> ### 重要说明 - YouTube Shorts搜索机制:
|
|
1264
|
+
> 根据YouTube的搜索逻辑,Shorts搜索有以下特性:
|
|
1265
|
+
> 1. **首次请求**(无continuation_token):可能返回混合内容(部分长视频 + 部分短视频)
|
|
1266
|
+
> 2. **后续请求**(有continuation_token):仅返回纯短视频内容
|
|
1267
|
+
> 3. **解决方案**:
|
|
1268
|
+
> - 方案A:使用 `filter_mixed_content=true`(默认),自动过滤掉长视频
|
|
1269
|
+
> - 方案B:使用第一次返回的 continuation_token 进行第二次请求,获取纯Shorts内容
|
|
1270
|
+
> - 方案C:设置 `filter_mixed_content=false`,获取原始混合内容
|
|
1271
|
+
>
|
|
1272
|
+
> ### 参数详解:
|
|
1273
|
+
>
|
|
1274
|
+
> #### 📌 必选参数 (Required Parameters):
|
|
1275
|
+
>
|
|
1276
|
+
> **search_query** (string)
|
|
1277
|
+
> - **作用**: 搜索关键字,用于匹配Shorts视频的标题、描述等内容
|
|
1278
|
+
> - **格式**: 任意字符串
|
|
1279
|
+
> - **示例**: `"Python编程"`, `"gaming"`, `"cooking tutorial"`
|
|
1280
|
+
> - **注意**: 支持中英文及其他语言,空格会被自动处理
|
|
1281
|
+
>
|
|
1282
|
+
> #### ⚙️ 可选参数 - 基础设置 (Optional Parameters - Basic Settings):
|
|
1283
|
+
>
|
|
1284
|
+
> **language_code** (string, 可选)
|
|
1285
|
+
> - **作用**: 设置搜索结果的显示语言,影响返回内容的语言偏好
|
|
1286
|
+
> - **默认值**: `"en-US"`
|
|
1287
|
+
> - **可用值**:
|
|
1288
|
+
> - `"zh-CN"` - 简体中文
|
|
1289
|
+
> - `"zh-TW"` - 繁体中文
|
|
1290
|
+
> - `"en-US"` - 英语(美国)
|
|
1291
|
+
> - `"en-GB"` - 英语(英国)
|
|
1292
|
+
> - `"ja-JP"` - 日语
|
|
1293
|
+
> - `"ko-KR"` - 韩语
|
|
1294
|
+
> - `"es-ES"` - 西班牙语
|
|
1295
|
+
> - `"fr-FR"` - 法语
|
|
1296
|
+
> - `"de-DE"` - 德语
|
|
1297
|
+
> - 其他符合IETF BCP 47标准的语言代码
|
|
1298
|
+
> - **示例**: `language_code=zh-CN`
|
|
1299
|
+
> - **影响**: 会影响搜索算法的语言匹配和结果排序
|
|
1300
|
+
>
|
|
1301
|
+
> **country_code** (string, 可选)
|
|
1302
|
+
> - **作用**: 设置地区/国家代码,影响搜索结果的地域相关性和内容可用性
|
|
1303
|
+
> - **默认值**: `"US"`
|
|
1304
|
+
> - **可用值**:
|
|
1305
|
+
> - `"US"` - 美国
|
|
1306
|
+
> - `"CN"` - 中国
|
|
1307
|
+
> - `"JP"` - 日本
|
|
1308
|
+
> - `"KR"` - 韩国
|
|
1309
|
+
> - `"GB"` - 英国
|
|
1310
|
+
> - `"DE"` - 德国
|
|
1311
|
+
> - `"FR"` - 法国
|
|
1312
|
+
> - `"CA"` - 加拿大
|
|
1313
|
+
> - 其他符合ISO 3166-1 alpha-2标准的国家代码
|
|
1314
|
+
> - **示例**: `country_code=JP`
|
|
1315
|
+
> - **影响**: 某些Shorts可能因地区限制而不可见
|
|
1316
|
+
>
|
|
1317
|
+
> **time_zone** (string, 可选)
|
|
1318
|
+
> - **作用**: 设置时区,影响时间相关过滤器(如"今天"、"本周")的计算
|
|
1319
|
+
> - **默认值**: `"America/Los_Angeles"`
|
|
1320
|
+
> - **可用值**: 符合IANA时区数据库的时区标识符
|
|
1321
|
+
> - `"America/Los_Angeles"` - 美国太平洋时区
|
|
1322
|
+
> - `"America/New_York"` - 美国东部时区
|
|
1323
|
+
> - `"Asia/Shanghai"` - 中国时区
|
|
1324
|
+
> - `"Asia/Tokyo"` - 日本时区
|
|
1325
|
+
> - `"Europe/London"` - 英国时区
|
|
1326
|
+
> - `"Europe/Paris"` - 法国时区
|
|
1327
|
+
> - **示例**: `time_zone=Asia/Shanghai`
|
|
1328
|
+
> - **影响**: 结合upload_time参数使用时,决定"今天"等时间段的具体范围
|
|
1329
|
+
>
|
|
1330
|
+
> **filter_mixed_content** (boolean, 可选)
|
|
1331
|
+
> - **作用**: 控制是否自动过滤掉响应中的长视频(非Shorts内容)
|
|
1332
|
+
> - **默认值**: `true`
|
|
1333
|
+
> - **可用值**:
|
|
1334
|
+
> - `true` - 自动过滤长视频,只返回Shorts(推荐)
|
|
1335
|
+
> - `false` - 返回原始内容,可能包含长视频
|
|
1336
|
+
> - **示例**: `filter_mixed_content=true`
|
|
1337
|
+
> - **使用场景**:
|
|
1338
|
+
> - `true`: 当你只需要纯Shorts内容时使用(推荐首次请求使用)
|
|
1339
|
+
> - `false`: 当你需要分析YouTube原始返回的混合内容时使用(调试用)
|
|
1340
|
+
> - **注意**: 只影响首次请求,使用continuation_token的请求本身就只返回Shorts
|
|
1341
|
+
>
|
|
1342
|
+
> #### 🎯 可选参数 - Shorts过滤条件 (Optional Parameters - Shorts Filters):
|
|
1343
|
+
>
|
|
1344
|
+
> **upload_time** (string, 可选)
|
|
1345
|
+
> - **作用**: 按上传时间过滤Shorts,只返回指定时间段内上传的视频
|
|
1346
|
+
> - **默认值**: `null` (不过滤)
|
|
1347
|
+
> - **可用值**:
|
|
1348
|
+
> - `"hour"` - 过去1小时内上传
|
|
1349
|
+
> - `"today"` - 今天上传(基于time_zone参数)
|
|
1350
|
+
> - `"week"` - 本周上传(最近7天)
|
|
1351
|
+
> - `"month"` - 本月上传(最近30天)
|
|
1352
|
+
> - `"year"` - 今年上传(最近365天)
|
|
1353
|
+
> - **示例**: `upload_time=week`
|
|
1354
|
+
> - **使用场景**: 寻找最新、热门的Shorts内容
|
|
1355
|
+
> - **注意**: 与time_zone参数配合使用,时间计算基于设定的时区
|
|
1356
|
+
>
|
|
1357
|
+
> **sort_by** (string, 可选)
|
|
1358
|
+
> - **作用**: 设置搜索结果的排序方式
|
|
1359
|
+
> - **默认值**: `null` (YouTube默认相关性排序)
|
|
1360
|
+
> - **可用值**:
|
|
1361
|
+
> - `"relevance"` - 按相关性排序(YouTube默认算法)
|
|
1362
|
+
> - `"upload_date"` - 按上传日期排序(最新优先)
|
|
1363
|
+
> - `"view_count"` - 按观看次数排序(最多观看优先)
|
|
1364
|
+
> - `"rating"` - 按评分排序(最高评分优先)
|
|
1365
|
+
> - **示例**: `sort_by=view_count`
|
|
1366
|
+
> - **使用场景**:
|
|
1367
|
+
> - `relevance`: 寻找最相关的内容
|
|
1368
|
+
> - `upload_date`: 寻找最新发布的Shorts
|
|
1369
|
+
> - `view_count`: 寻找最受欢迎的Shorts
|
|
1370
|
+
> - `rating`: 寻找质量最高的Shorts
|
|
1371
|
+
> - **优先级**: sort_by的优先级高于upload_time,两者同时使用时以sort_by为准
|
|
1372
|
+
>
|
|
1373
|
+
> #### 📄 可选参数 - 翻页控制 (Optional Parameters - Pagination):
|
|
1374
|
+
>
|
|
1375
|
+
> **continuation_token** (string, 可选)
|
|
1376
|
+
> - **作用**: 用于获取下一页搜索结果的翻页令牌
|
|
1377
|
+
> - **默认值**: `null` (获取第一页)
|
|
1378
|
+
> - **格式**: YouTube返回的加密字符串
|
|
1379
|
+
> - **示例**: `continuation_token=EqcBEgPkuKzor4YybhmgGk...`
|
|
1380
|
+
> - **获取方式**: 从上一次请求的响应中提取(见"翻页机制详解"部分)
|
|
1381
|
+
> - **使用场景**:
|
|
1382
|
+
> - 首次搜索:不传此参数,获取第一页结果
|
|
1383
|
+
> - 后续翻页:传入上次返回的token,获取下一页结果
|
|
1384
|
+
> - **注意**:
|
|
1385
|
+
> - Token有时效性,通常在数小时内有效
|
|
1386
|
+
> - 使用continuation_token时,必须保持search_query等其他参数一致
|
|
1387
|
+
> - 使用token的请求会自动返回纯Shorts内容(无需过滤)
|
|
1388
|
+
>
|
|
1389
|
+
> ### 翻页机制详解:
|
|
1390
|
+
> #### 如何获取 continuation_token:
|
|
1391
|
+
> 从响应JSON中提取,路径通常为以下之一:
|
|
1392
|
+
> ```python
|
|
1393
|
+
> # 路径1:在 onResponseReceivedCommands 中
|
|
1394
|
+
> response["data"]["onResponseReceivedCommands"][0]["appendContinuationItemsAction"]["continuationItems"][-1]["continuationItemRenderer"]["continuationEndpoint"]["continuationCommand"]["token"]
|
|
1395
|
+
>
|
|
1396
|
+
> # 路径2:在 contents 中
|
|
1397
|
+
> response["data"]["contents"]["twoColumnSearchResultsRenderer"]["primaryContents"]["sectionListRenderer"]["contents"][-1]["continuationItemRenderer"]["continuationEndpoint"]["continuationCommand"]["token"]
|
|
1398
|
+
> ```
|
|
1399
|
+
>
|
|
1400
|
+
> #### 使用流程:
|
|
1401
|
+
> 1. **首次请求**: 不传 continuation_token
|
|
1402
|
+
> ```
|
|
1403
|
+
> GET /api/v1/youtube_web/get_shorts_search?search_query=python
|
|
1404
|
+
> ```
|
|
1405
|
+
> 2. **提取token**: 从响应中找到 continuation_token
|
|
1406
|
+
> 3. **后续请求**: 传入 continuation_token 获取下一页
|
|
1407
|
+
> ```
|
|
1408
|
+
> GET /api/v1/youtube_web/get_shorts_search?search_query=python&continuation_token=xxx
|
|
1409
|
+
> ```
|
|
1410
|
+
>
|
|
1411
|
+
> ### 响应数据结构:
|
|
1412
|
+
> ```json
|
|
1413
|
+
> {
|
|
1414
|
+
> "code": 200,
|
|
1415
|
+
> "data": {
|
|
1416
|
+
> "contents": {
|
|
1417
|
+
> "twoColumnSearchResultsRenderer": {
|
|
1418
|
+
> "primaryContents": {
|
|
1419
|
+
> "sectionListRenderer": {
|
|
1420
|
+
> "contents": [
|
|
1421
|
+
> {
|
|
1422
|
+
> "itemSectionRenderer": {
|
|
1423
|
+
> "contents": [
|
|
1424
|
+
> {
|
|
1425
|
+
> "gridShelfViewModel": {
|
|
1426
|
+
> // Shorts视频列表
|
|
1427
|
+
> "items": [...]
|
|
1428
|
+
> }
|
|
1429
|
+
> }
|
|
1430
|
+
> ]
|
|
1431
|
+
> }
|
|
1432
|
+
> },
|
|
1433
|
+
> {
|
|
1434
|
+
> "continuationItemRenderer": {
|
|
1435
|
+
> "continuationEndpoint": {
|
|
1436
|
+
> "continuationCommand": {
|
|
1437
|
+
> "token": "xxx" // 下一页的token
|
|
1438
|
+
> }
|
|
1439
|
+
> }
|
|
1440
|
+
> }
|
|
1441
|
+
> }
|
|
1442
|
+
> ]
|
|
1443
|
+
> }
|
|
1444
|
+
> }
|
|
1445
|
+
> }
|
|
1446
|
+
> }
|
|
1447
|
+
> }
|
|
1448
|
+
> }
|
|
1449
|
+
> ```
|
|
1450
|
+
>
|
|
1451
|
+
> ### 返回:
|
|
1452
|
+
> - 专门针对Shorts的搜索结果,包含视频列表和翻页token
|
|
1453
|
+
>
|
|
1454
|
+
> # [English]
|
|
1455
|
+
> ### Purpose:
|
|
1456
|
+
> - YouTube Shorts specialized search using native YouTube API
|
|
1457
|
+
>
|
|
1458
|
+
> ### Features:
|
|
1459
|
+
> - 🎬 Specialized search for YouTube Shorts (<60 seconds)
|
|
1460
|
+
> - 🔍 Support for multiple filter conditions and sorting options
|
|
1461
|
+
> - 📱 Optimized for mobile short-form content
|
|
1462
|
+
> - ⚡ Smart filtering: First request may return mixed content (long+short videos), automatically filters long videos by default
|
|
1463
|
+
>
|
|
1464
|
+
> ### Important - YouTube Shorts Search Mechanism:
|
|
1465
|
+
> According to YouTube's search logic, Shorts search has these characteristics:
|
|
1466
|
+
> 1. **First request** (no continuation_token): May return mixed content (some long videos + some short videos)
|
|
1467
|
+
> 2. **Subsequent requests** (with continuation_token): Returns only pure Shorts content
|
|
1468
|
+
> 3. **Solutions**:
|
|
1469
|
+
> - Solution A: Use `filter_mixed_content=true` (default) to automatically filter long videos
|
|
1470
|
+
> - Solution B: Use continuation_token from first response for second request to get pure Shorts
|
|
1471
|
+
> - Solution C: Set `filter_mixed_content=false` to get original mixed content
|
|
1472
|
+
>
|
|
1473
|
+
> ### Parameters:
|
|
1474
|
+
> - **search_query**: Search keyword
|
|
1475
|
+
> - **language_code**: Language code (zh-CN for Chinese, en-US for English)
|
|
1476
|
+
> - **country_code**: Country code affecting regional relevance
|
|
1477
|
+
> - **time_zone**: Time zone (e.g., America/Los_Angeles, Asia/Shanghai)
|
|
1478
|
+
> - **filter_mixed_content**: Whether to filter long videos from mixed content (default true)
|
|
1479
|
+
>
|
|
1480
|
+
> ### Shorts-specific Filters:
|
|
1481
|
+
> #### Upload Time (upload_time):
|
|
1482
|
+
> - `hour`: Shorts uploaded in the past hour
|
|
1483
|
+
> - `today`: Shorts uploaded today
|
|
1484
|
+
> - `week`: Shorts uploaded this week
|
|
1485
|
+
> - `month`: Shorts uploaded this month
|
|
1486
|
+
> - `year`: Shorts uploaded this year
|
|
1487
|
+
>
|
|
1488
|
+
> #### Sort By (sort_by):
|
|
1489
|
+
> - `relevance`: Relevance (default)
|
|
1490
|
+
> - `upload_date`: Upload date
|
|
1491
|
+
> - `view_count`: View count
|
|
1492
|
+
> - `rating`: Rating
|
|
1493
|
+
>
|
|
1494
|
+
> ### Pagination Mechanism Explained:
|
|
1495
|
+
> #### How to get continuation_token:
|
|
1496
|
+
> Extract from response JSON, typically at one of these paths:
|
|
1497
|
+
> ```python
|
|
1498
|
+
> # Path 1: In onResponseReceivedCommands
|
|
1499
|
+
> response["onResponseReceivedCommands"][0]["appendContinuationItemsAction"]["continuationItems"][-1]["continuationItemRenderer"]["continuationEndpoint"]["continuationCommand"]["token"]
|
|
1500
|
+
>
|
|
1501
|
+
> # Path 2: In contents
|
|
1502
|
+
> response["contents"]["twoColumnSearchResultsRenderer"]["primaryContents"]["sectionListRenderer"]["contents"][-1]["continuationItemRenderer"]["continuationEndpoint"]["continuationCommand"]["token"]
|
|
1503
|
+
> ```
|
|
1504
|
+
>
|
|
1505
|
+
> #### Usage Flow:
|
|
1506
|
+
> 1. **First request**: Don't pass continuation_token
|
|
1507
|
+
> ```
|
|
1508
|
+
> GET /api/v1/youtube_web/get_shorts_search?search_query=python
|
|
1509
|
+
> ```
|
|
1510
|
+
> 2. **Extract token**: Find continuation_token in response
|
|
1511
|
+
> 3. **Next requests**: Pass continuation_token to get next page
|
|
1512
|
+
> ```
|
|
1513
|
+
> GET /api/v1/youtube_web/get_shorts_search?search_query=python&continuation_token=xxx
|
|
1514
|
+
> ```
|
|
1515
|
+
>
|
|
1516
|
+
> ### Response Data Structure:
|
|
1517
|
+
> ```json
|
|
1518
|
+
> {
|
|
1519
|
+
> "code": 200,
|
|
1520
|
+
> "data": {
|
|
1521
|
+
> "contents": {
|
|
1522
|
+
> "twoColumnSearchResultsRenderer": {
|
|
1523
|
+
> "primaryContents": {
|
|
1524
|
+
> "sectionListRenderer": {
|
|
1525
|
+
> "contents": [
|
|
1526
|
+
> {
|
|
1527
|
+
> "itemSectionRenderer": {
|
|
1528
|
+
> "contents": [
|
|
1529
|
+
> {
|
|
1530
|
+
> "gridShelfViewModel": {
|
|
1531
|
+
> // Shorts video list
|
|
1532
|
+
> "items": [...]
|
|
1533
|
+
> }
|
|
1534
|
+
> }
|
|
1535
|
+
> ]
|
|
1536
|
+
> }
|
|
1537
|
+
> },
|
|
1538
|
+
> {
|
|
1539
|
+
> "continuationItemRenderer": {
|
|
1540
|
+
> "continuationEndpoint": {
|
|
1541
|
+
> "continuationCommand": {
|
|
1542
|
+
> "token": "xxx" // Token for next page
|
|
1543
|
+
> }
|
|
1544
|
+
> }
|
|
1545
|
+
> }
|
|
1546
|
+
> }
|
|
1547
|
+
> ]
|
|
1548
|
+
> }
|
|
1549
|
+
> }
|
|
1550
|
+
> }
|
|
1551
|
+
> }
|
|
1552
|
+
> }
|
|
1553
|
+
> }
|
|
1554
|
+
> ```
|
|
1555
|
+
>
|
|
1556
|
+
> ### Returns:
|
|
1557
|
+
> - Shorts-specific search results with video list and pagination token
|
|
1558
|
+
>
|
|
1559
|
+
> # [示例/Examples]
|
|
1560
|
+
> ## 基础Shorts搜索(自动过滤长视频)
|
|
1561
|
+
> GET /youtube_web/get_shorts_search?search_query=Python编程
|
|
1562
|
+
>
|
|
1563
|
+
> ## 获取原始混合内容(包含长视频)
|
|
1564
|
+
> GET /youtube_web/get_shorts_search?search_query=Python编程&filter_mixed_content=false
|
|
1565
|
+
>
|
|
1566
|
+
> ## 搜索本周上传的Python相关Shorts
|
|
1567
|
+
> GET /youtube_web/get_shorts_search?search_query=python&upload_time=week
|
|
1568
|
+
>
|
|
1569
|
+
> ## 搜索观看次数最多的技术Shorts
|
|
1570
|
+
> GET /youtube_web/get_shorts_search?search_query=技术&sort_by=view_count
|
|
1571
|
+
>
|
|
1572
|
+
> ## 翻页获取更多Shorts
|
|
1573
|
+
> GET /youtube_web/get_shorts_search?search_query=编程&continuation_token=EqcBEgPkuKzor4YybhmgGk...
|
|
1574
|
+
|
|
1575
|
+
#### Parameters
|
|
1576
|
+
|
|
1577
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
1578
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1579
|
+
| search_query | query | string | Yes | 搜索关键字/Search keyword | None | Python编程 | None |
|
|
1580
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | en-US | en-US | None |
|
|
1581
|
+
| country_code | query | string | No | 国家代码(如US, CN等)/Country code | US | US | None |
|
|
1582
|
+
| time_zone | query | string | No | 时区(如America/Los_Angeles, Asia/Shanghai等)/Time zone | America/Los_Angeles | America/Los_Angeles | None |
|
|
1583
|
+
| upload_time | query | string enum[hour, today, week, month, year] | No | 上传时间过滤 \| Upload time filter for Shorts | None | None | None |
|
|
1584
|
+
| sort_by | query | string enum[relevance, upload_date, view_count, rating] | No | 排序方式 \| Sort by for Shorts | None | None | None |
|
|
1585
|
+
| continuation_token | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
1586
|
+
| filter_mixed_content | query | boolean | No | 是否过滤混合内容(长视频),默认True / Filter mixed content (long videos), default True | true | true | None |
|
|
1587
|
+
|
|
1588
|
+
#### Request Body
|
|
1589
|
+
|
|
1590
|
+
None
|
|
1591
|
+
|
|
1592
|
+
#### Success Response
|
|
1593
|
+
|
|
1594
|
+
##### `200 application/json`
|
|
1595
|
+
|
|
1596
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
1597
|
+
|
|
1598
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
1599
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
1600
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
1601
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
1602
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
1603
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
1604
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
1605
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
1606
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
1607
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
1608
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
1609
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
1610
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
1611
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
1612
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
1613
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
1614
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
1615
|
+
|
|
1616
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-signed-stream-url"></a>
|
|
1617
|
+
### `GET /api/u1/v1/youtube/web_v2/get_signed_stream_url`
|
|
1618
|
+
|
|
1619
|
+
- Summary: 获取已签名的视频流URL/Get signed video stream URL
|
|
1620
|
+
- Capabilities: livestream
|
|
1621
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
1622
|
+
- operationId: `get_signed_stream_url_api_v1_youtube_web_v2_get_signed_stream_url_get`
|
|
1623
|
+
|
|
1624
|
+
#### Notes
|
|
1625
|
+
|
|
1626
|
+
> # [中文]
|
|
1627
|
+
> ### 用途:
|
|
1628
|
+
> - 获取指定 itag 的已签名播放地址(可直接播放)
|
|
1629
|
+
> - 配合 get_video_streams 接口使用,先获取所有格式,再选择 itag 获取播放地址
|
|
1630
|
+
>
|
|
1631
|
+
> ### 参数:
|
|
1632
|
+
> - video_id: 视频ID(推荐)
|
|
1633
|
+
> - video_url: 完整的视频URL(可选)
|
|
1634
|
+
> - itag: 格式标识符,从 get_video_streams 接口返回的格式列表中选择
|
|
1635
|
+
>
|
|
1636
|
+
> ### 返回数据:
|
|
1637
|
+
> - itag: 格式标识符
|
|
1638
|
+
> - url: 已签名的播放地址(可直接使用)
|
|
1639
|
+
> - expires_in_seconds: URL有效期(通常为6小时 = 21600秒)
|
|
1640
|
+
>
|
|
1641
|
+
> ### 注意事项:
|
|
1642
|
+
> - 播放地址有时效性(约6小时),过期后需重新获取
|
|
1643
|
+
> - URL 长度较长(约1000-2000字符)
|
|
1644
|
+
> - 某些视频可能受地区限制
|
|
1645
|
+
>
|
|
1646
|
+
> # [English]
|
|
1647
|
+
> ### Purpose:
|
|
1648
|
+
> - Get signed playback URL for specific itag (ready to play)
|
|
1649
|
+
> - Use with get_video_streams endpoint: first get all formats, then select itag to get playback URL
|
|
1650
|
+
>
|
|
1651
|
+
> ### Parameters:
|
|
1652
|
+
> - video_id: Video ID (recommended)
|
|
1653
|
+
> - video_url: Full video URL (optional)
|
|
1654
|
+
> - itag: Format identifier, selected from formats list returned by get_video_streams
|
|
1655
|
+
>
|
|
1656
|
+
> ### Returns:
|
|
1657
|
+
> - itag: Format identifier
|
|
1658
|
+
> - url: Signed playback URL (ready to use)
|
|
1659
|
+
> - expires_in_seconds: URL validity period (typically 6 hours = 21600 seconds)
|
|
1660
|
+
>
|
|
1661
|
+
> ### Notes:
|
|
1662
|
+
> - Playback URLs expire after approximately 6 hours, need to regenerate after expiration
|
|
1663
|
+
> - URL length is long (approximately 1000-2000 characters)
|
|
1664
|
+
> - Some videos may have regional restrictions
|
|
1665
|
+
>
|
|
1666
|
+
> # [示例/Example]
|
|
1667
|
+
> video_id = "dQw4w9WgXcQ"
|
|
1668
|
+
> itag = 18 # 360p mp4 with audio
|
|
1669
|
+
|
|
1670
|
+
#### Parameters
|
|
1671
|
+
|
|
1672
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
1673
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1674
|
+
| video_id | query | string | No | 视频ID/Video ID | None | dQw4w9WgXcQ | None |
|
|
1675
|
+
| video_url | query | string | No | 视频URL/Video URL (如果提供video_id则忽略此参数/Ignored if video_id is provided) | None | https://www.youtube.com/watch?v=dQw4w9WgXcQ | None |
|
|
1676
|
+
| itag | query | integer | Yes | 格式标识符 itag (从 get_video_streams 接口获取)/Format identifier itag (obtained from get_video_streams endpoint) | None | 18 | None |
|
|
1677
|
+
|
|
1678
|
+
#### Request Body
|
|
1679
|
+
|
|
1680
|
+
None
|
|
1681
|
+
|
|
1682
|
+
#### Success Response
|
|
1683
|
+
|
|
1684
|
+
##### `200 application/json`
|
|
1685
|
+
|
|
1686
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
1687
|
+
|
|
1688
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
1689
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
1690
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
1691
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
1692
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
1693
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
1694
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
1695
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
1696
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
1697
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
1698
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
1699
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
1700
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
1701
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
1702
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
1703
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
1704
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
1705
|
+
|
|
1706
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-video-comment-replies"></a>
|
|
1707
|
+
### `GET /api/u1/v1/youtube/web_v2/get_video_comment_replies`
|
|
1708
|
+
|
|
1709
|
+
- Summary: 获取视频二级评论/Get video sub comments
|
|
1710
|
+
- Capabilities: comments / content details
|
|
1711
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
1712
|
+
- operationId: `get_video_comment_replies_api_v1_youtube_web_v2_get_video_comment_replies_get`
|
|
1713
|
+
|
|
1714
|
+
#### Notes
|
|
1715
|
+
|
|
1716
|
+
> # [中文]
|
|
1717
|
+
> ### 用途:
|
|
1718
|
+
> - 获取视频二级评论
|
|
1719
|
+
>
|
|
1720
|
+
> ### 参数详解:
|
|
1721
|
+
>
|
|
1722
|
+
> #### 📌 必选参数:
|
|
1723
|
+
> **continuation_token** (string)
|
|
1724
|
+
> - **作用**: 回复的continuation token
|
|
1725
|
+
> - **获取方式**: 从一级评论的响应数据中获取 `reply_continuation_token` 字段
|
|
1726
|
+
> - **示例**: `"Eg0SC29hU05CejRxTVFZGAYygwEaUBIaVWd3WmhjUXVGUmJZTlhkUV85VjRBYUFCQWciAggAKhhVQ0pIQko3Ri1uQUlsTUdvbG0wSHU0dmcyC29hU05CejRxTVFZQAFICoIBAggBQi9jb21tZW50LXJlcGxpZXMtaXRlbS1VZ3daaGNRdUZSYllOWGRRXzlWNEFhQUJBZw%3D%3D"`
|
|
1727
|
+
>
|
|
1728
|
+
> #### ⚙️ 可选参数:
|
|
1729
|
+
> **language_code** (string, 可选)
|
|
1730
|
+
> - **作用**: 设置回复显示的语言偏好
|
|
1731
|
+
> - **默认值**: `"zh-CN"`
|
|
1732
|
+
> - **可用值**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"` 等
|
|
1733
|
+
>
|
|
1734
|
+
> **country_code** (string, 可选)
|
|
1735
|
+
> - **作用**: 设置地区代码
|
|
1736
|
+
> - **默认值**: `"US"`
|
|
1737
|
+
> - **可用值**: `"US"`, `"JP"`, `"GB"` 等
|
|
1738
|
+
>
|
|
1739
|
+
> **need_format** (boolean, 可选)
|
|
1740
|
+
> - **作用**: 是否返回清洗后的精简数据
|
|
1741
|
+
> - **默认值**: `false`
|
|
1742
|
+
> - **可用值**:
|
|
1743
|
+
> - `false` - 返回原始完整数据
|
|
1744
|
+
> - `true` - 返回清洗后的精简数据(推荐)
|
|
1745
|
+
>
|
|
1746
|
+
> ### 使用流程:
|
|
1747
|
+
> 1. 先调用 `/get_video_comments` 接口获取一级评论
|
|
1748
|
+
> 2. 从一级评论的响应中找到 `reply_continuation_token` 字段
|
|
1749
|
+
> 3. 使用该 token 调用本接口获取该评论的所有回复
|
|
1750
|
+
>
|
|
1751
|
+
> ### 返回数据结构 (need_format=true):
|
|
1752
|
+
> ```json
|
|
1753
|
+
> {
|
|
1754
|
+
> "comments": [
|
|
1755
|
+
> {
|
|
1756
|
+
> "comment_id": "UgwZhcQuFRbYNXdQ_9V4AaABAg.A2B3C4D5E6F7G8H9I0J1",
|
|
1757
|
+
> "content": "回复内容文本",
|
|
1758
|
+
> "published_time": "2天前",
|
|
1759
|
+
> "reply_level": 1,
|
|
1760
|
+
> "like_count": "5",
|
|
1761
|
+
> "like_count_a11y": "5 次赞",
|
|
1762
|
+
> "reply_count": "0",
|
|
1763
|
+
> "author": {
|
|
1764
|
+
> "channel_id": "UCxxxxxx",
|
|
1765
|
+
> "display_name": "@username",
|
|
1766
|
+
> "channel_url": "https://www.youtube.com/@username",
|
|
1767
|
+
> "avatar_url": "https://yt3.ggpht.com/...",
|
|
1768
|
+
> "is_verified": false,
|
|
1769
|
+
> "is_creator": true,
|
|
1770
|
+
> "is_artist": false
|
|
1771
|
+
> }
|
|
1772
|
+
> }
|
|
1773
|
+
> ],
|
|
1774
|
+
> "continuation_token": "下一页token(如果有更多回复)"
|
|
1775
|
+
> }
|
|
1776
|
+
> ```
|
|
1777
|
+
>
|
|
1778
|
+
> ### 字段说明:
|
|
1779
|
+
> - `reply_level`: 回复层级(1表示二级评论/回复)
|
|
1780
|
+
> - `is_creator`: 是否为视频创作者(如果是创作者回复会标记为true)
|
|
1781
|
+
> - 其他字段与一级评论相同
|
|
1782
|
+
>
|
|
1783
|
+
> # [English]
|
|
1784
|
+
> ### Purpose:
|
|
1785
|
+
> - Get video second-level comments
|
|
1786
|
+
>
|
|
1787
|
+
> ### Parameters:
|
|
1788
|
+
> - id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc.
|
|
1789
|
+
> - continuation_token: Token to continue fetching comments. Default is None.
|
|
1790
|
+
> ### Returns:
|
|
1791
|
+
> - Video comments.
|
|
1792
|
+
>
|
|
1793
|
+
> # [示例/Example]
|
|
1794
|
+
> id = "LuIL5JATZsc"
|
|
1795
|
+
|
|
1796
|
+
#### Parameters
|
|
1797
|
+
|
|
1798
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
1799
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1800
|
+
| continuation_token | query | string | Yes | 回复的continuation token(从一级评论的reply_continuation_token字段获取)/Reply continuation token from first-level comment | None | None | None |
|
|
1801
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | zh-CN | zh-CN | None |
|
|
1802
|
+
| country_code | query | string | No | 国家代码(如US, JP等)/Country code | US | US | None |
|
|
1803
|
+
| need_format | query | boolean | No | 是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the data | true | None | None |
|
|
1804
|
+
|
|
1805
|
+
#### Request Body
|
|
1806
|
+
|
|
1807
|
+
None
|
|
1808
|
+
|
|
1809
|
+
#### Success Response
|
|
1810
|
+
|
|
1811
|
+
##### `200 application/json`
|
|
1812
|
+
|
|
1813
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
1814
|
+
|
|
1815
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
1816
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
1817
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
1818
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
1819
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
1820
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
1821
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
1822
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
1823
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
1824
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
1825
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
1826
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
1827
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
1828
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
1829
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
1830
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
1831
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
1832
|
+
|
|
1833
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-video-comments"></a>
|
|
1834
|
+
### `GET /api/u1/v1/youtube/web_v2/get_video_comments`
|
|
1835
|
+
|
|
1836
|
+
- Summary: 获取视频评论/Get video comments
|
|
1837
|
+
- Capabilities: comments / content details
|
|
1838
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
1839
|
+
- operationId: `get_video_comments_api_v1_youtube_web_v2_get_video_comments_get`
|
|
1840
|
+
|
|
1841
|
+
#### Notes
|
|
1842
|
+
|
|
1843
|
+
> # [中文]
|
|
1844
|
+
> ### 用途:
|
|
1845
|
+
> - 获取YouTube视频的一级评论
|
|
1846
|
+
>
|
|
1847
|
+
> ### 参数详解:
|
|
1848
|
+
>
|
|
1849
|
+
> #### 📌 必选参数:
|
|
1850
|
+
> **video_id** (string)
|
|
1851
|
+
> - **作用**: 视频ID
|
|
1852
|
+
> - **格式**: YouTube视频ID字符串
|
|
1853
|
+
> - **示例**: `"oaSNBz4qMQY"`
|
|
1854
|
+
> - **获取方式**: 从URL `https://www.youtube.com/watch?v=oaSNBz4qMQY` 中提取
|
|
1855
|
+
>
|
|
1856
|
+
> #### ⚙️ 可选参数:
|
|
1857
|
+
> **language_code** (string, 可选)
|
|
1858
|
+
> - **作用**: 设置评论显示的语言偏好
|
|
1859
|
+
> - **默认值**: `"zh-CN"`
|
|
1860
|
+
> - **可用值**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"` 等
|
|
1861
|
+
>
|
|
1862
|
+
> **country_code** (string, 可选)
|
|
1863
|
+
> - **作用**: 设置地区代码
|
|
1864
|
+
> - **默认值**: `"US"`
|
|
1865
|
+
> - **可用值**: `"US"`, `"JP"`, `"GB"` 等
|
|
1866
|
+
>
|
|
1867
|
+
> **sort_by** (string, 可选)
|
|
1868
|
+
> - **作用**: 评论排序方式
|
|
1869
|
+
> - **默认值**: `"top"`
|
|
1870
|
+
> - **可用值**:
|
|
1871
|
+
> - `"top"` - 热门评论(按点赞数排序)
|
|
1872
|
+
> - `"newest"` - 最新评论(按时间排序)
|
|
1873
|
+
>
|
|
1874
|
+
> **continuation_token** (string, 可选)
|
|
1875
|
+
> - **作用**: 翻页令牌,用于获取下一页评论
|
|
1876
|
+
> - **默认值**: `null`
|
|
1877
|
+
> - **获取方式**: 从上一次请求的响应中提取
|
|
1878
|
+
>
|
|
1879
|
+
> **need_format** (boolean, 可选)
|
|
1880
|
+
> - **作用**: 是否返回清洗后的精简数据
|
|
1881
|
+
> - **默认值**: `false`
|
|
1882
|
+
> - **可用值**:
|
|
1883
|
+
> - `false` - 返回原始完整数据
|
|
1884
|
+
> - `true` - 返回清洗后的精简数据(推荐)
|
|
1885
|
+
>
|
|
1886
|
+
> ### 返回数据结构 (need_format=true):
|
|
1887
|
+
> ```json
|
|
1888
|
+
> {
|
|
1889
|
+
> "comments": [
|
|
1890
|
+
> {
|
|
1891
|
+
> "comment_id": "UgzRDoUJAvDNn5_8i8p4AaABAg",
|
|
1892
|
+
> "content": "评论内容文本",
|
|
1893
|
+
> "published_time": "1天前",
|
|
1894
|
+
> "reply_level": 0,
|
|
1895
|
+
> "like_count": "2",
|
|
1896
|
+
> "like_count_a11y": "2 次赞",
|
|
1897
|
+
> "reply_count": "0",
|
|
1898
|
+
> "reply_count_a11y": "0 条回复",
|
|
1899
|
+
> "reply_count_text": "1 条回复",
|
|
1900
|
+
> "reply_continuation_token": "...",
|
|
1901
|
+
> "author": {
|
|
1902
|
+
> "channel_id": "UCzRzHrLFuH0lHZYnrI84I8Q",
|
|
1903
|
+
> "display_name": "@username",
|
|
1904
|
+
> "channel_url": "https://www.youtube.com/@username",
|
|
1905
|
+
> "avatar_url": "https://yt3.ggpht.com/...",
|
|
1906
|
+
> "avatar_thumbnails": [
|
|
1907
|
+
> {"url": "...", "width": 88, "height": 88}
|
|
1908
|
+
> ],
|
|
1909
|
+
> "is_verified": false,
|
|
1910
|
+
> "is_creator": false,
|
|
1911
|
+
> "is_artist": false
|
|
1912
|
+
> },
|
|
1913
|
+
> "creator_thumbnail_url": "https://yt3.ggpht.com/..."
|
|
1914
|
+
> }
|
|
1915
|
+
> ],
|
|
1916
|
+
> "continuation_token": "下一页token"
|
|
1917
|
+
> }
|
|
1918
|
+
> ```
|
|
1919
|
+
>
|
|
1920
|
+
> ### 字段说明:
|
|
1921
|
+
> - `comment_id`: 评论唯一ID
|
|
1922
|
+
> - `content`: 评论文本内容
|
|
1923
|
+
> - `published_time`: 发布时间(相对时间,如"1天前")
|
|
1924
|
+
> - `reply_level`: 回复层级(0表示一级评论)
|
|
1925
|
+
> - `like_count`: 点赞数
|
|
1926
|
+
> - `reply_count`: 回复数
|
|
1927
|
+
> - `reply_count_text`: 回复数文本(如"1 条回复")
|
|
1928
|
+
> - `reply_continuation_token`: 获取该评论回复的token
|
|
1929
|
+
> - `author`: 评论作者信息
|
|
1930
|
+
> - `channel_id`: 作者频道ID
|
|
1931
|
+
> - `display_name`: 显示名称
|
|
1932
|
+
> - `channel_url`: 频道URL
|
|
1933
|
+
> - `avatar_url`: 头像URL
|
|
1934
|
+
> - `is_verified`: 是否已认证
|
|
1935
|
+
> - `is_creator`: 是否为视频创作者
|
|
1936
|
+
> - `is_artist`: 是否为音乐人
|
|
1937
|
+
> - `creator_thumbnail_url`: 视频创作者头像URL
|
|
1938
|
+
>
|
|
1939
|
+
> # [English]
|
|
1940
|
+
> ### Purpose:
|
|
1941
|
+
> - Get YouTube video first-level comments
|
|
1942
|
+
>
|
|
1943
|
+
> ### Parameters:
|
|
1944
|
+
>
|
|
1945
|
+
> #### 📌 Required:
|
|
1946
|
+
> **video_id** (string)
|
|
1947
|
+
> - **Purpose**: Video ID
|
|
1948
|
+
> - **Format**: YouTube video ID string
|
|
1949
|
+
> - **Example**: `"oaSNBz4qMQY"`
|
|
1950
|
+
> - **How to get**: Extract from URL `https://www.youtube.com/watch?v=oaSNBz4qMQY`
|
|
1951
|
+
>
|
|
1952
|
+
> #### ⚙️ Optional:
|
|
1953
|
+
> **language_code** (string, optional)
|
|
1954
|
+
> - **Purpose**: Set language preference for comments
|
|
1955
|
+
> - **Default**: `"zh-CN"`
|
|
1956
|
+
> - **Values**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"`, etc.
|
|
1957
|
+
>
|
|
1958
|
+
> **country_code** (string, optional)
|
|
1959
|
+
> - **Purpose**: Set region code
|
|
1960
|
+
> - **Default**: `"US"`
|
|
1961
|
+
> - **Values**: `"US"`, `"JP"`, `"GB"`, etc.
|
|
1962
|
+
>
|
|
1963
|
+
> **sort_by** (string, optional)
|
|
1964
|
+
> - **Purpose**: Comment sorting method
|
|
1965
|
+
> - **Default**: `"top"`
|
|
1966
|
+
> - **Values**:
|
|
1967
|
+
> - `"top"` - Top comments (sorted by likes)
|
|
1968
|
+
> - `"newest"` - Newest comments (sorted by time)
|
|
1969
|
+
>
|
|
1970
|
+
> **continuation_token** (string, optional)
|
|
1971
|
+
> - **Purpose**: Pagination token for next page
|
|
1972
|
+
> - **Default**: `null`
|
|
1973
|
+
> - **How to get**: Extract from previous response
|
|
1974
|
+
>
|
|
1975
|
+
> **need_format** (boolean, optional)
|
|
1976
|
+
> - **Purpose**: Whether to return cleaned simplified data
|
|
1977
|
+
> - **Default**: `false`
|
|
1978
|
+
> - **Values**:
|
|
1979
|
+
> - `false` - Return raw complete data
|
|
1980
|
+
> - `true` - Return cleaned simplified data (recommended)
|
|
1981
|
+
>
|
|
1982
|
+
> ### Response Structure (need_format=true):
|
|
1983
|
+
> ```json
|
|
1984
|
+
> {
|
|
1985
|
+
> "comments": [
|
|
1986
|
+
> {
|
|
1987
|
+
> "comment_id": "UgzRDoUJAvDNn5_8i8p4AaABAg",
|
|
1988
|
+
> "content": "Comment text content",
|
|
1989
|
+
> "published_time": "1 day ago",
|
|
1990
|
+
> "reply_level": 0,
|
|
1991
|
+
> "like_count": "2",
|
|
1992
|
+
> "like_count_a11y": "2 likes",
|
|
1993
|
+
> "reply_count": "0",
|
|
1994
|
+
> "reply_count_a11y": "0 replies",
|
|
1995
|
+
> "reply_count_text": "1 reply",
|
|
1996
|
+
> "reply_continuation_token": "...",
|
|
1997
|
+
> "author": {
|
|
1998
|
+
> "channel_id": "UCzRzHrLFuH0lHZYnrI84I8Q",
|
|
1999
|
+
> "display_name": "@username",
|
|
2000
|
+
> "channel_url": "https://www.youtube.com/@username",
|
|
2001
|
+
> "avatar_url": "https://yt3.ggpht.com/...",
|
|
2002
|
+
> "avatar_thumbnails": [
|
|
2003
|
+
> {"url": "...", "width": 88, "height": 88}
|
|
2004
|
+
> ],
|
|
2005
|
+
> "is_verified": false,
|
|
2006
|
+
> "is_creator": false,
|
|
2007
|
+
> "is_artist": false
|
|
2008
|
+
> },
|
|
2009
|
+
> "creator_thumbnail_url": "https://yt3.ggpht.com/..."
|
|
2010
|
+
> }
|
|
2011
|
+
> ],
|
|
2012
|
+
> "continuation_token": "next page token"
|
|
2013
|
+
> }
|
|
2014
|
+
> ```
|
|
2015
|
+
>
|
|
2016
|
+
> ### Field Descriptions:
|
|
2017
|
+
> - `comment_id`: Unique comment ID
|
|
2018
|
+
> - `content`: Comment text content
|
|
2019
|
+
> - `published_time`: Published time (relative, e.g., "1 day ago")
|
|
2020
|
+
> - `reply_level`: Reply level (0 for first-level comments)
|
|
2021
|
+
> - `like_count`: Number of likes
|
|
2022
|
+
> - `reply_count`: Number of replies
|
|
2023
|
+
> - `reply_count_text`: Reply count text (e.g., "1 reply")
|
|
2024
|
+
> - `reply_continuation_token`: Token to get replies for this comment
|
|
2025
|
+
> - `author`: Comment author info
|
|
2026
|
+
> - `channel_id`: Author's channel ID
|
|
2027
|
+
> - `display_name`: Display name
|
|
2028
|
+
> - `channel_url`: Channel URL
|
|
2029
|
+
> - `avatar_url`: Avatar URL
|
|
2030
|
+
> - `is_verified`: Whether verified
|
|
2031
|
+
> - `is_creator`: Whether video creator
|
|
2032
|
+
> - `is_artist`: Whether artist
|
|
2033
|
+
> - `creator_thumbnail_url`: Video creator's avatar URL
|
|
2034
|
+
>
|
|
2035
|
+
> # [示例/Examples]
|
|
2036
|
+
> ## 获取热门评论
|
|
2037
|
+
> GET /youtube_web/get_video_comments?video_id=oaSNBz4qMQY&sort_by=top
|
|
2038
|
+
>
|
|
2039
|
+
> ## 获取最新评论
|
|
2040
|
+
> GET /youtube_web/get_video_comments?video_id=oaSNBz4qMQY&sort_by=newest
|
|
2041
|
+
>
|
|
2042
|
+
> ## 获取清洗后的评论数据(推荐)
|
|
2043
|
+
> GET /youtube_web/get_video_comments?video_id=oaSNBz4qMQY&need_format=true
|
|
2044
|
+
>
|
|
2045
|
+
> ## 翻页获取更多评论
|
|
2046
|
+
> GET /youtube_web/get_video_comments?video_id=oaSNBz4qMQY&continuation_token=xxx&need_format=true
|
|
2047
|
+
|
|
2048
|
+
#### Parameters
|
|
2049
|
+
|
|
2050
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2051
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2052
|
+
| video_id | query | string | Yes | 视频ID/Video ID | None | LuIL5JATZsc | None |
|
|
2053
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | zh-CN | zh-CN | None |
|
|
2054
|
+
| country_code | query | string | No | 国家代码(如US, JP等)/Country code | US | US | None |
|
|
2055
|
+
| sort_by | query | string enum[top, newest] | No | 排序方式 \| Sort by | top | None | None |
|
|
2056
|
+
| continuation_token | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
2057
|
+
| need_format | query | boolean | No | 是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the data | true | None | None |
|
|
2058
|
+
|
|
2059
|
+
#### Request Body
|
|
2060
|
+
|
|
2061
|
+
None
|
|
2062
|
+
|
|
2063
|
+
#### Success Response
|
|
2064
|
+
|
|
2065
|
+
##### `200 application/json`
|
|
2066
|
+
|
|
2067
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2068
|
+
|
|
2069
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2070
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2071
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2072
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2073
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2074
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2075
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2076
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2077
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2078
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2079
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2080
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
2081
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2082
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2083
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2084
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2085
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
2086
|
+
|
|
2087
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-video-info"></a>
|
|
2088
|
+
### `GET /api/u1/v1/youtube/web_v2/get_video_info`
|
|
2089
|
+
|
|
2090
|
+
- Summary: 获取视频详情 /Get video information
|
|
2091
|
+
- Capabilities: content details
|
|
2092
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
2093
|
+
- operationId: `get_video_info_api_v1_youtube_web_v2_get_video_info_get`
|
|
2094
|
+
|
|
2095
|
+
#### Notes
|
|
2096
|
+
|
|
2097
|
+
> # [中文]
|
|
2098
|
+
> ### 用途:
|
|
2099
|
+
> - 获取YouTube视频详情信息
|
|
2100
|
+
> - 返回原始完整数据(包含 playerResponse 和 initialData)
|
|
2101
|
+
>
|
|
2102
|
+
> ### 参数详解:
|
|
2103
|
+
>
|
|
2104
|
+
> #### 📌 必选参数:
|
|
2105
|
+
> **video_id** (string)
|
|
2106
|
+
> - **作用**: 视频ID
|
|
2107
|
+
> - **获取方式**: 从视频URL中提取,例如 `https://www.youtube.com/watch?v=oaSNBz4qMQY`,video_id 就是 `oaSNBz4qMQY`
|
|
2108
|
+
> - **示例**: `"oaSNBz4qMQY"`
|
|
2109
|
+
>
|
|
2110
|
+
> #### ⚙️ 可选参数:
|
|
2111
|
+
> **language_code** (string, 可选)
|
|
2112
|
+
> - **作用**: 设置语言偏好
|
|
2113
|
+
> - **默认值**: `"zh-CN"`
|
|
2114
|
+
> - **可用值**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"` 等
|
|
2115
|
+
>
|
|
2116
|
+
> ### 返回数据结构:
|
|
2117
|
+
> ```json
|
|
2118
|
+
> {
|
|
2119
|
+
> "playerResponse": {
|
|
2120
|
+
> "videoDetails": {},
|
|
2121
|
+
> "streamingData": {
|
|
2122
|
+
> "formats": [],
|
|
2123
|
+
> "adaptiveFormats": []
|
|
2124
|
+
> },
|
|
2125
|
+
> "microformat": {},
|
|
2126
|
+
> ...
|
|
2127
|
+
> },
|
|
2128
|
+
> "initialData": {
|
|
2129
|
+
> "contents": {
|
|
2130
|
+
> "twoColumnWatchNextResults": {
|
|
2131
|
+
> "results": {
|
|
2132
|
+
> "results": {
|
|
2133
|
+
> "contents": [
|
|
2134
|
+
> {
|
|
2135
|
+
> "videoPrimaryInfoRenderer": {...},
|
|
2136
|
+
> "videoSecondaryInfoRenderer": {...}
|
|
2137
|
+
> }
|
|
2138
|
+
> ]
|
|
2139
|
+
> }
|
|
2140
|
+
> }
|
|
2141
|
+
> }
|
|
2142
|
+
> },
|
|
2143
|
+
> ...
|
|
2144
|
+
> }
|
|
2145
|
+
> }
|
|
2146
|
+
> ```
|
|
2147
|
+
>
|
|
2148
|
+
> ### 主要字段说明:
|
|
2149
|
+
> - `playerResponse`: YouTube 播放器响应数据
|
|
2150
|
+
> - `videoDetails`: 视频基本信息(可能为空,取决于YouTube的返回)
|
|
2151
|
+
> - `streamingData`: 视频流数据(包含 formats 和 adaptiveFormats,包含 googlevideo.com 的URL)
|
|
2152
|
+
> - `microformat`: 元数据信息
|
|
2153
|
+
> - `initialData`: YouTube 页面初始化数据
|
|
2154
|
+
> - `videoPrimaryInfoRenderer`: 主要信息(标题、观看次数、点赞数等)
|
|
2155
|
+
> - `videoSecondaryInfoRenderer`: 次要信息(频道信息、描述等)
|
|
2156
|
+
>
|
|
2157
|
+
> # [English]
|
|
2158
|
+
> ### Purpose:
|
|
2159
|
+
> - Get YouTube video details
|
|
2160
|
+
> - Returns raw complete data (includes playerResponse and initialData)
|
|
2161
|
+
>
|
|
2162
|
+
> ### Parameters:
|
|
2163
|
+
>
|
|
2164
|
+
> #### 📌 Required:
|
|
2165
|
+
> **video_id** (string)
|
|
2166
|
+
> - **Purpose**: Video ID
|
|
2167
|
+
> - **How to get**: Extract from video URL, e.g., `https://www.youtube.com/watch?v=oaSNBz4qMQY`, video_id is `oaSNBz4qMQY`
|
|
2168
|
+
> - **Example**: `"oaSNBz4qMQY"`
|
|
2169
|
+
>
|
|
2170
|
+
> #### ⚙️ Optional:
|
|
2171
|
+
> **language_code** (string, optional)
|
|
2172
|
+
> - **Purpose**: Set language preference
|
|
2173
|
+
> - **Default**: `"zh-CN"`
|
|
2174
|
+
> - **Values**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"`, etc.
|
|
2175
|
+
>
|
|
2176
|
+
> ### Response Structure:
|
|
2177
|
+
> ```json
|
|
2178
|
+
> {
|
|
2179
|
+
> "playerResponse": {
|
|
2180
|
+
> "videoDetails": {},
|
|
2181
|
+
> "streamingData": {
|
|
2182
|
+
> "formats": [],
|
|
2183
|
+
> "adaptiveFormats": []
|
|
2184
|
+
> },
|
|
2185
|
+
> "microformat": {},
|
|
2186
|
+
> ...
|
|
2187
|
+
> },
|
|
2188
|
+
> "initialData": {
|
|
2189
|
+
> "contents": {
|
|
2190
|
+
> "twoColumnWatchNextResults": {
|
|
2191
|
+
> "results": {
|
|
2192
|
+
> "results": {
|
|
2193
|
+
> "contents": [
|
|
2194
|
+
> {
|
|
2195
|
+
> "videoPrimaryInfoRenderer": {...},
|
|
2196
|
+
> "videoSecondaryInfoRenderer": {...}
|
|
2197
|
+
> }
|
|
2198
|
+
> ]
|
|
2199
|
+
> }
|
|
2200
|
+
> }
|
|
2201
|
+
> }
|
|
2202
|
+
> },
|
|
2203
|
+
> ...
|
|
2204
|
+
> }
|
|
2205
|
+
> }
|
|
2206
|
+
> ```
|
|
2207
|
+
>
|
|
2208
|
+
> ### Key Fields:
|
|
2209
|
+
> - `playerResponse`: YouTube player response data
|
|
2210
|
+
> - `videoDetails`: Basic video info (may be empty depending on YouTube's response)
|
|
2211
|
+
> - `streamingData`: Video stream data (includes formats and adaptiveFormats with googlevideo.com URLs)
|
|
2212
|
+
> - `microformat`: Metadata information
|
|
2213
|
+
> - `initialData`: YouTube page initialization data
|
|
2214
|
+
> - `videoPrimaryInfoRenderer`: Primary info (title, view count, like count, etc.)
|
|
2215
|
+
> - `videoSecondaryInfoRenderer`: Secondary info (channel info, description, etc.)
|
|
2216
|
+
>
|
|
2217
|
+
> # [示例/Examples]
|
|
2218
|
+
> ## 获取视频详情数据 / Get video details
|
|
2219
|
+
> GET /youtube_web/get_video_info?video_id=oaSNBz4qMQY
|
|
2220
|
+
>
|
|
2221
|
+
> ## 指定语言 / Specify language
|
|
2222
|
+
> GET /youtube_web/get_video_info?video_id=oaSNBz4qMQY&language_code=en-US
|
|
2223
|
+
|
|
2224
|
+
#### Parameters
|
|
2225
|
+
|
|
2226
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2227
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2228
|
+
| video_id | query | string | Yes | 视频ID/Video ID | None | oaSNBz4qMQY | None |
|
|
2229
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | zh-CN | zh-CN | None |
|
|
2230
|
+
| need_format | query | boolean | No | 是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the data | true | None | None |
|
|
2231
|
+
|
|
2232
|
+
#### Request Body
|
|
2233
|
+
|
|
2234
|
+
None
|
|
2235
|
+
|
|
2236
|
+
#### Success Response
|
|
2237
|
+
|
|
2238
|
+
##### `200 application/json`
|
|
2239
|
+
|
|
2240
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2241
|
+
|
|
2242
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2243
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2244
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2245
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2246
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2247
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2248
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2249
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2250
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2251
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2252
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2253
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
2254
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2255
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2256
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2257
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2258
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
2259
|
+
|
|
2260
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-video-streams"></a>
|
|
2261
|
+
### `GET /api/u1/v1/youtube/web_v2/get_video_streams`
|
|
2262
|
+
|
|
2263
|
+
- Summary: 获取视频流信息/Get video streams info
|
|
2264
|
+
- Capabilities: content details / livestream
|
|
2265
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
2266
|
+
- operationId: `get_video_streams_api_v1_youtube_web_v2_get_video_streams_get`
|
|
2267
|
+
|
|
2268
|
+
#### Notes
|
|
2269
|
+
|
|
2270
|
+
> # [中文]
|
|
2271
|
+
> ### ⚠️ 重要说明:
|
|
2272
|
+
> - **此接口仅返回格式信息,URL 字段为 null**
|
|
2273
|
+
> - **必须搭配 get_signed_stream_url 接口获取播放地址**
|
|
2274
|
+
> - 如需一次性获取所有 URL,请使用 get_video_streams_v2 接口
|
|
2275
|
+
>
|
|
2276
|
+
> ### 用途:
|
|
2277
|
+
> - 获取YouTube视频所有清晰度的格式信息
|
|
2278
|
+
> - 返回标准格式(音视频合并)和自适应格式(音视频分离)
|
|
2279
|
+
>
|
|
2280
|
+
> ### 参数:
|
|
2281
|
+
> - video_id: 视频ID(推荐)
|
|
2282
|
+
> - video_url: 完整的视频URL(可选,如果提供video_id则忽略)
|
|
2283
|
+
>
|
|
2284
|
+
> ### 返回数据包含:
|
|
2285
|
+
> - 视频基本信息(标题、作者、时长、观看次数等)
|
|
2286
|
+
> - formats: 标准格式流(包含音频和视频)
|
|
2287
|
+
> - adaptive_formats: 自适应格式流(仅视频或仅音频)
|
|
2288
|
+
> - 每个格式包含: itag、mime_type、质量标签、分辨率、比特率等
|
|
2289
|
+
> - ⚠️ **url 字段为 null**(YouTube 需要签名解密才能获取真实播放地址)
|
|
2290
|
+
> - has_signature 为 true 表示需要使用 get_signed_stream_url 接口
|
|
2291
|
+
> - hls_manifest_url: HLS流地址(如果有)
|
|
2292
|
+
> - dash_manifest_url: DASH流地址(如果有)
|
|
2293
|
+
> - available_qualities: 所有可用的清晰度列表
|
|
2294
|
+
>
|
|
2295
|
+
> ### 使用流程(两步法):
|
|
2296
|
+
> 1. **第一步**: 调用此接口获取所有可用格式信息(URL 为 null)
|
|
2297
|
+
> 2. **第二步**: 从返回的 formats 或 adaptive_formats 中选择需要的 itag
|
|
2298
|
+
> 3. **第三步**: 调用 get_signed_stream_url 接口,传入 video_id 和 itag,获取真实播放地址
|
|
2299
|
+
>
|
|
2300
|
+
> ### 注意事项:
|
|
2301
|
+
> - YouTube 视频播放地址需要签名解密,原始 API 返回的 URL 字段为 null 是正常现象
|
|
2302
|
+
> - 播放地址必须通过 get_signed_stream_url 接口单独获取
|
|
2303
|
+
> - 高清视频(720p+)通常需要分别下载音视频流并合并
|
|
2304
|
+
>
|
|
2305
|
+
> ### 价格:
|
|
2306
|
+
> - $0.001 USD/请求
|
|
2307
|
+
>
|
|
2308
|
+
> # [English]
|
|
2309
|
+
> ### ⚠️ Important Notice:
|
|
2310
|
+
> - **This endpoint ONLY returns format information, URL fields are null**
|
|
2311
|
+
> - **MUST use get_signed_stream_url endpoint to get playback URLs**
|
|
2312
|
+
> - For getting all URLs at once, use get_video_streams_v2 endpoint
|
|
2313
|
+
>
|
|
2314
|
+
> ### Purpose:
|
|
2315
|
+
> - Get all quality format information for YouTube video
|
|
2316
|
+
> - Returns standard formats (merged audio/video) and adaptive formats (separate audio/video)
|
|
2317
|
+
>
|
|
2318
|
+
> ### Parameters:
|
|
2319
|
+
> - video_id: Video ID (recommended)
|
|
2320
|
+
> - video_url: Full video URL (optional, ignored if video_id is provided)
|
|
2321
|
+
>
|
|
2322
|
+
> ### Returns:
|
|
2323
|
+
> - Basic video info (title, author, duration, view count, etc.)
|
|
2324
|
+
> - formats: Standard format streams (audio and video combined)
|
|
2325
|
+
> - adaptive_formats: Adaptive format streams (video-only or audio-only)
|
|
2326
|
+
> - Each format contains: itag, mime_type, quality label, resolution, bitrate, etc.
|
|
2327
|
+
> - ⚠️ **url field is null** (YouTube requires signature decryption to get actual playback URL)
|
|
2328
|
+
> - has_signature=true means need to use get_signed_stream_url endpoint
|
|
2329
|
+
> - hls_manifest_url: HLS manifest URL (if available)
|
|
2330
|
+
> - dash_manifest_url: DASH manifest URL (if available)
|
|
2331
|
+
> - available_qualities: List of all available quality levels
|
|
2332
|
+
>
|
|
2333
|
+
> ### Usage Flow (Two-Step Method):
|
|
2334
|
+
> 1. **Step 1**: Call this endpoint to get all available format information (URLs are null)
|
|
2335
|
+
> 2. **Step 2**: Select the desired itag from returned formats or adaptive_formats
|
|
2336
|
+
> 3. **Step 3**: Call get_signed_stream_url endpoint with video_id and itag to get actual playback URL
|
|
2337
|
+
>
|
|
2338
|
+
> ### Notes:
|
|
2339
|
+
> - YouTube video playback URLs require signature decryption, null URL fields in raw API response is normal
|
|
2340
|
+
> - Playback URLs must be obtained separately via get_signed_stream_url endpoint
|
|
2341
|
+
> - High-quality videos (720p+) usually require separate download and merge of audio/video streams
|
|
2342
|
+
>
|
|
2343
|
+
> ### Price:
|
|
2344
|
+
> - $0.001 USD/request
|
|
2345
|
+
>
|
|
2346
|
+
> ### [示例/Example]
|
|
2347
|
+
> #### Step 1 - 获取格式信息: video_id = "dQw4w9WgXcQ"
|
|
2348
|
+
> #### Step 2 - 获取播放地址: use get_signed_stream_url with selected itag
|
|
2349
|
+
|
|
2350
|
+
#### Parameters
|
|
2351
|
+
|
|
2352
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2353
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2354
|
+
| video_id | query | string | No | 视频ID/Video ID | None | dQw4w9WgXcQ | None |
|
|
2355
|
+
| video_url | query | string | No | 视频URL/Video URL (如果提供video_id则忽略此参数/Ignored if video_id is provided) | None | https://www.youtube.com/watch?v=dQw4w9WgXcQ | None |
|
|
2356
|
+
|
|
2357
|
+
#### Request Body
|
|
2358
|
+
|
|
2359
|
+
None
|
|
2360
|
+
|
|
2361
|
+
#### Success Response
|
|
2362
|
+
|
|
2363
|
+
##### `200 application/json`
|
|
2364
|
+
|
|
2365
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2366
|
+
|
|
2367
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2368
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2369
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2370
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2371
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2372
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2373
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2374
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2375
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2376
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2377
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2378
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
2379
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2380
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2381
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2382
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2383
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
2384
|
+
|
|
2385
|
+
<a id="get-api-u1-v1-youtube-web-v2-get-video-streams-v2"></a>
|
|
2386
|
+
### `GET /api/u1/v1/youtube/web_v2/get_video_streams_v2`
|
|
2387
|
+
|
|
2388
|
+
- Summary: 获取视频流信息 V2/Get video streams info V2
|
|
2389
|
+
- Capabilities: content details / livestream
|
|
2390
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
2391
|
+
- operationId: `get_video_streams_v2_api_v1_youtube_web_v2_get_video_streams_v2_get`
|
|
2392
|
+
|
|
2393
|
+
#### Notes
|
|
2394
|
+
|
|
2395
|
+
> # [中文]
|
|
2396
|
+
> ### ✅ 特性:
|
|
2397
|
+
> - **自动返回所有格式的已解密播放地址**
|
|
2398
|
+
> - 无需额外调用 get_signed_stream_url 接口
|
|
2399
|
+
> - 一次性获取所有清晰度的可用链接
|
|
2400
|
+
>
|
|
2401
|
+
> ### 用途:
|
|
2402
|
+
> - 获取YouTube视频所有清晰度的格式信息和播放地址
|
|
2403
|
+
> - 返回标准格式(音视频合并)和自适应格式(音视频分离)
|
|
2404
|
+
> - 适合需要展示所有清晰度选项的场景
|
|
2405
|
+
>
|
|
2406
|
+
> ### 参数:
|
|
2407
|
+
> - video_id: 视频ID(推荐)
|
|
2408
|
+
> - video_url: 完整的视频URL(可选,如果提供video_id则忽略)
|
|
2409
|
+
>
|
|
2410
|
+
> ### 返回数据包含:
|
|
2411
|
+
> - 视频基本信息(标题、作者、时长、观看次数等)
|
|
2412
|
+
> - formats: 标准格式流(包含音频和视频)
|
|
2413
|
+
> - adaptive_formats: 自适应格式流(仅视频或仅音频)
|
|
2414
|
+
> - 每个格式包含: itag、mime_type、质量标签、分辨率、比特率等
|
|
2415
|
+
> - ✅ **url 字段包含已解密的播放地址,可直接使用**
|
|
2416
|
+
> - has_signature 为 false 表示 URL 已解密,可直接播放
|
|
2417
|
+
> - hls_manifest_url: HLS流地址(如果有)
|
|
2418
|
+
> - dash_manifest_url: DASH流地址(如果有)
|
|
2419
|
+
> - available_qualities: 所有可用的清晰度列表
|
|
2420
|
+
> - expires_in_seconds: URL 过期时间(约 6 小时 = 21600 秒)
|
|
2421
|
+
>
|
|
2422
|
+
> ### 与 get_video_streams 的区别:
|
|
2423
|
+
> - **get_video_streams**: URL 为 null,需要搭配 get_signed_stream_url 使用(两步法)
|
|
2424
|
+
> - **get_video_streams_v2 (本接口)**: 自动返回所有已解密的 URL(一步到位)
|
|
2425
|
+
>
|
|
2426
|
+
> ### 注意事项:
|
|
2427
|
+
> - 播放地址有时效性(约6小时),建议获取后尽快使用
|
|
2428
|
+
> - 高清视频(720p+)通常需要分别下载音视频流并合并
|
|
2429
|
+
> - 响应时间较长(约10秒),因为需要为所有格式解密 URL
|
|
2430
|
+
>
|
|
2431
|
+
> ### 价格:
|
|
2432
|
+
> - $0.003 USD/请求
|
|
2433
|
+
>
|
|
2434
|
+
> # [English]
|
|
2435
|
+
> ### ✅ Features:
|
|
2436
|
+
> - **Automatically returns decrypted playback URLs for all formats**
|
|
2437
|
+
> - No need to call get_signed_stream_url endpoint separately
|
|
2438
|
+
> - Get all quality URLs in one request
|
|
2439
|
+
>
|
|
2440
|
+
> ### Purpose:
|
|
2441
|
+
> - Get all quality format information and playback URLs for YouTube video
|
|
2442
|
+
> - Returns standard formats (merged audio/video) and adaptive formats (separate audio/video)
|
|
2443
|
+
> - Suitable for scenarios that need to display all quality options
|
|
2444
|
+
>
|
|
2445
|
+
> ### Parameters:
|
|
2446
|
+
> - video_id: Video ID (recommended)
|
|
2447
|
+
> - video_url: Full video URL (optional, ignored if video_id is provided)
|
|
2448
|
+
>
|
|
2449
|
+
> ### Returns:
|
|
2450
|
+
> - Basic video info (title, author, duration, view count, etc.)
|
|
2451
|
+
> - formats: Standard format streams (audio and video combined)
|
|
2452
|
+
> - adaptive_formats: Adaptive format streams (video-only or audio-only)
|
|
2453
|
+
> - Each format contains: itag, mime_type, quality label, resolution, bitrate, etc.
|
|
2454
|
+
> - ✅ **url field contains decrypted playback URL, ready to use**
|
|
2455
|
+
> - has_signature=false means URL is decrypted and ready to play
|
|
2456
|
+
> - hls_manifest_url: HLS manifest URL (if available)
|
|
2457
|
+
> - dash_manifest_url: DASH manifest URL (if available)
|
|
2458
|
+
> - available_qualities: List of all available quality levels
|
|
2459
|
+
> - expires_in_seconds: URL expiration time (about 6 hours = 21600 seconds)
|
|
2460
|
+
>
|
|
2461
|
+
> ### Difference from get_video_streams:
|
|
2462
|
+
> - **get_video_streams**: URLs are null, need to use get_signed_stream_url (two-step method)
|
|
2463
|
+
> - **get_video_streams_v2 (this endpoint)**: Automatically returns all decrypted URLs (one-step solution)
|
|
2464
|
+
>
|
|
2465
|
+
> ### Notes:
|
|
2466
|
+
> - Playback URLs expire after ~6 hours, use them promptly
|
|
2467
|
+
> - High-quality videos (720p+) usually require separate download and merge of audio/video streams
|
|
2468
|
+
> - Longer response time (~10 seconds) as it needs to decrypt URLs for all formats
|
|
2469
|
+
>
|
|
2470
|
+
> ### Price:
|
|
2471
|
+
> - $0.003 USD/request
|
|
2472
|
+
>
|
|
2473
|
+
> ### [示例/Example]
|
|
2474
|
+
> #### 获取所有格式和URL: video_id = "dQw4w9WgXcQ"
|
|
2475
|
+
|
|
2476
|
+
#### Parameters
|
|
2477
|
+
|
|
2478
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2479
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2480
|
+
| video_id | query | string | No | 视频ID/Video ID | None | dQw4w9WgXcQ | None |
|
|
2481
|
+
| video_url | query | string | No | 视频URL/Video URL (如果提供video_id则忽略此参数/Ignored if video_id is provided) | None | https://www.youtube.com/watch?v=dQw4w9WgXcQ | None |
|
|
2482
|
+
|
|
2483
|
+
#### Request Body
|
|
2484
|
+
|
|
2485
|
+
None
|
|
2486
|
+
|
|
2487
|
+
#### Success Response
|
|
2488
|
+
|
|
2489
|
+
##### `200 application/json`
|
|
2490
|
+
|
|
2491
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2492
|
+
|
|
2493
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2494
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2495
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2496
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2497
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2498
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2499
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2500
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2501
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2502
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2503
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2504
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
2505
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2506
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2507
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2508
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2509
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
2510
|
+
|
|
2511
|
+
<a id="get-api-u1-v1-youtube-web-v2-search-channels"></a>
|
|
2512
|
+
### `GET /api/u1/v1/youtube/web_v2/search_channels`
|
|
2513
|
+
|
|
2514
|
+
- Summary: 搜索频道/Search channels
|
|
2515
|
+
- Capabilities: search / profiles / accounts
|
|
2516
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
2517
|
+
- operationId: `search_channels_api_v1_youtube_web_v2_search_channels_get`
|
|
2518
|
+
|
|
2519
|
+
#### Notes
|
|
2520
|
+
|
|
2521
|
+
> # [中文]
|
|
2522
|
+
> ### 用途:
|
|
2523
|
+
> - 搜索YouTube频道
|
|
2524
|
+
> - 只返回频道类型的搜索结果(过滤掉视频、播放列表等)
|
|
2525
|
+
> - 支持分页获取更多频道
|
|
2526
|
+
>
|
|
2527
|
+
> ### 参数:
|
|
2528
|
+
> - keyword: 搜索关键词(首次请求必填)
|
|
2529
|
+
> - continuation_token: 分页token(可选,用于获取下一页)
|
|
2530
|
+
> - need_format: 是否格式化数据(默认 true)
|
|
2531
|
+
> - true: 返回格式化的结构化数据(推荐)
|
|
2532
|
+
> - false: 返回原始的 YouTube API 结构(用于调试)
|
|
2533
|
+
>
|
|
2534
|
+
> ### 返回数据包含:
|
|
2535
|
+
> #### 当 need_format=true 时:
|
|
2536
|
+
> - keyword: 搜索关键词
|
|
2537
|
+
> - channels: 频道列表
|
|
2538
|
+
> - channel_id: 频道ID(如 "UCjuNibFJ21MiSNpu8LZyV4w")
|
|
2539
|
+
> - title: 频道名称
|
|
2540
|
+
> - handle: 频道自定义handle(如 "@chaijing2023")
|
|
2541
|
+
> - subscriber_count_text: 订阅者数量文本(如 "1.11M subscribers")
|
|
2542
|
+
> - description: 频道描述片段
|
|
2543
|
+
> - thumbnails: 缩略图列表(包含不同尺寸)
|
|
2544
|
+
> - is_subscribed: 当前用户是否已订阅该频道(布尔值)
|
|
2545
|
+
> - canonical_url: 频道规范URL路径(如 "/@chaijing2023")
|
|
2546
|
+
> - channel_url: 频道完整URL(优先使用自定义URL)
|
|
2547
|
+
> - continuation_token: 下一页的分页token
|
|
2548
|
+
> - has_more: 是否还有更多频道
|
|
2549
|
+
> - total_count: 当前页频道数量
|
|
2550
|
+
>
|
|
2551
|
+
> #### 当 need_format=false 时:
|
|
2552
|
+
> - keyword: 搜索关键词
|
|
2553
|
+
> - channels: 原始的 channelRenderer 对象列表
|
|
2554
|
+
> - continuation_token: 下一页的分页token
|
|
2555
|
+
> - has_more: 是否还有更多频道
|
|
2556
|
+
> - total_count: 当前页频道数量
|
|
2557
|
+
>
|
|
2558
|
+
> ### 使用流程:
|
|
2559
|
+
> 1. 首次请求:只传 keyword 参数
|
|
2560
|
+
> 2. 获取响应中的 continuation_token
|
|
2561
|
+
> 3. 下次请求:传入 continuation_token(keyword 可选)
|
|
2562
|
+
> 4. 重复步骤 2-3 直到 has_more 为 false
|
|
2563
|
+
>
|
|
2564
|
+
> ### 注意事项:
|
|
2565
|
+
> - 每页通常返回 10-20 个频道
|
|
2566
|
+
> - 搜索结果只包含频道,不包含视频、播放列表等
|
|
2567
|
+
> - 搜索结果的顺序和数量由 YouTube 算法决定
|
|
2568
|
+
>
|
|
2569
|
+
> ### 价格:
|
|
2570
|
+
> - $0.001 USD / 请求
|
|
2571
|
+
>
|
|
2572
|
+
> # [English]
|
|
2573
|
+
> ### Purpose:
|
|
2574
|
+
> - Search YouTube channels
|
|
2575
|
+
> - Only returns channel-type search results (filters out videos, playlists, etc.)
|
|
2576
|
+
> - Supports pagination to get more channels
|
|
2577
|
+
>
|
|
2578
|
+
> ### Parameters:
|
|
2579
|
+
> - keyword: Search keyword (required for first request)
|
|
2580
|
+
> - continuation_token: Pagination token (optional, for next page)
|
|
2581
|
+
> - need_format: Whether to format data (default true)
|
|
2582
|
+
> - true: Return formatted structured data (recommended)
|
|
2583
|
+
> - false: Return raw YouTube API structure (for debugging)
|
|
2584
|
+
>
|
|
2585
|
+
> ### Returns:
|
|
2586
|
+
> #### When need_format=true:
|
|
2587
|
+
> - keyword: Search keyword
|
|
2588
|
+
> - channels: Channels list
|
|
2589
|
+
> - channel_id: Channel ID (e.g., "UCjuNibFJ21MiSNpu8LZyV4w")
|
|
2590
|
+
> - title: Channel name
|
|
2591
|
+
> - handle: Channel custom handle (e.g., "@chaijing2023")
|
|
2592
|
+
> - subscriber_count_text: Subscriber count text (e.g., "1.11M subscribers")
|
|
2593
|
+
> - description: Channel description snippet
|
|
2594
|
+
> - thumbnails: Thumbnail list (multiple sizes)
|
|
2595
|
+
> - is_subscribed: Whether current user is subscribed to this channel (boolean)
|
|
2596
|
+
> - canonical_url: Channel canonical URL path (e.g., "/@chaijing2023")
|
|
2597
|
+
> - channel_url: Full channel URL (prefers custom URL)
|
|
2598
|
+
> - continuation_token: Next page pagination token
|
|
2599
|
+
> - has_more: Whether there are more channels
|
|
2600
|
+
> - total_count: Current page channel count
|
|
2601
|
+
>
|
|
2602
|
+
> #### When need_format=false:
|
|
2603
|
+
> - keyword: Search keyword
|
|
2604
|
+
> - channels: Raw channelRenderer object list
|
|
2605
|
+
> - continuation_token: Next page pagination token
|
|
2606
|
+
> - has_more: Whether there are more channels
|
|
2607
|
+
> - total_count: Current page channel count
|
|
2608
|
+
>
|
|
2609
|
+
> ### Usage Flow:
|
|
2610
|
+
> 1. First request: Only pass keyword parameter
|
|
2611
|
+
> 2. Get continuation_token from response
|
|
2612
|
+
> 3. Next request: Pass continuation_token (keyword optional)
|
|
2613
|
+
> 4. Repeat steps 2-3 until has_more is false
|
|
2614
|
+
>
|
|
2615
|
+
> ### Notes:
|
|
2616
|
+
> - Each page typically returns 10-20 channels
|
|
2617
|
+
> - Search results only include channels, not videos, playlists, etc.
|
|
2618
|
+
> - Order and quantity of results determined by YouTube algorithm
|
|
2619
|
+
>
|
|
2620
|
+
> ### Price:
|
|
2621
|
+
> - $0.001 USD / request
|
|
2622
|
+
>
|
|
2623
|
+
> ### [示例/Example]
|
|
2624
|
+
> #### 搜索频道: keyword = "Rick Astley"
|
|
2625
|
+
|
|
2626
|
+
#### Parameters
|
|
2627
|
+
|
|
2628
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2629
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2630
|
+
| keyword | query | string | No | 搜索关键词/Search keyword | None | Rick Astley | None |
|
|
2631
|
+
| continuation_token | query | string | No | 分页token/Pagination token | None | None | None |
|
|
2632
|
+
| need_format | query | boolean | No | 是否格式化数据/Whether to format data | true | None | None |
|
|
2633
|
+
|
|
2634
|
+
#### Request Body
|
|
2635
|
+
|
|
2636
|
+
None
|
|
2637
|
+
|
|
2638
|
+
#### Success Response
|
|
2639
|
+
|
|
2640
|
+
##### `200 application/json`
|
|
2641
|
+
|
|
2642
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2643
|
+
|
|
2644
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2645
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2646
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2647
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2648
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2649
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2650
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2651
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2652
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2653
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2654
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2655
|
+
| cache_message | string | No | Cache message (EN-US) \| 缓存消息 (English) | This request will be cached. You can access the cached result directly using th… | None | None |
|
|
2656
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2657
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2658
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2659
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2660
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|