Home / Geolocation APIs / IP Geolocation API
IPBase

IP Geolocation API

Get accurate IP address geolocation data with country, city, timezone, currency, and ISP information. Support for both IPv4 and IPv6 addresses.

Example Response
{
  "ip": "1.1.1.1",
  "country_code": "AU",
  "country_name": "Australia",
  "city": "Sydney",
  "latitude": -33.8688,
  "longitude": 151.2093,
  "timezone": "Australia/Sydney",
  "currency": "AUD",
  "connection": {
    "isp": "Cloudflare Inc"
  }
}

Use Cases

Real-world applications of IP geolocation data

🌍

Content Localization

Automatically display content in the user's language and currency based on their location. Improve user experience with localized pricing and regional content.

🔒

Fraud Prevention

Detect suspicious login attempts and transactions from unusual locations. Implement geo-blocking and access controls to protect your platform.

📊

Analytics & Reporting

Understand your audience demographics with geographic analytics. Track visitor locations and generate detailed regional reports.

🎯

Targeted Advertising

Deliver location-specific ads and promotions. Increase conversion rates with geographically relevant marketing campaigns.

⚖️

Compliance & Restrictions

Enforce geographic restrictions and comply with regional regulations like GDPR. Implement geo-fencing for content distribution.

🕐

Timezone Detection

Automatically detect user timezones for scheduling and time-based features. Display times in the user's local timezone.

API Examples

Simple integration with your favorite programming language

cURL
Shell
curl "https://api.ipbase.com/v2/info?apikey=YOUR_API_KEY&ip=1.1.1.1"
JavaScript
Node.js
const response = await fetch(
  'https://api.ipbase.com/v2/info?apikey=YOUR_API_KEY'
);
const data = await response.json();
console.log(data.data);
Python
v3+
import requests

response = requests.get(
    'https://api.ipbase.com/v2/info',
    params={'apikey': 'YOUR_API_KEY'}
)
data = response.json()
print(data['data'])
PHP
7.4+
$response = file_get_contents(
    'https://api.ipbase.com/v2/info?apikey=YOUR_API_KEY'
);
$data = json_decode($response, true);
print_r($data['data']);

Available Integrations

Use IPBase with your favorite tools and platforms

API Marketplaces

Automation & Integration Platforms

⚙️
Zapier
Coming Soon
🔧
Make
Coming Soon
🔗
n8n
Coming Soon
🌊
Pipedream
Coming Soon

Ready to Get Started?

Start your free trial today. No credit card required.

Start Free Trial