@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,2636 @@
|
|
|
1
|
+
# YouTube-Web-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-api.md`](../api-tags/youtube-web-api.md)
|
|
5
|
+
- Current contract file: `api-contracts/youtube-web-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: `21`
|
|
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数据接口/YouTube-Web-API endpoints)**
|
|
12
|
+
|
|
13
|
+
## Route Contracts
|
|
14
|
+
|
|
15
|
+
<a id="get-api-u1-v1-youtube-web-get-channel-description"></a>
|
|
16
|
+
### `GET /api/u1/v1/youtube/web/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_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_v2** 接口获取channel_id
|
|
35
|
+
> - 该接口会返回类似 `UCeu6U67OzJhV1KwBansH3Dg` 的频道ID
|
|
36
|
+
>
|
|
37
|
+
> ### 参数详解:
|
|
38
|
+
>
|
|
39
|
+
> #### 📌 必选参数(二选一):
|
|
40
|
+
> **channel_id** (string)
|
|
41
|
+
> - **作用**: 频道ID,用于第一次请求获取频道基本信息
|
|
42
|
+
> - **格式**: 通常以 `UC` 开头的24位字符串
|
|
43
|
+
> - **示例**: `"UCeu6U67OzJhV1KwBansH3Dg"`
|
|
44
|
+
> - **获取方式**: 调用 **get_channel_id_v2** 接口,传入频道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_v2?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_v2** 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_v2** 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_v2?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_v2?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_v2接口从频道URL获取/Channel ID, can be obtained from channel URL via get_channel_id_v2 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 | false | 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-get-channel-id"></a>
|
|
292
|
+
### `GET /api/u1/v1/youtube/web/get_channel_id`
|
|
293
|
+
|
|
294
|
+
- Summary: 获取频道ID/Get channel ID
|
|
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_get_channel_id_get`
|
|
298
|
+
|
|
299
|
+
#### Notes
|
|
300
|
+
|
|
301
|
+
> # [中文]
|
|
302
|
+
> ### 用途:
|
|
303
|
+
> - 获取频道ID。
|
|
304
|
+
> ### 参数:
|
|
305
|
+
> - channel_name: 频道名称。
|
|
306
|
+
> ### 返回:
|
|
307
|
+
> - 频道ID。
|
|
308
|
+
>
|
|
309
|
+
> # [English]
|
|
310
|
+
> ### Purpose:
|
|
311
|
+
> - Get channel ID.
|
|
312
|
+
> ### Parameters:
|
|
313
|
+
> - channel_name: Channel name.
|
|
314
|
+
> ### Returns:
|
|
315
|
+
> - Channel ID.
|
|
316
|
+
>
|
|
317
|
+
> # [示例/Example]
|
|
318
|
+
> channel_name = "LinusTechTips"
|
|
319
|
+
|
|
320
|
+
#### Parameters
|
|
321
|
+
|
|
322
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
323
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
324
|
+
| channel_name | query | string | Yes | 频道名称/Channel name | None | LinusTechTips | None |
|
|
325
|
+
|
|
326
|
+
#### Request Body
|
|
327
|
+
|
|
328
|
+
None
|
|
329
|
+
|
|
330
|
+
#### Success Response
|
|
331
|
+
|
|
332
|
+
##### `200 application/json`
|
|
333
|
+
|
|
334
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
335
|
+
|
|
336
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
337
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
338
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
339
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
340
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
341
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
342
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
343
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
344
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
345
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
346
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
347
|
+
| 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 |
|
|
348
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
349
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
350
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
351
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
352
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
353
|
+
|
|
354
|
+
<a id="get-api-u1-v1-youtube-web-get-channel-id-v2"></a>
|
|
355
|
+
### `GET /api/u1/v1/youtube/web/get_channel_id_v2`
|
|
356
|
+
|
|
357
|
+
- Summary: 从频道URL获取频道ID V2/Get channel ID from URL V2
|
|
358
|
+
- Capabilities: profiles / accounts
|
|
359
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
360
|
+
- operationId: `get_channel_id_v2_api_v1_youtube_web_get_channel_id_v2_get`
|
|
361
|
+
|
|
362
|
+
#### Notes
|
|
363
|
+
|
|
364
|
+
> # [中文]
|
|
365
|
+
> ### 用途:
|
|
366
|
+
> - 从YouTube频道URL转换获取频道ID(channel_id)。
|
|
367
|
+
> - 支持多种URL格式,包括@用户名格式、/channel/格式、/c/格式、/user/格式。
|
|
368
|
+
> ### 参数:
|
|
369
|
+
> - channel_url: 频道URL。
|
|
370
|
+
> ### 返回:
|
|
371
|
+
> - channel_id: 频道ID(如:UCeu6U67OzJhV1KwBansH3Dg)
|
|
372
|
+
> - channel_url: 标准化的频道URL
|
|
373
|
+
> - source: 数据来源(url_parse表示直接从URL解析,page_parse表示从页面解析)
|
|
374
|
+
>
|
|
375
|
+
> # [English]
|
|
376
|
+
> ### Purpose:
|
|
377
|
+
> - Convert YouTube channel URL to channel ID.
|
|
378
|
+
> - Supports multiple URL formats including @username, /channel/, /c/, /user/ formats.
|
|
379
|
+
> ### Parameters:
|
|
380
|
+
> - channel_url: Channel URL.
|
|
381
|
+
> ### Returns:
|
|
382
|
+
> - channel_id: Channel ID (e.g., UCeu6U67OzJhV1KwBansH3Dg)
|
|
383
|
+
> - channel_url: Normalized channel URL
|
|
384
|
+
> - source: Data source (url_parse means parsed from URL directly, page_parse means parsed from page)
|
|
385
|
+
>
|
|
386
|
+
> # [示例/Example]
|
|
387
|
+
> channel_url = "https://www.youtube.com/@CozyCraftYT"
|
|
388
|
+
|
|
389
|
+
#### Parameters
|
|
390
|
+
|
|
391
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
392
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
393
|
+
| 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 |
|
|
394
|
+
|
|
395
|
+
#### Request Body
|
|
396
|
+
|
|
397
|
+
None
|
|
398
|
+
|
|
399
|
+
#### Success Response
|
|
400
|
+
|
|
401
|
+
##### `200 application/json`
|
|
402
|
+
|
|
403
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
404
|
+
|
|
405
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
406
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
407
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
408
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
409
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
410
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
411
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
412
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
413
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
414
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
415
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
416
|
+
| 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 |
|
|
417
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
418
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
419
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
420
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
421
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
422
|
+
|
|
423
|
+
<a id="get-api-u1-v1-youtube-web-get-channel-info"></a>
|
|
424
|
+
### `GET /api/u1/v1/youtube/web/get_channel_info`
|
|
425
|
+
|
|
426
|
+
- Summary: 获取频道信息/Get channel information
|
|
427
|
+
- Capabilities: profiles / accounts
|
|
428
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
429
|
+
- operationId: `get_channel_info_api_v1_youtube_web_get_channel_info_get`
|
|
430
|
+
|
|
431
|
+
#### Notes
|
|
432
|
+
|
|
433
|
+
> # [中文]
|
|
434
|
+
> ### 用途:
|
|
435
|
+
> - 获取频道信息。
|
|
436
|
+
> ### 参数:
|
|
437
|
+
> - channel_id: 频道ID。
|
|
438
|
+
> ### 返回:
|
|
439
|
+
> - 频道信息。
|
|
440
|
+
>
|
|
441
|
+
> # [English]
|
|
442
|
+
> ### Purpose:
|
|
443
|
+
> - Get channel information.
|
|
444
|
+
> ### Parameters:
|
|
445
|
+
> - channel_id: Channel ID.
|
|
446
|
+
> ### Returns:
|
|
447
|
+
> - Channel information.
|
|
448
|
+
>
|
|
449
|
+
> # [示例/Example]
|
|
450
|
+
> channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"
|
|
451
|
+
|
|
452
|
+
#### Parameters
|
|
453
|
+
|
|
454
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
455
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
456
|
+
| channel_id | query | string | Yes | 频道ID/Channel ID | None | UCXuqSBlHAE6Xw-yeJA0Tunw | None |
|
|
457
|
+
|
|
458
|
+
#### Request Body
|
|
459
|
+
|
|
460
|
+
None
|
|
461
|
+
|
|
462
|
+
#### Success Response
|
|
463
|
+
|
|
464
|
+
##### `200 application/json`
|
|
465
|
+
|
|
466
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
467
|
+
|
|
468
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
469
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
470
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
471
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
472
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
473
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
474
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
475
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
476
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
477
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
478
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
479
|
+
| 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 |
|
|
480
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
481
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
482
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
483
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
484
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
485
|
+
|
|
486
|
+
<a id="get-api-u1-v1-youtube-web-get-channel-short-videos"></a>
|
|
487
|
+
### `GET /api/u1/v1/youtube/web/get_channel_short_videos`
|
|
488
|
+
|
|
489
|
+
- Summary: 获取频道短视频/Get channel short videos
|
|
490
|
+
- Capabilities: profiles / accounts / content details
|
|
491
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
492
|
+
- operationId: `get_channel_short_videos_api_v1_youtube_web_get_channel_short_videos_get`
|
|
493
|
+
|
|
494
|
+
#### Notes
|
|
495
|
+
|
|
496
|
+
> # [中文]
|
|
497
|
+
> ### 用途:
|
|
498
|
+
> - 获取频道短视频。
|
|
499
|
+
> ### 参数:
|
|
500
|
+
> - channel_id: 频道ID。
|
|
501
|
+
> - continuation_token: 用于继续获取频道短视频的令牌。默认为None。
|
|
502
|
+
> ### 返回:
|
|
503
|
+
> - 频道短视频。
|
|
504
|
+
>
|
|
505
|
+
> # [English]
|
|
506
|
+
> ### Purpose:
|
|
507
|
+
> - Get channel short videos.
|
|
508
|
+
> ### Parameters:
|
|
509
|
+
> - channel_id: Channel ID.
|
|
510
|
+
> - continuation_token: Token to continue fetching channel short videos. Default is None.
|
|
511
|
+
> ### Returns:
|
|
512
|
+
> - Channel short videos.
|
|
513
|
+
>
|
|
514
|
+
> # [示例/Example]
|
|
515
|
+
> channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"
|
|
516
|
+
|
|
517
|
+
#### Parameters
|
|
518
|
+
|
|
519
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
520
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
521
|
+
| channel_id | query | string | Yes | 频道ID/Channel ID | None | UCXuqSBlHAE6Xw-yeJA0Tunw | None |
|
|
522
|
+
| continuation_token | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
523
|
+
|
|
524
|
+
#### Request Body
|
|
525
|
+
|
|
526
|
+
None
|
|
527
|
+
|
|
528
|
+
#### Success Response
|
|
529
|
+
|
|
530
|
+
##### `200 application/json`
|
|
531
|
+
|
|
532
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
533
|
+
|
|
534
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
535
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
536
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
537
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
538
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
539
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
540
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
541
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
542
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
543
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
544
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
545
|
+
| 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 |
|
|
546
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
547
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
548
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
549
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
550
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
551
|
+
|
|
552
|
+
<a id="get-api-u1-v1-youtube-web-get-channel-url"></a>
|
|
553
|
+
### `GET /api/u1/v1/youtube/web/get_channel_url`
|
|
554
|
+
|
|
555
|
+
- Summary: 从频道ID获取频道URL/Get channel URL from channel ID
|
|
556
|
+
- Capabilities: profiles / accounts
|
|
557
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
558
|
+
- operationId: `get_channel_url_api_v1_youtube_web_get_channel_url_get`
|
|
559
|
+
|
|
560
|
+
#### Notes
|
|
561
|
+
|
|
562
|
+
> # [中文]
|
|
563
|
+
> ### 用途:
|
|
564
|
+
> - 从YouTube频道ID转换获取频道Handle (@用户名)
|
|
565
|
+
> - 与 get_channel_id_v2 接口互为反向操作
|
|
566
|
+
>
|
|
567
|
+
> ### 参数:
|
|
568
|
+
> - channel_id: 频道ID(如:UCeu6U67OzJhV1KwBansH3Dg)
|
|
569
|
+
>
|
|
570
|
+
> ### 返回:
|
|
571
|
+
> - channel_id: 频道ID
|
|
572
|
+
> - handle: 频道Handle(如:CozyCraftYT)
|
|
573
|
+
> - title: 频道名称
|
|
574
|
+
> - channel_url: 标准频道URL(/channel/格式)
|
|
575
|
+
> - vanity_url: 个性化URL(/@用户名格式)
|
|
576
|
+
>
|
|
577
|
+
> ### 使用场景:
|
|
578
|
+
> - 当你有频道ID但需要获取@用户名格式的URL时
|
|
579
|
+
> - 需要展示用户友好的频道链接时
|
|
580
|
+
>
|
|
581
|
+
> # [English]
|
|
582
|
+
> ### Purpose:
|
|
583
|
+
> - Convert YouTube channel ID to channel handle (@username)
|
|
584
|
+
> - Reverse operation of get_channel_id_v2 endpoint
|
|
585
|
+
>
|
|
586
|
+
> ### Parameters:
|
|
587
|
+
> - channel_id: Channel ID (e.g., UCeu6U67OzJhV1KwBansH3Dg)
|
|
588
|
+
>
|
|
589
|
+
> ### Returns:
|
|
590
|
+
> - channel_id: Channel ID
|
|
591
|
+
> - handle: Channel handle (e.g., CozyCraftYT)
|
|
592
|
+
> - title: Channel name
|
|
593
|
+
> - channel_url: Standard channel URL (/channel/ format)
|
|
594
|
+
> - vanity_url: Vanity URL (/@username format)
|
|
595
|
+
>
|
|
596
|
+
> ### Use Cases:
|
|
597
|
+
> - When you have channel ID but need @username format URL
|
|
598
|
+
> - When you need to display user-friendly channel links
|
|
599
|
+
>
|
|
600
|
+
> # [示例/Example]
|
|
601
|
+
> channel_id = "UCeu6U67OzJhV1KwBansH3Dg"
|
|
602
|
+
|
|
603
|
+
#### Parameters
|
|
604
|
+
|
|
605
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
606
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
607
|
+
| channel_id | query | string | Yes | 频道ID/Channel ID (格式如:UCeu6U67OzJhV1KwBansH3Dg) | None | UCeu6U67OzJhV1KwBansH3Dg | None |
|
|
608
|
+
|
|
609
|
+
#### Request Body
|
|
610
|
+
|
|
611
|
+
None
|
|
612
|
+
|
|
613
|
+
#### Success Response
|
|
614
|
+
|
|
615
|
+
##### `200 application/json`
|
|
616
|
+
|
|
617
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
618
|
+
|
|
619
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
620
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
621
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
622
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
623
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
624
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
625
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
626
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
627
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
628
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
629
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
630
|
+
| 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 |
|
|
631
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
632
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
633
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
634
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
635
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
636
|
+
|
|
637
|
+
<a id="get-api-u1-v1-youtube-web-get-channel-videos"></a>
|
|
638
|
+
### `GET /api/u1/v1/youtube/web/get_channel_videos`
|
|
639
|
+
|
|
640
|
+
- Summary: 获取频道视频 V1(即将过时,优先使用 V2)/Get channel videos V1 (deprecated soon, use V2 first)
|
|
641
|
+
- Capabilities: profiles / accounts / content details
|
|
642
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
643
|
+
- operationId: `get_channel_videos_api_v1_youtube_web_get_channel_videos_get`
|
|
644
|
+
|
|
645
|
+
#### Notes
|
|
646
|
+
|
|
647
|
+
> # [中文]
|
|
648
|
+
> ### 用途:
|
|
649
|
+
> - 获取频道视频。
|
|
650
|
+
> ### 参数:
|
|
651
|
+
> - channel_id: 频道ID。
|
|
652
|
+
> - continuation_token: 用于继续获取频道视频的令牌。默认为None。
|
|
653
|
+
> ### 返回:
|
|
654
|
+
> - 频道视频。
|
|
655
|
+
>
|
|
656
|
+
> # [English]
|
|
657
|
+
> ### Purpose:
|
|
658
|
+
> - Get channel videos.
|
|
659
|
+
> ### Parameters:
|
|
660
|
+
> - channel_id: Channel ID.
|
|
661
|
+
> - continuation_token: Token to continue fetching channel videos. Default is None.
|
|
662
|
+
> ### Returns:
|
|
663
|
+
> - Channel videos.
|
|
664
|
+
>
|
|
665
|
+
> # [示例/Example]
|
|
666
|
+
> channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"
|
|
667
|
+
|
|
668
|
+
#### Parameters
|
|
669
|
+
|
|
670
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
671
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
672
|
+
| channel_id | query | string | Yes | 频道ID/Channel ID | None | UCXuqSBlHAE6Xw-yeJA0Tunw | None |
|
|
673
|
+
| continuation_token | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
674
|
+
|
|
675
|
+
#### Request Body
|
|
676
|
+
|
|
677
|
+
None
|
|
678
|
+
|
|
679
|
+
#### Success Response
|
|
680
|
+
|
|
681
|
+
##### `200 application/json`
|
|
682
|
+
|
|
683
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
684
|
+
|
|
685
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
686
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
687
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
688
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
689
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
690
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
691
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
692
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
693
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
694
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
695
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
696
|
+
| 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 |
|
|
697
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
698
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
699
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
700
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
701
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
702
|
+
|
|
703
|
+
<a id="get-api-u1-v1-youtube-web-get-channel-videos-v2"></a>
|
|
704
|
+
### `GET /api/u1/v1/youtube/web/get_channel_videos_v2`
|
|
705
|
+
|
|
706
|
+
- Summary: 获取频道视频 V2/Get channel videos V2
|
|
707
|
+
- Capabilities: profiles / accounts / content details
|
|
708
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
709
|
+
- operationId: `get_channel_videos_v2_api_v1_youtube_web_get_channel_videos_v2_get`
|
|
710
|
+
|
|
711
|
+
#### Notes
|
|
712
|
+
|
|
713
|
+
> # [中文]
|
|
714
|
+
>
|
|
715
|
+
> ### 用途:
|
|
716
|
+
> - 获取频道视频 V2,支持获取频道视频列表,频道短视频列表,频道直播列表。
|
|
717
|
+
>
|
|
718
|
+
> ### 参数:
|
|
719
|
+
> - channel_id: 频道ID或频道名称,如果是频道名称,则需要在前面加上 `@` 符号,例如:@LinusTechTips。
|
|
720
|
+
> - lang: 视频结果语言代码,默认为 `en-US`,任何语言代码均可,当提交不支持的语言代码时,默认使用 `en-US` 作为语言代码。
|
|
721
|
+
> - sortBy: 排序方式,默认为 `newest`,可选值为 `newest` 和 `oldest` 和 `mostPopular`:
|
|
722
|
+
> - newest: 按照最新排序,默认值。
|
|
723
|
+
> - oldest: 按照最旧排序。
|
|
724
|
+
> - mostPopular: 按照最热排序。
|
|
725
|
+
> - contentType: 内容类型,默认为 `videos`,可选值为 `videos` 和 `shorts` 和 `live`:
|
|
726
|
+
> - videos: 视频列表,默认值。
|
|
727
|
+
> - shorts: 短视频列表。
|
|
728
|
+
> - live: 直播列表。
|
|
729
|
+
> - nextToken: 用于继续获取视频的令牌。可选参数,默认值为空,从第一页开始获取。
|
|
730
|
+
> - 如果获取第一页,则nextToken参数为None。
|
|
731
|
+
> - 如果获取第二页,则nextToken参数为第一页请求返回的nextToken。
|
|
732
|
+
>
|
|
733
|
+
> ### 返回:
|
|
734
|
+
> - 频道视频列表,包含视频ID、标题、缩略图、观看次数、点赞次数、评论数、视频时长等信息。
|
|
735
|
+
>
|
|
736
|
+
> # [English]
|
|
737
|
+
>
|
|
738
|
+
> ### Purpose:
|
|
739
|
+
> - Get channel videos V2, support getting channel video list, channel short video list, channel live list.
|
|
740
|
+
>
|
|
741
|
+
> ### Parameters:
|
|
742
|
+
> - channel_id: Channel ID or channel name, if it is a channel name, add `@` symbol in front of it, for example: @LinusTechTips.
|
|
743
|
+
> - lang: Video result language code, default is `en-US`, any language code is supported, when submitting unsupported language code, default use `en-US` as language code.
|
|
744
|
+
> - sortBy: Sort by, default is `newest`, optional values are `newest` and `oldest` and `mostPopular`:
|
|
745
|
+
> - newest: Sort by newest, default value.
|
|
746
|
+
> - oldest: Sort by oldest.
|
|
747
|
+
> - mostPopular: Sort by most popular.
|
|
748
|
+
> - contentType: Content type, default is `videos`, optional values are `videos`
|
|
749
|
+
> - videos: Video list, default value.
|
|
750
|
+
> - shorts: Short video list.
|
|
751
|
+
> - live: Live list.
|
|
752
|
+
> - nextToken: Token to continue fetching videos. Optional parameter, default value is empty, start from the first page.
|
|
753
|
+
> - If fetching the first page, the nextToken parameter is None.
|
|
754
|
+
> - If fetching the second page, the nextToken parameter is the nextToken returned by the first page request.
|
|
755
|
+
> ### Returns:
|
|
756
|
+
> - Channel video list, including video ID, title, thumbnail, view count, like count, comment count, video duration and other information.
|
|
757
|
+
>
|
|
758
|
+
> # [示例/Example]
|
|
759
|
+
> channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"
|
|
760
|
+
> lang = "en-US"
|
|
761
|
+
> sortBy = "newest"
|
|
762
|
+
> contentType = "videos"
|
|
763
|
+
> nextToken = None
|
|
764
|
+
|
|
765
|
+
#### Parameters
|
|
766
|
+
|
|
767
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
768
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
769
|
+
| channel_id | query | string | Yes | 频道ID/Channel ID | None | UCXuqSBlHAE6Xw-yeJA0Tunw | None |
|
|
770
|
+
| lang | query | string | No | 视频结果语言代码/Video result language code | en-US | en-US | None |
|
|
771
|
+
| sortBy | query | string | No | 排序方式/Sort by | newest | newest | None |
|
|
772
|
+
| contentType | query | string | No | 内容类型/Content type | videos | videos | None |
|
|
773
|
+
| nextToken | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
774
|
+
|
|
775
|
+
#### Request Body
|
|
776
|
+
|
|
777
|
+
None
|
|
778
|
+
|
|
779
|
+
#### Success Response
|
|
780
|
+
|
|
781
|
+
##### `200 application/json`
|
|
782
|
+
|
|
783
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
784
|
+
|
|
785
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
786
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
787
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
788
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
789
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
790
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
791
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
792
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
793
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
794
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
795
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
796
|
+
| 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 |
|
|
797
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
798
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
799
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
800
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
801
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
802
|
+
|
|
803
|
+
<a id="get-api-u1-v1-youtube-web-get-channel-videos-v3"></a>
|
|
804
|
+
### `GET /api/u1/v1/youtube/web/get_channel_videos_v3`
|
|
805
|
+
|
|
806
|
+
- Summary: 获取频道视频 V3/Get channel videos V3
|
|
807
|
+
- Capabilities: profiles / accounts / content details
|
|
808
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
809
|
+
- operationId: `get_channel_videos_v3_api_v1_youtube_web_get_channel_videos_v3_get`
|
|
810
|
+
|
|
811
|
+
#### Notes
|
|
812
|
+
|
|
813
|
+
> # [中文]
|
|
814
|
+
> ### 用途:
|
|
815
|
+
> - 获取YouTube频道的视频列表 V3
|
|
816
|
+
> - 支持分页获取,可通过 continuation_token 获取更多视频
|
|
817
|
+
>
|
|
818
|
+
> ### 参数详解:
|
|
819
|
+
>
|
|
820
|
+
> #### 📌 必选参数:
|
|
821
|
+
> **channel_id** (string)
|
|
822
|
+
> - **作用**: 频道ID
|
|
823
|
+
> - **获取方式**:
|
|
824
|
+
> - 从频道URL中提取,例如 `https://www.youtube.com/channel/UCJHBJ7F-nAIlMGolm0Hu4vg`
|
|
825
|
+
> - 或从 `@用户名` 格式的URL中,先访问频道页面获取真实的频道ID
|
|
826
|
+
> - **示例**: `"UCJHBJ7F-nAIlMGolm0Hu4vg"`
|
|
827
|
+
>
|
|
828
|
+
> #### ⚙️ 可选参数:
|
|
829
|
+
> **language_code** (string, 可选)
|
|
830
|
+
> - **作用**: 设置语言偏好
|
|
831
|
+
> - **默认值**: `"zh-CN"`
|
|
832
|
+
> - **可用值**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"` 等
|
|
833
|
+
>
|
|
834
|
+
> **country_code** (string, 可选)
|
|
835
|
+
> - **作用**: 设置地区代码
|
|
836
|
+
> - **默认值**: `"US"`
|
|
837
|
+
> - **可用值**: `"US"`, `"JP"`, `"GB"` 等
|
|
838
|
+
>
|
|
839
|
+
> **continuation_token** (string, 可选)
|
|
840
|
+
> - **作用**: 分页token,用于获取下一页视频
|
|
841
|
+
> - **获取方式**: 从上一次请求的响应中提取
|
|
842
|
+
> - **首次请求**: 不传此参数或传 `null`
|
|
843
|
+
>
|
|
844
|
+
> **need_format** (boolean, 可选)
|
|
845
|
+
> - **作用**: 是否返回清洗后的精简数据
|
|
846
|
+
> - **默认值**: `false`
|
|
847
|
+
> - **可用值**:
|
|
848
|
+
> - `false` - 返回原始完整数据
|
|
849
|
+
> - `true` - 返回清洗后的精简数据(推荐)
|
|
850
|
+
>
|
|
851
|
+
> ### 返回数据结构 (need_format=true):
|
|
852
|
+
> ```json
|
|
853
|
+
> {
|
|
854
|
+
> "videos": [
|
|
855
|
+
> {
|
|
856
|
+
> "video_id": "zd3yCa1bJCM",
|
|
857
|
+
> "title": "Minecraft: DREAM! - Asleep Custom Map",
|
|
858
|
+
> "thumbnail": "https://i.ytimg.com/vi/zd3yCa1bJCM/hqdefault.jpg",
|
|
859
|
+
> "thumbnails": [
|
|
860
|
+
> {"url": "...", "width": 168, "height": 94},
|
|
861
|
+
> {"url": "...", "width": 336, "height": 188}
|
|
862
|
+
> ],
|
|
863
|
+
> "moving_thumbnail": "https://i.ytimg.com/an_webp/zd3yCa1bJCM/mqdefault_6s.webp?...",
|
|
864
|
+
> "duration": "16:57",
|
|
865
|
+
> "duration_accessibility": "16分钟57秒钟",
|
|
866
|
+
> "view_count": "343,369次观看",
|
|
867
|
+
> "short_view_count": "34万次观看",
|
|
868
|
+
> "published_time": "18小时前",
|
|
869
|
+
> "description": "Today, we're trapped in a super weird dream...",
|
|
870
|
+
> "is_live": false,
|
|
871
|
+
> "is_verified": true,
|
|
872
|
+
> "url": "https://www.youtube.com/watch?v=zd3yCa1bJCM",
|
|
873
|
+
> "playback_url": "https://rr5---sn-ogueln67.googlevideo.com/initplayback?..."
|
|
874
|
+
> }
|
|
875
|
+
> ],
|
|
876
|
+
> "continuation_token": "下一页token"
|
|
877
|
+
> }
|
|
878
|
+
> ```
|
|
879
|
+
>
|
|
880
|
+
> ### 清洗后的字段说明:
|
|
881
|
+
> - `video_id`: 视频ID
|
|
882
|
+
> - `title`: 视频标题
|
|
883
|
+
> - `thumbnail`: 最高清晰度缩略图URL
|
|
884
|
+
> - `thumbnails`: 所有分辨率的缩略图列表
|
|
885
|
+
> - `moving_thumbnail`: 动态缩略图URL(webp格式,鼠标悬停预览)
|
|
886
|
+
> - `duration`: 视频时长(如"16:57")
|
|
887
|
+
> - `duration_accessibility`: 时长无障碍文本(如"16分钟57秒钟")
|
|
888
|
+
> - `view_count`: 完整观看次数(如"343,369次观看")
|
|
889
|
+
> - `short_view_count`: 简短观看次数(如"34万次观看")
|
|
890
|
+
> - `published_time`: 发布时间(如"18小时前")
|
|
891
|
+
> - `description`: 视频描述片段
|
|
892
|
+
> - `is_live`: 是否为直播
|
|
893
|
+
> - `is_verified`: 频道是否已认证
|
|
894
|
+
> - `url`: 视频播放页URL
|
|
895
|
+
> - `playback_url`: 视频播放初始化URL(googlevideo.com,可能为空)
|
|
896
|
+
> - `continuation_token`: 下一页的分页token
|
|
897
|
+
>
|
|
898
|
+
> # [English]
|
|
899
|
+
> ### Purpose:
|
|
900
|
+
> - Get YouTube channel video list V3
|
|
901
|
+
> - Supports pagination via continuation_token
|
|
902
|
+
>
|
|
903
|
+
> ### Parameters:
|
|
904
|
+
>
|
|
905
|
+
> #### 📌 Required:
|
|
906
|
+
> **channel_id** (string)
|
|
907
|
+
> - **Purpose**: Channel ID
|
|
908
|
+
> - **How to get**:
|
|
909
|
+
> - Extract from channel URL, e.g., `https://www.youtube.com/channel/UCJHBJ7F-nAIlMGolm0Hu4vg`
|
|
910
|
+
> - Or visit the channel page to get the real channel ID from `@username` format URLs
|
|
911
|
+
> - **Example**: `"UCJHBJ7F-nAIlMGolm0Hu4vg"`
|
|
912
|
+
>
|
|
913
|
+
> #### ⚙️ Optional:
|
|
914
|
+
> **language_code** (string, optional)
|
|
915
|
+
> - **Purpose**: Set language preference
|
|
916
|
+
> - **Default**: `"zh-CN"`
|
|
917
|
+
> - **Values**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"`, etc.
|
|
918
|
+
>
|
|
919
|
+
> **country_code** (string, optional)
|
|
920
|
+
> - **Purpose**: Set region code
|
|
921
|
+
> - **Default**: `"US"`
|
|
922
|
+
> - **Values**: `"US"`, `"JP"`, `"GB"`, etc.
|
|
923
|
+
>
|
|
924
|
+
> **continuation_token** (string, optional)
|
|
925
|
+
> - **Purpose**: Pagination token for next page
|
|
926
|
+
> - **How to get**: Extract from previous response
|
|
927
|
+
> - **First request**: Omit or set to `null`
|
|
928
|
+
>
|
|
929
|
+
> **need_format** (boolean, optional)
|
|
930
|
+
> - **Purpose**: Whether to return cleaned simplified data
|
|
931
|
+
> - **Default**: `false`
|
|
932
|
+
> - **Values**:
|
|
933
|
+
> - `false` - Return raw complete data
|
|
934
|
+
> - `true` - Return cleaned simplified data (recommended)
|
|
935
|
+
>
|
|
936
|
+
> ### Response Structure (need_format=true):
|
|
937
|
+
> ```json
|
|
938
|
+
> {
|
|
939
|
+
> "videos": [
|
|
940
|
+
> {
|
|
941
|
+
> "video_id": "zd3yCa1bJCM",
|
|
942
|
+
> "title": "Minecraft: DREAM! - Asleep Custom Map",
|
|
943
|
+
> "thumbnail": "https://i.ytimg.com/vi/zd3yCa1bJCM/hqdefault.jpg",
|
|
944
|
+
> "thumbnails": [
|
|
945
|
+
> {"url": "...", "width": 168, "height": 94},
|
|
946
|
+
> {"url": "...", "width": 336, "height": 188}
|
|
947
|
+
> ],
|
|
948
|
+
> "moving_thumbnail": "https://i.ytimg.com/an_webp/zd3yCa1bJCM/mqdefault_6s.webp?...",
|
|
949
|
+
> "duration": "16:57",
|
|
950
|
+
> "duration_accessibility": "16 minutes, 57 seconds",
|
|
951
|
+
> "view_count": "343,369 views",
|
|
952
|
+
> "short_view_count": "343K views",
|
|
953
|
+
> "published_time": "18 hours ago",
|
|
954
|
+
> "description": "Today, we're trapped in a super weird dream...",
|
|
955
|
+
> "is_live": false,
|
|
956
|
+
> "is_verified": true,
|
|
957
|
+
> "url": "https://www.youtube.com/watch?v=zd3yCa1bJCM",
|
|
958
|
+
> "playback_url": "https://rr5---sn-ogueln67.googlevideo.com/initplayback?..."
|
|
959
|
+
> }
|
|
960
|
+
> ],
|
|
961
|
+
> "continuation_token": "next page token"
|
|
962
|
+
> }
|
|
963
|
+
> ```
|
|
964
|
+
>
|
|
965
|
+
> ### Cleaned Data Field Descriptions:
|
|
966
|
+
> - `video_id`: Video ID
|
|
967
|
+
> - `title`: Video title
|
|
968
|
+
> - `thumbnail`: Highest resolution thumbnail URL
|
|
969
|
+
> - `thumbnails`: List of all resolution thumbnails
|
|
970
|
+
> - `moving_thumbnail`: Moving thumbnail URL (webp format, hover preview)
|
|
971
|
+
> - `duration`: Video duration (e.g., "16:57")
|
|
972
|
+
> - `duration_accessibility`: Duration accessibility text (e.g., "16 minutes, 57 seconds")
|
|
973
|
+
> - `view_count`: Full view count (e.g., "343,369 views")
|
|
974
|
+
> - `short_view_count`: Short view count (e.g., "343K views")
|
|
975
|
+
> - `published_time`: Published time (e.g., "18 hours ago")
|
|
976
|
+
> - `description`: Video description snippet
|
|
977
|
+
> - `is_live`: Whether it's a live stream
|
|
978
|
+
> - `is_verified`: Whether the channel is verified
|
|
979
|
+
> - `url`: Video playback page URL
|
|
980
|
+
> - `playback_url`: Video playback initialization URL (googlevideo.com, may be empty)
|
|
981
|
+
> - `continuation_token`: Pagination token for next page
|
|
982
|
+
>
|
|
983
|
+
> # [示例/Examples]
|
|
984
|
+
> ## 获取频道首页视频 / Get first page of channel videos
|
|
985
|
+
> GET /youtube_web/get_channel_videos_v3?channel_id=UCJHBJ7F-nAIlMGolm0Hu4vg
|
|
986
|
+
>
|
|
987
|
+
> ## 获取清洗后的数据(推荐)/ Get cleaned data (recommended)
|
|
988
|
+
> GET /youtube_web/get_channel_videos_v3?channel_id=UCJHBJ7F-nAIlMGolm0Hu4vg&need_format=true
|
|
989
|
+
>
|
|
990
|
+
> ## 获取下一页 / Get next page
|
|
991
|
+
> GET /youtube_web/get_channel_videos_v3?channel_id=UCJHBJ7F-nAIlMGolm0Hu4vg&continuation_token=xxxxx&need_format=true
|
|
992
|
+
|
|
993
|
+
#### Parameters
|
|
994
|
+
|
|
995
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
996
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
997
|
+
| channel_id | query | string | Yes | 频道ID/Channel ID | None | UCJHBJ7F-nAIlMGolm0Hu4vg | None |
|
|
998
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | zh-CN | zh-CN | None |
|
|
999
|
+
| country_code | query | string | No | 国家代码(如US, JP等)/Country code | US | US | None |
|
|
1000
|
+
| continuation_token | query | string | No | 分页token,用于获取下一页/Pagination token for next page | None | None | None |
|
|
1001
|
+
| need_format | query | boolean | No | 是否需要清洗数据,提取关键内容,移除冗余数据/Whether to clean and format the data | false | None | None |
|
|
1002
|
+
|
|
1003
|
+
#### Request Body
|
|
1004
|
+
|
|
1005
|
+
None
|
|
1006
|
+
|
|
1007
|
+
#### Success Response
|
|
1008
|
+
|
|
1009
|
+
##### `200 application/json`
|
|
1010
|
+
|
|
1011
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
1012
|
+
|
|
1013
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
1014
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
1015
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
1016
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
1017
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
1018
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
1019
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
1020
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
1021
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
1022
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
1023
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
1024
|
+
| 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 |
|
|
1025
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
1026
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
1027
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
1028
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
1029
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
1030
|
+
|
|
1031
|
+
<a id="get-api-u1-v1-youtube-web-get-general-search"></a>
|
|
1032
|
+
### `GET /api/u1/v1/youtube/web/get_general_search`
|
|
1033
|
+
|
|
1034
|
+
- Summary: 综合搜索(支持过滤条件)/General search with filters
|
|
1035
|
+
- Capabilities: search
|
|
1036
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
1037
|
+
- operationId: `get_general_search_api_v1_youtube_web_get_general_search_get`
|
|
1038
|
+
|
|
1039
|
+
#### Notes
|
|
1040
|
+
|
|
1041
|
+
> # [中文]
|
|
1042
|
+
> ### 用途:
|
|
1043
|
+
> - YouTube综合搜索,支持多种过滤条件,可以精确筛选搜索结果
|
|
1044
|
+
>
|
|
1045
|
+
> ### 参数详解:
|
|
1046
|
+
> - **search_query**: 搜索关键字
|
|
1047
|
+
> - **language_code**: 语言代码,推荐使用zh-CN(中文)或en-US(英文)
|
|
1048
|
+
> - **country_code**: 国家代码,影响搜索结果的地区相关性
|
|
1049
|
+
> - **time_zone**: 时区设置
|
|
1050
|
+
>
|
|
1051
|
+
> ### 过滤条件 (选择一个值即可):
|
|
1052
|
+
> #### 上传时间 (upload_time):
|
|
1053
|
+
> - `hour`: 过去1小时内上传
|
|
1054
|
+
> - `today`: 今天上传
|
|
1055
|
+
> - `week`: 本周上传
|
|
1056
|
+
> - `month`: 本月上传
|
|
1057
|
+
> - `year`: 今年上传
|
|
1058
|
+
>
|
|
1059
|
+
> #### 视频时长 (duration):
|
|
1060
|
+
> - `short`: 短视频(少于4分钟)
|
|
1061
|
+
> - `medium`: 中等时长(4-20分钟)
|
|
1062
|
+
> - `long`: 长视频(超过20分钟)
|
|
1063
|
+
>
|
|
1064
|
+
> #### 内容类型 (content_type):
|
|
1065
|
+
> - `video`: 视频
|
|
1066
|
+
> - `channel`: 频道
|
|
1067
|
+
> - `playlist`: 播放列表
|
|
1068
|
+
> - `movie`: 电影
|
|
1069
|
+
>
|
|
1070
|
+
> #### 特征 (feature):
|
|
1071
|
+
> - `hd`: 高清视频
|
|
1072
|
+
> - `4k`: 4K视频
|
|
1073
|
+
> - `subtitles`: 包含字幕
|
|
1074
|
+
> - `live`: 直播
|
|
1075
|
+
> - `creative_commons`: 知识共享许可
|
|
1076
|
+
> - `360`: 360度视频
|
|
1077
|
+
> - `vr180`: VR180视频
|
|
1078
|
+
> - `3d`: 3D视频
|
|
1079
|
+
> - `hdr`: HDR视频
|
|
1080
|
+
> - `location`: 包含位置信息
|
|
1081
|
+
> - `purchased`: 已购买内容
|
|
1082
|
+
>
|
|
1083
|
+
> #### 排序方式 (sort_by):
|
|
1084
|
+
> - `relevance`: 相关性(默认)
|
|
1085
|
+
> - `upload_date`: 上传日期
|
|
1086
|
+
> - `view_count`: 观看次数
|
|
1087
|
+
> - `rating`: 评分
|
|
1088
|
+
>
|
|
1089
|
+
> ### 返回:
|
|
1090
|
+
> - 包含过滤条件的搜索结果
|
|
1091
|
+
>
|
|
1092
|
+
> # [English]
|
|
1093
|
+
> ### Purpose:
|
|
1094
|
+
> - YouTube comprehensive search with multiple filter options for precise result filtering
|
|
1095
|
+
>
|
|
1096
|
+
> ### Parameters:
|
|
1097
|
+
> - **search_query**: Search keyword
|
|
1098
|
+
> - **language_code**: Language code (zh-CN for Chinese, en-US for English)
|
|
1099
|
+
> - **country_code**: Country code affecting regional relevance
|
|
1100
|
+
> - **time_zone**: Time zone setting
|
|
1101
|
+
>
|
|
1102
|
+
> ### Filter Options (select one value for each):
|
|
1103
|
+
> #### Upload Time (upload_time):
|
|
1104
|
+
> - `hour`: Uploaded in the past hour
|
|
1105
|
+
> - `today`: Uploaded today
|
|
1106
|
+
> - `week`: Uploaded this week
|
|
1107
|
+
> - `month`: Uploaded this month
|
|
1108
|
+
> - `year`: Uploaded this year
|
|
1109
|
+
>
|
|
1110
|
+
> #### Duration (duration):
|
|
1111
|
+
> - `short`: Short videos (under 4 minutes)
|
|
1112
|
+
> - `medium`: Medium length (4-20 minutes)
|
|
1113
|
+
> - `long`: Long videos (over 20 minutes)
|
|
1114
|
+
>
|
|
1115
|
+
> #### Content Type (content_type):
|
|
1116
|
+
> - `video`: Videos
|
|
1117
|
+
> - `channel`: Channels
|
|
1118
|
+
> - `playlist`: Playlists
|
|
1119
|
+
> - `movie`: Movies
|
|
1120
|
+
>
|
|
1121
|
+
> #### Features (feature):
|
|
1122
|
+
> - `hd`: High definition
|
|
1123
|
+
> - `4k`: 4K videos
|
|
1124
|
+
> - `subtitles`: With subtitles
|
|
1125
|
+
> - `live`: Live streams
|
|
1126
|
+
> - `creative_commons`: Creative Commons licensed
|
|
1127
|
+
> - `360`: 360-degree videos
|
|
1128
|
+
> - `vr180`: VR180 videos
|
|
1129
|
+
> - `3d`: 3D videos
|
|
1130
|
+
> - `hdr`: HDR videos
|
|
1131
|
+
> - `location`: With location info
|
|
1132
|
+
> - `purchased`: Purchased content
|
|
1133
|
+
>
|
|
1134
|
+
> #### Sort By (sort_by):
|
|
1135
|
+
> - `relevance`: Relevance (default)
|
|
1136
|
+
> - `upload_date`: Upload date
|
|
1137
|
+
> - `view_count`: View count
|
|
1138
|
+
> - `rating`: Rating
|
|
1139
|
+
>
|
|
1140
|
+
> ### Returns:
|
|
1141
|
+
> - Filtered search results
|
|
1142
|
+
>
|
|
1143
|
+
> # [示例/Examples]
|
|
1144
|
+
> ## 基础搜索
|
|
1145
|
+
> GET /youtube_web/get_general_search?search_query=Python编程
|
|
1146
|
+
>
|
|
1147
|
+
> ## 搜索本周上传的Python编程短视频
|
|
1148
|
+
> GET /youtube_web/get_general_search?search_query=Python编程&upload_time=week&duration=short
|
|
1149
|
+
>
|
|
1150
|
+
> ## 搜索高清的Python教程视频,按观看次数排序
|
|
1151
|
+
> GET /youtube_web/get_general_search?search_query=Python tutorial&feature=hd&sort_by=view_count
|
|
1152
|
+
>
|
|
1153
|
+
> ## 搜索今天上传的4K编程直播
|
|
1154
|
+
> GET /youtube_web/get_general_search?search_query=programming&upload_time=today&feature=4k&content_type=video
|
|
1155
|
+
|
|
1156
|
+
#### Parameters
|
|
1157
|
+
|
|
1158
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
1159
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1160
|
+
| search_query | query | string | Yes | 搜索关键字/Search keyword | None | Python编程 | None |
|
|
1161
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | zh-CN | None | None |
|
|
1162
|
+
| country_code | query | string | No | 国家代码(如US, CN等)/Country code | US | None | None |
|
|
1163
|
+
| time_zone | query | string | No | 时区(如America/Los_Angeles, Asia/Shanghai等)/Time zone | America/Los_Angeles | None | None |
|
|
1164
|
+
| upload_time | query | string enum[hour, today, week, month, year] | No | 上传时间过滤 \| Upload time filter | None | None | None |
|
|
1165
|
+
| duration | query | string enum[short, medium, long] | No | 视频时长过滤 \| Duration filter | None | None | None |
|
|
1166
|
+
| content_type | query | string enum[video, channel, playlist, movie] | No | 内容类型过滤 \| Content type filter | None | None | None |
|
|
1167
|
+
| feature | query | string enum[live, 4k, hd, subtitles, creative_commons, 360, ...] | No | 特征过滤 \| Feature filter | None | None | None |
|
|
1168
|
+
| sort_by | query | string enum[relevance, upload_date, view_count, rating] | No | 排序方式 \| Sort by | None | None | None |
|
|
1169
|
+
| continuation_token | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
1170
|
+
|
|
1171
|
+
#### Request Body
|
|
1172
|
+
|
|
1173
|
+
None
|
|
1174
|
+
|
|
1175
|
+
#### Success Response
|
|
1176
|
+
|
|
1177
|
+
##### `200 application/json`
|
|
1178
|
+
|
|
1179
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
1180
|
+
|
|
1181
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
1182
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
1183
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
1184
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
1185
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
1186
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
1187
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
1188
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
1189
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
1190
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
1191
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
1192
|
+
| 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 |
|
|
1193
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
1194
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
1195
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
1196
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
1197
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
1198
|
+
|
|
1199
|
+
<a id="get-api-u1-v1-youtube-web-get-relate-video"></a>
|
|
1200
|
+
### `GET /api/u1/v1/youtube/web/get_relate_video`
|
|
1201
|
+
|
|
1202
|
+
- Summary: 获取推荐视频/Get related videos
|
|
1203
|
+
- Capabilities: content details
|
|
1204
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
1205
|
+
- operationId: `get_relate_video_api_v1_youtube_web_get_relate_video_get`
|
|
1206
|
+
|
|
1207
|
+
#### Notes
|
|
1208
|
+
|
|
1209
|
+
> # [中文]
|
|
1210
|
+
> ### 用途:
|
|
1211
|
+
> - 根据视频ID获取推荐视频数据。
|
|
1212
|
+
> ### 参数:
|
|
1213
|
+
> - video_id: 视频ID,从URL中获取,例如:https://www.youtube.com/watch?v=LuIL5JATZsc,这里的video_id就是LuIL5JATZsc。
|
|
1214
|
+
> - continuation_token: 用于继续获取推荐视频的令牌。默认为None。
|
|
1215
|
+
> ### 返回:
|
|
1216
|
+
> - 推荐视频数据。
|
|
1217
|
+
>
|
|
1218
|
+
> # [English]
|
|
1219
|
+
> ### Purpose:
|
|
1220
|
+
> - Get related videos by video ID.
|
|
1221
|
+
> ### Parameters:
|
|
1222
|
+
> - video_id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc.
|
|
1223
|
+
> - continuation_token: Token to continue fetching related videos. Default is None.
|
|
1224
|
+
> ### Returns:
|
|
1225
|
+
> - Related videos.
|
|
1226
|
+
>
|
|
1227
|
+
> # [示例/Example]
|
|
1228
|
+
> video_id = "LuIL5JATZsc"
|
|
1229
|
+
|
|
1230
|
+
#### Parameters
|
|
1231
|
+
|
|
1232
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
1233
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1234
|
+
| video_id | query | string | Yes | 视频ID/Video ID | None | LuIL5JATZsc | None |
|
|
1235
|
+
| continuation_token | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
1236
|
+
|
|
1237
|
+
#### Request Body
|
|
1238
|
+
|
|
1239
|
+
None
|
|
1240
|
+
|
|
1241
|
+
#### Success Response
|
|
1242
|
+
|
|
1243
|
+
##### `200 application/json`
|
|
1244
|
+
|
|
1245
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
1246
|
+
|
|
1247
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
1248
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
1249
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
1250
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
1251
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
1252
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
1253
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
1254
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
1255
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
1256
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
1257
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
1258
|
+
| 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 |
|
|
1259
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
1260
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
1261
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
1262
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
1263
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
1264
|
+
|
|
1265
|
+
<a id="get-api-u1-v1-youtube-web-get-shorts-search"></a>
|
|
1266
|
+
### `GET /api/u1/v1/youtube/web/get_shorts_search`
|
|
1267
|
+
|
|
1268
|
+
- Summary: YouTube Shorts短视频搜索/YouTube Shorts search
|
|
1269
|
+
- Capabilities: search
|
|
1270
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
1271
|
+
- operationId: `get_shorts_search_api_v1_youtube_web_get_shorts_search_get`
|
|
1272
|
+
|
|
1273
|
+
#### Notes
|
|
1274
|
+
|
|
1275
|
+
> # [中文]
|
|
1276
|
+
> ### 用途:
|
|
1277
|
+
> - YouTube Shorts短视频专门搜索,使用原生YouTube API接口
|
|
1278
|
+
>
|
|
1279
|
+
> ### 特点:
|
|
1280
|
+
> - 🎬 专门搜索YouTube Shorts短视频(<60秒)
|
|
1281
|
+
> - 🔍 支持多种过滤条件和排序方式
|
|
1282
|
+
> - 📱 优化的移动端短视频内容
|
|
1283
|
+
> - ⚡ 智能过滤:首次请求可能返回混合内容(长视频+短视频),默认自动过滤长视频
|
|
1284
|
+
>
|
|
1285
|
+
> ### 重要说明 - YouTube Shorts搜索机制:
|
|
1286
|
+
> 根据YouTube的搜索逻辑,Shorts搜索有以下特性:
|
|
1287
|
+
> 1. **首次请求**(无continuation_token):可能返回混合内容(部分长视频 + 部分短视频)
|
|
1288
|
+
> 2. **后续请求**(有continuation_token):仅返回纯短视频内容
|
|
1289
|
+
> 3. **解决方案**:
|
|
1290
|
+
> - 方案A:使用 `filter_mixed_content=true`(默认),自动过滤掉长视频
|
|
1291
|
+
> - 方案B:使用第一次返回的 continuation_token 进行第二次请求,获取纯Shorts内容
|
|
1292
|
+
> - 方案C:设置 `filter_mixed_content=false`,获取原始混合内容
|
|
1293
|
+
>
|
|
1294
|
+
> ### 参数详解:
|
|
1295
|
+
>
|
|
1296
|
+
> #### 📌 必选参数 (Required Parameters):
|
|
1297
|
+
>
|
|
1298
|
+
> **search_query** (string)
|
|
1299
|
+
> - **作用**: 搜索关键字,用于匹配Shorts视频的标题、描述等内容
|
|
1300
|
+
> - **格式**: 任意字符串
|
|
1301
|
+
> - **示例**: `"Python编程"`, `"gaming"`, `"cooking tutorial"`
|
|
1302
|
+
> - **注意**: 支持中英文及其他语言,空格会被自动处理
|
|
1303
|
+
>
|
|
1304
|
+
> #### ⚙️ 可选参数 - 基础设置 (Optional Parameters - Basic Settings):
|
|
1305
|
+
>
|
|
1306
|
+
> **language_code** (string, 可选)
|
|
1307
|
+
> - **作用**: 设置搜索结果的显示语言,影响返回内容的语言偏好
|
|
1308
|
+
> - **默认值**: `"en-US"`
|
|
1309
|
+
> - **可用值**:
|
|
1310
|
+
> - `"zh-CN"` - 简体中文
|
|
1311
|
+
> - `"zh-TW"` - 繁体中文
|
|
1312
|
+
> - `"en-US"` - 英语(美国)
|
|
1313
|
+
> - `"en-GB"` - 英语(英国)
|
|
1314
|
+
> - `"ja-JP"` - 日语
|
|
1315
|
+
> - `"ko-KR"` - 韩语
|
|
1316
|
+
> - `"es-ES"` - 西班牙语
|
|
1317
|
+
> - `"fr-FR"` - 法语
|
|
1318
|
+
> - `"de-DE"` - 德语
|
|
1319
|
+
> - 其他符合IETF BCP 47标准的语言代码
|
|
1320
|
+
> - **示例**: `language_code=zh-CN`
|
|
1321
|
+
> - **影响**: 会影响搜索算法的语言匹配和结果排序
|
|
1322
|
+
>
|
|
1323
|
+
> **country_code** (string, 可选)
|
|
1324
|
+
> - **作用**: 设置地区/国家代码,影响搜索结果的地域相关性和内容可用性
|
|
1325
|
+
> - **默认值**: `"US"`
|
|
1326
|
+
> - **可用值**:
|
|
1327
|
+
> - `"US"` - 美国
|
|
1328
|
+
> - `"CN"` - 中国
|
|
1329
|
+
> - `"JP"` - 日本
|
|
1330
|
+
> - `"KR"` - 韩国
|
|
1331
|
+
> - `"GB"` - 英国
|
|
1332
|
+
> - `"DE"` - 德国
|
|
1333
|
+
> - `"FR"` - 法国
|
|
1334
|
+
> - `"CA"` - 加拿大
|
|
1335
|
+
> - 其他符合ISO 3166-1 alpha-2标准的国家代码
|
|
1336
|
+
> - **示例**: `country_code=JP`
|
|
1337
|
+
> - **影响**: 某些Shorts可能因地区限制而不可见
|
|
1338
|
+
>
|
|
1339
|
+
> **time_zone** (string, 可选)
|
|
1340
|
+
> - **作用**: 设置时区,影响时间相关过滤器(如"今天"、"本周")的计算
|
|
1341
|
+
> - **默认值**: `"America/Los_Angeles"`
|
|
1342
|
+
> - **可用值**: 符合IANA时区数据库的时区标识符
|
|
1343
|
+
> - `"America/Los_Angeles"` - 美国太平洋时区
|
|
1344
|
+
> - `"America/New_York"` - 美国东部时区
|
|
1345
|
+
> - `"Asia/Shanghai"` - 中国时区
|
|
1346
|
+
> - `"Asia/Tokyo"` - 日本时区
|
|
1347
|
+
> - `"Europe/London"` - 英国时区
|
|
1348
|
+
> - `"Europe/Paris"` - 法国时区
|
|
1349
|
+
> - **示例**: `time_zone=Asia/Shanghai`
|
|
1350
|
+
> - **影响**: 结合upload_time参数使用时,决定"今天"等时间段的具体范围
|
|
1351
|
+
>
|
|
1352
|
+
> **filter_mixed_content** (boolean, 可选)
|
|
1353
|
+
> - **作用**: 控制是否自动过滤掉响应中的长视频(非Shorts内容)
|
|
1354
|
+
> - **默认值**: `true`
|
|
1355
|
+
> - **可用值**:
|
|
1356
|
+
> - `true` - 自动过滤长视频,只返回Shorts(推荐)
|
|
1357
|
+
> - `false` - 返回原始内容,可能包含长视频
|
|
1358
|
+
> - **示例**: `filter_mixed_content=true`
|
|
1359
|
+
> - **使用场景**:
|
|
1360
|
+
> - `true`: 当你只需要纯Shorts内容时使用(推荐首次请求使用)
|
|
1361
|
+
> - `false`: 当你需要分析YouTube原始返回的混合内容时使用(调试用)
|
|
1362
|
+
> - **注意**: 只影响首次请求,使用continuation_token的请求本身就只返回Shorts
|
|
1363
|
+
>
|
|
1364
|
+
> #### 🎯 可选参数 - Shorts过滤条件 (Optional Parameters - Shorts Filters):
|
|
1365
|
+
>
|
|
1366
|
+
> **upload_time** (string, 可选)
|
|
1367
|
+
> - **作用**: 按上传时间过滤Shorts,只返回指定时间段内上传的视频
|
|
1368
|
+
> - **默认值**: `null` (不过滤)
|
|
1369
|
+
> - **可用值**:
|
|
1370
|
+
> - `"hour"` - 过去1小时内上传
|
|
1371
|
+
> - `"today"` - 今天上传(基于time_zone参数)
|
|
1372
|
+
> - `"week"` - 本周上传(最近7天)
|
|
1373
|
+
> - `"month"` - 本月上传(最近30天)
|
|
1374
|
+
> - `"year"` - 今年上传(最近365天)
|
|
1375
|
+
> - **示例**: `upload_time=week`
|
|
1376
|
+
> - **使用场景**: 寻找最新、热门的Shorts内容
|
|
1377
|
+
> - **注意**: 与time_zone参数配合使用,时间计算基于设定的时区
|
|
1378
|
+
>
|
|
1379
|
+
> **sort_by** (string, 可选)
|
|
1380
|
+
> - **作用**: 设置搜索结果的排序方式
|
|
1381
|
+
> - **默认值**: `null` (YouTube默认相关性排序)
|
|
1382
|
+
> - **可用值**:
|
|
1383
|
+
> - `"relevance"` - 按相关性排序(YouTube默认算法)
|
|
1384
|
+
> - `"upload_date"` - 按上传日期排序(最新优先)
|
|
1385
|
+
> - `"view_count"` - 按观看次数排序(最多观看优先)
|
|
1386
|
+
> - `"rating"` - 按评分排序(最高评分优先)
|
|
1387
|
+
> - **示例**: `sort_by=view_count`
|
|
1388
|
+
> - **使用场景**:
|
|
1389
|
+
> - `relevance`: 寻找最相关的内容
|
|
1390
|
+
> - `upload_date`: 寻找最新发布的Shorts
|
|
1391
|
+
> - `view_count`: 寻找最受欢迎的Shorts
|
|
1392
|
+
> - `rating`: 寻找质量最高的Shorts
|
|
1393
|
+
> - **优先级**: sort_by的优先级高于upload_time,两者同时使用时以sort_by为准
|
|
1394
|
+
>
|
|
1395
|
+
> #### 📄 可选参数 - 翻页控制 (Optional Parameters - Pagination):
|
|
1396
|
+
>
|
|
1397
|
+
> **continuation_token** (string, 可选)
|
|
1398
|
+
> - **作用**: 用于获取下一页搜索结果的翻页令牌
|
|
1399
|
+
> - **默认值**: `null` (获取第一页)
|
|
1400
|
+
> - **格式**: YouTube返回的加密字符串
|
|
1401
|
+
> - **示例**: `continuation_token=EqcBEgPkuKzor4YybhmgGk...`
|
|
1402
|
+
> - **获取方式**: 从上一次请求的响应中提取(见"翻页机制详解"部分)
|
|
1403
|
+
> - **使用场景**:
|
|
1404
|
+
> - 首次搜索:不传此参数,获取第一页结果
|
|
1405
|
+
> - 后续翻页:传入上次返回的token,获取下一页结果
|
|
1406
|
+
> - **注意**:
|
|
1407
|
+
> - Token有时效性,通常在数小时内有效
|
|
1408
|
+
> - 使用continuation_token时,必须保持search_query等其他参数一致
|
|
1409
|
+
> - 使用token的请求会自动返回纯Shorts内容(无需过滤)
|
|
1410
|
+
>
|
|
1411
|
+
> ### 翻页机制详解:
|
|
1412
|
+
> #### 如何获取 continuation_token:
|
|
1413
|
+
> 从响应JSON中提取,路径通常为以下之一:
|
|
1414
|
+
> ```python
|
|
1415
|
+
> # 路径1:在 onResponseReceivedCommands 中
|
|
1416
|
+
> response["data"]["onResponseReceivedCommands"][0]["appendContinuationItemsAction"]["continuationItems"][-1]["continuationItemRenderer"]["continuationEndpoint"]["continuationCommand"]["token"]
|
|
1417
|
+
>
|
|
1418
|
+
> # 路径2:在 contents 中
|
|
1419
|
+
> response["data"]["contents"]["twoColumnSearchResultsRenderer"]["primaryContents"]["sectionListRenderer"]["contents"][-1]["continuationItemRenderer"]["continuationEndpoint"]["continuationCommand"]["token"]
|
|
1420
|
+
> ```
|
|
1421
|
+
>
|
|
1422
|
+
> #### 使用流程:
|
|
1423
|
+
> 1. **首次请求**: 不传 continuation_token
|
|
1424
|
+
> ```
|
|
1425
|
+
> GET /api/v1/youtube_web/get_shorts_search?search_query=python
|
|
1426
|
+
> ```
|
|
1427
|
+
> 2. **提取token**: 从响应中找到 continuation_token
|
|
1428
|
+
> 3. **后续请求**: 传入 continuation_token 获取下一页
|
|
1429
|
+
> ```
|
|
1430
|
+
> GET /api/v1/youtube_web/get_shorts_search?search_query=python&continuation_token=xxx
|
|
1431
|
+
> ```
|
|
1432
|
+
>
|
|
1433
|
+
> ### 响应数据结构:
|
|
1434
|
+
> ```json
|
|
1435
|
+
> {
|
|
1436
|
+
> "code": 200,
|
|
1437
|
+
> "data": {
|
|
1438
|
+
> "contents": {
|
|
1439
|
+
> "twoColumnSearchResultsRenderer": {
|
|
1440
|
+
> "primaryContents": {
|
|
1441
|
+
> "sectionListRenderer": {
|
|
1442
|
+
> "contents": [
|
|
1443
|
+
> {
|
|
1444
|
+
> "itemSectionRenderer": {
|
|
1445
|
+
> "contents": [
|
|
1446
|
+
> {
|
|
1447
|
+
> "gridShelfViewModel": {
|
|
1448
|
+
> // Shorts视频列表
|
|
1449
|
+
> "items": [...]
|
|
1450
|
+
> }
|
|
1451
|
+
> }
|
|
1452
|
+
> ]
|
|
1453
|
+
> }
|
|
1454
|
+
> },
|
|
1455
|
+
> {
|
|
1456
|
+
> "continuationItemRenderer": {
|
|
1457
|
+
> "continuationEndpoint": {
|
|
1458
|
+
> "continuationCommand": {
|
|
1459
|
+
> "token": "xxx" // 下一页的token
|
|
1460
|
+
> }
|
|
1461
|
+
> }
|
|
1462
|
+
> }
|
|
1463
|
+
> }
|
|
1464
|
+
> ]
|
|
1465
|
+
> }
|
|
1466
|
+
> }
|
|
1467
|
+
> }
|
|
1468
|
+
> }
|
|
1469
|
+
> }
|
|
1470
|
+
> }
|
|
1471
|
+
> ```
|
|
1472
|
+
>
|
|
1473
|
+
> ### 返回:
|
|
1474
|
+
> - 专门针对Shorts的搜索结果,包含视频列表和翻页token
|
|
1475
|
+
>
|
|
1476
|
+
> # [English]
|
|
1477
|
+
> ### Purpose:
|
|
1478
|
+
> - YouTube Shorts specialized search using native YouTube API
|
|
1479
|
+
>
|
|
1480
|
+
> ### Features:
|
|
1481
|
+
> - 🎬 Specialized search for YouTube Shorts (<60 seconds)
|
|
1482
|
+
> - 🔍 Support for multiple filter conditions and sorting options
|
|
1483
|
+
> - 📱 Optimized for mobile short-form content
|
|
1484
|
+
> - ⚡ Smart filtering: First request may return mixed content (long+short videos), automatically filters long videos by default
|
|
1485
|
+
>
|
|
1486
|
+
> ### Important - YouTube Shorts Search Mechanism:
|
|
1487
|
+
> According to YouTube's search logic, Shorts search has these characteristics:
|
|
1488
|
+
> 1. **First request** (no continuation_token): May return mixed content (some long videos + some short videos)
|
|
1489
|
+
> 2. **Subsequent requests** (with continuation_token): Returns only pure Shorts content
|
|
1490
|
+
> 3. **Solutions**:
|
|
1491
|
+
> - Solution A: Use `filter_mixed_content=true` (default) to automatically filter long videos
|
|
1492
|
+
> - Solution B: Use continuation_token from first response for second request to get pure Shorts
|
|
1493
|
+
> - Solution C: Set `filter_mixed_content=false` to get original mixed content
|
|
1494
|
+
>
|
|
1495
|
+
> ### Parameters:
|
|
1496
|
+
> - **search_query**: Search keyword
|
|
1497
|
+
> - **language_code**: Language code (zh-CN for Chinese, en-US for English)
|
|
1498
|
+
> - **country_code**: Country code affecting regional relevance
|
|
1499
|
+
> - **time_zone**: Time zone (e.g., America/Los_Angeles, Asia/Shanghai)
|
|
1500
|
+
> - **filter_mixed_content**: Whether to filter long videos from mixed content (default true)
|
|
1501
|
+
>
|
|
1502
|
+
> ### Shorts-specific Filters:
|
|
1503
|
+
> #### Upload Time (upload_time):
|
|
1504
|
+
> - `hour`: Shorts uploaded in the past hour
|
|
1505
|
+
> - `today`: Shorts uploaded today
|
|
1506
|
+
> - `week`: Shorts uploaded this week
|
|
1507
|
+
> - `month`: Shorts uploaded this month
|
|
1508
|
+
> - `year`: Shorts uploaded this year
|
|
1509
|
+
>
|
|
1510
|
+
> #### Sort By (sort_by):
|
|
1511
|
+
> - `relevance`: Relevance (default)
|
|
1512
|
+
> - `upload_date`: Upload date
|
|
1513
|
+
> - `view_count`: View count
|
|
1514
|
+
> - `rating`: Rating
|
|
1515
|
+
>
|
|
1516
|
+
> ### Pagination Mechanism Explained:
|
|
1517
|
+
> #### How to get continuation_token:
|
|
1518
|
+
> Extract from response JSON, typically at one of these paths:
|
|
1519
|
+
> ```python
|
|
1520
|
+
> # Path 1: In onResponseReceivedCommands
|
|
1521
|
+
> response["onResponseReceivedCommands"][0]["appendContinuationItemsAction"]["continuationItems"][-1]["continuationItemRenderer"]["continuationEndpoint"]["continuationCommand"]["token"]
|
|
1522
|
+
>
|
|
1523
|
+
> # Path 2: In contents
|
|
1524
|
+
> response["contents"]["twoColumnSearchResultsRenderer"]["primaryContents"]["sectionListRenderer"]["contents"][-1]["continuationItemRenderer"]["continuationEndpoint"]["continuationCommand"]["token"]
|
|
1525
|
+
> ```
|
|
1526
|
+
>
|
|
1527
|
+
> #### Usage Flow:
|
|
1528
|
+
> 1. **First request**: Don't pass continuation_token
|
|
1529
|
+
> ```
|
|
1530
|
+
> GET /api/v1/youtube_web/get_shorts_search?search_query=python
|
|
1531
|
+
> ```
|
|
1532
|
+
> 2. **Extract token**: Find continuation_token in response
|
|
1533
|
+
> 3. **Next requests**: Pass continuation_token to get next page
|
|
1534
|
+
> ```
|
|
1535
|
+
> GET /api/v1/youtube_web/get_shorts_search?search_query=python&continuation_token=xxx
|
|
1536
|
+
> ```
|
|
1537
|
+
>
|
|
1538
|
+
> ### Response Data Structure:
|
|
1539
|
+
> ```json
|
|
1540
|
+
> {
|
|
1541
|
+
> "code": 200,
|
|
1542
|
+
> "data": {
|
|
1543
|
+
> "contents": {
|
|
1544
|
+
> "twoColumnSearchResultsRenderer": {
|
|
1545
|
+
> "primaryContents": {
|
|
1546
|
+
> "sectionListRenderer": {
|
|
1547
|
+
> "contents": [
|
|
1548
|
+
> {
|
|
1549
|
+
> "itemSectionRenderer": {
|
|
1550
|
+
> "contents": [
|
|
1551
|
+
> {
|
|
1552
|
+
> "gridShelfViewModel": {
|
|
1553
|
+
> // Shorts video list
|
|
1554
|
+
> "items": [...]
|
|
1555
|
+
> }
|
|
1556
|
+
> }
|
|
1557
|
+
> ]
|
|
1558
|
+
> }
|
|
1559
|
+
> },
|
|
1560
|
+
> {
|
|
1561
|
+
> "continuationItemRenderer": {
|
|
1562
|
+
> "continuationEndpoint": {
|
|
1563
|
+
> "continuationCommand": {
|
|
1564
|
+
> "token": "xxx" // Token for next page
|
|
1565
|
+
> }
|
|
1566
|
+
> }
|
|
1567
|
+
> }
|
|
1568
|
+
> }
|
|
1569
|
+
> ]
|
|
1570
|
+
> }
|
|
1571
|
+
> }
|
|
1572
|
+
> }
|
|
1573
|
+
> }
|
|
1574
|
+
> }
|
|
1575
|
+
> }
|
|
1576
|
+
> ```
|
|
1577
|
+
>
|
|
1578
|
+
> ### Returns:
|
|
1579
|
+
> - Shorts-specific search results with video list and pagination token
|
|
1580
|
+
>
|
|
1581
|
+
> # [示例/Examples]
|
|
1582
|
+
> ## 基础Shorts搜索(自动过滤长视频)
|
|
1583
|
+
> GET /youtube_web/get_shorts_search?search_query=Python编程
|
|
1584
|
+
>
|
|
1585
|
+
> ## 获取原始混合内容(包含长视频)
|
|
1586
|
+
> GET /youtube_web/get_shorts_search?search_query=Python编程&filter_mixed_content=false
|
|
1587
|
+
>
|
|
1588
|
+
> ## 搜索本周上传的Python相关Shorts
|
|
1589
|
+
> GET /youtube_web/get_shorts_search?search_query=python&upload_time=week
|
|
1590
|
+
>
|
|
1591
|
+
> ## 搜索观看次数最多的技术Shorts
|
|
1592
|
+
> GET /youtube_web/get_shorts_search?search_query=技术&sort_by=view_count
|
|
1593
|
+
>
|
|
1594
|
+
> ## 翻页获取更多Shorts
|
|
1595
|
+
> GET /youtube_web/get_shorts_search?search_query=编程&continuation_token=EqcBEgPkuKzor4YybhmgGk...
|
|
1596
|
+
|
|
1597
|
+
#### Parameters
|
|
1598
|
+
|
|
1599
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
1600
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1601
|
+
| search_query | query | string | Yes | 搜索关键字/Search keyword | None | Python编程 | None |
|
|
1602
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | en-US | en-US | None |
|
|
1603
|
+
| country_code | query | string | No | 国家代码(如US, CN等)/Country code | US | US | None |
|
|
1604
|
+
| time_zone | query | string | No | 时区(如America/Los_Angeles, Asia/Shanghai等)/Time zone | America/Los_Angeles | America/Los_Angeles | None |
|
|
1605
|
+
| upload_time | query | string enum[hour, today, week, month, year] | No | 上传时间过滤 \| Upload time filter for Shorts | None | None | None |
|
|
1606
|
+
| sort_by | query | string enum[relevance, upload_date, view_count, rating] | No | 排序方式 \| Sort by for Shorts | None | None | None |
|
|
1607
|
+
| continuation_token | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
1608
|
+
| filter_mixed_content | query | boolean | No | 是否过滤混合内容(长视频),默认True / Filter mixed content (long videos), default True | true | true | None |
|
|
1609
|
+
|
|
1610
|
+
#### Request Body
|
|
1611
|
+
|
|
1612
|
+
None
|
|
1613
|
+
|
|
1614
|
+
#### Success Response
|
|
1615
|
+
|
|
1616
|
+
##### `200 application/json`
|
|
1617
|
+
|
|
1618
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
1619
|
+
|
|
1620
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
1621
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
1622
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
1623
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
1624
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
1625
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
1626
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
1627
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
1628
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
1629
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
1630
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
1631
|
+
| 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 |
|
|
1632
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
1633
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
1634
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
1635
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
1636
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
1637
|
+
|
|
1638
|
+
<a id="get-api-u1-v1-youtube-web-get-trending-videos"></a>
|
|
1639
|
+
### `GET /api/u1/v1/youtube/web/get_trending_videos`
|
|
1640
|
+
|
|
1641
|
+
- Summary: 获取趋势视频/Get trending videos
|
|
1642
|
+
- Capabilities: trends / rankings / content details
|
|
1643
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
1644
|
+
- operationId: `get_trending_videos_api_v1_youtube_web_get_trending_videos_get`
|
|
1645
|
+
|
|
1646
|
+
#### Notes
|
|
1647
|
+
|
|
1648
|
+
> # [中文]
|
|
1649
|
+
> ### 用途:
|
|
1650
|
+
> - 获取趋势视频。
|
|
1651
|
+
> ### 参数:
|
|
1652
|
+
> - language_code: 语言代码,默认为en。
|
|
1653
|
+
> - country_code: 国家代码,默认为us。
|
|
1654
|
+
> - section: 类型,默认为Now,可选值为Music, Gaming, Movies。
|
|
1655
|
+
> ### 返回:
|
|
1656
|
+
> - 趋势视频。
|
|
1657
|
+
>
|
|
1658
|
+
> # [English]
|
|
1659
|
+
> ### Purpose:
|
|
1660
|
+
> - Get trending videos.
|
|
1661
|
+
> ### Parameters:
|
|
1662
|
+
> - language_code: Language code, default is en.
|
|
1663
|
+
> - country_code: Country code, default is us.
|
|
1664
|
+
> - section: Section, default is Now, optional values are Music, Gaming, Movies.
|
|
1665
|
+
> ### Returns:
|
|
1666
|
+
> - Trending videos.
|
|
1667
|
+
>
|
|
1668
|
+
> # [示例/Example]
|
|
1669
|
+
|
|
1670
|
+
#### Parameters
|
|
1671
|
+
|
|
1672
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
1673
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
1674
|
+
| language_code | query | string | No | 语言代码/Language code | en | None | None |
|
|
1675
|
+
| country_code | query | string | No | 国家代码/Country code | us | None | None |
|
|
1676
|
+
| section | query | string | No | 类型/Section | Now | None | 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-get-video-comment-replies"></a>
|
|
1707
|
+
### `GET /api/u1/v1/youtube/web/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_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 | false | 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-get-video-comments"></a>
|
|
1834
|
+
### `GET /api/u1/v1/youtube/web/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_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 | false | 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-get-video-info"></a>
|
|
2088
|
+
### `GET /api/u1/v1/youtube/web/get_video_info`
|
|
2089
|
+
|
|
2090
|
+
- Summary: 获取视频信息 V1/Get video information V1
|
|
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_get_video_info_get`
|
|
2094
|
+
|
|
2095
|
+
#### Notes
|
|
2096
|
+
|
|
2097
|
+
> # [中文]
|
|
2098
|
+
> ### 用途:
|
|
2099
|
+
> - 获取视频元数据及下载信息
|
|
2100
|
+
> - 此接口收费: 0.002$/次
|
|
2101
|
+
> - 如果需要节省成本,可以使用V2版本,V2版本是0.001$/次,但不保证稳定性。
|
|
2102
|
+
> ### 详细参数:
|
|
2103
|
+
> - url_access:
|
|
2104
|
+
> - normal: 包含音视频直链
|
|
2105
|
+
> - blocked: 不包含直链
|
|
2106
|
+
> - videos/audios:
|
|
2107
|
+
> - auto: 根据url_access自动选择(normal→true,blocked→false)
|
|
2108
|
+
> - true: 返回简化格式信息
|
|
2109
|
+
> - raw: 返回原始格式信息
|
|
2110
|
+
> - false: 不包含该类型数据
|
|
2111
|
+
> ### 返回:
|
|
2112
|
+
> - 视频元数据 + 请求参数对应的资源信息
|
|
2113
|
+
>
|
|
2114
|
+
> # [English]
|
|
2115
|
+
> ### Purpose:
|
|
2116
|
+
> - Get video metadata and download information
|
|
2117
|
+
> - This endpoint is charged: 0.002$/request
|
|
2118
|
+
> - To save cost, you can use V2 version, which is 0.001$/request, but stability is not guaranteed.
|
|
2119
|
+
> ### Parameters Detail:
|
|
2120
|
+
> - url_access:
|
|
2121
|
+
> - normal: Include direct URLs
|
|
2122
|
+
> - blocked: Exclude direct URLs
|
|
2123
|
+
> - videos/audios:
|
|
2124
|
+
> - auto: Auto-select based on url_access (normal→true,blocked→false)
|
|
2125
|
+
> - true: Simplified format
|
|
2126
|
+
> - raw: Original format
|
|
2127
|
+
> - false: Exclude this type
|
|
2128
|
+
> ### Returns:
|
|
2129
|
+
> - Video metadata + requested resource information
|
|
2130
|
+
>
|
|
2131
|
+
> # [示例/Example]
|
|
2132
|
+
> video_id = "LuIL5JATZsc"
|
|
2133
|
+
> url_access = "blocked"
|
|
2134
|
+
> lang = "zh-CN"
|
|
2135
|
+
>
|
|
2136
|
+
> video_id = "LuIL5JATZsc"
|
|
2137
|
+
> url_access = "normal"
|
|
2138
|
+
> lang = "en-US"
|
|
2139
|
+
> videos = "auto"
|
|
2140
|
+
> audios = "auto"
|
|
2141
|
+
> subtitles = True
|
|
2142
|
+
|
|
2143
|
+
#### Parameters
|
|
2144
|
+
|
|
2145
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2146
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2147
|
+
| video_id | query | string | Yes | 视频ID/Video ID | None | LuIL5JATZsc | None |
|
|
2148
|
+
| url_access | query | string enum[normal, blocked] | No | URL访问模式:normal(包含音视频URL)\| blocked(不包含音视频URL) / URL access mode | normal | None | None |
|
|
2149
|
+
| lang | query | string | No | 语言代码(IETF标签),默认en-US / Language code | en-US | zh-CN | None |
|
|
2150
|
+
| videos | query | string enum[auto, true, raw, false] | No | 视频格式:auto(自动)\| true(简化格式)\| raw(原始格式)\| false(不获取) / Video format selection | auto | None | None |
|
|
2151
|
+
| audios | query | string enum[auto, true, raw, false] | No | 音频格式:auto(自动)\| true(简化格式)\| raw(原始格式)\| false(不获取) / Audio format selection | auto | None | None |
|
|
2152
|
+
| subtitles | query | boolean | No | 是否获取字幕 / Include subtitles | true | None | None |
|
|
2153
|
+
| related | query | boolean | No | 是否获取相关视频 / Include related content | true | None | None |
|
|
2154
|
+
|
|
2155
|
+
#### Request Body
|
|
2156
|
+
|
|
2157
|
+
None
|
|
2158
|
+
|
|
2159
|
+
#### Success Response
|
|
2160
|
+
|
|
2161
|
+
##### `200 application/json`
|
|
2162
|
+
|
|
2163
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2164
|
+
|
|
2165
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2166
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2167
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2168
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2169
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2170
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2171
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2172
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2173
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2174
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2175
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2176
|
+
| 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 |
|
|
2177
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2178
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2179
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2180
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2181
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
2182
|
+
|
|
2183
|
+
<a id="get-api-u1-v1-youtube-web-get-video-info-v2"></a>
|
|
2184
|
+
### `GET /api/u1/v1/youtube/web/get_video_info_v2`
|
|
2185
|
+
|
|
2186
|
+
- Summary: 获取视频信息 V2/Get video information V2
|
|
2187
|
+
- Capabilities: content details
|
|
2188
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
2189
|
+
- operationId: `get_video_info_v2_api_v1_youtube_web_get_video_info_v2_get`
|
|
2190
|
+
|
|
2191
|
+
#### Notes
|
|
2192
|
+
|
|
2193
|
+
> # [中文]
|
|
2194
|
+
> ### 用途:
|
|
2195
|
+
> - 获取视频元数据及下载信息
|
|
2196
|
+
> - 此接口收费: 0.001$/次
|
|
2197
|
+
> ### 参数:
|
|
2198
|
+
> - video_id: 视频ID,从URL中获取,例如:https://www.youtube.com/watch?v=LuIL5JATZsc,这里的video_id就是LuIL5JATZsc。
|
|
2199
|
+
> ### 返回:
|
|
2200
|
+
> - 视频元数据 + 请求参数对应的资源信息
|
|
2201
|
+
>
|
|
2202
|
+
> # [English]
|
|
2203
|
+
> ### Purpose:
|
|
2204
|
+
> - Get video metadata and download information
|
|
2205
|
+
> - This endpoint is charged: 0.001$/request
|
|
2206
|
+
> ### Parameters Detail:
|
|
2207
|
+
> - video_id: Video ID, get it from the URL, for example: https://www.youtube.com/watch?v=LuIL5JATZsc, the id is LuIL5JATZsc.
|
|
2208
|
+
> ### Returns:
|
|
2209
|
+
> - Video metadata + requested resource information
|
|
2210
|
+
>
|
|
2211
|
+
> # [示例/Example]
|
|
2212
|
+
> video_id = "LuIL5JATZsc"
|
|
2213
|
+
|
|
2214
|
+
#### Parameters
|
|
2215
|
+
|
|
2216
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2217
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2218
|
+
| video_id | query | string | Yes | 视频ID/Video ID | None | LuIL5JATZsc | None |
|
|
2219
|
+
|
|
2220
|
+
#### Request Body
|
|
2221
|
+
|
|
2222
|
+
None
|
|
2223
|
+
|
|
2224
|
+
#### Success Response
|
|
2225
|
+
|
|
2226
|
+
##### `200 application/json`
|
|
2227
|
+
|
|
2228
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2229
|
+
|
|
2230
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2231
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2232
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2233
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2234
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2235
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2236
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2237
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2238
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2239
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2240
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2241
|
+
| 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 |
|
|
2242
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2243
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2244
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2245
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2246
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
2247
|
+
|
|
2248
|
+
<a id="get-api-u1-v1-youtube-web-get-video-info-v3"></a>
|
|
2249
|
+
### `GET /api/u1/v1/youtube/web/get_video_info_v3`
|
|
2250
|
+
|
|
2251
|
+
- Summary: 获取视频详情 V3/Get video information V3
|
|
2252
|
+
- Capabilities: content details
|
|
2253
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
2254
|
+
- operationId: `get_video_info_v3_api_v1_youtube_web_get_video_info_v3_get`
|
|
2255
|
+
|
|
2256
|
+
#### Notes
|
|
2257
|
+
|
|
2258
|
+
> # [中文]
|
|
2259
|
+
> ### 用途:
|
|
2260
|
+
> - 获取YouTube视频详情信息
|
|
2261
|
+
> - 返回原始完整数据(包含 playerResponse 和 initialData)
|
|
2262
|
+
>
|
|
2263
|
+
> ### 参数详解:
|
|
2264
|
+
>
|
|
2265
|
+
> #### 📌 必选参数:
|
|
2266
|
+
> **video_id** (string)
|
|
2267
|
+
> - **作用**: 视频ID
|
|
2268
|
+
> - **获取方式**: 从视频URL中提取,例如 `https://www.youtube.com/watch?v=oaSNBz4qMQY`,video_id 就是 `oaSNBz4qMQY`
|
|
2269
|
+
> - **示例**: `"oaSNBz4qMQY"`
|
|
2270
|
+
>
|
|
2271
|
+
> #### ⚙️ 可选参数:
|
|
2272
|
+
> **language_code** (string, 可选)
|
|
2273
|
+
> - **作用**: 设置语言偏好
|
|
2274
|
+
> - **默认值**: `"zh-CN"`
|
|
2275
|
+
> - **可用值**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"` 等
|
|
2276
|
+
>
|
|
2277
|
+
> ### 返回数据结构:
|
|
2278
|
+
> ```json
|
|
2279
|
+
> {
|
|
2280
|
+
> "playerResponse": {
|
|
2281
|
+
> "videoDetails": {},
|
|
2282
|
+
> "streamingData": {
|
|
2283
|
+
> "formats": [],
|
|
2284
|
+
> "adaptiveFormats": []
|
|
2285
|
+
> },
|
|
2286
|
+
> "microformat": {},
|
|
2287
|
+
> ...
|
|
2288
|
+
> },
|
|
2289
|
+
> "initialData": {
|
|
2290
|
+
> "contents": {
|
|
2291
|
+
> "twoColumnWatchNextResults": {
|
|
2292
|
+
> "results": {
|
|
2293
|
+
> "results": {
|
|
2294
|
+
> "contents": [
|
|
2295
|
+
> {
|
|
2296
|
+
> "videoPrimaryInfoRenderer": {...},
|
|
2297
|
+
> "videoSecondaryInfoRenderer": {...}
|
|
2298
|
+
> }
|
|
2299
|
+
> ]
|
|
2300
|
+
> }
|
|
2301
|
+
> }
|
|
2302
|
+
> }
|
|
2303
|
+
> },
|
|
2304
|
+
> ...
|
|
2305
|
+
> }
|
|
2306
|
+
> }
|
|
2307
|
+
> ```
|
|
2308
|
+
>
|
|
2309
|
+
> ### 主要字段说明:
|
|
2310
|
+
> - `playerResponse`: YouTube 播放器响应数据
|
|
2311
|
+
> - `videoDetails`: 视频基本信息(可能为空,取决于YouTube的返回)
|
|
2312
|
+
> - `streamingData`: 视频流数据(包含 formats 和 adaptiveFormats,包含 googlevideo.com 的URL)
|
|
2313
|
+
> - `microformat`: 元数据信息
|
|
2314
|
+
> - `initialData`: YouTube 页面初始化数据
|
|
2315
|
+
> - `videoPrimaryInfoRenderer`: 主要信息(标题、观看次数、点赞数等)
|
|
2316
|
+
> - `videoSecondaryInfoRenderer`: 次要信息(频道信息、描述等)
|
|
2317
|
+
>
|
|
2318
|
+
> # [English]
|
|
2319
|
+
> ### Purpose:
|
|
2320
|
+
> - Get YouTube video details
|
|
2321
|
+
> - Returns raw complete data (includes playerResponse and initialData)
|
|
2322
|
+
>
|
|
2323
|
+
> ### Parameters:
|
|
2324
|
+
>
|
|
2325
|
+
> #### 📌 Required:
|
|
2326
|
+
> **video_id** (string)
|
|
2327
|
+
> - **Purpose**: Video ID
|
|
2328
|
+
> - **How to get**: Extract from video URL, e.g., `https://www.youtube.com/watch?v=oaSNBz4qMQY`, video_id is `oaSNBz4qMQY`
|
|
2329
|
+
> - **Example**: `"oaSNBz4qMQY"`
|
|
2330
|
+
>
|
|
2331
|
+
> #### ⚙️ Optional:
|
|
2332
|
+
> **language_code** (string, optional)
|
|
2333
|
+
> - **Purpose**: Set language preference
|
|
2334
|
+
> - **Default**: `"zh-CN"`
|
|
2335
|
+
> - **Values**: `"zh-CN"`, `"en-US"`, `"ja-JP"`, `"ko-KR"`, etc.
|
|
2336
|
+
>
|
|
2337
|
+
> ### Response Structure:
|
|
2338
|
+
> ```json
|
|
2339
|
+
> {
|
|
2340
|
+
> "playerResponse": {
|
|
2341
|
+
> "videoDetails": {},
|
|
2342
|
+
> "streamingData": {
|
|
2343
|
+
> "formats": [],
|
|
2344
|
+
> "adaptiveFormats": []
|
|
2345
|
+
> },
|
|
2346
|
+
> "microformat": {},
|
|
2347
|
+
> ...
|
|
2348
|
+
> },
|
|
2349
|
+
> "initialData": {
|
|
2350
|
+
> "contents": {
|
|
2351
|
+
> "twoColumnWatchNextResults": {
|
|
2352
|
+
> "results": {
|
|
2353
|
+
> "results": {
|
|
2354
|
+
> "contents": [
|
|
2355
|
+
> {
|
|
2356
|
+
> "videoPrimaryInfoRenderer": {...},
|
|
2357
|
+
> "videoSecondaryInfoRenderer": {...}
|
|
2358
|
+
> }
|
|
2359
|
+
> ]
|
|
2360
|
+
> }
|
|
2361
|
+
> }
|
|
2362
|
+
> }
|
|
2363
|
+
> },
|
|
2364
|
+
> ...
|
|
2365
|
+
> }
|
|
2366
|
+
> }
|
|
2367
|
+
> ```
|
|
2368
|
+
>
|
|
2369
|
+
> ### Key Fields:
|
|
2370
|
+
> - `playerResponse`: YouTube player response data
|
|
2371
|
+
> - `videoDetails`: Basic video info (may be empty depending on YouTube's response)
|
|
2372
|
+
> - `streamingData`: Video stream data (includes formats and adaptiveFormats with googlevideo.com URLs)
|
|
2373
|
+
> - `microformat`: Metadata information
|
|
2374
|
+
> - `initialData`: YouTube page initialization data
|
|
2375
|
+
> - `videoPrimaryInfoRenderer`: Primary info (title, view count, like count, etc.)
|
|
2376
|
+
> - `videoSecondaryInfoRenderer`: Secondary info (channel info, description, etc.)
|
|
2377
|
+
>
|
|
2378
|
+
> # [示例/Examples]
|
|
2379
|
+
> ## 获取视频详情数据 / Get video details
|
|
2380
|
+
> GET /youtube_web/get_video_info_v3?video_id=oaSNBz4qMQY
|
|
2381
|
+
>
|
|
2382
|
+
> ## 指定语言 / Specify language
|
|
2383
|
+
> GET /youtube_web/get_video_info_v3?video_id=oaSNBz4qMQY&language_code=en-US
|
|
2384
|
+
|
|
2385
|
+
#### Parameters
|
|
2386
|
+
|
|
2387
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2388
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2389
|
+
| video_id | query | string | Yes | 视频ID/Video ID | None | oaSNBz4qMQY | None |
|
|
2390
|
+
| language_code | query | string | No | 语言代码(如zh-CN, en-US等)/Language code | zh-CN | zh-CN | None |
|
|
2391
|
+
|
|
2392
|
+
#### Request Body
|
|
2393
|
+
|
|
2394
|
+
None
|
|
2395
|
+
|
|
2396
|
+
#### Success Response
|
|
2397
|
+
|
|
2398
|
+
##### `200 application/json`
|
|
2399
|
+
|
|
2400
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2401
|
+
|
|
2402
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2403
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2404
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2405
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2406
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2407
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2408
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2409
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2410
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2411
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2412
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2413
|
+
| 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 |
|
|
2414
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2415
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2416
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2417
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2418
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
2419
|
+
|
|
2420
|
+
<a id="get-api-u1-v1-youtube-web-get-video-subtitles"></a>
|
|
2421
|
+
### `GET /api/u1/v1/youtube/web/get_video_subtitles`
|
|
2422
|
+
|
|
2423
|
+
- Summary: 获取视频字幕/Get video subtitles
|
|
2424
|
+
- Capabilities: subtitles / transcription / content details
|
|
2425
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
2426
|
+
- operationId: `api_get_video_subtitles_api_v1_youtube_web_get_video_subtitles_get`
|
|
2427
|
+
|
|
2428
|
+
#### Notes
|
|
2429
|
+
|
|
2430
|
+
> # [中文]
|
|
2431
|
+
> ### 用途:
|
|
2432
|
+
> - 获取视频字幕内容
|
|
2433
|
+
> ### 使用流程:
|
|
2434
|
+
> 1. 先调用获取视频详情接口,从字幕数据中获取subtitleUrl
|
|
2435
|
+
> 2. 使用该URL作为本接口参数
|
|
2436
|
+
> ### 参数说明:
|
|
2437
|
+
> - fix_overlap: 特别适用于自动生成的字幕,会自动分割重叠的时间段
|
|
2438
|
+
>
|
|
2439
|
+
> # [English]
|
|
2440
|
+
> ### Purpose:
|
|
2441
|
+
> - Get video subtitle content
|
|
2442
|
+
> ### Workflow:
|
|
2443
|
+
> 1. First call get_video_info to obtain subtitleUrl
|
|
2444
|
+
> 2. Use that URL as parameter here
|
|
2445
|
+
> ### Parameter Notes:
|
|
2446
|
+
> - fix_overlap: Especially useful for auto-generated subtitles, will split overlapping time ranges
|
|
2447
|
+
>
|
|
2448
|
+
> # [示例/Example]
|
|
2449
|
+
> subtitle_url = "https://www.youtube.com/api/timedtext?v=G33j5Qi4rE8..."
|
|
2450
|
+
> target_lang = "zh-CN"
|
|
2451
|
+
|
|
2452
|
+
#### Parameters
|
|
2453
|
+
|
|
2454
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2455
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2456
|
+
| subtitle_url | query | string | Yes | 字幕URL(需先调用获取视频详情接口) / Subtitle URL from video details | None | https://www.youtube.com/api/timedtext?v=... | None |
|
|
2457
|
+
| format | query | string enum[srt, xml, vtt, txt] | No | 字幕格式:srt/xml/vtt/txt / Subtitle format | srt | None | None |
|
|
2458
|
+
| fix_overlap | query | boolean | No | 修复重叠字幕(默认开启) / Fix overlapping subtitles | true | None | None |
|
|
2459
|
+
| target_lang | query | string | No | 目标语言代码(留空保持原语言) / Target language code | None | zh-CN | None |
|
|
2460
|
+
|
|
2461
|
+
#### Request Body
|
|
2462
|
+
|
|
2463
|
+
None
|
|
2464
|
+
|
|
2465
|
+
#### Success Response
|
|
2466
|
+
|
|
2467
|
+
##### `200 application/json`
|
|
2468
|
+
|
|
2469
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2470
|
+
|
|
2471
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2472
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2473
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2474
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2475
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2476
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2477
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2478
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2479
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2480
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2481
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2482
|
+
| 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 |
|
|
2483
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2484
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2485
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2486
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2487
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
2488
|
+
|
|
2489
|
+
<a id="get-api-u1-v1-youtube-web-search-channel"></a>
|
|
2490
|
+
### `GET /api/u1/v1/youtube/web/search_channel`
|
|
2491
|
+
|
|
2492
|
+
- Summary: 搜索频道/Search channel
|
|
2493
|
+
- Capabilities: search / profiles / accounts
|
|
2494
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
2495
|
+
- operationId: `search_channel_api_v1_youtube_web_search_channel_get`
|
|
2496
|
+
|
|
2497
|
+
#### Notes
|
|
2498
|
+
|
|
2499
|
+
> # [中文]
|
|
2500
|
+
> ### 用途:
|
|
2501
|
+
> - 搜索频道。
|
|
2502
|
+
> ### 参数:
|
|
2503
|
+
> - search_query: 搜索关键字。
|
|
2504
|
+
> - language_code: 语言代码,默认为en。
|
|
2505
|
+
> - country_code: 国家代码,默认为us。
|
|
2506
|
+
> - continuation_token: 用于继续获取搜索结果的令牌。默认为None。
|
|
2507
|
+
> ### 返回:
|
|
2508
|
+
> - 搜索结果。
|
|
2509
|
+
>
|
|
2510
|
+
> # [English]
|
|
2511
|
+
> ### Purpose:
|
|
2512
|
+
> - Search channel.
|
|
2513
|
+
> ### Parameters:
|
|
2514
|
+
> - search_query: Search keyword.
|
|
2515
|
+
> - language_code: Language code, default is en.
|
|
2516
|
+
> - country_code: Country code, default is us.
|
|
2517
|
+
> - continuation_token: Token to continue fetching search results. Default is None.
|
|
2518
|
+
> ### Returns:
|
|
2519
|
+
> - Search results.
|
|
2520
|
+
>
|
|
2521
|
+
> # [示例/Example]
|
|
2522
|
+
> channel_id = "UCXuqSBlHAE6Xw-yeJA0Tunw"
|
|
2523
|
+
> search_query = "AMD"
|
|
2524
|
+
|
|
2525
|
+
#### Parameters
|
|
2526
|
+
|
|
2527
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2528
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2529
|
+
| channel_id | query | string | Yes | 频道ID/Channel ID | None | UCXuqSBlHAE6Xw-yeJA0Tunw | None |
|
|
2530
|
+
| search_query | query | string | Yes | 搜索关键字/Search keyword | None | AMD | None |
|
|
2531
|
+
| language_code | query | string | No | 语言代码/Language code | en | None | None |
|
|
2532
|
+
| country_code | query | string | No | 国家代码/Country code | us | None | None |
|
|
2533
|
+
| continuation_token | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
2534
|
+
|
|
2535
|
+
#### Request Body
|
|
2536
|
+
|
|
2537
|
+
None
|
|
2538
|
+
|
|
2539
|
+
#### Success Response
|
|
2540
|
+
|
|
2541
|
+
##### `200 application/json`
|
|
2542
|
+
|
|
2543
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2544
|
+
|
|
2545
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2546
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2547
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2548
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2549
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2550
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2551
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2552
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2553
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2554
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2555
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2556
|
+
| 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 |
|
|
2557
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2558
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2559
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2560
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2561
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|
|
2562
|
+
|
|
2563
|
+
<a id="get-api-u1-v1-youtube-web-search-video"></a>
|
|
2564
|
+
### `GET /api/u1/v1/youtube/web/search_video`
|
|
2565
|
+
|
|
2566
|
+
- Summary: 搜索视频/Search video
|
|
2567
|
+
- Capabilities: search / content details
|
|
2568
|
+
- Auth: Header `Authorization: Bearer {token}`; docs also allow Cookie `Authorization` as fallback (`HTTPBearer`)
|
|
2569
|
+
- operationId: `search_video_api_v1_youtube_web_search_video_get`
|
|
2570
|
+
|
|
2571
|
+
#### Notes
|
|
2572
|
+
|
|
2573
|
+
> # [中文]
|
|
2574
|
+
> ### 用途:
|
|
2575
|
+
> - 搜索视频。
|
|
2576
|
+
> ### 参数:
|
|
2577
|
+
> - search_query: 搜索关键字。
|
|
2578
|
+
> - language_code: 语言代码,默认为en。
|
|
2579
|
+
> - order_by: 排序方式,默认为this_month,可选值为this_week, this_month, this_year, last_hour, today。
|
|
2580
|
+
> - country_code: 国家代码,默认为us。
|
|
2581
|
+
> - continuation_token: 用于继续获取搜索结果的令牌。默认为None。
|
|
2582
|
+
> ### 返回:
|
|
2583
|
+
> - 搜索结果。
|
|
2584
|
+
>
|
|
2585
|
+
> # [English]
|
|
2586
|
+
> ### Purpose:
|
|
2587
|
+
> - Search video.
|
|
2588
|
+
> ### Parameters:
|
|
2589
|
+
> - search_query: Search keyword.
|
|
2590
|
+
> - language_code: Language code, default is en.
|
|
2591
|
+
> - order_by: Order by, default is this_month, optional values are this_week, this_month, this_year, last_hour, today.
|
|
2592
|
+
> - country_code: Country code, default is us.
|
|
2593
|
+
> - continuation_token: Token to continue fetching search results. Default is None.
|
|
2594
|
+
> ### Returns:
|
|
2595
|
+
> - Search results.
|
|
2596
|
+
>
|
|
2597
|
+
> # [示例/Example]
|
|
2598
|
+
> search_query = "Minecraft"
|
|
2599
|
+
|
|
2600
|
+
#### Parameters
|
|
2601
|
+
|
|
2602
|
+
| Field | In | Type | Required | Description | Default | Example | Enum |
|
|
2603
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
2604
|
+
| search_query | query | string | Yes | 搜索关键字/Search keyword | None | Minecraft | None |
|
|
2605
|
+
| language_code | query | string | No | 语言代码/Language code | en | None | None |
|
|
2606
|
+
| order_by | query | string | No | 排序方式/Order by | this_month | None | None |
|
|
2607
|
+
| country_code | query | string | No | 国家代码/Country code | us | None | None |
|
|
2608
|
+
| continuation_token | query | string | No | 翻页令牌/Pagination token | None | None | None |
|
|
2609
|
+
|
|
2610
|
+
#### Request Body
|
|
2611
|
+
|
|
2612
|
+
None
|
|
2613
|
+
|
|
2614
|
+
#### Success Response
|
|
2615
|
+
|
|
2616
|
+
##### `200 application/json`
|
|
2617
|
+
|
|
2618
|
+
- Schema summary: `code`:integer, `request_id`:string, `message`:string, `message_zh`:string, `support`:string, `time`:string, `time_stamp`:integer, `time_zone`:string, ...
|
|
2619
|
+
|
|
2620
|
+
| Field | Type | Required | Description | Default | Example | Enum |
|
|
2621
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
2622
|
+
| code | integer | No | HTTP status code \| HTTP状态码 | 200 | None | None |
|
|
2623
|
+
| request_id | string | No | Unique request identifier \| 唯一请求标识符 | None | None | None |
|
|
2624
|
+
| message | string | No | Response message (EN-US) \| 响应消息 (English) | Request successful. This request will incur a charge. | None | None |
|
|
2625
|
+
| message_zh | string | No | Response message (ZH-CN) \| 响应消息 (中文) | 请求成功,本次请求将被计费。 | None | None |
|
|
2626
|
+
| support | string | No | Support message \| 支持消息 | Discord: https://discord.gg/aMEAS8Xsvz | None | None |
|
|
2627
|
+
| time | string | No | The time the response was generated \| 生成响应的时间 | None | None | None |
|
|
2628
|
+
| time_stamp | integer | No | The timestamp the response was generated \| 生成响应的时间戳 | None | None | None |
|
|
2629
|
+
| time_zone | string | No | The timezone of the response time \| 响应时间的时区 | America/Los_Angeles | None | None |
|
|
2630
|
+
| docs | string | No | Link to the API Swagger documentation for this endpoint \| 此端点的 API Swagger 文档链接 | None | None | None |
|
|
2631
|
+
| 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 |
|
|
2632
|
+
| cache_message_zh | string | No | Cache message (ZH-CN) \| 缓存消息 (中文) | 本次请求将被缓存,你可以使用下面的 URL 直接访问缓存结果,有效期为 24 小时,访问缓存不会产生额外费用。 | None | None |
|
|
2633
|
+
| cache_url | string | No | The URL to access the cached result \| 访问缓存结果的 URL | None | None | None |
|
|
2634
|
+
| router | string | No | The endpoint that generated this response \| 生成此响应的端点 | None | None | None |
|
|
2635
|
+
| params | dynamic object | No | The parameters used in the request \| 请求中使用的参数 | None | None | None |
|
|
2636
|
+
| data | null | No | The response data \| 响应数据 | None | None | None |
|