skillfed

ipinfo

Official Python library for IPInfo

ipinfo v5.6.0 498.5K downloads/30d#6,329 on PyPI567
Permissive license Apache License 2.0 Active released

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 on this page — 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

ipinfo on PyPI

pip

pip install ipinfo

uv

uv add ipinfo

poetry

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 the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — aiohttp, cachetools, requests
Maintenance actively maintained — 114 days since the last release
Last repo commit
First released
Downloads 498,514/month — #6,329 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ipinfo-5.6.0-py3-none-any.whl

Tags

IP geolocation lookupIP address details APIASN and ISP informationIP location datageoip python libraryIP company informationcarrier detection API
geolocationip-lookupasync-support

More Internet packages