IP API Demo
This demo uses a test API key to show how the IP to Location API works.
API Test
Testing the IP API
No data available
API Response
Sample JSON response from the API
Click "Refresh Data" in the widget to see the API response
How to Use the API
Simple examples of how to call the API
HTTP Request
GET https://iptolocation.vercel.app/api/ip?apiKey=YOUR_API_KEYJavaScript Example
fetch('https://iptolocation.vercel.app/api/ip?apiKey=YOUR_API_KEY')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));Enhanced Response Format
{
"ip": "8.8.8.8",
"country": "United States",
"country_code": "US",
"country_code_iso3": "USA",
"country_capital": "Washington, D.C.",
"country_tld": ".us",
"continent_code": "NA",
"in_eu": false,
"postal": "94043",
"latitude": 37.4056,
"longitude": -122.0775,
"timezone": "America/Los_Angeles",
"utc_offset": "-0800",
"country_calling_code": "+1",
"currency": "USD",
"currency_name": "Dollar",
"languages": "en-US",
"country_area": 9833517,
"country_population": 331002651,
"region": "California",
"region_code": "CA",
"city": "Mountain View",
"asn": "AS15169",
"org": "Google LLC",
"timestamp": "2025-03-07T18:50:16.000Z"
}