ipgeo: Query the 'IPGeolocation.io IP Location API'

View source: R/ipgeo.R

ipgeoR Documentation

Query the 'IPGeolocation.io IP Location API'

Description

Queries the 'IPGeolocation.io IP Location API' (<https://ipgeolocation.io/documentation/ip-location-api.html>) to retrieve IP geolocation and related network intelligence data.

Usage

ipgeo(ip, api_key, fields = NULL, excludes = NULL, include = NULL)

Arguments

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").

Details

Supports response filtering using 'fields' and 'excludes' parameters (dot notation supported), and optional objects using the 'include' parameter.

Value

A list containing the parsed API response.

Examples

api_key <- Sys.getenv("IPGEOLOCATION_API_KEY")

if (nzchar(api_key)) {
  result <- ipgeo("8.8.8.8", api_key)
  str(result)
}


ipgeolocation documentation built on April 7, 2026, 9:08 a.m.