查询账号内容列表

接口描述

通过账号ID查询发布的内容数据。

请求地址

接口地址:https://api.shuwen.com/mcndata/content/list

请求方式:GET

请求头

参数
是否必填 类型 描述
sw-access-key 必填 String AccessKey

请求参数

参数 是否必填 类型
描述
timestamp 必填 Long 毫秒级时间戳
signature 必填 String 签名信息,详见接口鉴权
mid 必填 String 账号ID
page 必填 Integer 起始页码,默认为1
size 必填 Integer 单页返回条数,10-100 之间,默认20

响应结果

内容列表按发布时间的倒序返回数据,以下仅列出了接口响应结果,公共响应结果见请求响应结果

字段
允许为空 类型
描述
total_count Integer 符合条件的结果条数
has_more Integer 是否有更多数据,当has_more为1时表示有更多数据,可使用page和size请求参数进行翻页
+list Array 内容列表,无结果时返回空
└list.cid String 内容ID
└list.title String 内容标题
└list.url String 内容播放页地址
└list.thumbnail String 内容封面
└list.publish String 内容发布时间
└list.platform String 内容发布平台
└list.play_count Integer 内容播放数,抖音平台为空
└list.like_count Integer 内容点赞数,部分平台为空
└list.update_time String 内容数据更新时间
└list.video_duration Integer 视频时长
└+list.media Object 发布账号信息
└list.media.mid String 发布账号ID
└list.media.name String 发布账号名称
└list.media.avatar String 发布账号头像
└list.media.is_verified Integer 发布账号认证状态,1为认证账号,0为未认证账号

请求额度

单个应用每日的请求次数如下:

应用状态 请求额度
体验 10次/天
正式 10,000次/天

请求示例

下面使用Python实现该接口调用,开发者可以参考实现其他语言的版本。

import requests
import time
import hashlib

# 应用ak和sk
access_key = "YOUR_ACCESS_KEY"
secret_key = "YOUR_SECRET_KEY"

# 13位的当前时间戳
timestamp = round(time.time() * 1000)


# 生成签名
def getSignature(access_key, secret_key, timestamp):
    temp = secret_key + str(timestamp) + access_key
    return hashlib.md5(temp.encode(encoding="UTF-8")).hexdigest()

# 签名后的字符串
signature = getSignature(access_key, secret_key, timestamp)

# 请求url
url = "https://api.shuwen.com/mcndata/content/list"

# 请求头
headers = {
  "sw-access-key": access_key
}

# 请求参数
params = {
    "timestamp": timestamp,
    "signature": signature,
    "mid": "502334",  # 账号ID
    "page": 1,      # 起始页数,默认为1
    "size": 20     # 单页条数,默认为20
}

# 发起http请求
response = requests.get(url, params=params, headers=headers)
print(response.content.decode("utf8"))复制

响应示例

{
    "success": true,
    "code": "0",
    "msg": "Success",
    "requestId": "http-nio-8080-exec-71_5c466d1163d44efe985e82f5f1ff59ff",
    "data": {
        "list": [
            {
                "video_duration": 1044000,
                "thumbnail": "https://mcn.newscdn.cn/cover/content/20200603/6198aa4a0ccc081a49622e9534ea2bfd.jpg",
                "like_count": 245279,
                "media": {
                    "name": "李子柒",
                    "mid": "502334",
                    "avatar": "https://mcn.newscdn.cn/cover/media/20200413/0ce66ef329963adc9d3b76ff837a0f82.jpg",
                    "is_verified": 1
                },
                "play_count": 2562340,
                "title": "【土豆的花样吃法】农耕之乐,劳作之美,饮食之道——土豆的一生",
                "platform": "bilibili",
                "url": "https://www.mcndata.cn/link/25qQZsdcGtK0",
                "update_time": "2020-06-18 00:13:18",
                "publish": "2020-06-03 21:24:00",
                "cid": "1268184537251328000"
            },
            {
                "video_duration": 1145000,
                "thumbnail": "https://mcn.newscdn.cn/cover/content/20200519/ece9fadca81a4748bcdf81202aca86ee.jpg",
                "like_count": 273225,
                "media": {
                    "name": "李子柒",
                    "mid": "502334",
                    "avatar": "https://mcn.newscdn.cn/cover/media/20200413/0ce66ef329963adc9d3b76ff837a0f82.jpg",
                    "is_verified": 1
                },
                "play_count": 2325108,
                "title": "【小麦的一生】一株小麦,变化出扎根在每个人记忆里的味道",
                "platform": "bilibili",
                "url": "https://www.mcndata.cn/link/25I2iN8CecAw",
                "update_time": "2020-06-18 00:13:18",
                "publish": "2020-05-19 21:19:04",
                "cid": "1262742931719213056"
            },
            {
                "video_duration": 749000,
                "thumbnail": "https://mcn.newscdn.cn/cover/content/20200501/987e11523fc394f3673cf3e9b299fb15.jpg",
                "like_count": 235487,
                "media": {
                    "name": "李子柒",
                    "mid": "502334",
                    "avatar": "https://mcn.newscdn.cn/cover/media/20200413/0ce66ef329963adc9d3b76ff837a0f82.jpg",
                    "is_verified": 1
                },
                "play_count": 2463608,
                "title": "【豌豆的一生】豌豆大丰收!得闲把豌豆吃食都做个遍",
                "platform": "bilibili",
                "url": "https://www.mcndata.cn/link/24bcZU7qf0H4",
                "update_time": "2020-06-18 00:13:18",
                "publish": "2020-04-30 20:00:17",
                "cid": "1255948266579841024"
            },
            {
                "video_duration": 747000,
                "thumbnail": "https://mcn.newscdn.cn/cover/content/20200414/333174aaeb821861f91f090ebf49078a.jpg",
                "like_count": 260786,
                "media": {
                    "name": "李子柒",
                    "mid": "502334",
                    "avatar": "https://mcn.newscdn.cn/cover/media/20200413/0ce66ef329963adc9d3b76ff837a0f82.jpg",
                    "is_verified": 1
                },
                "play_count": 2964076,
                "title": "【大蒜】一棵蒜苗的一生,最难割舍的家常滋味——大蒜",
                "platform": "bilibili",
                "url": "https://www.mcndata.cn/link/241U4urickCW",
                "update_time": "2020-06-18 00:13:18",
                "publish": "2020-04-13 20:50:12",
                "cid": "1249886475684810752"
            },
            {
                "video_duration": 605000,
                "thumbnail": "https://mcn.newscdn.cn/cover/content/20200413/a45f953c1da8497c39775fe20d4b4604.jpg",
                "like_count": 273680,
                "media": {
                    "name": "李子柒",
                    "mid": "502334",
                    "avatar": "https://mcn.newscdn.cn/cover/media/20200413/0ce66ef329963adc9d3b76ff837a0f82.jpg",
                    "is_verified": 1
                },
                "play_count": 2747281,
                "title": "【桃花节】骑马踏青,取花为食,才不辜负春日好时节——上巳节",
                "platform": "bilibili",
                "url": "https://www.mcndata.cn/link/2408CJSnc0X4",
                "update_time": "2020-06-18 00:13:18",
                "publish": "2020-04-02 18:00:31",
                "cid": "1249657273899433984"
            },
            {
                "video_duration": 982000,
                "thumbnail": "https://mcn.newscdn.cn/cover/content/20200413/5a4a3021198b79b2933f43b7a046bee1.jpg",
                "like_count": 372792,
                "media": {
                    "name": "李子柒",
                    "mid": "502334",
                    "avatar": "https://mcn.newscdn.cn/cover/media/20200413/0ce66ef329963adc9d3b76ff837a0f82.jpg",
                    "is_verified": 1
                },
                "play_count": 2290359,
                "title": "【蓝染】印染在花布上的靛蓝,铭刻在骨子里的传承——蓝印花布",
                "platform": "bilibili",
                "url": "https://www.mcndata.cn/link/24086dcGbpHs",
                "update_time": "2020-06-18 00:13:18",
                "publish": "2020-03-22 18:00:46",
                "cid": "1249657008580329472"
            },
            {
                "video_duration": 681000,
                "thumbnail": "https://mcn.newscdn.cn/cover/content/20200413/453a59eb5cc217c3d50b987cbce55d67.jpg",
                "like_count": 0,
                "media": {
                    "name": "李子柒",
                    "mid": "502334",
                    "avatar": "https://mcn.newscdn.cn/cover/media/20200413/0ce66ef329963adc9d3b76ff837a0f82.jpg",
                    "is_verified": 1
                },
                "play_count": 3166016,
                "title": "【棉花】寒夜里最柔软的守护,暖暖的,很贴心——棉被",
                "platform": "bilibili",
                "url": "https://www.mcndata.cn/link/24085JBAecU8",
                "update_time": "2020-04-30 10:36:55",
                "publish": "2020-01-20 18:40:41",
                "cid": "1249656947079262208"
            },
            {
                "video_duration": 664000,
                "thumbnail": "https://mcn.newscdn.cn/cover/content/20200413/ba6c5ed1b72e2892e089bcffd7e017dc.jpg",
                "like_count": 0,
                "media": {
                    "name": "李子柒",
                    "mid": "502334",
                    "avatar": "https://mcn.newscdn.cn/cover/media/20200413/0ce66ef329963adc9d3b76ff837a0f82.jpg",
                    "is_verified": 1
                },
                "play_count": 2816954,
                "title": "【腊肠煲仔饭】当腊味煲仔饭遇上胡椒猪肚鸡,你又以为有故事?还是没有!",
                "platform": "bilibili",
                "url": "https://www.mcndata.cn/link/2408C9FTjcNS",
                "update_time": "2020-04-30 10:36:55",
                "publish": "2020-01-08 18:47:31",
                "cid": "1249657265951223808"
            },
            {
                "video_duration": 671000,
                "thumbnail": "https://mcn.newscdn.cn/cover/content/20200413/e0de8445e61ebab72a97f0bf7e835436.jpg",
                "like_count": 0,
                "media": {
                    "name": "李子柒",
                    "mid": "502334",
                    "avatar": "https://mcn.newscdn.cn/cover/media/20200413/0ce66ef329963adc9d3b76ff837a0f82.jpg",
                    "is_verified": 1
                },
                "play_count": 2608051,
                "title": "【烙锅和缙云烧饼】当烙锅遇上缙云烧饼,你以为有故事?并没有!",
                "platform": "bilibili",
                "url": "https://www.mcndata.cn/link/24085DYvGkcs",
                "update_time": "2020-04-30 10:36:55",
                "publish": "2020-01-01 05:32:00",
                "cid": "1249656942721380352"
            }
        ],
        "total_count": 9,
        "has_more": 0
    }
}
复制