Home
avatar

如果不存在过

百度小说热搜榜

百度小说热搜榜

接口信息

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

请求示例

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

请求 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/201

返回示例

{"code":200,"msg":"请求成功","data":{"content":[{"word":"儒道至圣","desc":"这是一个读书人掌握天地之力的世界。  才气在身,诗可杀敌,词能灭军,文章安天下。  秀才提笔,纸上谈兵;举人杀敌,出口成章;进士一怒,唇枪舌剑。  圣人驾临,口诛笔伐,可诛人,可判天子无道,以一敌国。  此时,圣院把持文位,国君掌官位,十国相争,蛮族虎视,群妖作乱。  此时,无唐诗大兴,无宋词鼎盛,无创新文章,百年无新圣。  一个默默无闻的寒门子弟,被人砸破头后,挟传世诗词,书惊圣文章,踏上至圣之路。  感谢阅文官方书评团提供书评支持!","hotChange":"down","hotScore":"102181","img":"https://fyb-2.cdn.bcebos.com/hotboard_image/66e2a155513639db66977d13ab6f8944","index":0,"indexUrl":"https://index.baidu.com/v2/main/index.html#/brand/100263305?words=儒道至圣","query":"儒道至圣 小说","url":"https://www.baidu.com/s?wd=%E5%84%92%E9%81%93%E8%87%B3%E5%9C%A3+%E5%B0%8F%E8%AF%B4&sa=fyb_novel_all&rsv_dl=fyb_novel_all","show":["作者:永恒之火","类型:玄幻"]},{"word":"诡秘之主","desc":"蒸汽与机械的浪潮中,谁能触及非凡?历史和黑暗的迷雾里,又是谁在耳语?我从诡秘中醒来,睁眼看见这个世界: 枪械,大炮,巨舰,飞空艇,差分机;魔药,占卜,诅咒,倒吊人,封印物……光明依旧照耀,神秘从未远离,这是一段“愚者”的传说。","hotChange":"down","hotScore":"99765","img":"https://fyb-2.cdn.bcebos.com/hotboard_image/6b1e8f4838a31a95ebdf3690e56a2fcb","index":1,"indexUrl":"https://index.baidu.com/v2/main/index.html#/brand/100307631?words=诡秘之主","query":"诡秘之主 小说","url":"https://www.baidu.com/s?wd=%E8%AF%A1%E7%A7%98%E4%B9%8B%E4%B8%BB+%E5%B0%8F%E8%AF%B4&sa=fyb_novel_all&rsv_dl=fyb_novel_all","show":["作者:爱潜水的

示例代码

// jQuery-Ajax
$.ajax({
	url: 'https://api.code410.com/api/hot/baidu_novel',
	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_novel"
params = {
    # 该接口无需参数
}
res = requests.get(url, params=params)
print(res.json())
const https = require('https');
const url = 'https://api.code410.com/api/hot/baidu_novel';

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_novel")
	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_novel");
            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_novel";
        HttpResponseMessage response = await client.GetAsync(url);
        string body = await response.Content.ReadAsStringAsync();
        Console.WriteLine(body);
    }
}
<?php
$url = "https://api.code410.com/api/hot/baidu_novel";
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
curl "https://api.code410.com/api/hot/baidu_novel"

在线调试

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

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

免费