API 文档 / 百度SEO检测 / 首页排名批量查询

首页排名批量查询

接口地址:
localhost:88/api/v1/{apikey}/ranking/query 获取私钥
请求方式:
GET
返回格式:
JSON
请求示例:
localhost:88/api/v1/{apikey}/ranking/query?domains=example.com,baidu.com&keywords=测试,百度
接口备注:
批量查看域名的首页排名相关信息

请求参数说明

名称 类型 必填 说明
domains String 域名,多个用逗号分隔
keywords String 关键词,多个用逗号分隔,每个关键词的位置对应域名的位置

返回参数说明

名称 类型 说明
count Int 查询总数
results Array 查询结果列表
results[].domain String 域名
results[].keyword String 关键词
results[].ranking String 首页排名(如"第1名"或"暂无排名")
results[].title String 首页标题
results[].url String 收录链接URL
results[].status String 查询状态
results[].cached Boolean 是否来自缓存

JSON 返回示例

JSON
{
	"code": 200,
	"message": "操作成功",
	"data": {
		"count": 2,
		"results": [
			{
				"domain": "example.com",
				"keyword": "测试",
				"ranking": "暂无排名",
				"title": "",
				"url": "",
				"status": "未收录",
				"cached": true
			},
			{
				"domain": "baidu.com",
				"keyword": "百度",
				"ranking": "暂无排名",
				"title": "",
				"url": "",
				"status": "未收录",
				"cached": true
			}
		]
	}
}

接口状态码说明

所有 API 接口统一使用以下错误码格式返回,请根据 code 值判断请求结果。

状态码 类型 说明
200 成功 请求成功,data 字段包含返回数据
401 认证错误 缺少 API Key 或 API Key 无效。请检查 URL 路径中的 {apikey} 是否正确,或联系客服获取有效密钥
403 权限错误 账号已被禁用,无法调用接口。请联系客服解封
422 参数错误 请求参数验证失败。请检查参数名称、格式和必填项是否符合接口文档要求
500 服务端错误 服务器内部异常。若频繁出现请联系客服处理