Learn R Programming

rgeolocate (version 0.5.0)

db_ip: Geolocate IP Addresses Through db-ip.com

Description

ip_api consumes a vector of IP addresses and geolocates them via https://db-ip.com/{db-ip.com}. See `Details` for more information.

Usage

db_ip(ip_addresses, key)

Arguments

ip_addresses
a character vector of IP addresses.
key
a db-ip.com API key.

Value

  • a list of lists, each containing the geolocated values for one IP address. The variables found depend on the level of access your API key has; see the http://db-ip.com/api/#key{API documentation} for more information.

Details

http://db-ip.com/{db-ip.com} provides IP geolocation, either for free (with a cap of 2,500 requests a day) or in various paid tiers.

To use the service, register there for an API key, and plug that key and the IP addresses into db_ip

Examples

Run this code
db_ip(ip_addresses = "173.194.67.1", key = "ThisIsNotARealKey")

Run the code above in your browser using DataLab