Package 'ipgeolocation'

Title: Client for the 'IPGeolocation.io IP Location API'
Description: Provides functions to query the 'IPGeolocation.io IP Location API' (<https://ipgeolocation.io/documentation/ip-location-api.html>). Supports retrieval of IP location, ASN, network, currency, timezone, abuse, and security data. Response filtering is supported using 'fields' and 'excludes' parameters (dot notation supported), and optional objects can be requested via the 'include' parameter. Returns parsed API responses as R objects.
Authors: Anwar Ahmed [aut, cre], IPGeolocation IO [cph]
Maintainer: Anwar Ahmed <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-05-18 09:50:49 UTC
Source: https://github.com/devjfreaks/ipgeolocation-r

Help Index


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)
}