用于查询网站的备案数据(可以查询个人)有一些可能查询不到,如果查询不到就使用id=86
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| url | string | 是 | 需要查询的域名 | baidu.com |
| type | string | 否 | 输出格式:text/json(可选) | json |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "url",
"type": "string",
"required": true,
"description": "需要查询的域名",
"example": "baidu.com"
},
{
"name": "type",
"type": "string",
"required": false,
"description": "输出格式:text/json(可选)",
"example": "json"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "网站备案2.0",
"description": "用于查询网站的备案数据(可以查询个人)有一些可能查询不到,如果查询不到就使用id=86",
"version": "1.0.0"
},
"paths": {
"/api/zzgj/icp2.0/api.php": {
"get": {
"summary": "网站备案2.0",
"description": "用于查询网站的备案数据(可以查询个人)有一些可能查询不到,如果查询不到就使用id=86",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "url",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "baidu.com"
},
"description": "需要查询的域名"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "输出格式:text/json(可选)"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "网站备案2.0",
"description": "用于查询网站的备案数据(可以查询个人)有一些可能查询不到,如果查询不到就使用id=86",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "url",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "baidu.com"
},
"description": "需要查询的域名"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "输出格式:text/json(可选)"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api-v2.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"domain": "baidu.com",
"status": "该域名禁止查询",
"subject": "",
"type": "",
"number": "",
"time": ""
}
用于查询网站备案数据,支持个人网站备案查询。
该接口面向站长工具类应用使用,可通过提交域名获取对应备案信息。
https://api-v2.317ak.com/api/zzgj/icp2.0/api.php
GET、POST
接口调用必须携带密钥,首选通过 Query 参数进行鉴权:
key=接口调用密钥
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥,通过 Query 参数 key 传递。 |
| url | string | 是 | 需要查询的域名,例如:baidu.com。 |
| type | string | 否 | 输出格式,可选值:text、json。 |
{
"domain": "baidu.com",
"status": "该域名禁止查询",
"subject": "",
"type": "",
"number": "",
"time": ""
}
| 字段 | 类型 | 说明 |
|---|---|---|
| domain | string | 查询的域名 |
| status | string | 查询状态信息 |
| subject | string | 网站主体信息 |
| type | string | 网站类型信息 |
| number | string | 备案编号信息 |
| time | string | 备案时间信息 |
接口调用失败时,将返回包含错误码的 JSON 数据:
{
"code":0,
"msg":"未提供调用密钥",
"errcode":11001
}
| errcode | 含义 |
|---|---|
| 11001 | 未提供调用密钥 |
| 11002 | 密钥错误 |
| 11003 | 密钥已禁用 |
| 11004 | 积分余额不足 |
| 11005 | 请求过于频繁(QPM 限制) |
| 11006 | 接口维护中 |
| 11007 | 接口已禁用 |
| 11008 | 接口不可用 |
| 11009 | 密钥校验暂不可用 |
| 11010 | 积分系统暂不可用 |
| 11011 | 收费接口须提供有效密钥 |
| 11012 | 鉴权方式错误 |
| 11013 | 接口不存在 |
| 11014 | ***地址无效 |
| 11015 | ***地址不允许 |
| 11016 | ***请求失败 |
| 11017 | 服务暂不可用 |
| 11018 | 请求方式不允许 |
| 11019 | 当前IP不在白名单内 |
| 11020 | 启用出口代理须提供有效密钥 |
| 11021 | 未配置可用出口代理 |
| 11022 | 出口代理不可用 |
| 11023 | 密钥已过期 |
| 11024 | 令牌分配积分不足 |
curl "https://api-v2.317ak.com/api/zzgj/icp2.0/api.php?key=你的密钥&url=baidu.com&type=json"
// PHP
## 注意事项
- 请妥善保管接口调用密钥,避免在公开场景中泄露。密钥不建议直接写入前端页面、公开代码仓库或可被他人获取的位置。
- 本接口必须携带密钥调用,请按照首选鉴权方式通过 Query 参数 `key` 传递接口调用密钥。
- 查询参数 `url` 必须填写需要查询的域名,建议使用规范域名格式,例如 `baidu.com`,避免携带无关路径或参数导致查询结果异常。
- 部分网站备案数据可能无法查询到,接口会返回对应状态信息;如指定域名无法获取结果,可根据实际需求使用接口说明中的备用查询标识进行处理。
- `type` 参数用于选择返回格式,可选 `text` 或 `json`,未填写时请根据接口默认返回行为处理。
- 请合理控制接口调用频率,避免短时间内大量重复请求影响正常使用。
- 调用接口时建议使用 HTTPS 请求方式,保障请求过程中的数据安全。#!/bin/bash
# 查询备案接口
KEY="YOUR_API_KEY"
DOMAIN="baidu.com"
API="https://api-v2.317ak.com/api/zzgj/icp2.0/api.php"
curl -G "$API" \
--data-urlencode "key=$KEY" \
--data-urlencode "url=$DOMAIN" --data-urlencode "type=json"