無料 IP 位置情報・リスク判定 API
高性能、IPv4/IPv6デュアルスタック、多言語対応。完全無料、登録不要。
本製品は、MaxMindが作成したGeoLite2データを使用しています。入手先: https://www.maxmind.com.
⏱️
レート制限
最大1秒あたり1リクエスト(1 req/s)。
♾️
利用枠(クォータ)
1日あたりや全体のクォータ制限はありません。完全無料でご利用いただけます。
エンドポイント
GET
https://api.myipdns.com/
IPv4
IPv6
JSON形式
GET
https://v4.api.myipdns.com/
IPv4のみ
テキスト形式
GET
https://v6.api.myipdns.com/
IPv6のみ
テキスト形式
パラメータ
| パラメータ名 | 説明 | 例 |
|---|---|---|
ip |
照会するIP。省略した場合、アクセス元のIPを返します。 | ?ip=8.8.8.8 |
lang |
応答言語。対応:en, cn, ru, ja, fr, de, es, pt。 | ?lang=zh-CN |
JSON 応答例
Request: GET https://api.myipdns.com/?ip=8.8.8.8&lang=en
{
"ip": "8.8.8.8",
"continent": "North America",
"continent_code": "NA",
"country": "United States",
"country_code": "US",
"timezone": "America/Chicago",
"latitude": 37.751,
"longitude": -97.822,
"asn": 15169,
"as_org": "Google LLC",
"native_type": "native",
"rir_registry": "arin",
"is_hosting": true,
"usage_type": "DCH",
"query_time": "0.03",
"source": "maxmind.com"
}
ターミナルプロトコルスタック&プライバシー診断 API (/check)
curl、wget、自動化スクリプト向けの高精度・プロキシ非経由プロトコルスタックおよび出口トポロジー検査エンドポイント。
⚡
読み取りレート制限
1 IPあたり 1 リクエスト/秒 (バースト 5)。超過時は HTTP 429 を返します。
🔗
共有作成クォータ
1 IPあたり 5 回/時間。超過時は共有リンクを生成せずに診断結果を正常に返します (HTTP 200)。
エンドポイント
GET
https://myipdns.com/check
Dual-Stack
デフォルト形式 (ANSIカラー / ターミナルテキスト)
GET
https://myipdns.com/check?format=line
Dual-Stack
行形式 (Shell / 自動化用の KEY=VALUE 形式)
GET
https://myipdns.com/check?format=json
Dual-Stack
構造化 JSON 形式
パラメータ
| パラメータ名 | 説明 | 例 |
|---|---|---|
format |
出力形式の指定: json (構造化 JSON) または line (KEY=VALUE 形式) | ?format=line / ?format=json |
share |
30日間の共有レポートURLとSVGバッジを生成 (5回/時間/IP に制限) | ?share=1 |
color |
ANSIカラーエスケープコードを無効化: ?color=0 または ?plain=1 | ?color=0 / ?plain=1 |
-4 / -6 |
IPv4またはIPv6スタックを明示的にプローブ: curl -4 または curl -6 | curl -4 https://myipdns.com/check |
JSON レスポンスフィールド完全仕様
| Field | Type | Description |
|---|---|---|
ip | string | クライアント出口 IP アドレス |
ip_version | string | IP バージョン (IPv4 または IPv6) (IPv4 / IPv6) |
country | string | 複数ソースの投票によって決定された国名 |
country_code | string | ISO 3166-1 alpha-2 国コード (2文字大文字) |
city | string | null | 都市名 (未測定の場合は null) |
asn | string | 自律システム番号 (例: AS15169) |
as_org | string | ASN の組織名 / ISP 名 |
is_datacenter | boolean | データセンターまたはホスティングネットワークを示すブール値 |
is_proxy | boolean | 商用プロキシまたは VPN 出口を示すブール値 |
transport | object | トランスポート層指紋オブジェクト。🔴 未測定の指標は厳格に null (0 や false を返さない) |
transport.mss | string | 観測された TCP 最大セグメントサイズ (例: 1380、未測定時は "n/a") |
transport.mtu | integer | null | MSS から推定されたパス MTU (例: WireGuard の場合 1420、未測定時は null) |
transport.mtu_note | string | null | MTU に基づくリンク種別のヒューリスティック分類 (未測定時は null) |
transport.wscale | integer | null | TCP ウィンドウスケール指数 (未測定時は null) |
transport.syn_win | integer | null | TCP 初期 SYN 受信ウィンドウサイズ (未測定時は null) |
transport.syn_ttl | integer | null | 推定された初期 SYN 生存時間 TTL (未測定時は null) |
transport.option_order | string | null | カンマ区切りの TCP SYN オプション順序 (未測定時は null) |
transport.ts_val | integer | null | TCP タイムスタンプ値 (未測定時は null) |
transport.ts_hz | integer | null | 推定された TCP タイムスタンプクロック周波数 Hz (未測定時は null) |
transport.ecn_enabled | boolean | null | 明示的輻輳通知 ECN 状態 (未測定時は null) |
crypto | object | アプリケーションおよび暗号化ハンドシェイクオブジェクト (HTTP バージョン、TLS バージョン、JA4、JA3、ALPN) |
verdict | object | トポロジー判定結論、判定根拠および説明 |
share_url | string (optional) | ?share=1 が指定されクォータ内の場合に生成される30日間共有URL |
badge_url | string (optional) | ?share=1 が指定されクォータ内の場合に生成されるSVGバッジURL |
行形式 (Shell / 自動化用の KEY=VALUE 形式) Example:
ip=35.212.190.31
ip_version=IPv4
country=United States
country_code=US
city=San Jose
asn=AS15169
as_org=Google LLC
is_datacenter=true
is_proxy=false
mss=1380
mtu=1420
mtu_note=Encapsulated Tunnel (WireGuard / Tailscale / CDN)
wscale=7
syn_win=65535
syn_ttl=64
option_order=MSS,SACK_PERM,TS,NOP,WS
ts_val=987654
ts_hz=1000
ecn_enabled=true
http_proto=HTTP/2.0
tls_version=TLS 1.3
ja4=t13d1516h2_8daaf6152771_000000000000
verdict=topo_terminated_remote_protocol
verdict_basis=reputation
verdict_summary=Data Center / Proxy Egress (Hosting Network)
構造化 JSON 形式 Example:
{
"ip": "35.212.190.31",
"ip_version": "IPv4",
"country": "United States",
"country_code": "US",
"city": "San Jose",
"asn": "AS15169",
"as_org": "Google LLC",
"is_datacenter": true,
"is_proxy": false,
"transport": {
"mss": "1380",
"mtu": 1420,
"mtu_note": "Encapsulated Tunnel (WireGuard / Tailscale / CDN)",
"wscale": 7,
"syn_win": 65535,
"syn_ttl": 64,
"option_order": "MSS,SACK_PERM,TS,NOP,WS",
"ts_val": 987654,
"ts_hz": 1000,
"ecn_enabled": true
},
"crypto": {
"http_proto": "HTTP/2.0",
"tls_version": "TLS 1.3",
"ja4": "t13d1516h2_8daaf6152771_000000000000"
},
"verdict": {
"key": "topo_terminated_remote_protocol",
"basis": "reputation",
"summary": "Data Center / Proxy Egress (Hosting Network)"
}
}
コマンドライン(CLI / curl)インターフェース
複雑なAPI連携は不要です。ターミナルでコマンドを直接実行するだけで、IPデータやプレーンテキストIPを素早く取得できます。CLIリクエストは1秒あたり1回に制限されます。
1. 自身のIPの標準JSONプロファイルを取得:
curl https://myipdns.com
2. 指定した対象IP(例: 8.8.8.8)の標準JSONプロファイルを取得:
curl https://myipdns.com/ip/8.8.8.8
3. プレーンテキストのIP文字列を取得(シェルスクリプトに最適):
curl https://myipdns.com/ip
API 技術仕様と FAQ
プロトコルスタック測定の仕組み、null 安全性のルール、スクリプト連携について。
/check は直結デュアルスタックプローブ (check_dns.myipdns.com) へ HTTP 302 リダイレクトします。リバースプロキシや CDN をバイパスし、サーバーカーネルが TCP SYN パケットを直接検査するためです。
データの誤解を防ぐためです。TCP において MTU 0 は不正な値であり、ECN 無効と未測定 (HTTP/3 QUIC 接続時など) は明確に異なります。未測定項目は厳格に null を返します。
KEY=VALUE 形式の curl -sL 'https://myipdns.com/check?format=line' を使い awk や grep で抽出するか、?format=json と jq を組み合わせて使用します。
読み取り制限 (1 req/s, burst 5) を超過すると Retry-After 付きの HTTP 429 が返されます。共有作成 (5回/時間/IP) 超過時は診断データ (HTTP 200) のみを正常に返し、共有リンクの生成のみがスキップされます。
クレジットと謝辞
ネットワーク出口の検証に、以下のサードパーティAPIを使用しています。
-
www.cloudflare.com
-
api.vore.top
-
myip.ipip.net
-
data.video.iqiyi.com
-
api.ipify.org
-
api6.ipify.org
-
ipv4.agi.li
-
ipv6.agi.li
-
netlify-ip.html.zone
-
ip.011102.xyz
-
api.ip.sb
-
api.ipapi.is
-
api.db-ip.com
-
free.freeipapi.com
-
api.ipquery.io
-
api.ipbase.com
-
wtfismyip.com
-
geolocation-db.com
-
ipv6.my.ipinfo.app
-
myexternalip.com
-
ifconfig.me
-
checkip.amazonaws.com
-
icanhazip.com
-
ipecho.net
-
4.ident.me
-
6.ident.me
-
cloudflare-ip.html.zone
-
ipmax.vercel.app
-
ipv4.jsonip.com
-
ipv6.jsonip.com
-
api.kieng.cn
-
v4.api.ipinfo.io
-
v6.api.ipinfo.io
-
v4.api.myipdns.com
-
v6.api.myipdns.com
-
my.ipinfo.app
-
www.cloudflare-cn.com
-
x.com
-
my.ip.cn
-
api.myip.la