API文档

北京时间: 2026-05-04 13:37:45
基础信息
基础URLhttps://intel.ltzy.top/api
请求方式GET / POST
返回格式JSON / XML / JSONP
认证无需认证
返回格式参数
format=jsonJSON格式(默认)
format=xmlXML格式
format=jsonpJSONP格式(需callback参数)
统一API接口
推荐使用:所有功能通过一个接口完成,参数决定返回内容
GET/POST /api 或 /api/cpus
参数类型必填说明
qstring搜索关键词(型号、系列、架构等)
idstringCPU ID,获取单个CPU详情
seriesstring系列筛选:core/pentium/celeron/xeon/atom/early
pageint页码,默认1
per_pageint每页数量,默认20,最大100
formatstring返回格式:json/xml/jsonp
callbackstringJSONP回调函数名
使用示例
搜索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数据字段
字段类型说明示例
idstring唯一标识intel-4004
modelstring型号4004
full_namestring完整名称Intel 4004
architecturestring架构4-bit
coresint核心数1
threadsint线程数1
base_frequencystring基础频率740 kHz
max_turbo_frequencystring加速频率3.2 GHz
processstring工艺10 μm
tdpstring功耗125W
release_datestring发布日期1971-11-15
socketstring插槽LGA1700
seriesstring系列core
familystring家族Core i9
url_slugstringURL别名intel-4004
快速测试