查询
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
num | 否 | int | 返回数量1-50,默认10 | |
page | 否 | int | 翻页,默认1 | |
rand | 否 | int | 随机获取,默认1 | |
word | 否 | string | 检索关键词 |
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 状态码 | |
reason | string | 状态提示 | |
result | json | 返回结果 | |
curpage | int | 当前页 | |
allnum | int | 结果数 | |
id | string | 新闻唯一ID | |
ctime | Date | 发布时间 | |
title | string | 文章标题 | |
description | string | 文章描述 | |
source | string | 文章来源 | |
picUrl | string | 封面图片 | |
url | string | 文章地址 |
JSON返回示例:JSON在线格式化工具 >
{
"reason": "success",
"result": {
"curpage": 1,
"allnum": 2,
"newslist": [
{
"id": "b69ac31b32521868525a7d140b310a38",
"ctime": "2023-03-08 11:11",
"title": "刘雯井柏然秀场合体,甜蜜说笑帮理项链好甜!",
"description": "",
"source": "网易明星",
"picUrl": "https://nimg.ws.126.net/?url=http%3A%2F%2Fcms-bucket.ws.126.net%2F2023%2F0308%2F559d5573p00rr6m68001rc0009c0070c.png&thumbnail=130y90&quality=100&type=jpg",
"url": "https://www.163.com/ent/article/HVA7J8SB00038FO9.html"
},
{
"id": "1287679a73a4217613ff86fe99bcf201",
"ctime": "2023-03-08 11:23",
"title": "黄多多才女人设翻车!《陪你多读书》就读错字道歉",
"description": "",
"source": "网易明星",
"picUrl": "https://nimg.ws.126.net/?url=http%3A%2F%2Fcms-bucket.ws.126.net%2F2023%2F0308%2Ff2b5bda6p00rr6mqa000wc0009c0070c.png&thumbnail=130y90&quality=100&type=jpg",
"url": "https://www.163.com/ent/article/HVA8A44H00038FO9.html"
}
]
},
"error_code": 0
}
服务级错误码参照(error_code):
错误码 | 说明 | |
---|---|---|
275800 | 网络超时,请稍后重试 | |
275801 | 275800 | |
275802 | 查询错误 |
系统级错误码参照:
错误码 | 说明 | 旧版本(resultcode) | |
---|---|---|---|
10001 | 错误的请求KEY | 101 | |
10002 | 该KEY无请求权限 | 102 | |
10003 | KEY过期 | 103 | |
10004 | 错误的OPENID | 104 | |
10005 | 应用未审核超时,请提交认证 | 105 | |
10007 | 未知的请求源 | 107 | |
10008 | 被禁止的IP | 108 | |
10009 | 被禁止的KEY | 109 | |
10011 | 当前IP请求超过限制 | 111 | |
10012 | 请求超过次数限制 | 112 | |
10013 | 测试KEY超过请求限制 | 113 | |
10014 | 系统内部异常(调用充值类业务时,请务必联系客服或通过订单查询接口检测订单,避免造成损失) | 114 | |
10020 | 接口维护 | 120 | |
10021 | 接口停用 | 121 |
错误码格式说明(示例:200201):
2 | 002 | 01 | |
---|---|---|---|
服务级错误(1为系统级错误) | 服务模块代码(即数据ID) | 具体错误代码 |