The IP Address Geolocation API provided by GuguData offers a powerful and efficient way to retrieve geographical information for any IP address. Whether you're working with IPv4 or IPv6, this API enables you to quickly identify the user's country, state, city, and coordinates (latitude and longitude).
This is an essential tool for developers who need reliable location data for applications involving fraud detection, content localization, user behavior analysis, or network diagnostics.
๐ Try the Demo
๐ Key Features
- โ Supports both IPv4 and IPv6 formats
- ๐ Returns detailed location data: Country, State/Province, City, Latitude, Longitude
- โก Real-time results with ultra-fast API response
- ๐ Full HTTPS support, including TLS v1.0โv1.3 and Apple ATS compatibility
- ๐ Globally distributed CDN nodes ensure low latency and high availability
- ๐ Perfect for:
- Fraud detection and risk analysis
- Content and language localization
- Regional user analytics
- Network performance monitoring
๐ง API Endpoint
-
Base URL:
https://api.gugudata.io/v1/location/ip -
Method:
GET -
Authorization: Requires
appkey(available from your GuguData developer dashboard)
๐ฅ Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
appkey |
string | Yes | Your API key from GuguData |
ip |
string | Yes | The IP address to lookup (IPv4 or IPv6, e.g., 8.8.8.8, 2001:db8::) |
๐ค Response Format
The API returns a structured JSON object. Below are key response fields:
Metadata (under dataStatus)
| Field | Type | Description |
|---|---|---|
requestParameter |
string | Echo of the request |
statusCode |
integer | HTTP response code |
status |
string | Status result (e.g., "OK") |
statusDescription |
string | Human-readable status message |
responseDateTime |
string | Timestamp of the response |
dataTotalCount |
integer | Number of results (usually 1) |
Geolocation Data (under data)
| Field | Type | Description |
|---|---|---|
countryCode |
string | ISO country code (e.g., "US", "CN") |
state |
string | State or province |
city |
string | City name |
latitude |
number | Latitude coordinate |
longitude |
number | Longitude coordinate |
โ ๏ธ Error Codes
| Code | Meaning | Description |
|---|---|---|
| 200 | Success | Geolocation data retrieved successfully |
| 400 | Parameter Error | Invalid IP format or missing parameters |
| 402 | Invalid APPKEY | Check if your API key is valid |
| 403 | Account in Arrears | Your account needs reactivation |
| 429 | Too Many Requests | Rate limited: max 100 requests/sec |
| 500 | Internal Server Error | Service failed to process request |
| 503 | Service Unavailable | Temporary outage or maintenance |
๐งฉ Use Cases
โ Fraud Detection
Compare user IP with declared region to detect suspicious behavior.
๐ Content Localization
Customize site language or layout based on user location.
๐ Marketing & Analytics
Group users by region to tailor campaigns and reports.
๐ก๏ธ Access Control
Restrict content availability by country or region.
๐ผ๏ธ API Preview
๐ Related APIs
Looking for more data APIs? Visit the GuguData API Marketplace for a full list of tools for data analysis, content moderation, and location intelligence.

Top comments (0)