Home
avatar

如果不存在过

百度电影热搜榜

百度电影热搜榜

接口信息

项目内容
接口地址https://api.code410.com/api/hot/baidu_movie
返回格式application/json
请求方式HTTP GET POST/JSON
更新日期2023-09-03
调用权限免费开放
每日限制无限制
请求频率限制1秒5次

请求示例

https://api.code410.com/api/hot/baidu_movie

请求 HEADER

名称
Content-Typeapplication/x-www-form-urlencoded;charset;

返回参数说明

名称类型说明
codeint状态码
msgstring状态信息
datastring请求结果数据集
data.contentstring电影热搜榜数据集
data.content.wordstring电影名字
data.content.descstring电影简介描述
data.content.hotChangestring热度变化
data.content.hotScorestring热度值
data.content.imgstring电影封面图片
data.content.indexstring指数排名 (数值越小,排名越前)
data.content.indexUrlstring百度指数
data.content.querystring电影搜索关键词
data.content.urlstring电影搜索链接
data.content.showstring电影信息
debugstring/array调试数据
exec_timefloat执行耗时
user_ipstring客户端IP

错误码参照

错误码类型说明
403int没有权限
400int参数传递不正确
500int服务器内部错误

在线调试 / 完整文档

本接口为 信息查找 分类下的开放接口。完整文档、在线调试与示例代码请前往 https://api.code410.com/doc/202

返回示例

{
  "code": 200,
  "msg": "请求成功",
  "data": {
    "content": [
      {
        "word": "寒战1994",
        "desc": "1994年,香港回归前夕,政治部即将解散。一宗富商绑架案,让热血正义的李文彬(刘俊谦 饰)与冷血野心家蔡元祺(吴彦祖 饰),在警界掀起一场暗潮涌动的权力较量。",
        "hotChange": "",
        "hotScore": "96438",
        "img": "https://b.bdstatic.com/searchbox/file/cmsuploader/20260428/1777366956288962.png",
        "index": 0,
        "indexUrl": "",
        "query": "寒战1994 电影",
        "url": "https://www.baidu.com/s?wd=%E5%AF%92%E6%88%981994+%E7%94%B5%E5%BD%B1&sa=fyb_movie_all_all&rsv_dl=fyb_movie_all_all",
        "show": [
          "类型:剧情、动作",
          "演员:吴彦祖、刘俊谦、吴慷仁"
        ]
      },
      {
        "word": "10间敢死队",
        "desc": "当一个一心求死的人,遇上一群拼命想活的人,他在这份滚烫的生命力里豁然醒悟—勇敢活!放肆笑!",
        "hotChange": "",
        "hotScore": "89672",
        "img": "https://b.bdstatic.com/searchbox/file/cmsuploader/20260428/1777366956338950.png",
        "index": 1,
        "indexUrl": "",
        "query": "10间敢死队 电影",
        "url": "https://www.baidu.com/s?wd=10%E9%97%B4%E6%95%A2%E6%AD%BB%E9%98%9F+%E7%94%B5%E5%BD%B1&sa=fyb_movie_all_all&rsv_dl=fyb_movie_all_all",
        "show": [
          "类型:喜剧、剧情",
          "演员:蒋龙、齐溪、杨超越、王子川、张弛"
        ]
      },
      {
        "word": "消失的人",
        "desc": "同一个小区里,儿童失踪、深夜入侵、尸体藏匿,三起看似无关的谜案,竟指向一个真相!。",
        "hotChange": "",
        "hotScore": "86849",
        "img": "https://b.bdstatic.com/searchbox/file/cmsuploader/20260428/1777366956254880.png",
        "index": 2,
        "indexUrl": "",
        "query": "消失的人 电影",
        "url": "https://www.baidu.com/s?wd=%E6%B6%88%E5%A4%B1%E7%9A%84%E4%BA%BA+%E7%94%B5%E5%BD%B1&sa=fyb_movie_all_all&rsv_dl=fyb_movie_all_all",
        "show": [
          "类型:犯罪、悬疑",
          "演员:郑恺、刘浩存、邱泽、李晨"
        ]
      }
    ]
  },
  "exec_time": 0.127,
  "ip": "197.149.235.178"
}
// (content 共 10 项,此处仅展示前 3 项)

示例代码

// jQuery-Ajax
$.ajax({
	url: 'https://api.code410.com/api/hot/baidu_movie',
	data: {
		// 该接口无需参数
	},
	type: 'GET',
	dataType: 'json',
	success: function (data) {
		console.log(data); // 请求成功,输出结果
	},
	error: function () {
		console.log('请求失败');
	}
});
import requests

url = "https://api.code410.com/api/hot/baidu_movie"
params = {
    # 该接口无需参数
}
res = requests.get(url, params=params)
print(res.json())
const https = require('https');
const url = 'https://api.code410.com/api/hot/baidu_movie';

https.get(url, res => {
  let data = '';
  res.on('data', chunk => data += chunk);
  res.on('end', () => console.log(JSON.parse(data)));
}).on('error', err => console.error(err));
package main

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

func main() {
	resp, err := http.Get("https://api.code410.com/api/hot/baidu_movie")
	if err != nil {
		fmt.Println("http get error", err)
		return
	}
	defer resp.Body.Close()

	result, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(string(result))
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class Test {
    public static void main(String[] args) {
        try {
            URL url = new URL("https://api.code410.com/api/hot/baidu_movie");
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("GET");
            conn.connect();

            BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
            String line;
            StringBuilder sb = new StringBuilder();
            while ((line = reader.readLine()) != null) sb.append(line);
            reader.close();
            System.out.println(sb.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program {
    static async Task Main() {
        HttpClient client = new HttpClient();
        string url = "https://api.code410.com/api/hot/baidu_movie";
        HttpResponseMessage response = await client.GetAsync(url);
        string body = await response.Content.ReadAsStringAsync();
        Console.WriteLine(body);
    }
}
<?php
$url = "https://api.code410.com/api/hot/baidu_movie";
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
curl "https://api.code410.com/api/hot/baidu_movie"

在线调试

该接口无需参数,直接点击下方按钮发起请求。

填写参数后点击「发起请求」查看实时返回结果。

免费