桑帛云API

多节点ping

GET 无需 Key 运行中

接口简介

多节点ping接口API,支持批量检测目标地址连通性,覆盖多地域节点,返回延迟、丢包率等数据,响应迅速,数据精准,适配网络监控、稳定性测试场景。

接口地址

https://api.lolimi.cn/API/ping/a

请求示例

测试访问
https://api.lolimi.cn/API/ping/a?demo=baidu.com

返回预览

JSON
{
    "target_host": "baidu.com",
    "nodes": [
        {
            "node_location": "中国 浙江省 金华市\/电信",
            "ping_info": {
                "test_host": "baidu.com",
                "ip": "111.63.65.247",
                "location": "河北省石家庄市 移动",
                "byte": "64 bytes",
                "ttl": "41 (TTL)",
                "min_delay": "27.5 ms",
                "max_delay": "27.5 ms",
                "avg_delay": "27.5 ms",
                "sent_packets": "1 packets",
                "received_packets": "1 packets",
                "packet_loss": "0%",
                "msg": "ok"
            }
        },
        {
            "node_location": "中国 湖北省 十堰市\/电信",
            "ping_info": {
                "test_host": "baidu.com",
                "ip": "111.63.65.247",
                "location": "河北省石家庄市 移动",
                "byte": "64 bytes",
                "ttl": "43 (TTL)",
                "min_delay": "28.6 ms",
                "max_delay": "28.6 ms",
                "avg_delay": "28.6 ms",
                "sent_packets": "1 packets",
                "received_packets": "1 packets",
                "packet_loss": "0%",
                "msg": "ok"
            }
        },
        {
            "node_location": "中国 浙江省 杭州市\/数据中心",
            "ping_info": {
                "test_host": "baidu.com",
                "ip": "111.63.65.103",
                "location": "河北省石家庄市 移动",
                "byte": "64 bytes",
                "ttl": "1 (TTL)",
                "min_delay": "28 ms",
                "max_delay": "28 ms",
                "avg_delay": "28 ms",
                "sent_packets": "1 packets",
                "received_packets": "1 packets",
                "packet_loss": "0%",
                "msg": "ok"
            }
        },
        {
            "node_location": "中国 山东省 枣庄市\/电信",
            "ping_info": {
                "test_host": "baidu.com",
                "ip": "111.63.65.103",
                "location": "河北省石家庄市 移动",
                "byte": "64 bytes",
                "ttl": "45 (TTL)",
                "min_delay": "20.5 ms",
                "max_delay": "20.5 ms",
                "avg_delay": "20.5 ms",
                "sent_packets": "1 packets",
                "received_packets": "1 packets",
                "packet_loss": "0%",
                "msg": "ok"
            }
        },
        {
            "node_location": "中国 香港",
            "ping_info": {
                "test_host": "baidu.com",
                "ip": "111.63.65.103",
                "location": "河北省石家庄市 移动",
                "byte": "64 bytes",
                "ttl": "44 (TTL)",
                "min_delay": "54.4 ms",
                "max_delay": "54.4 ms",
                "avg_delay": "54.4 ms",
                "sent_packets": "1 packets",
                "received_packets": "1 packets",
                "packet_loss": "0%",
                "msg": "ok"
            }
        },
        {
            "node_location": "中国 北京\/数据中心",
            "ping_info": {
                "test_host": "baidu.com",
                "ip": "111.63.65.247",
                "location": "河北省石家庄市 移动",
                "byte": "64 bytes",
                "ttl": "38 (TTL)",
                "min_delay": "36.1 ms",
                "max_delay": "36.1 ms",
                "avg_delay": "36.1 ms",
                "sent_packets": "1 packets",
                "received_packets": "1 packets",
                "packet_loss": "0%",
                "msg": "ok"
            }
        },
        {
            "node_location": "中国 山东省 济南市\/电信",
            "ping_info": {
                "test_host": "baidu.com",
                "ip": "124.237.177.164",
                "location": "河北省保定市 电信",
                "byte": "64 bytes",
                "ttl": "41 (TTL)",
                "min_delay": "25.3 ms",
                "max_delay": "25.3 ms",
                "avg_delay": "25.3 ms",
                "sent_packets": "1 packets",
                "received_packets": "1 packets",
                "packet_loss": "0%",
                "msg": "ok"
            }
        },
        {
            "node_location": "中国 上海市\/数据中心",
            "ping_info": {
                "test_host": "baidu.com",
                "ip": "111.63.65.103",
                "location": "河北省石家庄市 移动",
                "byte": "64 bytes",
                "ttl": "47 (TTL)",
                "min_delay": "42 ms",
                "max_delay": "42 ms",
                "avg_delay": "42 ms",
                "sent_packets": "1 packets",
                "received_packets": "1 packets",
                "packet_loss": "0%",
                "msg": "ok"
            }
        }
    ],
    "total_nodes": 8,
    "success_nodes": 8,
    "msg": "ok"
}

请求参数

参数名类型必填描述
demostringRequired需要测的ip/url

返回参数

参数名类型描述
target_hoststring目标ping检测主机地址
nodesarray多节点ping检测结果集合
nodes[].node_locationstring检测节点地理位置及网络运营商
nodes[].ping_infoobject对应节点的ping详细信息
nodes[].ping_info.test_hoststring实际检测的主机地址
nodes[].ping_info.ipstring目标主机对应的IP地址
nodes[].ping_info.locationstring目标IP的地理位置及网络运营商
nodes[].ping_info.bytestringping请求发送的数据包大小
nodes[].ping_info.ttlstring数据包生存时间
nodes[].ping_info.min_delaystring最小延迟时间
nodes[].ping_info.max_delaystring最大延迟时间
nodes[].ping_info.avg_delaystring平均延迟时间
nodes[].ping_info.sent_packetsstring发送的数据包数量
nodes[].ping_info.received_packetsstring接收的数据包数量
nodes[].ping_info.packet_lossstring数据包丢包率
nodes[].ping_info.msgstring对应节点ping检测结果状态描述
total_nodesint参与检测的总节点数量
success_nodesintping检测成功的节点数量
msgstring整体多节点ping检测结果状态描述

参数配置

登录获取 Key
<?php
$url = "https://api.lolimi.cn/API/ping/a";
$params = array (
  'demo' => 'value',
);
$url .= '?' . http_build_query($params);
$res = file_get_contents($url);
echo $res;
概览
文档
调试
代码
已复制到剪贴板