IP Detection
IP 歸屬地 API
IP 位址的國家、城市、座標及時區。
定位 IP
GET/v1/geo/{ip}
API 金鑰
參數
- ipstring路徑必填
IPv4 或 IPv6 位址。
回應欄位
- ipstring
被偵測的 IP 位址。
- countrystring
國家名稱。
- countryCodestring
兩位 ISO 國家代碼。
- citystring
城市名稱。
- regionstring
地區或州。
- postalCodestring | null
郵遞區號。
- latitudenumber | null
緯度。
- longitudenumber | null
經度。
- timezonestring
IANA 時區。
- accuracyRadiusinteger | null
位置估算的半徑,以公里為單位。
- lockedstring[]
在目前方案下以 null 返回的欄位路徑(以點分隔)。Starter 及以上方案不返回此欄位。
- planRequiredstring
包含被鎖定欄位的方案。Starter 及以上方案不返回此欄位。
curl https://ipscanner.io/v1/geo/24.48.0.1 \
-H "Authorization: Bearer YOUR_API_KEY"回應
{
"ip": "24.48.0.1",
"country": "Canada",
"countryCode": "CA",
"city": "Montreal",
"region": "Quebec",
"postalCode": "H1K",
"latitude": 45.6085,
"longitude": -73.5493,
"timezone": "America/Toronto",
"accuracyRadius": 5
}