canonical: https://jentic.com/apis/ip2location.com/ip2location

# IP2Location IP Geolocation

IP2Location IP Geolocation is a hosted service that performs reverse lookups on an IPv4 or IPv6 address and returns the country, region, city, latitude and longitude, ZIP or postal code, time zone, ISP, domain name, connection type, mobile carrier, ASN, weather station, elevation, and usage type. The single-endpoint surface is keyed by an API key and accepts a 'package' parameter that selects how many fields are returned, from a basic country lookup through to a full geolocation profile. It is a long-standing alternative to MaxMind for teams that want a simple HTTPS lookup over a managed dataset.

## For AI agents

Resolve any IP address to country, city, ISP, time zone, ASN, and usage type so an agent can enrich logs or apply geo and risk rules.

## Scope

Does not handle proxy or VPN detection, domain WHOIS, or threat intelligence - use for IP geolocation lookups only.

## Capabilities

- Resolve any IPv4 or IPv6 address to country, region, city, and postal code
- Return ISP, domain, ASN, and connection type for an IP address
- Look up the time zone offset and observed daylight-saving rules for an IP
- Return the usage type that classifies an IP as residential, mobile, hosting, or other
- Select the response shape via the package parameter to control cost and payload size
- Look up mobile carrier, MCC, and MNC for IPs that resolve to a cellular network

## Use cases

### Compliance and Geo-Restriction

Compliance teams can call the lookup with a smaller package size to confirm visitor country and apply jurisdiction rules at the edge, then call the larger package only when the basic check is ambiguous. The package selector keeps the cost and payload aligned with the actual decision being made.

Example prompt: Look up the country code for a visitor IP using the WS1 package and return whether the country sits inside the EU.

### Log Enrichment for Analytics

Analytics pipelines can batch IPs from access logs, call the lookup once per IP with a richer package such as WS24 to add ISP, ASN, and usage type, and then aggregate the result into per-region dashboards. The single-endpoint design keeps the integration small.

Example prompt: For each unique IP in a log file, call IP2Location with package WS24 and write the country, ISP, and usage type back to the row.

### Trust and Safety Triage

Risk teams can use the usage type field to flag traffic from hosting providers or commercial VPN ASNs, then escalate accounts whose recent logins shift between mobile carrier and hosting in short windows. IP2Location returns the ASN and usage type in the same response so triage stays a single API call.

Example prompt: Look up an IP and return a risk verdict if usage type is 'DCH' (data center) or the ASN matches a known commercial VPN provider.

### Agent-Driven IP Enrichment

An AI agent connected via Jentic can enrich a list of suspect IPs with country, city, ISP, ASN, and usage type by issuing one search query through Jentic. The agent does not need to remember the package codes; Jentic surfaces the right input schema with the package parameter described.

Example prompt: For each IP in a list of 25, call IP2Location with package WS25 via Jentic and return a JSON summary keyed by IP.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | / | Reverse IP lookup with package-controlled response |

## Key resources

- **Lookup** — Single-endpoint reverse IP lookup with package-controlled response shape.

## Why Jentic

- **Setup:** Wiring IP2Location by hand means registering for a key, appending it as the 'key' query parameter on every call to api.ip2location.com, and picking the right package and add-on codes to shape each response. Through Jentic you install once, import IP2Location IP Geolocation from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** IP2Location exposes a single read-only geolocation lookup where the target IP travels as a query parameter, so scope the agent to the operations it needs, such as geolocating an IP. It stays a lookup client and cannot reach anything beyond the operations you allow.
- **Credential handling:** Your IP2Location API key is stored once, encrypted, by your own Jentic One instance and injected as the 'key' query parameter at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'geolocate an IP' or 'look up ASN for an address', and Jentic returns the IP2Location operation with its input schema, including the package parameter, so the agent picks the right response shape without browsing the reference docs.

## Related APIs

- **IP2Location.io** — IP2Location.io is the modern hosted variant from the same vendor with a JSON-first response and proxy detection.
- **ip-api** — ip-api offers a free, no-key geolocation tier that covers the basic country, city, and ISP fields.
- **IP2Proxy** — IP2Proxy adds anonymous proxy, VPN, and TOR detection that the geolocation API does not surface.

## FAQ

### What authentication does the IP2Location IP Geolocation API use?

The endpoint accepts an API key as a query parameter named 'key'. Through Jentic the key is held in the encrypted vault and appended at execution time so the raw key does not reach the agent context.

### Can I look up an IP and choose how much data is returned?

Yes. The 'package' query parameter selects the response shape, from WS1 (country only) up to richer packages that add ISP, ASN, usage type, weather, and mobile carrier. Choose the smallest package that answers the question to keep cost and payload down.

### Does the IP2Location API support IPv6?

Yes. The same endpoint accepts IPv4 and IPv6 addresses; the response fields are the same shape for both, so an agent does not need to branch on the address family.

### What are the rate limits for the IP2Location IP Geolocation API?

Throughput is governed by the credit balance on the API key rather than a per-minute rate limit; each lookup consumes credits scaled by the chosen package. Usage and remaining credits are visible in the IP2Location account dashboard.

### How do I geolocate an IP through Jentic?

Search Jentic for 'geolocate an IP with IP2Location', load the schema for GET /, and execute with the ip and package parameters. Run pip install jentic, then await client.search, await client.load, await client.execute.

### What does usage type tell me about an IP?

Usage type classifies the IP into categories such as residential (RES), commercial (COM), data center (DCH), mobile (MOB), and education (EDU), which is useful for risk and abuse triage. Pick a package that includes the usage_type field when this matters.

### Can I limit what my agent is allowed to do with the IP2Location IP Geolocation API?

Yes. Jentic One is self-hosted by you, so your own rules decide which operations and credentials the agent may use. IP2Location IP Geolocation exposes a single read-only lookup that resolves an IP to country, city, ISP, ASN, and usage type, so you can allow the agent only that geolocation operation and nothing else. Because the target IP travels as a query parameter on that one call, the agent stays a lookup client and cannot reach anything beyond the operation you permit.
