目前市面上的大多数IP定位接口要么是收费的,要么提供的免费调用次数非常有限,无法满足长期或高频次的使用需求。为了满足个人用户的需求,本站提供免费API接口采用了Cloudflare的免费功能实现,通常适用于个人用户的常见使用场景,免费调用次数足够日常使用。本站接口都能稳定提供服务,且无需担心过多的费用或频次限制,非常适合个人或小型项目使用。
用于根据用户的IP地址来获取其地理位置,例如城市、国家、经纬度等信息。
➜ ~ curl https://ip.
{
"Method": "GET",
"Url": "https://ip./",
"IP": {
"IP": "220.196.192.111",
"Continent": "AS",
"Country": "CN",
"Region": "Shanghai",
"RegionCode": "SH",
"City": "Shanghai",
"Latitude": "31.22220",
"Longitude": "121.45810",
"Colo": "LAX",
"ASN": 17621,
"ASOrganization": "China Unicom",
"Timezone": "Asia/Shanghai"
},
"Headers": {
"accept": "*/*",
"accept-encoding": "gzip, br",
"connection": "Keep-Alive",
"host": "ip.",
"user-agent": "curl/7.64.1",
"x-forwarded-proto": "https",
"x-real-ip": "220.196.192.111"
},
"Security": {
"clientTcpRtt": 209,
"tlsCipher": "ECDHE-ECDSA-CHACHA20-POLY1305",
"tlsVersion": "TLSv1.2",
"httpProtocol": "HTTP/2"
}
}
2、获取当前世界时间
获取当前几个主要时区的当前时间
➜ ~ curl https://time.
{
"Asia/Shanghai": "2024年11月13日 12:17:05",
"UTC": "2024年11月13日 04:17:05",
"America/New_York": "2024年11月12日 23:17:05",
"Europe/London": "2024年11月13日 04:17:05",
"Australia/Sydney": "2024年11月13日 15:17:05",
"Europe/Berlin": "2024年11月13日 05:17:05",
"Europe/Paris": "2024年11月13日 05:17:05"
}