豆瓣电影电视剧
其他 官方文档
根据豆瓣的id查出相关电影/剧集的视频信息
基本说明:
接口地址:https://movie.querydata.org/api
返回格式:json
请求方式:get
请求示例:https://movie.querydata.org/api?id=33410979
请求参数说明:
名称 类型 必填 说明
id int 必填 豆瓣id
返回参数说明:
名称 类型 说明
- - 见json
JSON返回示例:
{
	"id": "611f2aa2fda7bd337df36d9a",
	"originalName": "龙虎武师",
	"imdbVotes": null,
	"imdbRating": null,
	"rottenVotes": null,
	"rottenRating": null,
	"doubanId": "33410979",
	"imdbId": null,
	"alias": "KungFu Stuntmen",
	"doubanVotes": 0,
	"doubanRating": "",
	"year": null,
	"type": "Movie",
	"duration": 5520,
	"dateReleased": "2020-10-12T08:00:00.000+08:00",
	"totalSeasons": null,
	"episodes": null,
	"data": [{
		"genre": "纪录片",
		"name": "龙虎武师",
		"lang": "Cn",
		"language": "汉语普通话,粤语",
		"poster": "https://image.querydata.org/movie/poster/1629432485284-caaf1c.jpg",
		"description": "影片集结洪金宝、袁和平、程小东、元华、甄子丹、钱嘉乐等华语电影最强“武师阵容”,首次全方位揭秘香港龙虎武师长达六十余年风云变幻,展现中国功夫影人搏命人生路。",
		"country": "中国大陆"
	}],
	"director": [{
		"data": [{
			"name": "魏君子",
			"lang": "Cn"
		}, {
			"name": "Junzi Wei",
			"lang": "En"
		}]
	}],
	"actor": [{
		"data": [{
			"name": "成龙",
			"lang": "Cn"
		}, {
			"name": "Jackie Chan",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "袁和平",
			"lang": "Cn"
		}, {
			"name": "Woo-ping Yuen",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "徐克",
			"lang": "Cn"
		}, {
			"name": "Hark Tsui",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "曾志伟",
			"lang": "Cn"
		}, {
			"name": "Eric Tsang",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "熊欣欣",
			"lang": "Cn"
		}, {
			"name": "Xinxin Xiong",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "梁小龙",
			"lang": "Cn"
		}, {
			"name": "Siu-Lung Leung",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "刘伟强",
			"lang": "Cn"
		}, {
			"name": "Andrew Lau",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "甄子丹",
			"lang": "Cn"
		}, {
			"name": "Donnie Yen",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "杨盼盼",
			"lang": "Cn"
		}, {
			"name": "Pan Pan Yeung",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "元华",
			"lang": "Cn"
		}, {
			"name": "Wah Yuen",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "程小东",
			"lang": "Cn"
		}, {
			"name": "Siu-Tung Ching",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "元秋",
			"lang": "Cn"
		}, {
			"name": "Qiu Yuen",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "钱嘉乐",
			"lang": "Cn"
		}, {
			"name": "Kar Lok Chin",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "陈会毅",
			"lang": "Cn"
		}, {
			"name": "Billy Chan",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "洪金宝",
			"lang": "Cn"
		}, {
			"name": "Sammo Hung Kam-Bo",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "钱小豪",
			"lang": "Cn"
		}, {
			"name": "Siu-hou Chin",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "元武",
			"lang": "Cn"
		}, {
			"name": "Wu Yuan",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "徐忠信",
			"lang": "Cn"
		}, {
			"name": "Alan Chui Chung San",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "林迪安",
			"lang": "Cn"
		}, {
			"name": "Dion Lam",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "李海生",
			"lang": "Cn"
		}, {
			"name": "Hoi Sang Lee",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "火星",
			"lang": "Cn"
		}, {
			"name": "Mars",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "余袁稳",
			"lang": "Cn"
		}, {
			"name": "Yu Yuen Yin",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "吴育枢",
			"lang": "Cn"
		}, {
			"name": "Jackson Ng Yuk-Sue",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "小侯",
			"lang": "Cn"
		}, {
			"name": "Hou Hsia",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "钟发",
			"lang": "Cn"
		}, {
			"name": "Fat Chung",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "刘家荣",
			"lang": "Cn"
		}, {
			"name": "Chia Yung Liu",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "刘允",
			"lang": "Cn"
		}, {
			"name": "Yue Tau Wan",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "吴思远",
			"lang": "Cn"
		}, {
			"name": "See-Yuen Ng",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "董玮",
			"lang": "Cn"
		}, {
			"name": "Wai Tung",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "徐小明",
			"lang": "Cn"
		}, {
			"name": "Siu Ming Tsui",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "谷轩昭",
			"lang": "Cn"
		}, {
			"name": "Huan-Chiu Ku",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "唐季礼",
			"lang": "Cn"
		}, {
			"name": "Stanley Tong",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "元德",
			"lang": "Cn"
		}, {
			"name": "Tak Yuen",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "黎强权",
			"lang": "Cn"
		}, {
			"name": "Benny Lai Keung-Kuen",
			"lang": "En"
		}]
	}, {
		"data": [{
			"name": "徐二牛",
			"lang": "Cn"
		}, {
			"name": "Simon Chui Yee-Ang",
			"lang": "En"
		}]
	}],
	"writer": [{
		"data": [{
			"name": "魏君子",
			"lang": "Cn"
		}, {
			"name": "Junzi Wei",
			"lang": "En"
		}]
	}]
}
服务级错误码参照
错误码 说明
- -
完整教学代码示例
<?php
/**
 * Created by PhpStorm.
 * User: FZS
 * Time: 2021/09/01 00:38
 */
class freeApi
{
    private $apiUrl;

    public function __construct()
    {
        $this->apiUrl = 'https://movie.querydata.org/api?id=33410979';
    }

    /**
     * 获取结果
     * @return array
     */
    public function getResult()
    {
        return file_get_contents($this->apiUrl);
    }
}
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

const (
	APIURL   = "https://movie.querydata.org/api?id=33410979"
)

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))
}