Type: Package
Title: Client for the 'IPGeolocation.io IP Location API'
Version: 0.1.0
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.
License: MIT + file LICENSE
Encoding: UTF-8
Imports: httr2
Depends: R (≥ 4.1.0)
URL: https://github.com/devjfreaks/ipgeolocation-r
BugReports: https://github.com/devjfreaks/ipgeolocation-r/issues
RoxygenNote: 7.3.3
NeedsCompilation: no
Packaged: 2026-04-01 11:06:08 UTC; anwar
Author: Anwar Ahmed [aut, cre], IPGeolocation IO [cph]
Maintainer: Anwar Ahmed <anwar@jfreaks.com>
Repository: CRAN
Date/Publication: 2026-04-07 07:40:10 UTC

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