Youtube 接口

Youtube 接口

wpchell 115 2025-06-19

接口说明

  • 请确保所有请求均携带有效的token参数(各平台唯一)。

  • 接口统一返回JSON格式数据,重点关注message字段:值为"请求成功"表示成功;其他值请根据其提示排查错误。

  • 当响应中cost=true时,表示请求已生效并计费,即使遇到错误(如资源失效404),也请勿重复尝试。

  • 对于YouTube接口,由于其响应时间较长,强烈建议设置超时(timeout)不少于30秒,以避免因超时误判导致重复请求扣费。

测试token

token: 请联系管理员开通 q:1098441010 vx:pchell11

余额查询

请求示例
http://43.134.116.51:10002/youtube/get_user_balance/?token=
参数

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

响应
{
    "cost": false,
    "data": {
        "count": 9999.0
    },
    "message": "请求成功"
}
其他说明

用户信息

请求示例
http://43.134.116.51:10002/youtube/user_info/?token=&user_name=
参数

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

user_name

用户名

从用户主页url中获取,例如:https://www.youtube.com/@MrBeast,其用户名为:MrBeast

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

用户视频列表

请求示例
http://43.134.116.51:10002/youtube/user_video/?token=&user_name=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

user_name

用户名

用户信息接口返回

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照发布时间排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/user_video/?token=***&user_name=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

用户shorts列表

请求示例
http://43.134.116.51:10002/youtube/user_shorts/?token=&user_name=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

user_name

用户名

用户信息接口返回

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照发布时间排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/user_shorts/?token=***&user_name=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

频道信息

请求示例
http://43.134.116.51:10002/youtube/channel_info/?token=&channel_id=
参数

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

channel_id

频道id

https://www.youtube.com/channel/UCBXNpF6k2n8dsI6nBH8q4sQ

取:UCBXNpF6k2n8dsI6nBH8q4sQ

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

频道视频列表

请求示例
http://43.134.116.51:10002/youtube/channel_video/?token=&channel_id=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

channel_id

频道id

参考channel_info

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照发布时间排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/channel_video/?token=***&channel_id=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

搜索(全部)

请求示例
http://43.134.116.51:10002/youtube/search_all/?token=&keyword=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

keyword

搜索关键词

-

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照发布时间排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/search_all/?token=***&keyword=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

搜索(视频)

请求示例
http://43.134.116.51:10002/youtube/search_video/?token=&keyword=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

keyword

搜索关键词

-

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照youtube页面展示结果排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/search_video/?token=***&keyword=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

搜索(shorts)

请求示例
http://43.134.116.51:10002/youtube/search_shorts/?token=&keyword=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

keyword

搜索关键词

-

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照youtube页面展示结果排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/search_shorts/?token=***&keyword=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

话题(全部)

请求示例
http://43.134.116.51:10002/youtube/tag_all/?token=&tag_name=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

tag_name

搜索关键词

-

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照youtube页面展示结果排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/tag_all/?token=***&tag_name=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

话题(shorts)

请求示例
http://43.134.116.51:10002/youtube/tag_shorts/?token=&tag_name=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

tag_name

搜索关键词

-

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照youtube页面展示结果排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/tag_shorts/?token=***&tag_name=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

作品详情

请求示例
http://43.134.116.51:10002/youtube/video_detail/?token=&video_id=
参数

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

video_id

视频id

https://www.youtube.com/watch?v=JLILu3xXoAE 取:JLILu3xXoAE

https://www.youtube.com/shorts/lVxLQAlyS04 取:

lVxLQAlyS04

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

作品推荐列表

请求示例
http://43.134.116.51:10002/youtube/video_recommend_list/?token=&video_id=&cursor=
参数

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

video_id

视频id

https://www.youtube.com/watch?v=JLILu3xXoAE 取:JLILu3xXoAE

https://www.youtube.com/shorts/lVxLQAlyS04 取:

lVxLQAlyS04

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照youtube页面展示结果排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/video_recommend_list/?token=***&video_id=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

视频下载

请求示例
http://43.134.116.51:10002/youtube/video_download/?token=&video_id=
参数

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

video_id

视频id

https://www.youtube.com/watch?v=JLILu3xXoAE 取:JLILu3xXoAE

https://www.youtube.com/shorts/lVxLQAlyS04 取:

lVxLQAlyS04

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

shorts详情

请求示例
http://43.134.116.51:10002/youtube/shorts_detail/?token=&shorts_id=
参数

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

shorts_id

shorts id

https://www.youtube.com/shorts/lVxLQAlyS04 取:

lVxLQAlyS04

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

评论(视频)

请求示例
http://43.134.116.51:10002/youtube/video_comment/?token=&video_id=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

video_id

视频id

https://www.youtube.com/watch?v=JLILu3xXoAE 取:JLILu3xXoAE

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照热度排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/video_comment/?token=***&video_id=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

回复(视频)

请求示例
http://43.134.116.51:10002/youtube/video_reply/?token=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

cursor

二级评论请求参数

前一页返回(第一个continuationCommand.token)

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照youtube页面展示结果排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/video_reply/?token=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

评论(shorts)

请求示例
http://43.134.116.51:10002/youtube/shorts_comment/?token=&short_id=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

shorts_id

视频id

https://www.youtube.com/shorts/lVxLQAlyS04

取:lVxLQAlyS04

cursor

翻页参数

前一页返回(第一个continuationCommand.token)

空,默认返回第一页

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照热度排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/shorts_comment/?token=***&short_id=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'

回复(视频)

请求示例
http://43.134.116.51:10002/youtube/shorts_reply/?token=&cursor=
参数说明

参数名

含义

传参说明

是否必须

缺省值

token

鉴权参数

-

cursor

二级评论请求参数

前一页返回(第一个continuationCommand.token)

响应
{
     "cost": true,
     "data": {
          ... # youtube数据
     },
     "message": "请求成功"
}
其他说明

按照youtube页面展示结果排序

由于cursor过长超过2048,使用GET请求可能会出现429,可以使用POST请求,curl请求示例如下:

curl --location 'http://43.134.116.51:10002/youtube/shorts_reply/?token=***' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'cursor=***'