{ipapi.r} is an R package designed to retrieve and analyze information about IP addresses with IPQuery API.
It provides tools to query IP-related metadata, such as geolocation, ISP details, and more, making it ideal for developers and data scientists working with IP-based insights.
- Retrieve geolocation details for any IP address.
- Identify ISP and organization information.
- Support for querying single or multiple IP addresses.
- Easy integration with public IP lookup APIs.
- Compatible with {httr2} for modern and secure HTTP requests.
To install the development version from GitHub:
# install.packages("pak")
pak::pak("jahnen/ipapi.r")
CRAN, R-universe will be available soon.
Querying an IP Address Retrieve metadata for a single IP address:
library(ipapi.r)
# Getting Your Own IP
IPQuery()
# Query Own IP
IPQuery("self")
# Query details for a specific IP
IPQuery("1.1.1.1")
# Querying Multiple IPs
IPQuery(c("1.1.1.1", "2.2.2.2"))
Contributions are welcome! To contribute:
- Fork this repository.
- Create a feature branch (git checkout -b feature/your-feature-name).
- Commit your changes (git commit -am 'Add a new feature').
- Push to the branch (git push origin feature/your-feature-name).
- Create a pull request. Please ensure all changes are tested and documented before submitting.
If you encounter any issues, please report them on the GitHub Issues page.
This package is licensed under the MIT License. See the LICENSE file for details.
This package was inspired by IPQuery project.