API文档
北京时间: 2026-05-04 13:37:45基础信息
| 基础URL | https://intel.ltzy.top/api |
| 请求方式 | GET / POST |
| 返回格式 | JSON / XML / JSONP |
| 认证 | 无需认证 |
返回格式参数
| format=json | JSON格式(默认) |
| format=xml | XML格式 |
| format=jsonp | JSONP格式(需callback参数) |
统一API接口
推荐使用:所有功能通过一个接口完成,参数决定返回内容
GET/POST /api 或 /api/cpus
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
q | string | 否 | 搜索关键词(型号、系列、架构等) |
id | string | 否 | CPU ID,获取单个CPU详情 |
series | string | 否 | 系列筛选:core/pentium/celeron/xeon/atom/early |
page | int | 否 | 页码,默认1 |
per_page | int | 否 | 每页数量,默认20,最大100 |
format | string | 否 | 返回格式:json/xml/jsonp |
callback | string | 否 | JSONP回调函数名 |
使用示例
搜索CPU
GET /api?q=i9-14900K
POST /api {"q": "i9-14900K"}
获取单个CPU
GET /api?id=intel-4004
POST /api {"id": "intel-4004"}
按系列筛选
GET /api?series=core&page=1
GET /api?series=xeon&per_page=50
不同返回格式
GET /api?q=4004&format=xml
GET /api?q=4004&format=jsonp&callback=myFunc
返回示例
{
"success": true,
"data": {
"list": [...],
"page": 1,
"per_page": 20,
"total": 556,
"pages": 28
},
"message": "成功",
"error": null,
"time": "2026-05-04 12:00:00"
}
代码示例
// 搜索CPU
fetch('https://intel.ltzy.top/api?q=i9')
.then(r => r.json())
.then(d => console.log(d.data.list));
// 获取单个CPU
fetch('https://intel.ltzy.top/api?id=intel-4004')
.then(r => r.json())
.then(d => console.log(d.data));
// POST请求
fetch('https://intel.ltzy.top/api', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({q: 'core i7'})
}).then(r => r.json()).then(console.log);
import requests
# 搜索CPU
r = requests.get('https://intel.ltzy.top/api', params={'q': 'i9'})
data = r.json()
for cpu in data['data']['list']:
print(cpu['model'])
# 获取单个CPU
r = requests.get('https://intel.ltzy.top/api', params={'id': 'intel-4004'})
print(r.json()['data'])
# POST请求
r = requests.post('https://intel.ltzy.top/api', json={'q': 'xeon'})
print(r.json())
# 搜索CPU
curl "https://intel.ltzy.top/api?q=i9"
# 获取单个CPU
curl "https://intel.ltzy.top/api?id=intel-4004"
# POST请求
curl -X POST "https://intel.ltzy.top/api" -H "Content-Type: application/json" -d '{"q":"xeon"}'
# XML格式
curl "https://intel.ltzy.top/api?q=4004&format=xml"
CPU数据字段
| 字段 | 类型 | 说明 | 示例 |
|---|---|---|---|
| id | string | 唯一标识 | intel-4004 |
| model | string | 型号 | 4004 |
| full_name | string | 完整名称 | Intel 4004 |
| architecture | string | 架构 | 4-bit |
| cores | int | 核心数 | 1 |
| threads | int | 线程数 | 1 |
| base_frequency | string | 基础频率 | 740 kHz |
| max_turbo_frequency | string | 加速频率 | 3.2 GHz |
| process | string | 工艺 | 10 μm |
| tdp | string | 功耗 | 125W |
| release_date | string | 发布日期 | 1971-11-15 |
| socket | string | 插槽 | LGA1700 |
| series | string | 系列 | core |
| family | string | 家族 | Core i9 |
| url_slug | string | URL别名 | intel-4004 |