百度汽车热搜榜
百度汽车热搜榜
接口信息
| 项目 | 内容 |
|---|---|
| 接口地址 | https://api.code410.com/api/hot/baidu_car |
| 返回格式 | application/json |
| 请求方式 | HTTP GET POST/JSON |
| 更新日期 | 2023-09-03 |
| 调用权限 | 免费开放 |
| 每日限制 | 无限制 |
| 请求频率限制 | 1秒5次 |
请求示例
https://api.code410.com/api/hot/baidu_car请求 HEADER
| 名称 | 值 |
|---|---|
| Content-Type | application/x-www-form-urlencoded;charset; |
返回参数说明
| 名称 | 类型 | 说明 |
|---|---|---|
| code | int | 状态码 |
| msg | string | 状态信息 |
| data | string | 请求结果数据集 |
| data.content | string | 汽车热搜榜数据集 |
| data.content.word | string | 汽车名字 |
| data.content.hotChange | string | 热度变化 |
| data.content.hotScore | string | 热度值 |
| data.content.img | string | 汽车展示图片 |
| data.content.index | string | 指数排名 (数值越小,排名越前) |
| data.content.indexUrl | string | 百度指数 |
| data.content.price | string | 汽车价格 |
| data.content.query | string | 汽车搜索关键词 |
| data.content.url | string | 汽车搜索链接 |
| data.content.show | string | 汽车信息 |
| debug | string/array | 调试数据 |
| exec_time | float | 执行耗时 |
| user_ip | string | 客户端IP |
错误码参照
| 错误码 | 类型 | 说明 |
|---|---|---|
| 403 | int | 没有权限 |
| 400 | int | 参数传递不正确 |
| 500 | int | 服务器内部错误 |
在线调试 / 完整文档
本接口为 信息查找 分类下的开放接口。完整文档、在线调试与示例代码请前往 https://api.code410.com/doc/204。
返回示例
{
"code": 200,
"msg": "请求成功",
"data": {
"content": [
{
"word": "捷达VS8",
"hotChange": "up",
"hotScore": "6994895",
"img": "https://youjia-image.cdn.bcebos.com/seriesImage/177224545652517533f4.png@!default_youjia_1#",
"index": 0,
"indexUrl": "",
"price": "11.99-13.79万",
"query": "捷达VS8 汽车",
"url": "https://www.baidu.com/s?wd=%E6%8D%B7%E8%BE%BEVS8+%E6%B1%BD%E8%BD%A6&sa=fyb_car_all&rsv_dl=fyb_car_all",
"show": [
"价格:11.99-13.79万",
"级别:中型SUV"
]
},
{
"word": "宝骏云海",
"hotChange": "up",
"hotScore": "97938",
"img": "https://youjia-image.cdn.bcebos.com/seriesImage/1769073386237517f814.png@!default_youjia_1#",
"index": 1,
"indexUrl": "",
"price": "10.98-16.58万",
"query": "宝骏云海 汽车",
"url": "https://www.baidu.com/s?wd=%E5%AE%9D%E9%AA%8F%E4%BA%91%E6%B5%B7+%E6%B1%BD%E8%BD%A6&sa=fyb_car_all&rsv_dl=fyb_car_all",
"show": [
"价格:10.98-16.58万",
"级别:紧凑型SUV"
]
},
{
"word": "揽胜",
"hotChange": "up",
"hotScore": "93993",
"img": "https://youjia-image.cdn.bcebos.com/seriesImage/16608963688539ffaea7.png@!default_youjia_1#",
"index": 2,
"indexUrl": "",
"price": "141.2-333.9万",
"query": "揽胜 汽车",
"url": "https://www.baidu.com/s?wd=%E6%8F%BD%E8%83%9C+%E6%B1%BD%E8%BD%A6&sa=fyb_car_all&rsv_dl=fyb_car_all",
"show": [
"价格:141.2-333.9万",
"级别:中大型SUV"
]
}
]
},
"exec_time": 0.129,
"ip": "197.149.235.178"
}
// (content 共 30 项,此处仅展示前 3 项)示例代码
// jQuery-Ajax
$.ajax({
url: 'https://api.code410.com/api/hot/baidu_car',
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_car"
params = {
# 该接口无需参数
}
res = requests.get(url, params=params)
print(res.json())const https = require('https');
const url = 'https://api.code410.com/api/hot/baidu_car';
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_car")
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_car");
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_car";
HttpResponseMessage response = await client.GetAsync(url);
string body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
}<?php
$url = "https://api.code410.com/api/hot/baidu_car";
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);curl "https://api.code410.com/api/hot/baidu_car"在线调试
该接口无需参数,直接点击下方按钮发起请求。
填写参数后点击「发起请求」查看实时返回结果。
