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

# 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 IPv4 and IPv6 addresses to a region, country, and city with optional currency, flag, and language fields, covering 180+ countries. The whole API is a single GET endpoint keyed by an api_key query parameter, returning JSON. It is intended for inline lookups in onboarding, fraud, and personalization flows where a heavier MaxMind or IPinfo install is unnecessary.

## For AI agents

Resolve any IPv4 or IPv6 address to country, region, city, currency, and language using one 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 behind an IP for fraud and quality scoring
- Cross-check user-supplied country with the country derived from IP

## Use cases

### Geo-pricing and localization

Call the geolocation endpoint on session start to resolve country and currency from the visitor IP, then choose the right storefront variant. Returns ISO country and currency codes plus locale data so the storefront can render prices in the right denomination.

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

### IP-country mismatch fraud signal

Compare the country derived from the signup IP with the user-supplied billing country, and surface mismatches for review. Combine with proxy/VPN detection from another source for a stronger fraud score.

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

### Audit log enrichment

Attach geolocation data to login and security audit log entries so reviewers can spot anomalous geographies. The endpoint returns country, region, city, and ISP - enough to flag impossible-travel events.

Example prompt: For each login event, call /v1/ with the source IP and append country, city, and isp to the audit record

### AI agent visitor profiling

An agent enriching visitor records or webhook payloads calls the Abstract endpoint via Jentic to attach country, city, and ISP without ever holding the api_key. The response is small and stable enough to drop into downstream CRM and analytics pipelines.

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 to country, region, city, currency, and language |

## Key resources

- **IP Lookup** — Resolve any IPv4 or IPv6 address to country, region, city, timezone, currency, and language 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 each request. 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 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?

An api_key query parameter on the single GET /v1/ endpoint. There is no OAuth or header-based auth. Through Jentic the api_key is held in the vault and injected at execution time.

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

Yes. GET /v1/ accepts 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?

The free tier allows up to 20,000 requests per month at 1 request per second; paid plans raise both quota and concurrency. Spec does not encode these - check your Abstract dashboard.

### 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 await client.search, load, execute.

### Is the Abstract IP geolocation API free?

Yes, with a 20,000 lookups/month free tier at 1 req/sec. Paid plans add concurrency, SLA, and HTTPS-only options. Response schema is identical across tiers.

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

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials the agent may use, so you can restrict it to just the single IP-to-location lookup on GET `/v1/.` That endpoint takes only the api_key and the target IP as query parameters and has no resource id in the URL, so nothing beyond that lookup runs unless you explicitly add it. Your Abstract api_key stays inside your own instance and is injected at execution time, so the agent never handles it directly.
