IPPubblico パブリックAPI

無料・認証不要のパブリックIP API。IPv4、IPv6、ISP、ASN、位置情報、タイムゾーンを返す4つのエンドポイント — JSONまたはテキスト形式。

✓ 無料 ✓ APIキー不要 ✓ レート制限なし JSON & Plain text CORS enabled

ベースURL endpoints

endpoints
# Full data (JSON)
https://ippubblico.org/?api=1

# IPv4 + IPv6 (plain text, 2 lines)
https://ippubblico.org/?text=1

# IPv4 only
https://ipv4.ippubblico.org/

# IPv6 only
https://ipv6.ippubblico.org/

エンドポイント reference

GET https://ippubblico.org/?api=1 完全なJSONレスポンス

呼び出し元のIPアドレスに関するすべての利用可能なデータを含む完全なJSONオブジェクトを返します。

curl
curl https://ippubblico.org/?api=1
Response — application/json
{
  "status":   "ok",
  "ip":       "93.45.12.88",
  "ipv4":     "93.45.12.88",
  "ipv6":     null,
  "isp":      "Telecom Italia S.p.A.",
  "asn":      "AS3269",
  "timezone": "Europe/Rome",
  "datetime": "2026-05-05T12:00:00+02:00",
  "geo": {
    "city":    "Rome",
    "region":  "Lazio",
    "country": "Italy",
    "lat":     41.9028,
    "lon":     12.4964
  },
  "headers":  { /* HTTP request headers */ },
  "cached":   false,
  "lang":     "en"
}
フィールド説明
statusstring"ok" または "partial"(位置情報取得失敗時)
ipstring検出されたIP(IPv4またはIPv6)
ipv4string | nullIPv4アドレス(利用可能な場合)
ipv6string | nullIPv6アドレス(利用可能な場合)
ispstring | nullインターネットサービスプロバイダー名
asnstring | null自律システム番号(例:"AS3269")
timezonestring | nullIANAタイムゾーン(例:"Europe/Rome")
datetimestring呼び出し元タイムゾーンのISO 8601日時
geo.citystring | nullおおよその都市名
geo.regionstring | null地域/都道府県
geo.countrystring | null国名
geo.lat / geo.lonfloat | nullおおよその座標
cachedboolean1時間キャッシュから提供された場合true
GET https://ippubblico.org/?text=1 プレーンテキスト — IPv4 + IPv6

IPv4とIPv6を2行に分けて返します。プロトコルが利用できない場合はNONEを返します。

curl
curl https://ippubblico.org/?text=1
Response — text/plain
IPv4: 93.45.12.88
IPv6: NONE
GET https://ipv4.ippubblico.org/ IPv4のみ

IPv4アドレスのみをプレーンテキストで返します。利用できない場合はNONE

curl
curl https://ipv4.ippubblico.org/
Response — text/plain
93.45.12.88
GET https://ipv6.ippubblico.org/ IPv6のみ

IPv6アドレスのみをプレーンテキストで返します。利用できない場合はNONE

curl
curl https://ipv6.ippubblico.org/
Response — text/plain
2001:db8::1

コード例 samples

bash / curl
# 完全なJSON取得
curl https://ippubblico.org/?api=1

# IPv4のみ取得
MY_IP=$(curl -s https://ipv4.ippubblico.org/)
echo "My IPv4: $MY_IP"

# IPv6のみ取得
MY_IPV6=$(curl -s https://ipv6.ippubblico.org/)
echo "My IPv6: $MY_IPV6"
JavaScript (fetch)
// Full JSON
const res = await fetch('https://ippubblico.org/?api=1');
const data = await res.json();
console.log(data.ipv4, data.ipv6, data.geo.country);

// IPv4 only
const ipv4 = await fetch('https://ipv4.ippubblico.org/').then(r => r.text());
console.log('IPv4:', ipv4);
Python
import requests

# Full JSON
data = requests.get('https://ippubblico.org/?api=1').json()
print(data['ipv4'], data['geo']['country'])

# IPv4 only
ipv4 = requests.get('https://ipv4.ippubblico.org/').text.strip()
print(f'IPv4: {ipv4}')
PHP
// Full JSON
$data = json_decode(file_get_contents('https://ippubblico.org/?api=1'), true);
echo $data['ipv4'];

// IPv4 only
$ipv4 = trim(file_get_contents('https://ipv4.ippubblico.org/'));
Go
resp, _ := http.Get("https://ipv4.ippubblico.org/")
body, _ := io.ReadAll(resp.Body)
fmt.Println("IPv4:", strings.TrimSpace(string(body)))
PowerShell
$ip = (Invoke-WebRequest 'https://ipv4.ippubblico.org/').Content.Trim()
Write-Host "IPv4: $ip"
Ruby
require 'open-uri'
ipv4 = URI.open('https://ipv4.ippubblico.org/').read.strip
puts "IPv4: #{ipv4}"
C# / .NET
var client = new HttpClient();
var ipv4 = (await client.GetStringAsync("https://ipv4.ippubblico.org/")).Trim();
Console.WriteLine($"IPv4: {ipv4}");

注意事項 info

  • 認証不要 — APIキーやトークンは不要
  • CORS有効 — あらゆるドメインのブラウザJavaScriptから利用可能
  • 1時間キャッシュ — IP毎に位置情報を1時間キャッシュ
  • IPv4サブドメイン — ipv4.ippubblico.orgはDNS AレコードでIPv4接続を強制
  • IPv6サブドメイン — ipv6.ippubblico.orgはDNS AAAAレコードでIPv6接続を強制
  • 位置情報精度 — 都市/地域レベルの概算(〜50km)。法的または監視目的には不適切。
  • データ保持 — IPとメタデータは最大90日間保存。第三者への共有なし。

対応言語 43

ウェブサイト全体は43言語で利用可能です。API自体は言語に依存しません。

🇮🇹 IT Italiano
🇬🇧 EN English
🇩🇪 DE Deutsch
🇫🇷 FR Français
🇪🇸 ES Español
🇵🇹 PT Português
🇳🇱 NL Nederlands
🇵🇱 PL Polski
🇷🇴 RO Română
🇨🇿 CS Čeština
🇸🇪 SV Svenska
🇩🇰 DA Dansk
🇫🇮 FI Suomi
🇭🇺 HU Magyar
🇸🇰 SK Slovenčina
🇧🇬 BG Български
🇭🇷 HR Hrvatski
🇸🇮 SL Slovenščina
🇪🇪 ET Eesti
🇱🇻 LV Latviešu
🇱🇹 LT Lietuvių
🇬🇷 EL Ελληνικά
🇲🇹 MT Malti
🇮🇪 GA Gaeilge
🇷🇺 RU Русский
🇺🇦 UK Українська
🇯🇵 JA 日本語
🇨🇳 ZH 中文
🇮🇳 HI हिन्दी
🇸🇦 AR العربية
🇰🇷 KO 한국어
🇹🇷 TR Türkçe
🇮🇩 ID Bahasa Indonesia
🇻🇳 VI Tiếng Việt
🇹🇭 TH ภาษาไทย
🇲🇾 MS Bahasa Melayu
🇳🇴 NB Norsk Bokmål
🇵🇰 UR اردو
🇰🇪 SW Kiswahili
🇮🇷 FA فارسی
🇧🇩 BN বাংলা
🇵🇭 TL Filipino
🇮🇱 HE עברית