canonical: https://jentic.com/apis/abstractapi.com/abstractapi-geolocation

# Abstractapi IP geolocation API

Jentic publishes the only available OpenAPI specification for IP geolocation API, keeping it validated and agent-ready. Abstract's IP geolocation API resolves any IPv4 or IPv6 address to a region, country, and city across 180+ countries, with optional fields for currency, flag, language, timezone, and ISP. The whole API is a single GET endpoint, keyed by an api_key query parameter, returning JSON. It is designed for inline lookups in onboarding, fraud, and personalization flows where a heavier MaxMind or IPinfo install is overkill.

## For AI agents

Resolve any IPv4 or IPv6 address to country, region, city, timezone, currency, and language using a single Abstract endpoint authenticated by an api_key query parameter.

## Scope

Does not handle physical address geocoding, routing, or places search - use for IP-to-location resolution only.

## Capabilities

- Resolve a visitor IP to country, region, and city for personalization
- Detect the user's currency and language from their IP for localized pricing
- Look up the timezone of an IP for scheduling and timestamp display
- Identify the ISP and connection type behind an IP
- Cross-check user-submitted country with the country derived from IP

## Use cases

### Localize pricing by visitor IP

Call the geolocation endpoint on every page load to derive the visitor's country and currency, then show prices in the local currency. Returns within a few hundred milliseconds and covers 180+ countries, so it works as a drop-in replacement for heavier on-prem GeoIP databases.

Example prompt: Call GET /v1/ with ip_address=8.8.8.8 and return country_code and currency.currency_code

### Fraud signal for signups

Compare the country derived from the signup IP with the user-supplied billing country, and flag mismatches for review. The geolocation response includes country_code, region, and ISP fields useful for stacking with other fraud signals.

Example prompt: Call GET /v1/ with the signup IP and compare country_code with user-supplied country, returning a mismatch boolean

### Timezone-aware scheduling

When a user creates a meeting or schedules a notification, call the geolocation endpoint to derive their timezone from their IP and pre-fill the timezone selector. Avoids forcing users to pick from a dropdown.

Example prompt: Call GET /v1/ with the request IP and return timezone.name and timezone.gmt_offset

### AI agent visitor profiling

An agent enriching website visitor records calls the geolocation endpoint to attach country, city, and ISP to each session, all via Jentic so the api_key never enters the agent context. The response shape is small and stable, so the enriched record can be passed straight to a CRM or analytics pipeline.

Example prompt: For each visitor session, call /v1/ with the session IP and append country, city, and connection.connection_type to the visitor record

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /v1/ | Resolve an IP address to country, region, city, timezone, and ISP |

## Key resources

- **IP Lookup** — Resolve any IPv4 or IPv6 address to country, region, city, timezone, currency, language, and ISP via /v1/

## Why Jentic

- **Setup:** Wiring the Abstract IP geolocation API by hand means pointing calls at the ipgeolocation subdomain and appending the api_key query parameter yourself on every lookup. Through Jentic you install once, import the IP geolocation API from the API Directory, store the api_key once, and your agent calls it.
- **Permission scoping:** The lookup takes the api_key and target IP as query parameters with no resource id in the URL, so limit the agent to the operations it needs, namely the IP-to-location lookup. You choose the operations it may call, so nothing beyond that single lookup runs unless you add it.
- **Credential handling:** Your Abstract api_key is stored once, encrypted, by your own Jentic One instance and injected as the api_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 'find country from ip address', and Jentic returns the matching Abstract operation with its input schema so the agent calls the endpoint without browsing the reference docs.

## Related APIs

- **IPInfoDB** — Free IP-to-country and IP-to-city lookups
- **ipstack** — IP geolocation with optional security and currency modules
- **MaxMind** — GeoIP2 web service and downloadable databases

## FAQ

### Why is there no official OpenAPI spec for IP geolocation API?

Abstract API does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call IP geolocation API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the IP geolocation API use?

The endpoint requires an api_key query parameter - there is no header-based auth. Through Jentic the api_key is held encrypted in the vault and injected at execution time, so the agent never sees the raw secret.

### Can I look up an IPv6 address with this API?

Yes. GET /v1/ accepts both IPv4 and IPv6 in the ip_address query parameter and returns the same response shape. If ip_address is omitted the endpoint defaults to the requester's own IP.

### What are the rate limits for the IP geolocation API?

Limits are tied to your Abstract plan, not to the spec. The free tier is 20,000 requests/month with 1 request/second; paid tiers raise both quota and concurrency. Check your Abstract dashboard for current numbers.

### How do I look up a country from an IP through Jentic?

Search Jentic for 'look up country from ip address', load the operation that maps to GET /v1/ on ipgeolocation.abstractapi.com, then execute with ip_address. Install with pip install jentic and use the async pattern.

### Is the Abstract IP geolocation API free?

Yes, the free tier covers up to 20,000 lookups per month at 1 request per second. Paid tiers add HTTPS-only options, higher concurrency, and SLA, but the response schema is the same across tiers.

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

Yes. Because Jentic One is self-hosted, you run the execution layer yourself and your own rules decide which operations and credentials the agent may use. This API exposes a single IP-to-location lookup (GET /v1/), which takes the api_key and target IP as query parameters with no resource id in the URL, so you can grant the agent only that one lookup. Nothing beyond that IP-to-location call runs unless you explicitly add it, and the api_key is injected at execution time rather than exposed to the agent.
