IP Address Utilities

Is Private Ip

Validates whether an IP address falls within private network ranges defined by RFC 1918. Use `/v1/ip/is-private` endpoint or access via MCP in Cursor and other AI coding assistants. Returns boolean result for IPv4 addresses like 192.168.1.1 (true) or 8.8.8.8 (false). Essential for network security validation and routing logic.

API Endpoint

GET /v1/ip/is-private

Code Examples

curl "https://tinyfn.io/v1/ip/is-private" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/ip/is-private', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/ip/is-private',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's ip address tools:

{
  "mcpServers": {
    "tinyfn-ip": {
      "url": "https://tinyfn.io/mcp/ip",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What IP ranges are considered private by RFC 1918?

10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are the private IPv4 ranges. The tool returns true for any address within these blocks.

How do I check private IP status in my MCP-enabled AI assistant?

Call the is-private-ip tool with any IPv4 address. Your AI agent gets deterministic validation instead of potentially incorrect assumptions about network ranges.

Does this tool work with IPv6 addresses?

No, this specifically validates IPv4 private ranges per RFC 1918. IPv6 has different private addressing schemes not covered by this tool.

What happens if I pass an invalid IP address format?

The tool validates input format and returns an error for malformed addresses like '999.999.999.999' or non-numeric strings.

Can I use this for firewall rule validation?

Yes, it's perfect for programmatically checking if source/destination IPs are internal before applying routing or security policies.

Try Is Private Ip Now

Get your free API key and start using Is Private Ip in seconds.

Get Free API Key