| ipgeo | R Documentation |
Queries the 'IPGeolocation.io IP Location API' (<https://ipgeolocation.io/documentation/ip-location-api.html>) to retrieve IP geolocation and related network intelligence data.
ipgeo(ip, api_key, fields = NULL, excludes = NULL, include = NULL)
ip |
A character string specifying the IP address. |
api_key |
A character string containing your API key. |
fields |
Optional character vector of fields to include. |
excludes |
Optional character vector of fields to exclude. |
include |
Optional character vector of additional objects (e.g., "security", "hostname", "geo_accuracy", "abuse", "user_agent"). |
Supports response filtering using 'fields' and 'excludes' parameters (dot notation supported), and optional objects using the 'include' parameter.
A list containing the parsed API response.
api_key <- Sys.getenv("IPGEOLOCATION_API_KEY")
if (nzchar(api_key)) {
result <- ipgeo("8.8.8.8", api_key)
str(result)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.