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

# IPInfoDB API

IPInfoDB is a long-running free IP geolocation service that maps IPv4 and IPv6 addresses to country and city-level data. The v3 API exposes two endpoints - ip-city and ip-country - both authenticated with an API key passed as a query parameter and returning JSON or XML. Country lookups give country name, code, and continent, while city lookups add region, ZIP code, latitude, longitude, and time zone.

## For AI agents

Resolve any IPv4 or IPv6 address to country or city-level location data, including coordinates and time zone, using a free API key. Suited to lightweight enrichment where ASN and risk signals are not needed.

## Scope

Does not handle ASN lookups, VPN/proxy detection, or domain WHOIS - use for basic IP-to-location enrichment only.

## Capabilities

- Resolve an IP address to country name, country code, and continent in one call
- Geolocate an IP to city, region, postal code, latitude, longitude, and time zone
- Look up the requester's own IP location by omitting the ip parameter
- Choose between JSON, XML, or serialized PHP response formats per request
- Handle both IPv4 and IPv6 inputs through the same endpoints

## Use cases

### Free Country-Level Visitor Routing

Route website or app visitors to a regional landing page or content variant based on the country derived from their IP, without the cost of a paid geolocation provider. The ip-country endpoint returns country code and name in a single fast call, suitable for free tiers and low-volume sites. Integration takes under an hour for a typical web app.

Example prompt: Call GET /ip-country/ with the visitor IP and the key query parameter, then redirect to the appropriate country landing page based on countryCode.

### City-Level Time Zone Detection

Show times in the visitor's local time zone without asking for browser geolocation by mapping their IP through the ip-city endpoint, which returns the timeZone offset alongside city and coordinates. Useful for scheduling tools, SaaS dashboards, and email send-time optimization.

Example prompt: Call GET /ip-city/ for the user's IP, parse timeZone from the response, and convert all timestamps in the UI to that offset.

### Coordinate Enrichment for Analytics

Append latitude and longitude to event records as they arrive in an analytics pipeline, enabling map visualizations and proximity queries without sending raw IPs downstream. ip-city returns numeric coordinates as part of every response and works on a free key for low to medium volume.

Example prompt: For each new event in the queue, call GET /ip-city/ with the source IP and write latitude and longitude into the event row before flushing to the warehouse.

### Agent Geolocation via Jentic

Agents that need a quick country or city for an IP - for example to label a support ticket with the user's region - can call IPInfoDB through Jentic without managing the free key directly. Jentic resolves the agent's intent to one of the two endpoints and injects the key from the vault.

Example prompt: Use Jentic to search for 'free IP city lookup', load the ip-city operation, and execute it with the IP from the customer record.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /ip-country/ | Resolve an IP to country and continent |
| GET | /ip-city/ | Resolve an IP to city, coordinates, and time zone |

## Key resources

- **IP to Country** — Lightweight country, country code, and continent lookup for an IP
- **IP to City** — Full city-level enrichment including region, ZIP, coordinates, and time zone

## Why Jentic

- **Setup:** Wiring IPInfoDB by hand means registering for a key, adding it to the query string on api.ipinfodb.com/v3, and choosing between the country-only and city-level endpoints for each lookup. Through Jentic you install once, import IPInfoDB from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** IPInfoDB exposes two read-only lookups where the IP travels as a query parameter, so scope the agent to the operations it needs, such as finding the country or city of an IP. It stays a lookup client and cannot reach anything beyond the operations you allow.
- **Credential handling:** Your IPInfoDB key is stored once, encrypted, by your own Jentic One instance and injected into the query string at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'find the country of an IP', and Jentic returns the matching IPInfoDB operation with its input schema, so the agent calls the right endpoint without reading the v3 docs.

## Related APIs

- **ipapi - IP Geolocation API** — Paid IP geolocation with bulk lookups, ASN, and VPN/proxy detection.
- **IPstack API** — Commercial IP geolocation with currency, language, and security modules.
- **IPGeolocation.io API** — Geolocation with astronomy, time-zone, and user-agent parsing in one provider.
- **MaxMind GeoIP API** — Industry-grade geolocation and fraud-scoring database with REST and downloadable variants.

## FAQ

### What authentication does the IPInfoDB API use?

IPInfoDB uses an API key supplied as the key query parameter on every request. Through Jentic, the key is stored in the encrypted vault and added at execution time so the secret never appears in agent context.

### Is the IPInfoDB API free?

Yes. IPInfoDB offers a free tier with a registered API key suitable for moderate use; higher volume requires a paid plan or commercial license. The two endpoints behave the same way on free and paid keys.

### Can I get coordinates and time zone from an IP with IPInfoDB?

Yes. The GET /ip-city/ endpoint returns latitude, longitude, and timeZone alongside city, region, and ZIP code in the same response.

### Does IPInfoDB support IPv6 addresses?

Yes. Both /ip-country/ and /ip-city/ accept IPv6 inputs in the ip query parameter and return the same fields as for IPv4.

### What are the rate limits for the IPInfoDB API?

Free keys are limited to roughly two requests per second per key, with no fixed monthly cap. Sustained higher throughput requires a commercial agreement with IPInfoDB.

### How do I look up an IP through Jentic?

Search Jentic for 'IP to city lookup', load the ip-city operation, and execute it with the IP. Jentic injects the key parameter and returns the parsed JSON record.

### Can I limit what my agent is allowed to do with the IPInfoDB API?

Yes. Because Jentic One is self-hosted, you decide which of IPInfoDB's two read-only lookups your agent may call, so you can grant only the country lookup (GET /ip-country/) or only the city lookup (GET /ip-city/) as your rules require. The agent stays a lookup client that resolves an IP to location fields and cannot reach anything beyond the operations you allow. Your API key is held by your own instance and added to the query string at execution time, so it never enters the agent's prompt or logs.
