接口地址:http://apis.juhe.cn/fapig/douyin/billboard |
---|
返回格式:json |
请求方式:get/post |
请求示例:http://apis.juhe.cn/fapig/douyin/billboard?key=&type=hot_video |
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
key | string | 必填 | 聚合key 扫码关注公众号 |
type | string | 必填 | 固定值(hot_video:热门视频,amusement_overall:搞笑,game_console:游戏,food_overall:美食,car_overall:汽车,travel_overall:旅游,sport_overall:体育,cospa_overall:二次元) |
size | int | 选填 | 返回条数,默认10,最大50 |
名称 | 类型 | 说明 |
---|---|---|
error_code | int | 返回码 |
reason | string | 返回说明 |
result | string | 返回结果集 |
title | string | 视频标题 |
share_url | string | 视频播放页面URL |
author | string | 视频发布者昵称 |
item_cover | string | 视频封面图 |
hot_value | int | 热度指数 |
hot_words | string | 视频热词 |
play_count | int | 播放数 |
digg_count | int | 点赞数 |
comment_count | int | 评论数 |
{
"reason": "查询成功!",
"result": [{
"title": "宁波黑坑水库盘老板,看看最后的渔获在你们那里能值多少钱。 #钓鱼 #dou来钓鱼516",
"share_url": "https://www.iesdouyin.com/share/video/6960674964378897677/?region=CN&mid=6960676544603851533&u_code=0&titleType=title&did=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1",
"author": "天元邓刚",
"item_cover": "https://p6.douyinpic.com/img/tos-cn-p-0015/cd3cd955c1ec40d8a346c7fc652db36f~c5_300x400.jpeg?from=2563711402_large",
"hot_value": 188721410,
"hot_words": "老板,最后的,钓鱼,宁波,黑坑,水库,看看,渔获,你们,那里,能值,多少,dou,516",
"play_count": 303819638,
"digg_count": 2209478,
"comment_count": 97122
}],
"error_code": 0
}
错误码 | 说明 |
---|---|
10001 | 错误的请求KEY |
10002 | 该KEY无请求权限 |
10003 | KEY过期 |
10004 | 错误的OPENID |
10005 | 应用未审核超时,请提交认证 |
10007 | 未知的请求源 |
10008 | 被禁止的IP |
10009 | 被禁止的KEY |
10011 | 当前IP请求超过限制 |
10012 | 请求超过次数限制 |
10013 | 测试KEY超过请求限制 |
10014 | 系统内部异常 |
10020 | 接口维护 |
10021 | 接口停用 |
<?php
/**
* Created by PhpStorm.
* User: FZS
* Time: 2022/03/11 12:38
*/
class freeApi
{
private $apiUrl;
public function __construct()
{
$this->apiUrl = 'http://apis.juhe.cn/fapig/douyin/billboard?key=&type=hot_video';
}
/**
* 获取结果
* @return array
*/
public function getResult()
{
return file_get_contents($this->apiUrl);
}
}
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
const (
APIURL = "http://apis.juhe.cn/fapig/douyin/billboard?key=&type=hot_video"
)
func main() {
queryUrl := fmt.Sprintf("%s",APIURL)
resp, err := http.Get(queryUrl)
if err != nil {
log.Println(err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}