IP API Playground

Interactive testing environment for our IP geolocation, DNS lookup, and network APIs. Test endpoints, generate code examples, and integrate our APIs into your applications.

API Endpoint

Custom Headers

No custom headers added

Status:

Code Examples

🚀 API Playground Features

Interactive Testing - Test all API endpoints with custom parameters

Code Generation - Get code examples in multiple programming languages

Response Analysis - View headers, status codes, and response times

Request History - Track your API calls and replay previous requests

Custom Headers - Add authentication or custom headers to requests

Available APIs

🌍 IP Geolocation

Get geographic location data for any IP address with accuracy indicators.

🔍 IP Lookup

Detailed IP information including ISP, ASN, and network details.

🔄 Reverse DNS

Find domain names associated with IP addresses.

🌐 ASN Information

Autonomous System Number details and network routing information.

Playground Features

⚡ Real-time Testing

Test API endpoints instantly with custom parameters and headers.

💻 Code Generation

Auto-generate code examples in multiple programming languages.

📊 Response Analysis

View response headers, status codes, and response times.

📝 Request History

Track and replay your API calls for testing and development.

Common Use Cases

🎯 Fraud Detection

Use IP geolocation to detect suspicious activity:

  • Verify user location
  • Detect proxy/VPN usage
  • Flag unusual login patterns
  • Validate transaction origins

🌐 Content Personalization

Customize content based on location:

  • Show relevant language
  • Display local currency
  • Provide regional content
  • Optimize CDN routing

📊 Analytics & Insights

Gather visitor intelligence:

  • Track visitor demographics
  • Analyze traffic patterns
  • Monitor attack sources
  • Optimize infrastructure

Quick Start Examples

JavaScript (Fetch API)

// Get IP information
const response = await fetch('https://whatismyip.io/api/ip-lookup?ip=8.8.8.8');
const data = await response.json();

console.log(data.country); // "United States"
console.log(data.isp);     // "Google LLC"
console.log(data.city);    // "Mountain View"

Python (Requests)

import requests

# Get geolocation data
url = "https://whatismyip.io/api/geolocation?ip=203.0.113.1"
response = requests.get(url)
data = response.json()

print(f"Location: {data['city']}, {data['region']}")
print(f"Coordinates: {data['latitude']}, {data['longitude']}")

cURL

# Test reverse DNS lookup
curl -X GET "https://whatismyip.io/api/reverse-dns?ip=8.8.8.8" \
     -H "Accept: application/json" \
     -H "User-Agent: MyApp/1.0"

# Response: {"ip":"8.8.8.8","hostname":"dns.google","verified":true}

API Endpoints Reference

EndpointMethodParametersRate Limit
/api/ip-lookupGETip (required)1000/hour
/api/geolocationGETip (required), accuracy2000/hour
/api/reverse-dnsGETip (required)500/hour
/api/asn-lookupGETasn (required)1000/hour

Frequently Asked Questions

What is an API playground?

An API playground is an interactive testing environment where you can explore and test API endpoints, view responses, and generate code examples without writing any code first.

Which APIs can I test in the playground?

You can test our IP lookup, geolocation, reverse DNS, ASN lookup, and other network-related APIs. Each endpoint provides detailed information and examples.

Do I need an API key to use the playground?

No API key is required for basic testing in the playground. However, production usage and higher rate limits require an API key.

What programming languages are supported?

The playground generates code examples in cURL, JavaScript, Python, PHP, and Node.js. More languages may be added based on demand.

Can I save my API requests?

Yes! The playground maintains a request history so you can replay previous API calls and compare results over time.

How do I integrate these APIs into my application?

Use the generated code examples as a starting point. For production use, sign up for an API key and follow our documentation for authentication and best practices.