Skip to main content

IP Intelligence quickstart

The AntAPI IP Intelligence API (ip) inspects IPv4 and IPv6 addresses using self-hosted open datasets—combining deterministic RFC scope classification, BGP ASN routing ranges (IPtoASN), city-level geolocation (DB-IP Lite), official cloud/CDN/crawler/Tor feeds, and optional live reverse DNS PTR lookups.

  • Free browser tool: IP Address & ASN Lookup
  • HTTP endpoints:
    • POST https://api.antapi.dev/ip/v1/lookup (single IP, billed per request)
    • POST https://api.antapi.dev/ip/v1/batch (1–100 IPs, deduplicated and billed per unique IP)
  • Online MCP tools: ip_lookup (scope ip:lookup) and ip_batch (scope ip:batch)

1. Prerequisites​

  1. Create a project and copy a server-side API key from API keys & authentication.
  2. Ensure your organization has an active USD balance (new verified accounts receive $2 in permanent credit).

2. Look up a single IP address​

Send a JSON request with ip (IPv4 or IPv6) and optional include_ptr (defaults to false; set true to run a bounded live reverse DNS PTR lookup for public IPs):

curl -sS "https://api.antapi.dev/ip/v1/lookup" \
-H "Authorization: Bearer $ANTAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"ip":"1.1.1.1","include_ptr":true}'

Key response fields​

  • ip, version, scope, is_public, is_bogon: Canonical address normalization and RFC scope classification (public, private, loopback, cgnat, link_local, multicast, documentation, unspecified, reserved).
  • flags: Structured boolean flags for RFC address classes plus infrastructure signals (is_hosting, is_cdn, is_bot, is_tor_exit).
  • asn: BGP Autonomous System Number, organization description, country code, range boundaries, and exact CIDR prefix from IPtoASN (PDDL).
  • geo: Estimated country_code, country_name, continent_code, region, city, and approximate coordinates from DB-IP City Lite (CC BY 4.0), with automatic country-level fallback when city data is unavailable.
  • network: Sorted tags, cloud_provider, cloud_service, cloud_region, official crawler bot_name, and is_tor_exit.
  • reverse_dns: Always includes canonical arpa_name; when include_ptr is true for a public IP, returns status and resolved hostnames.
  • sources: Per-dataset readiness flags, refresh timestamps, and required DB-IP attribution string.

3. Batch look up up to 100 IP addresses​

Submit up to 100 IPv4 or IPv6 addresses in a single synchronous request. Duplicate addresses (including IPv4-mapped IPv6 forms like ::ffff:1.1.1.1) are normalized once and billed per unique IP returned:

curl -sS "https://api.antapi.dev/ip/v1/batch" \
-H "Authorization: Bearer $ANTAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"ips":["1.1.1.1","8.8.8.8","2606:4700:4700::1111"]}'

4. Use from an AI agent via MCP​

Connect your MCP client to https://api.antapi.dev/mcp following the MCP setup guide, approve ip:lookup or ip:batch, and ask your agent:

Look up 1.1.1.1 and tell me its ASN, organization, geolocation, and whether it belongs to a cloud provider, CDN, bot, or Tor exit node.

5. Attribution & billing rules​

  • Per-request & per-item billing: POST /ip/v1/lookup bills 1 request per valid IP lookup (including private/bogon classification results). POST /ip/v1/batch bills 1 unit per unique IP returned. Invalid input (400) is not charged.
  • Open data attribution: City-level geolocation includes data from DB-IP under CC BY 4.0 (IP Geolocation by DB-IP). BGP ASN data is sourced from IPtoASN (PDDL v1.0).