Skip to main content

接口列表概览

覆盖抖音短视频与直播电商生态的常用接口。调用成功每次扣除 0.10 Credits。

获取单个作品数据/Get single video data

0.10 Credits / 次 /api/v1/douyin/web/fetch_one_video

[中文]

用途:

  • 获取单个作品数据 V1,若此接口失效,请使用 /fetch_one_video_v2 接口,或使用APP接口。

参数:

  • aweme_id: 作品id
  • need_anchor_info: 是否需要锚点信息,默认为False,开启后会看到一些有关视频的锚点信息,如地理位置,商户信息,商品橱窗等,可能会增加接口响应时间。
  • 如果不需要锚点信息,建议保持默认值False,如果接口报错,可以尝试关闭此参数。

返回:

  • 作品数据

[English]

Purpose:

  • Get single video data V1, if this interface fails, please use the /fetch_one_video_v2 interface, or use the APP interface.

Parameters:

  • aweme_id: Video id
  • need_anchor_info: Whether anchor information is needed, default is False, enabling it will show some anchor information about the video, such as location, merchant information, product showcase, etc., which may increase the interface response time.
  • If anchor information is not needed, it is recommended to keep the default value False, if the interface reports an error, you can try to turn off this parameter.

Return:

  • Video data

[示例/Example]

aweme_id = “7372484719365098803” need_anchor_info = False

输入参数 (input 对象)

cURL
Python

获取单个作品数据 V2/Get single video data V2

0.10 Credits / 次 /api/v1/douyin/web/fetch_one_video_v2

[中文]

用途:

  • 获取单个作品数据 V2,若此接口失效,请使用 /fetch_one_video 接口,或使用APP接口。

参数:

  • aweme_id: 作品id

返回:

  • 作品数据

[English]

Purpose:

  • Get single video data V2, if this interface fails, please use the /fetch_one_video interface, or use the APP interface.

Parameters:

  • aweme_id: Video id

Return:

  • Video data

[示例/Example]

aweme_id = “7372484719365098803”

输入参数 (input 对象)

cURL
Python

0.10 Credits / 次 /api/v1/douyin/web/fetch_one_video_by_share_url

[中文]

用途:

  • 根据分享链接获取单个作品数据 (本质上基于 /fetch_one_video 接口实现,建议有能力自行获取视频ID以提升接口响应速度)
  • 返回的视频画质比APP接口高一些,但是响应字段没有APP接口多。

参数:

  • share_url: 分享链接

返回:

  • 作品数据

[English]

Purpose:

  • Get single video data by sharing link (Essentially implemented based on the /fetch_one_video interface, it is recommended to obtain the video ID by yourself to improve the interface response speed)
  • The returned video quality is higher than the APP interface, but the response fields are not as many as the APP interface.

Parameters:

  • share_url: Share link

Return:

  • Video data

[示例/Example]

share_url = “https://v.douyin.com/e3x2fjE/

输入参数 (input 对象)

cURL
Python

获取视频的最高画质播放链接/Get the highest quality play URL of the video

0.10 Credits / 次 /api/v1/douyin/web/fetch_video_high_quality_play_url

[中文]

用途:

  • 价格:0.005$ 一次。
  • 获取视频的最高画质(原始上传画质)播放链接
  • 该接口会返回最高画质的播放链接,原始上传画质是指用户上传视频时的画质,通常最高画质视频无压缩码率并且文件头包含元数据。
  • 最高画质的视频链接无法从抖音APP或网页版直接获取,需要通过此接口获取。
  • 此接口非常适合用于获取高清无水印视频链接,适用于需要高质量视频的场景,如视频编辑、存档、训练模型等。
  • 一般情况都可以在线播放,如果不行,可以尝试使用IDM或浏览器下载后播放。

参数:

  • aweme_id: 作品id,优先使用aweme_id,如果没有则使用share_url。
  • share_url: 可选,分享链接,如果提供了作品id,则此参数可以不传。
  • region: 可选,请求出口地区(ISO 国家代码,如 “CN” / “US” / “HK”)。
    • 抖音服务器会根据请求 IP 返回对应区域的 CDN 域名, 因此当用户位于中国大陆时建议传 region="CN" 以拿到国内 CDN 链接, 下载速度会显著比海外 CDN 更快。
    • 不传则使用本服务出口 IP(通常是海外节点,返回海外 CDN)。

返回:

  • video_id: 作品id
  • original_video_url: 最高画质(原始上传画质)播放链接
  • video_data: 视频数据,包含视频的元数据,如时长、大小等。

[English]

Purpose:

  • Price: 0.005$ each time.
  • Get the highest quality (original upload quality) play URL of the video
  • This interface will return the highest quality play URL, the original upload quality refers to the quality of the video when the user uploads it, usually the highest quality video has an uncompressed bitrate and the file header contains metadata.
  • The highest quality video link cannot be obtained directly from the Douyin APP or web version, and must be obtained through this interface.
  • This interface is very suitable for obtaining high-definition, watermark-free video links, suitable for scenarios that require high-quality videos, such as video editing, archiving, training models, etc.
  • Generally, it can be played online, if not, you can try to download it using IDM or a browser and then play it.

Parameters:

  • aweme_id: Video id, prefer to use aweme_id, if not available, use share_url.
  • share_url: Optional, share link, if the video id is provided, this parameter can be omitted.
  • region: Optional, ISO country code (e.g. “CN” / “US” / “HK”) used as the request exit region.
    • Douyin returns CDN URLs based on the request IP. Pass region="CN" for users located in mainland China to get China-region CDN URLs, which are significantly faster than overseas CDNs.
    • If omitted, the request uses the service’s own exit IP (typically overseas).

Return:

  • video_id: Video id
  • original_video_url: Highest quality (original upload quality) play URL
  • video_data: Video data, including metadata such as duration, size, etc.

[示例/Example]

aweme_id = “7512756548356492544” share_url = “https://www.douyin.com/video/7512756548356492544” region = “CN”

输入参数 (input 对象)

cURL
Python

批量获取视频的最高画质播放链接/Batch get the highest quality play URL of videos

0.10 Credits / 次 /api/v1/douyin/web/fetch_multi_video_high_quality_play_url

[中文]

用途:

  • 此接口目前优惠活动价为0.25,活动结束后恢复原价0.25,活动结束后恢复原价0.5。不足50个视频按50个视频收费。
  • 批量获取视频的最高画质(原始上传画质)播放链接
  • 该接口会返回最高画质的播放链接,原始上传画质是指用户上传视频时的画质,通常最高画质视频无压缩码率并且文件头包含元数据。
  • 最高画质的视频链接无法从抖音APP或网页版直接获取,需要通过此接口获取。
  • 此接口非常适合用于批量获取高清无水印视频链接,适用于需要高质量视频的场景,如视频编辑、存档、训练模型等。
  • 使用并发请求,提高批量获取效率。
  • 最多支持50个视频ID。

参数:

  • aweme_ids: 作品id列表,用逗号分隔,例如: “123,456,789”,最多50个。

返回:

  • total: 总数
  • success_count: 成功数量
  • failed_count: 失败数量
  • videos: 视频列表,每个视频包含以下字段:
    • video_id: 作品id
    • original_video_url: 最高画质(原始上传画质)播放链接
    • file_size: 文件大小(字节)
    • file_size_in_mb: 文件大小(MB)
    • content_type: 内容类型
    • success: 是否成功
    • error: 错误信息(如果失败)

备注:

  • 由于数量较多,处理时间可能会稍长,请增加等待时间。

[English]

Purpose:

  • This interface is currently on sale for 0.25,andwillreturntotheoriginalpriceof0.25, and will return to the original price of 0.5 after the event ends. If there are less than 50 videos, they will be charged as 50 videos.
  • Batch get the highest quality (original upload quality) play URL of videos
  • This interface will return the highest quality play URL, the original upload quality refers to the quality of the video when the user uploads it, usually the highest quality video has an uncompressed bitrate and the file header contains metadata.
  • The highest quality video link cannot be obtained directly from the Douyin APP or web version, and must be obtained through this interface.
  • This interface is very suitable for batch obtaining high-definition, watermark-free video links, suitable for scenarios that require high-quality videos, such as video editing, archiving, training models, etc.
  • Use concurrent requests to improve batch acquisition efficiency.
  • Support up to 50 video IDs.

Parameters:

  • aweme_ids: Video id list, separated by commas, for example: “123,456,789”, up to 50.

Return:

  • total: Total count
  • success_count: Success count
  • failed_count: Failed count
  • videos: Video list, each video contains the following fields:
    • video_id: Video id
    • original_video_url: Highest quality (original upload quality) play URL
    • file_size: File size (bytes)
    • file_size_in_mb: File size (MB)
    • content_type: Content type
    • success: Whether successful
    • error: Error message (if failed)

Note:

  • Due to the large number, the processing time may be slightly longer, please increase the waiting time.

[示例/Example]

aweme_ids = “7512756548356492544,7448118827402972455,7126745726494821640”

输入参数 (input 对象)

无需任何特殊参数(传空对象 {} 即可)
cURL
Python

批量获取视频信息/Batch Get Video Information

0.10 Credits / 次 /api/v1/douyin/web/fetch_multi_video

[中文]

用途:

  • 批量获取视频信息,支持图文、视频等,一次性最多支持50个视频,此接口收费固定价格为0.00150=0.05 * 50 = 0.05一次。
  • 若此接口失效,请使用APP接口替代。

参数:

  • aweme_ids: 作品id列表,最多支持50个作品id。

返回:

  • 作品数据

[English]

Purpose:

  • Batch Get Video Information, support photo, video, etc., up to 50 videos at a time, this interface charges a fixed price of 0.00150=0.05 * 50 = 0.05 each time.
  • If this interface fails, please use the APP interface instead.

Parameters:

  • aweme_ids: List of video ids, up to 50 video ids are supported.

Return:

  • Video data

[示例/Example]

aweme_ids = [“7372484719365098803”, “7126745726494821640”, “7372484719365098803”, “7126745726494821640”, “7372484719365098803”, “7126745726494821640”, “7372484719365098803”, “7126745726494821640”, “7372484719365098803”, “7126745726494821640”]

输入参数 (input 对象)

无需任何特殊参数(传空对象 {} 即可)
cURL
Python

获取单个作品视频弹幕数据/Get single video danmaku data

0.10 Credits / 次 /api/v1/douyin/web/fetch_one_video_danmaku

[中文]

用途:

  • 获取单个作品视频弹幕数据

参数:

  • item_id: 作品id
  • duration: 视频总时长
  • end_time: 结束时间
  • start_time: 开始时间

返回:

  • 视频弹幕数据

[English]

Purpose:

  • Get single video danmaku data

Parameters:

  • item_id: Video id
  • duration: Video total duration
  • end_time: End time
  • start_time: Start time

Return:

  • Video danmaku data

[示例/Example]

item_id = “7355433624046472498” duration = 15134 end_time = 15133 start_time = 0

输入参数 (input 对象)

cURL
Python

获取首页推荐数据/Get home feed data

0.10 Credits / 次 /api/v1/douyin/web/fetch_home_feed

[中文]

用途:

  • 获取首页推荐数据

参数:

  • count: 数量,默认为10,建议保持不变。
  • refresh_index: 刷新/翻页索引,从 0 开始,每翻一页 +1。
    • refresh_index=0:刷新(首次进入/下拉刷新)
    • refresh_index>0:翻页(下滑加载更多)
  • cookie: 可选,用户网页版抖音登录Cookie。传入后返回该账号的个性化推荐;不传则使用默认Cookie返回通用推荐。

返回:

  • Feed数据

[English]

Purpose:

  • Get home feed data

Parameters:

  • count: Number, default is 10, it is recommended to keep it unchanged.
  • refresh_index: Refresh/paging index, start at 0 and +1 per page.
    • refresh_index=0: refresh (first entry / pull-to-refresh)
    • refresh_index>0: load-more (scroll down)
  • cookie: Optional, your web version of Douyin login Cookie. Returns a personalized feed for that account; uses the default Cookie if omitted.

Return:

  • Feed data

[示例/Example]

count = 10 refresh_index = 0 cookie = ""

输入参数 (input 对象)

无需任何特殊参数(传空对象 {} 即可)
cURL
Python

0.10 Credits / 次 /api/v1/douyin/web/fetch_related_posts

[中文]

用途:

  • 获取相关作品推荐数据

参数:

  • aweme_id: 作品id
  • refresh_index: 翻页索引,默认为1,然后每次增加1用于翻页。
  • count: 数量,默认为20,建议保持不变。

返回:

  • 作品数据

[English]

Purpose:

  • Get related posts recommendation data

Parameters:

  • aweme_id: Video id
  • refresh_index: Paging index, default is 1, then increase by 1 each time for paging.
  • count: Number, default is 20, it is recommended to keep it unchanged.

Return:

  • Video data

[示例/Example]

aweme_id = “7393365489105358132” refresh_index = 1 count = 20

输入参数 (input 对象)

cURL
Python

获取用户主页作品数据/Get user homepage video data

0.10 Credits / 次 /api/v1/douyin/web/fetch_user_post_videos

[中文]

用途:

  • 获取用户主页作品数据
  • 注意:请尽量使用APP的接口而不是WEB的接口,因为WEB的接口可能会被不稳定。

参数:

  • sec_user_id: 用户sec_user_id
  • max_cursor: 翻页游标,第一次请求传0,然后每次请求传上一次请求返回的max_cursor进行翻页。
  • count: 最大数量,建议不要超过20
  • filter_type: 过滤类型,可选参数如下:
    • 0: 默认排序
    • 3: 热度排序
  • cookie: 用户网页版抖音Cookie(此接口可以接受用户提供自己的Cookie)

返回:

  • 用户作品数据

[English]

Purpose:

  • Get user homepage video data
  • Note: Please try to use the APP interface instead of the WEB API, because the WEB API may be unstable.

Parameters:

  • sec_user_id: User sec_user_id
  • max_cursor: Paging cursor, pass 0 for the first request, and then pass the max_cursor returned by the previous request for paging each time.
  • count: Maximum count number, it is recommended not to exceed 20
  • filter_type: Filter type, optional parameters are as follows:
    • 0: Default sorting
    • 3: Sort by popularity
  • cookie: User’s web version of Douyin Cookie (This interface can accept users to provide their own Cookie)

Return:

  • User video data

[示例/Example]

sec_user_id = “MS4wLjABAAAANXSltcLCzDGmdNFI2Q_QixVTr67NiYzjKOIP5s03CAE” max_cursor = “0” counts = 20 filter_type = “0”

输入参数 (input 对象)

cURL
Python

获取用户喜欢作品数据/Get user like video data

0.10 Credits / 次 /api/v1/douyin/web/fetch_user_like_videos

[中文]

用途:

  • 获取用户喜欢作品数据

参数:

  • sec_user_id: 用户sec_user_id
  • max_cursor: 最大游标
  • count: 最大数量
  • cookie: 用户网页版抖音Cookie(此接口需要用户提供自己的Cookie)

返回:

  • 用户作品数据

[English]

Purpose:

  • Get user like video data

Parameters:

  • sec_user_id: User sec_user_id
  • max_cursor: Maximum cursor
  • count: Maximum count number
  • cookie: User’s web version of Douyin Cookie (This interface requires users to provide their own Cookie)

Return:

  • User video data

[示例/Example]

sec_user_id = “MS4wLjABAAAAW9FWcqS7RdQAWPd2AA5fL_ilmqsIFUCQ_Iym6Yh9_cUa6ZRqVLjVQSUjlHrfXY1Y” max_cursor = 0 counts = 20

输入参数 (input 对象)

无需任何特殊参数(传空对象 {} 即可)
cURL
Python

获取用户收藏作品数据/Get user collection video data

0.10 Credits / 次 /api/v1/douyin/web/fetch_user_collection_videos

[中文]

用途:

  • 获取用户收藏作品数据

参数:

  • cookie: 用户网页版抖音Cookie(此接口需要用户提供自己的Cookie)
  • max_cursor: 最大游标
  • count: 最大数量

返回:

  • 用户作品数据

[English]

Purpose:

  • Get user collection video data

Parameters:

  • cookie: User’s web version of Douyin Cookie (This interface requires users to provide their own Cookie)
  • max_cursor: Maximum cursor
  • count: Maximum number

Return:

  • User video data

[示例/Example]

cookie = “YOUR_COOKIE” max_cursor = 0 counts = 20

输入参数 (input 对象)

无需任何特殊参数(传空对象 {} 即可)
cURL
Python

获取用户收藏夹/Get user collection

0.10 Credits / 次 /api/v1/douyin/web/fetch_user_collects

[中文]

用途:

  • 获取用户收藏夹

参数:

  • max_cursor: 最大游标
  • count: 最大数量
  • cookie: 用户网页版抖音Cookie(此接口需要用户提供自己的Cookie)

返回:

  • 用户收藏夹数据

[English]

Purpose:

  • Get user collection

Parameters:

  • max_cursor: Maximum cursor
  • count: Maximum number
  • cookie: User’s web version of Douyin Cookie (This interface requires users to provide their own Cookie)

Return:

  • User collection data

[示例/Example]

cookie = “YOUR_COOKIE” max_cursor = 0 counts = 20

输入参数 (input 对象)

无需任何特殊参数(传空对象 {} 即可)
cURL
Python

获取用户收藏夹数据/Get user collection data

0.10 Credits / 次 /api/v1/douyin/web/fetch_user_collects_videos

[中文]

用途:

  • 获取用户收藏夹数据

参数:

  • collects_id: 收藏夹id
  • max_cursor: 最大游标
  • count: 最大数量

返回:

  • 用户作品数据

[English]

Purpose:

  • Get user collection data

Parameters:

  • collects_id: Collection id
  • max_cursor: Maximum cursor
  • count: Maximum number

Return:

  • User video data

[示例/Example]

collects_id = "" max_cursor = 0 counts = 20

输入参数 (input 对象)

cURL
Python

获取用户合辑作品数据/Get user mix video data

0.10 Credits / 次 /api/v1/douyin/web/fetch_user_mix_videos

[中文]

用途:

  • 获取用户合辑作品数据

参数:

  • mix_id: 合辑id
  • max_cursor: 最大游标
  • count: 最大数量

返回:

  • 用户作品数据

[English]

Purpose:

  • Get user mix video data

Parameters:

  • mix_id: Mix id
  • max_cursor: Maximum cursor
  • count: Maximum number

Return:

  • User video data

[示例/Example]

url = https://www.douyin.com/collection/7348687990509553679 mix_id = “7348687990509553679” max_cursor = 0 counts = 20

输入参数 (input 对象)

cURL
Python