获取抖音视频详情(API接口展示)

1,622 阅读1分钟

API名称

item_get_video - 获取抖音视频详情 1663407859446.jpg

注册申请试用

点击注册

请求参数:item_id=7092264344980868359

参数说明:item_id:视频id,\

响应参数

Version: Date:

名称类型必须示例值描述
itemitem[]0视频详情数据

请求示例

<?php

// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.onebound.cn/help/demo/sdk/demo-sign.php
$method = "GET";
$url = "https://api-gw.onebound.cn/douyin/item_get_video/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&item_id=7092264344980868359";
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
var_dump(curl_exec($curl));
?>

响应示例

{
	"item": {
		"num_iid": "7092264344980868359",
		"detail_url": "https://www.iesdouyin.com/share/video/7092264344980868359/?region=&mid=7090863251021515533&u_code=0&did=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title",
		"title": "修以美好,与君相遇#就算无人欣赏也要独自芬芳",
		"type": "video",
		"nick": "花草日记 🪴 麦麦",
		"signature": "🐌不谈悲喜、只闻花香\n\n🐌手机随拍、装点生活",
		"uid": "5698411035",
		"short_id": "969898359",
		"video": {
			"url": "https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0200fg10000c9mcherc77ufa73socn0&ratio=720p&line=0",
			"url_raw": "https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200fg10000c9mcherc77ufa73socn0&ratio=720p&line=0",
			"pic_url": "https://p6-sign.douyinpic.com/tos-cn-p-0015/871cb3034d9b4073bd2aa8960bff93fd~c5_300x400.jpeg?x-expires=1657267200&x-signature=B51pWtm1i1Mljef8gNaulIXDdgk%3D&from=4257465056_large&s=PackSourceEnum_DOUYIN_REFLOW&se=false&sc=cover&l=202206241654240102080650503702D0F0"
		},
		"music": {
			"title": "@若然若创作的原声一若然若",
			"nick": "若然若",
			"url": "https://sf6-cdn-tos.douyinstatic.com/obj/ies-music/7090863247943109407.mp3",
			"pic_url": "https://p3.douyinpic.com/aweme/1080x1080/aweme-avatar/tos-cn-avt-0015_1e7c8177679e3c9b4743da4968714762.jpeg?from=116350172"
		},
		"item_imgs": []
	},
	"error": "",
	"reason": "",
	"error_code": "0000",
	"cache": 0,
	"api_info": "today:60 max:10100 all[110=60+19+31];expires:2030-12-31",
	"execution_time": "0.237",
	"server_time": "Beijing/2022-06-24 16:54:24",
	"client_ip": "106.6.39.153",
	"call_args": [],
	"api_type": "douyin",
	"translate_language": "zh-CN",
	"translate_engine": "google_new",
	"server_memory": "3.04MB",
	"request_id": "1.62b57bc005cc9",
	"last_id": "1038207645"
}

异常示例

{
  "error": "item-not-found",
  "reason": "没找到",
  "error_code": "2000",
  "success": 0,
  "cache": 0,
  "api_info": "today:0 max:10000",
  "execution_time": 0.081,
  "server_time": "Beijing/2020-06-10 23:44:00",
  "call_args": [],
  "api_type": "douyin",
  "request_id": "1ee0ffc041242"}
```
```