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.
- 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.
Parameters
GET /ip-intelligence/v1/lookup?ip=8.8.8.8 HTTP/1.1
Host: api.apicodex.io
{
"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
https://api.apicodex.ioAuthentication
Send your API key in an X-Api-Key header, or pass it as the apikey query parameter (?apikey=YOUR_KEY):
{
"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.
GET /ip-intelligence/v1/lookup?ip=8.8.8.8 HTTP/1.1{
"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 --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.8GET /ip-intelligence/health
Health check. Returns a simple OK message and requires no authentication.
/ip-intelligence/healthQuery Parameters
Optional parameters
ipThe 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.apikeyYour 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.
Recommended plan
Starter
$29.99 /month
Free
- All 49 APIs included
- No credit card required
- Full documentation and examples
Starter
Popular- All 49 APIs included
- Email support
- Usage dashboard and analytics
Pro
- All 49 APIs included
- Priority support
- Up to 5 API keys
Need a different plan?
Tell us about your API, volume, or support requirements.
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.
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.
Keep building
Related APIs
Query forward and reverse DNS records for A, AAAA, MX, TXT, SOA, NS, PTR and more with structured JSON responses.
Retrieve domain registration information, ownership details, registrar data, and expiration dates for any domain.
Analyze SPF, DKIM, and DMARC records to optimize email domain configurations and improve deliverability.