An Elixir library to find geographic location information from IP addresses, hostnames, or Plug.Conn structs.
GeoIP is an Elixir library that retrieves geographic location information—such as city, country, coordinates, and time zone—from IP addresses, hostnames, or Plug.Conn structs. It solves the problem of integrating geolocation data into Elixir applications by providing a unified interface to multiple external providers with built-in caching.
Elixir developers building web applications or services that require IP-based geolocation, such as analytics platforms, content localization tools, or security features.
Developers choose GeoIP for its simplicity, multi-provider flexibility, and out-of-the-box caching, which reduces API overhead and simplifies testing with a dedicated mock provider.
Elixir library to find geo location information given an IP address, hostname or Plug.Conn
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports freegeoip, ipstack, ipinfo, and IP2Location.io, allowing developers to switch providers based on cost, features, or reliability needs.
Default one-hour cache with configurable TTL reduces API calls and improves performance, as explicitly stated in the README.
Includes a dedicated test provider for mocking lookup data, simplifying development and testing without external dependencies.
Accepts IP addresses as strings or tuples, hostnames, or Plug.Conn structs, making it versatile for various Elixir web application scenarios.
As noted in the README, providers like ipinfo and IP2Location.io do not support lookups by hostname, restricting functionality for domain-based inputs.
For ipstack's free tier, HTTPS is not allowed, requiring insecure HTTP calls which may not meet compliance standards for production environments.
Relies on third-party services that can introduce latency, rate limits, or downtime risks, as highlighted by the caching mechanism to mitigate frequent calls.