SoonOne MCP server, all 49 APIs as agent tools. See how it works

Reverse DNS, ASN ownership, and bogon detection for any IP

IP Intelligence API

The IP Intelligence API turns a bare IPv4 or IPv6 address into actionable intelligence with a single GET request. It resolves reverse DNS (PTR) records, identifies the owning network through the authoritative Team Cymru IP-to-ASN dataset, and flags private, reserved, and non-routable addresses inline.

Built entirely on the Cloudflare global edge, every lookup runs over DNS-over-HTTPS with sub-second latency from the nearest data center — no scraping, no stale databases, and no per-record licensing. It is ideal for fraud and abuse scoring, log enrichment, SIEM pipelines, and CDN/anycast attribution.

Free tier included, no credit card required. One key works across all 49 APIs.

At a glance
IP Versions
IPv4 + IPv6
Lookup Speed
<200ms
Uptime SLA
99.9%

Key features

  • Reverse DNS (PTR) resolution for any IPv4 or IPv6 address
  • ASN and AS name identification via the Team Cymru IP-to-ASN dataset
  • BGP prefix, RIR registry, and allocation date enrichment
  • Bogon detection for private, reserved, and non-routable ranges
  • Caller self-identification when the ip parameter is omitted
  • Full IPv6 support including compressed and IPv4-mapped forms
  • Clean, flat JSON responses with best-effort partial data

Built for

  • Fraud and abuse scoring
  • Log and SIEM enrichment
  • Allow/deny-list automation
  • ASN-based geo and network routing
  • CDN and anycast attribution
  • "What is my IP" widgets and client diagnostics
  • Threat intelligence pipelines
  • Network reconnaissance and auditing

Try it

Build the request for your data

Edit the parameters below and see the exact curl command and JSON response you will get. No key required to preview.

GET/ip-intelligence/v1/lookup
Open in Playground

Parameters

Request · HTTP
GET /ip-intelligence/v1/lookup?ip=8.8.8.8 HTTP/1.1
Host: api.apicodex.io
Response · JSON
200 OK
{
"ip": "8.8.8.8",
"version": 4,
"reverse_dns": ["dns.google"],
"asn": "15169",
"asn_name": "GOOGLE, US",
"bgp_prefix": "8.8.8.0/24",
"country_code": "US",
"registry": "arin",
"allocated_date": "1992-12-01",
"is_bogon": false
}

Documentation

IP Intelligence API Documentation

The IP Intelligence API resolves reverse DNS (PTR), ASN/network ownership via the Team Cymru IP-to-ASN service, and a bogon/private-range flag for any IPv4 or IPv6 address. Authentication is handled globally: send your API key in an X-Api-Key header, or pass it as the apikey query parameter.

Base URL

url
https://api.apicodex.io

Authentication

Send your API key in an X-Api-Key header, or pass it as the apikey query parameter (?apikey=YOUR_KEY):

headers
{
"X-Api-Key": "YOUR_API_KEY"
}

Request and response

Illustrative values. Confirm current endpoint behavior, quotas, and data freshness in the API documentation before production use.

request · http
GET /ip-intelligence/v1/lookup?ip=8.8.8.8 HTTP/1.1
response · json
{
"ip": "8.8.8.8",
"version": 4,
"reverse_dns": ["dns.google"],
"asn": "15169",
"asn_name": "GOOGLE, US",
"bgp_prefix": "8.8.8.0/24",
"country_code": "US",
"registry": "arin",
"allocated_date": "1992-12-01",
"is_bogon": false
}

Code examples

cURL
curl --request GET \
  --url 'https://api.apicodex.io/ip-intelligence/v1/lookup?ip=8.8.8.8&apikey=YOUR_KEY'

Endpoints

GET /ip-intelligence/v1/lookup

Look up reverse DNS, ASN/network info, and bogon status for an IP. If ip is omitted, the caller's own IP (CF-Connecting-IP) is used.

/ip-intelligence/v1/lookup?ip=8.8.8.8

GET /ip-intelligence/health

Health check. Returns a simple OK message and requires no authentication.

/ip-intelligence/health

Query Parameters

Optional parameters

  • ip The IPv4 or IPv6 address to look up. If omitted, the caller's own IP (CF-Connecting-IP) is used. Returns 400 if omitted and that header is unavailable.
  • apikey Your API key, passed as a query parameter. Optional if you send it in an X-Api-Key header instead.

Pricing

IP Intelligence API Pricing

One key, one subscription, all 49 APIs. Start free and upgrade when you grow. No minimums, no lock-in.

This API costs 5 credits per request. Credits are shared across every API on your plan.

Estimate your monthly cost

Drag the slider to match your expected request volume. We will recommend the cheapest plan that covers it.

10,000

Recommended plan

Starter

$29.99 /month

Credits used50,000
Credits included50,000
Cost per 1K requests$2.999
Choose Starter

Free

Free
1,000 credits · ~200 requests/mo · 2 rps
  • All 49 APIs included
  • No credit card required
  • Full documentation and examples
Start for free

Starter

Popular
$29.99/month
50,000 credits · ~10,000 requests/mo · 10 rps
  • All 49 APIs included
  • Email support
  • Usage dashboard and analytics
Start with Starter

Pro

$99.99/month
250,000 credits · ~50,000 requests/mo · 25 rps
  • All 49 APIs included
  • Priority support
  • Up to 5 API keys
Start with Pro

Need a different plan?

Tell us about your API, volume, or support requirements.

Contact us

Coming soon · MCP

Use the IP Intelligence API from your AI agent

The API Codex MCP server will expose this API, and the other 39, to Claude, Cursor and any MCP client as tools. Same key, same credits, one config entry.

About the MCP server

FAQ

Frequently asked questions

For any IPv4 or IPv6 address the API returns a flat JSON object containing the normalized ip, its version (4 or 6), an array of reverse DNS (PTR) hostnames, the origin asn and asn_name, the covering bgp_prefix, the country_code, the RIR registry, the prefix allocated_date, and an is_bogon flag indicating whether the address is private, reserved, or non-routable. Network fields are null for bogon addresses.

Yes. The API fully supports both IPv4 and IPv6, including compressed IPv6 notation and IPv4-mapped IPv6 addresses. The response includes a version field set to 4 or 6 so you can branch your logic accordingly. Reverse DNS, ASN lookups, and bogon detection all work identically across both address families.

If you omit the ip query parameter, the API falls back to the caller's own IP using Cloudflare's CF-Connecting-IP header. This is ideal for building "what's my IP" widgets and client diagnostics. If that header is unavailable — for example during local development — and no ip is supplied, the API returns a 400 error indicating that no IP could be determined.

A bogon is an IP address that should never appear on the public internet, including private RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback, link-local, and other reserved blocks. When an address falls into one of these ranges the API sets is_bogon to true and returns null for the ASN, BGP prefix, registry, and country fields, since there is no public network ownership to report.

ASN, AS name, BGP prefix, RIR registry, and allocation date are sourced from the authoritative Team Cymru IP-to-ASN service, queried in real time over DNS-over-HTTPS from the Cloudflare edge. This means there are no stale local databases to maintain and no third-party API keys to manage — the data reflects the current global routing table.

The IP Intelligence API runs entirely on the Cloudflare global edge across 300+ locations, so every lookup is resolved from the data center nearest to your request. Typical responses complete in under 200ms. Because lookups run over DNS-over-HTTPS rather than scraping or querying a centralized database, latency stays low and consistent even under high concurrency.

Typical uses include enriching server logs and SIEM pipelines, fraud and abuse scoring, allow/deny-list automation, and CDN/anycast attribution. The clean, flat JSON response is easy to parse and join against your event data, and the bogon flag lets you immediately filter out internal traffic. Each lookup costs 5 credits, so the Pro plan ($99.99/month, 250,000 credits) covers up to 50,000 lookups per month for high-volume security workloads.