You need to enable JavaScript to run this app.
导航

短剧输出

最近更新时间2023.11.21 17:01:08

首次发布时间2023.11.21 17:01:08

本文档介绍内容定制提供的短剧对外输出能力接入,包括以下接口

  • 【获取短剧列表】:分页输出短剧详情列表;

  • 【获取短剧剧集列表】:通过短剧ID,分页获取指定短剧下的剧集详情列表。

接口说明

公共部分

请求

请求URL

请求URL由3部分组成

KEYVALUE/说明
Host(固定值)https://mercury.volcengineapi.com
Action按实际Action填写,下文写明
Version(固定值)2023-01-01

例如

https://mercury.volcengineapi.com?Action=ListShortPlays&Version=2023-01-01

请求Header

KEYVALUE/说明
Content-Type(固定值)application/json
ServiceName(固定值)volc_torchlight_api
AccessKey按实际AK填写
SecretKey按实际SK填写

验签及请求公共参数逻辑参考火山引擎官网:

响应

ResponseMetadata

字段名
字段类型
是否必填
说明
RequestId
string
请求链路Id
Action
string
访问Action
Version
string
API版本号
Service
string
访问的服务名称
Region
string
访问区域
Error
Error
错误信息

获取短剧列表 - ListShortPlays

该接口用于数据拉取,接口单客户限流5QPS

请求URL

https://mercury.volcengineapi.com?Action=ListShortPlays&Version=2023-01-01

请求Method

POST

数据入参

字段名字段类型是否必填说明
UtmSourcestring渠道号
NextTokenstring分页获取下一页内容的游标;不传递则返回第一页的内容
MaxResultsnumber返回每页的条数,默认值为10,最大值为20,不填或非法输入默认返回10条

数据出参

字段名
字段类型
说明
ResponseMetadata
ResponseMetadata
通用返回
Result
ListShortPlaysResult
返回数据

调用示例

携带公共参数验签,POST请求接口同步内容基本信息(公共参数验签参见上文)

{
    "UtmSource": "xxxx_default_content",
    "NextToken": "7241775650057638798",
    "MaxResults":10
}

返回示例

正常返回示例

{
    "ResponseMetadata": {
        "RequestId": "202306211106236436C29742C741A10485",
        "Action": "ListShortPlays",
        "Version": "2023-01-01",
        "Service": "volc_torchlight_api",
        "Region": "cn-north-1"
    },
    "Result": {
        "NextToken": "7216526606989265972",
        "ShortPlays": [
            {
                "Id": "7241775650057638798",
                "Name": "***",
                "Brief": "***",
                "CoverImageUrl":"http://p3-novel.byteimg.com/origin/novel-pic/b62f43e9b8581e3451483867748c0400",
                "Categories":["男生","逆袭","反转"]
            },...
        ]
    }
}

错误返回示例

{
    "ResponseMetadata": {
        "RequestId": "202210271151020102121450321B8D2A21",
        "Action": "ListShortPlays",
        "Version": "2023-01-01",
        "Service": "volc_torchlight_api",
        "Region": "cn-north-1",
        "Error": {
            "CodeN": 100010,
            "Code": "SignatureDoesNotMatch",
            "Message": "The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. Consult the service documentation for details."
        }
    }
}

获取剧集列表 - ListShortPlayEpisodes

请求URL

https://mercury.volcengineapi.com?Action=ListShortPlayEpisodes&Version=2023-01-01

请求Method

POST

数据入参

字段名字段类型是否必填说明
UtmSourcestring渠道号
ShortPlayIdstring指定短剧ID
NextTokenstring分页获取下一页内容的游标;不传递则返回第一页的内容
MaxResultsnumber返回每页的条数,默认值为10,最大值为30,不填或非法输入默认返回10条

数据出参

字段名
字段类型
说明
ResponseMetadata
ResponseMetadata
通用返回
Result
ListShortPlayEpisodesResult
返回数据

调用示例

携带公共参数验签,POST请求接口同步内容基本信息(公共参数验签参见上文)

{
    "UtmSource": "xxxx_default_content",
    "NextToken": "7241775650057638657",
    "MaxResults":10
}

返回示例

正常返回示例

{
    "ResponseMetadata": {
        "RequestId": "202306211106236436C29742C741A10485",
        "Action": "ListShortPlayEpisodes",
        "Version": "2023-01-01",
        "Service": "volc_torchlight_api",
        "Region": "cn-north-1"
    },
    "Result": {
        "NextToken": "7241775650057638658",
        "ShortPlayEpisodes": [
            {
                "Id": "7241775650057638657",
                "ShortPlayId":"7241775650057638798",
                "Name": "第一集",
                "Order":1,
                "Brief": "***",
                "CoverImages":[
                    {
                        "Width": 640,
                        "Height": 360,
                        "Url": "http://p6-open-sign.onewsimg.com/tos-cn-v-6fcc8e/oMk6NjKrwBzIUD85SAGQHmdBbJr7gcbhfMhnDe~tplv-obj.jpeg?scene=core&x-expires=1760529606&x-signature=BgfzeThyruZE6QD6hMo4t377B98%3D"
                    }
                ],
                "Duration":60,
                "Videos":[
                    {
                        "VideoUrl": "https://open.toutiao.com/video/url/?param=2EFBuH3EhDVLt3s13NwjHBiQ9CLHnDSAhJWu7fPSPfFc7VFTd79V46hu5pqq5yRx9759jWMf7LGNqQ8hFGZ1zT23swShJKw1KPSQMcezsUYQf8S3myyw82KtFMSJjESZZnc6maX63Fr6F4p6Uh3BvRgANFbkCrkiaPmz5EnCDXFfPzQYNmsTNepx5vSqvk9vFxnTAyPa9Gtgx&partner=xxxx_default_content&version=3",
                        "Definition": "540p",
                        "Size": 28856434,
                        "Width": 1920,
                        "Height": 1080
                    },
                    {
                        "VideoUrl": "https://open.toutiao.com/video/url/?param=2EFBuH3EhDVLt3s13NwjHBiQ9CLHnDSAhJWu7fPSPfFc7VFTd79V46hu5pqq5yRx9759jWMf7LGNqQ8hFGZ1zT23swShJKw1KPSQMcezsUYQf8S3myyw82KtFMSJjESZZnc6maX63Fr6F4p6Uh3BvRgANFbkCrkiaPmz5EnCDXFfPzQYNmsTNepx5vSqvk9vFxnTAyPa9Gtgx&partner=xxxx_default_content&version=3",
                        "Definition": "1080p",
                        "Size": 28856434,
                        "Width": 1920,
                        "Height": 1080
                    }
                ]
            },
            {
                "Id": "7241775650057638794",
                "ShortPlayId":"7241775650057638798",
                "Name": "第二集",
                "Order":2,
                "Brief": "***",
                "CoverImages":[
                    {
                        "Width": 640,
                        "Height": 360,
                        "Url": "http://p6-open-sign.onewsimg.com/tos-cn-v-6fcc8e/oMk6NjKrwBzIUD85SAGQHmdBbJr7gcbhfMhnDe~tplv-obj.jpeg?scene=core&x-expires=1760529606&x-signature=BgfzeThyruZE6QD6hMo4t377B98%3D"
                    }
                ],
                "Duration":60,
                "Videos":[
                    {
                        "VideoUrl": "https://open.toutiao.com/video/url/?param=2EFBuH3EhDVLt3s13NwjHBiQ9CLHnDSAhJWu7fPSPfFc7VFTd79V46hu5pqq5yRx9759jWMf7LGNqQ8hFGZ1zT23swShJKw1KPSQMcezsUYQf8S3myyw82KtFMSJjESZZnc6maX63Fr6F4p6Uh3BvRgANFbkCrkiaPmz5EnCDXFfPzQYNmsTNepx5vSqvk9vFxnTAyPa9Gtgx&partner=xxxx_default_content&version=3",
                        "Definition": "720p",
                        "Size": 28226434,
                        "Width": 1280,
                        "Height": 720
                    },
                    {
                        "VideoUrl": "https://open.toutiao.com/video/url/?param=2EFBuH3EhDVLt3s13NwjHBiQ9CLHnDSAhJWu7fPSPfFc7VFTd79V46hu5pqq5yRx9759jWMf7LGNqQ8hFGZ1zT23swShJKw1KPSQMcezsUYQf8S3myyw82KtFMSJjESZZnc6maX63Fr6F4p6Uh3BvRgANFbkCrkiaPmz5EnCDXFfPzQYNmsTNepx5vSqvk9vFxnTAyPa9Gtgx&partner=xxxx_default_content&version=3",
                        "Definition": "1080p",
                        "Size": 28856434,
                        "Width": 1920,
                        "Height": 1080
                    }
                ]
            }
        ]
    }
}

错误返回示例

{
    "ResponseMetadata": {
        "RequestId": "202210271151020102121450321B8D2A21",
        "Action": "ListShortPlayEpisodes",
        "Version": "2023-01-01",
        "Service": "volc_torchlight_api",
        "Region": "cn-north-1",
        "Error": {
            "CodeN": 100010,
            "Code": "SignatureDoesNotMatch",
            "Message": "The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. Consult the service documentation for details."
        }
    }
}