API

これらのHTTPエンドポイントはUIと同じデータを返し、スクリプトや監視、独自のクライアントから安全に利用できます(適切なレート制限付き)。

/ip — プレーンテキストIP

検出されたIPのみをテキストで返します。スクリプトやヘルスチェックに最適です。

/ip

curl -s https://example.com/ip

/api/info — JSON ペイロード

現在または指定したIPの情報を返します。domain=example.com(またはエンコードしたHTTP(S) URL)を指定すると、すべてのA/AAAAアドレスとメタデータを返します。

/api/info

curl -s "https://example.com/api/info?ip=1.1.1.1" | jq '.'
curl -s "https://example.com/api/info?domain=example.com" | jq '.'

/api/ipv4-probe と /api/ipv6-probe

利用可能ならそれぞれの IP のみを返し、無い場合は 204 を返します。デュアルスタック到達性テストに便利です。

/api/ipv4-probe / /api/ipv6-probe

curl -s https://example.com/api/ipv6-probe

/api/dns-leak-test — リゾルバーログ

ホームページのウィジェットが発行した id パラメーターを指定すると、DNS リークドメインへ問い合わせたリゾルバー IP を取得できます。

/api/dns-leak-test

curl -s "https://example.com/api/dns-leak-test?id=TEST_ID"

API v1 · ネットワークツール

IP計算、DNS・メール・登録情報の受動診断に加え、NekoIPだけへ通信する任意の能動的な接続テストを利用できます。

Access-Control-Allow-Origin: * · application/json · text/plain

サブネット・CIDR計算

IPv4/IPv6ネットワーク、範囲からCIDRへの変換、集約、分割、所属判定を行います。

/api/v1/tools/subnet?network=10.0.0.0%2F24

curl -H 'Accept: application/json' 'https://nekoip.ru/api/v1/tools/subnet?network=10.0.0.0%2F24'
curl -H 'Accept: text/plain' 'https://nekoip.ru/api/v1/tools/subnet?network=10.0.0.0%2F24'

IPアドレス変換

IPv4/IPv6を圧縮、展開、整数、16進数、2進数形式の間で変換します。

/api/v1/tools/ip-converter?ip=2001%3Adb8%3A%3A1

curl -H 'Accept: application/json' 'https://nekoip.ru/api/v1/tools/ip-converter?ip=2001%3Adb8%3A%3A1'
curl -H 'Accept: text/plain' 'https://nekoip.ru/api/v1/tools/ip-converter?ip=2001%3Adb8%3A%3A1'

DNSレコード検索

NekoIPの検証リゾルバーでDNSを照会し、TTL、rcode、DNSSEC認証を表示します。

/api/v1/tools/dns?domain=example.com&type=A

curl -H 'Accept: application/json' 'https://nekoip.ru/api/v1/tools/dns?domain=example.com&type=A'
curl -H 'Accept: text/plain' 'https://nekoip.ru/api/v1/tools/dns?domain=example.com&type=A'

メールDNS・SPF確認

メールサーバーへ接続せず、MX、SPF、DMARC、DKIM、MTA-STS、TLS-RPT、BIMIを確認します。

/api/v1/tools/email-dns?domain=example.com

curl -H 'Accept: application/json' 'https://nekoip.ru/api/v1/tools/email-dns?domain=example.com'
curl -H 'Accept: text/plain' 'https://nekoip.ru/api/v1/tools/email-dns?domain=example.com'

PTR・FCrDNSを確認

IPのPTR名を検索し、元のアドレスへ正引きできるか確認します。

/api/v1/tools/reverse-dns?ip=8.8.8.8

curl -H 'Accept: application/json' 'https://nekoip.ru/api/v1/tools/reverse-dns?ip=8.8.8.8'
curl -H 'Accept: text/plain' 'https://nekoip.ru/api/v1/tools/reverse-dns?ip=8.8.8.8'

WHOIS・RDAP検索

ドメイン、IP、ASNの登録情報とEPPステータスの説明を表示します。

/api/v1/tools/whois-rdap?query=example.com

curl -H 'Accept: application/json' 'https://nekoip.ru/api/v1/tools/whois-rdap?query=example.com'
curl -H 'Accept: text/plain' 'https://nekoip.ru/api/v1/tools/whois-rdap?query=example.com'

受動的ドメイン分析

対象サイトへ接続せず、DNS、メール保護、登録情報、IDN、PTRをまとめます。

/api/v1/tools/domain-analysis?domain=example.com

curl -H 'Accept: application/json' 'https://nekoip.ru/api/v1/tools/domain-analysis?domain=example.com'
curl -H 'Accept: text/plain' 'https://nekoip.ru/api/v1/tools/domain-analysis?domain=example.com'