首页 全部接口 API文档 文章 贡献者 友链 赞助 关于
登录/注册

ICP备案查询V2

GET https://apis.whrx.chat/api/icp/v2.php

ICP备案查询V2 API文档

接口简介

本API用于查询网站ICP备案信息。通过调用该接口,可以实时获取域名备案详情,包括备案号、主体信息、备案省份、网站状态等。支持查询已备案和未备案状态,数据准确可靠。

请求说明

请求参数

参数名类型是否必填说明
keystring接口访问密钥(开启密钥访问时必填)
domainstring需要查询的域名(如:baidu.com 或 https://www.baidu.com)

返回参数

参数名类型说明
codeinteger状态码,200表示成功
msgstring提示信息
dataobject返回数据详情
- domainstring域名
- is_icpboolean是否备案
- icp_numberstring备案号
- icp_statusstring网站备案状态
- icp_provincestring备案省份
- icp_typestring备案类型
- icp_serialstring备案序号
- site_indexstring网站首页
- unit_namestring主体名称
- nature_namestring主体性质
- update_timestring更新时间
- web_statusobject网站状态
- - statusstring网站状态描述
- - http_codeintegerHTTP状态码
- - accessibleboolean网站是否可访问
- response_timestring响应时间
- query_timestring查询时间
- from_cacheboolean是否从缓存获取

返回示例

成功示例

{
    "code": 200,
    "msg": "success",
    "data": {
        "domain": "baidu.com",
        "is_icp": true,
        "icp_number": "京ICP证030173号-1",
        "icp_status": "已备案",
        "icp_province": "北京",
        "icp_type": "证",
        "icp_serial": "030173",
        "site_index": "1",
        "unit_name": "北京百度网讯科技有限公司",
        "nature_name": "企业",
        "update_time": "2019-05-16",
        "web_status": {
            "status": "正常",
            "http_code": 200,
            "accessible": true
        },
        "response_time": "543ms",
        "query_time": "2026-05-06 03:35:50",
        "from_cache": false
    },
    "api_info": {
        "developer": "尋鯨錄",
        "blog": "https://www.xunjinlu.fun",
        "api_platform": "https://api.xunjinlu.fun"
    }
}

失败示例

{
    "code": 404,
    "msg": "域名未备案",
    "data": {
        "domain": "example.com"
    }
}

错误码说明

状态码说明
200成功
404域名未备案
500内部错误

调用示例

直接访问链接

https://api.xunjinlu.fun/api/icp/v2.php?key=YOUR_KEY&domain=baidu.com

cURL命令示例

curl -X GET "https://api.xunjinlu.fun/api/icp/v2.php?key=YOUR_KEY&domain=baidu.com" -H "accept: application/json"

Python (requests) 示例

import requests

url = "https://api.xunjinlu.fun/api/icp/v2.php"
params = {
"key": "YOUR_KEY",
"domain": "baidu.com"
}

response = requests.get(url, params=params)
print(response.json())

PHP (curl) 示例

$url = "https://api.xunjinlu.fun/api/icp/v2.php";
$key = "YOUR_KEY";
$domain = "baidu.com";

$params = array(
"key" => $key,
"domain" => $domain
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/x-www-form-urlencoded",
"accept: application/json"
));

$response = curl_exec($ch);
curl_close($ch);

echo $response;

HTML (iframe) 示例