IP Lookup Endpoint
This endpoint retrieves detailed information about an IP address. To use it, you must have a valid API Key and Access Token.
https://yourdomain.com/wp-ajax.php?action=cf_geoplugin_lookup
Parameters
Accepts GET or POST requests:
Parameter | Type | Required | Description |
---|---|---|---|
action | string | yes | Must always be set to cf_geoplugin_lookup. |
api_key | string | yes | Your API key. |
access_token | string | yes | Generated access token. |
ip | string | yes | Target IP address to look up. |
base_currency | string | no | Base currency for conversion by geolocation. Default: USD. |
Example JSON Response
{ "ip": "217.138.192.36", "ip_version": 4, "ip_dns": "", "ip_dns_host": "", "ip_dns_provider": "", "ip_number": "3649749028", "country_code": "GB", "country": "Great Britain", "region": "England", "region_code": "", "state": "England", "city": "United Kingdom", "continent": "Europe", "continent_code": "EU", "address": "United Kingdom, England, Great Britain", "area_code": "", "dma_code": "", "latitude": 51.508529663086, "longitude": -0.12574000656605, "timezone": "Europe/Zurich", "locale": "en_GB,ga_GB,cy_GB,gd_GB,kw_GB", "timezoneName": "Europe/Zurich", "currency": "GBP", "currency_symbol": "£", "base_currency": "USD", "base_currency_symbol": "$", "currency_converter": 0.7684, "host": "wpgeocontroller.com", "ip_host": "176.9.103.101", "timestamp": 1580843778, "timestamp_readable": "Tue, 04 Feb 2020 19:16:27 +0000", "current_time": "19:44:20", "current_date": "February 4, 2020", "is_vat": 1, "in_eu": 1, "gps": 0, "accuracy_radius": "200km", "runtime": 0.28025, "error": false, "error_message": "", "code": 206 }
You can integrate this JSON output into any external application.
Tip: For better performance, make the call once and store the result in a temporary session or cache that expires after a few minutes.