API

Use these HTTP endpoints inside scripts, monitoring jobs, or custom clients. They mirror the data from the UI and are protected with reasonable rate limits.

/ip — Plain text IP

Returns only the detected client IP as text. Useful for shell scripts and health checks.

/ip

Rate limit: 120 per minute · 3000 per day

curl -s https://nekoip.ru/ip

/api/info — JSON payload

Returns details for the current or specified IP. Pass domain=example.com (or an encoded HTTP(S) URL) to receive every A and AAAA address with metadata.

/api/info

  • ip1.1.1.1 | 2001:db8::1
  • domainexample.com | https://example.com/path

Rate limit: 20 per minute

Requests with ip or domain are additionally limited to 5 lookups per 60 s per client IP; above that the API answers 429 with retry_after.

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

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

Respond with only the IPv4 or IPv6 address if available, or 204 when absent. Call the dedicated single-stack hostnames below — on the main domain a probe just mirrors the address of the current connection.

https://ipv4.nekoip.ru/api/ipv4-probe / https://ipv6.nekoip.ru/api/ipv6-probe

Rate limit: 60 per minute

curl -s https://ipv4.nekoip.ru/api/ipv4-probe
curl -s https://ipv6.nekoip.ru/api/ipv6-probe

/api/dns-leak-test — Resolver log

Supply the id parameter generated on the homepage widget to retrieve the resolver IPs that queried the DNS leak domain.

/api/dns-leak-test

  • ida1b2c3d4e5f6 (required)

Rate limit: 30 per minute

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

API v1 · Network tools

Instant IP calculations, passive DNS, email and registry diagnostics, plus an optional active connection test that sends traffic only to NekoIP.

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

Response envelope

Every v1 tool answers with the same JSON envelope: ok, data with the result, findings with severity-tagged notes, and meta with request_id, cached, stale, duration_ms, retrieved_at and sources. Add format=text (or Accept: text/plain) to receive the same data as flat “key: value” lines.

{
  "ok": true,
  "data": { "network": "10.0.0.0/24", "usable_addresses": 254 },
  "findings": [
    { "code": "network_valid", "severity": "ok", "message": "...", "details": {} }
  ],
  "meta": {
    "request_id": "57f47f834af86d2f",
    "cached": false,
    "stale": false,
    "duration_ms": 0,
    "retrieved_at": "2026-01-01T00:00:00+00:00",
    "sources": []
  }
}

Errors

Failures keep the same shape with ok=false and an error object: code is stable, message is human readable in English, and fields marks the invalid parameters. Typical statuses: 400 invalid input, 404 unknown or expired session, 429 rate limit exceeded, 503 the tool is disabled or its upstream source is unavailable.

{
  "ok": false,
  "error": {
    "code": "invalid_dns_name",
    "message": "Enter a fully-qualified DNS owner name.",
    "fields": { "domain": "invalid" }
  },
  "meta": { "request_id": "858db277f46d825b" }
}

Every /api/v1/tools/ response carries a RateLimit-Policy header; rate-limited endpoints also send RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. Exceeding a limit returns 429 with error.code=rate_limit_exceeded and a Retry-After header.

Subnet calculator and CIDR converter

Calculate IPv4 and IPv6 networks, summarize ranges, aggregate prefixes, split subnets and test address membership.

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

Parameters:

  • operationanalyze (default) | range | aggregate | contains | split
  • network10.0.0.0/24 (analyze, contains, split)
  • start10.0.0.1 (range)
  • end10.0.0.254 (range)
  • networks10.0.0.0/25,10.0.0.128/25 (aggregate)
  • ip10.0.0.15 (contains)
  • new_prefix26 (split)
  • formatjson (default) | text | csv

Rate limit: offline — no limit, the answer is computed locally without external queries

Response formats: application/json · text/plain · text/csv

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 address converter

Convert IPv4 and IPv6 between compressed, expanded, integer, hexadecimal and binary forms.

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

Parameters:

  • ip2001:db8::1 | 192.0.2.10 | 3221225994 (required)
  • formatjson (default) | text

Rate limit: offline — no limit, the answer is computed locally without external queries

Response formats: application/json · text/plain

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 record lookup

Query common DNS record types through NekoIP’s validating resolver and inspect TTL, rcode and DNSSEC authentication.

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

Parameters:

  • domainexample.com (required)
  • typeA (default) | AAAA | ALL | CAA | CNAME | DNSKEY | DS | HTTPS | MX | NS | PTR | SOA | SRV | SVCB | TLSA | TXT
  • formatjson (default) | text

Rate limit: 30;w=60, 300;w=3600

Response formats: application/json · text/plain

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'

Email DNS and SPF checker

Inspect MX, SPF, DMARC, DKIM, MTA-STS, TLS-RPT and BIMI without connecting to a mail server.

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

Parameters:

  • domainexample.com (required)
  • selectordefault | google | selector1
  • formatjson (default) | text

Rate limit: 30;w=60, 300;w=3600

Response formats: application/json · text/plain

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'

Email policy generator

Parses a DKIM record and builds SPF and DMARC records from a JSON body. Fully offline: NekoIP sends no DNS query for this endpoint.

POST /api/v1/tools/email-policy

Parameters:

  • operationparse_dkim | generate_spf | generate_dmarc (required)
  • recordv=DKIM1; k=rsa; p=... (parse_dkim)
  • ipv4["192.0.2.10"] (generate_spf)
  • ipv6["2001:db8::1"] (generate_spf)
  • includes["_spf.example.net"] (generate_spf)
  • policy~all | -all | ?all (generate_spf) · none | quarantine | reject (generate_dmarc)
  • pct100 (generate_dmarc)
  • ruamailto:dmarc@example.com (generate_dmarc)
  • subdomain_policynone | quarantine | reject (generate_dmarc)

Rate limit: offline — no limit, the answer is computed locally without external queries

Response formats: application/json

curl -X POST -H 'Content-Type: application/json' \
     -d '{"operation": "generate_spf", "ipv4": ["192.0.2.10"], "includes": ["_spf.example.net"], "policy": "~all"}' \
     'https://nekoip.ru/api/v1/tools/email-policy'

Check reverse DNS and FCrDNS

Find PTR names for an IP address and verify whether they resolve back to the original address.

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

Parameters:

  • ip8.8.8.8 | 2001:4860:4860::8888 (required)
  • formatjson (default) | text

Rate limit: 30;w=60, 300;w=3600

Response formats: application/json · text/plain

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 and RDAP lookup

Look up registration data for domains, IP addresses and autonomous system numbers, with readable EPP status explanations.

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

Parameters:

  • queryexample.com | 8.8.8.8 | AS15169 (required)
  • formatjson (default) | text

Rate limit: 10;w=60, 60;w=3600

Response formats: application/json · text/plain

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'

Passive domain analysis

Combine DNS, email security, registration, IDN and PTR data without contacting the domain’s website.

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

Parameters:

  • domainexample.com (required)
  • formatjson (default) | text

Rate limit: 5;w=60, 30;w=3600

Response formats: application/json · text/plain

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'

The /api/v1/tools/dns-resolver/sessions and /api/v1/tools/connection-quality/sessions endpoints power the browser widgets: they require a same-origin request, send no CORS headers, and are not part of the public API.