IP Geolocation API
The IPify Geolocation API enables developers to retrieve geolocation data (country, city) and detect VPN or proxy usage for a given IP address. It is accessible via a simple HTTP GET request and supports a default API key for immediate integration.
Integration Overview
The IPify Geolocation API supports three integration points for country, country+city, and VPN/proxy detection lookups.
- getCountryGeolocation. Retrieves country-level geolocation data for an IP address.
- getCountryCityGeolocation. Retrieves both country and city-level geolocation data.
- getCountryCityVpnGeolocation. Retrieves country, city, and VPN/proxy detection information.
Detailed Integration Documentation
Country Geolocation
| Operation | getCountryGeolocation |
|---|---|
| Endpoint | GET /api/v2/country |
| Purpose | Retrieves country-level geolocation information for a specified IP address, or the caller’s IP if none is provided. |
| Parameters | Required: apiKey — API key for authentication. Optional: ipAddress — the IP to query (e.g. 8.8.8.8); if omitted, the caller’s IP is used. |
| Output | Successful: JSON with country-level geolocation data. Failure: error message (invalid API key or IP). |
| Workflow example | Send a GET request to /api/v2/country with apiKey and ipAddress, then parse the country information. |
Country and City Geolocation
| Operation | getCountryCityGeolocation |
|---|---|
| Endpoint | GET /api/v2/country,city |
| Purpose | Retrieves both country and city-level geolocation information for a specified IP or the caller’s IP. |
| Parameters | Required: apiKey. Optional: ipAddress. |
| Output | Successful: JSON with country and city-level data. Failure: error message. |
| Workflow example | Send a GET request to /api/v2/country,city with apiKey and ipAddress, then extract country and city. |
VPN / Proxy Detection
| Operation | getCountryCityVpnGeolocation |
|---|---|
| Endpoint | GET /api/v2/country,city,vpn |
| Purpose | Retrieves country, city, and VPN/proxy detection information for a specified IP or the caller’s IP. |
| Parameters | Required: apiKey. Optional: ipAddress. |
| Output | Successful: JSON with geolocation and VPN/proxy detection data. Failure: error message. |
| Workflow example | Send a GET request to /api/v2/country,city,vpn with apiKey and ipAddress, then flag VPN usage. |
Example Workflow: Geolocation & VPN Data
| Prepare request | Decide the level of detail needed (country, city, or VPN/proxy). |
|---|---|
| Query location | Use /api/v2/country,city with apiKey and ipAddress=8.8.8.8 for granular data. |
| Check VPN/proxy | Use /api/v2/country,city,vpn to identify VPN or proxy usage. |
| Store & monitor | Store the JSON response for display or flagging, and track API calls to stay within rate limits. |
Use Case
A cybersecurity analytics firm integrates the IPify Geolocation API on GCP to geolocate users and detect VPN or proxy activity. Using getCountryGeolocation, getCountryCityGeolocation, and getCountryCityVpnGeolocation (via geo.ipify.org/api/v2), the system captures IP metadata — location and anonymity signals — streamed into BigQuery for threat-intelligence modeling. Country and city metadata refine access controls, VPN detection flags suspicious traffic, and enriched JSON responses are archived in Cloud Storage for auditing and compliance.
For technical support, contact custom-connectors-support@isolutions.sa.