--- id: ipinfo version: "5.6.0" license: Apache License 2.0 license_treatment: permissive maintenance: active --- # ipinfo — Official Python library for IPInfo License: permissive · Maintenance: active · Downloads: 498.5K/mo ## What it is and what it does IPinfo is the official Python client for the IPinfo.io IP address API. It lets you look up geolocation (city, region, country, coordinates), ASN details (ISP, domain, network type), company information (business name and domain), and carrier data for any IP address. The library supports multiple API tiers—Lite, Core, Plus, and Residential Proxy—each returning different levels of detail. It provides both synchronous handlers (using requests) and asynchronous handlers (using aiohttp), so you can integrate it into blocking or async codebases. The package depends on aiohttp, cachetools, and requests. It requires Python 3.10 or later and an IPinfo API token to function. The free tier allows 50,000 requests per month and omits some premium fields like IP type and company data; paid plans unlock higher volumes and complete data. Most use cases involve a single handler instantiation per application, then calling getDetails() with an IP address or no argument to query the caller's own IP. Use it for: - Geolocate user traffic by IP to serve region-specific content or detect suspicious access patterns. - Enrich logs or analytics with ASN and company data to identify traffic sources and network operators. - Detect mobile carriers or privacy proxies using the Plus API for fraud prevention or access control. - Build IP reputation or abuse-tracking systems by querying abuse contact and hosting provider details. - Integrate IP geolocation into async web services without blocking the event loop. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Queries the IPinfo.io API to retrieve geolocation, ASN, company, and carrier details for IP addresses, with support for both synchronous and asynchronous requests. Yes, if you need IP geolocation and ASN data. The library is actively maintained, has no known vulnerabilities, installs cleanly, and is the official client for a widely-used API. The main constraint is the Python 3.10+ requirement and the need for an API token (though a free tier exists). Install it if your project targets modern Python and you're comfortable with an external API dependency. ## Install pip install ipinfo uv add ipinfo poetry add ipinfo ## Installing ipinfo Before you install: Low install friction with a pure Python wheel. Actively maintained with recent commits and no known vulnerabilities. Requires Python 3.10 or later, which may constrain older projects. License in practice: Licensed under Apache License 2.0, a permissive license allowing commercial and private use with minimal restrictions. Quickstart: pip install ipinfo import ipinfo handler = ipinfo.getHandler(access_token='your_token') details = handler.getDetails('8.8.8.8') print(details.city, details.country) Requires an IPinfo API access token (free account available at ipinfo.io/signup); free tier limited to 50,000 requests per month. Verify before relying: - Whether the async implementation's stated Python 3.9 and 3.10 support conflicts with the package's requires_python >=3.10 constraint. - Performance characteristics and rate-limiting behavior under high request volumes. - Caching behavior and whether cachetools integration is automatic or requires explicit configuration. ## Package facts - License: Apache License 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 498.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags IP geolocation lookup, IP address details API, ASN and ISP information, IP location data, geoip python library, IP company information, carrier detection API, geolocation, ip-lookup, async-support [View on SkillFed](https://skillfed.io/packages/ipinfo) · [View on PyPI](https://pypi.org/project/ipinfo/)