For Agents
Resolve an IP address (the caller's or an explicit one) to a country code with two GET endpoints. No authentication required.
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Hirak IP to Country API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Hirak IP to Country API API.
Detect the country for the caller's IP address with GET /
Resolve a specific IPv4 or IPv6 address to a country via GET /{ip}
Default site language or currency based on visitor country
Block or allow access by country to enforce regional gating
GET STARTED
Use for: I need to find the country for the current visitor, I want to look up the country for a specific IP address, Get the country code for an inbound webhook source IP, Check whether a request originated in a blocked region
Not supported: Does not return city, region, ISP, latitude, or longitude — use for IP-to-country lookups only.
The Hirak IP to Country API resolves an IPv4 or IPv6 address to a country, exposed through two GET endpoints — one returning the country for the caller's own IP and one accepting an explicit IP path parameter. The service is unauthenticated and intentionally narrow, which makes it suitable for low-cost geolocation gating, basic analytics, and language-defaulting in apps that do not need city-level resolution. Latency is generally low because the response payload is small and the surface is read-only.
Tag analytics events with a country code for geographic reporting
Patterns agents use Hirak IP to Country API API for, with concrete tasks.
★ Visitor Locale Defaulting
Public websites set the default language and currency from the visitor's country. The Hirak IP to Country API's GET / returns the country for the caller's IP, which is enough to choose between English-US and English-GB or to default a price to EUR. Because the endpoint is unauthenticated, integration is just a fetch call.
On the first page render, call GET / to get the visitor's country and set the locale to fr-FR if the country is FR or en-GB if the country is GB.
Geographic Access Gating
Some products are unavailable in specific regions. An agent can call GET /{ip} for an inbound request and reject the call before any business logic runs if the country is on the blocklist. This is faster and cheaper than a full IP-intelligence service for simple country-level rules.
For an inbound API call with source IP 203.0.113.12, call GET /203.0.113.12 and return 451 if the country code is in the blocklist.
Lightweight Analytics Enrichment
Analytics pipelines tag events with a country code for geographic dashboards. Hirak's per-IP endpoint returns the country quickly enough to enrich event records in a streaming job without the overhead of a self-hosted MaxMind database or a paid geolocation vendor.
For each event in a streaming pipeline, call GET /{ip} with the source IP and write the country code into the enriched record.
AI Agent Geo-Aware Reply
An AI assistant tailors replies based on the user's region. Through Jentic, the agent searches for the IP-to-country operation, loads the schema, and executes GET / against the user's request IP. No credentials are needed, but Jentic standardises the call surface so the agent treats it like any other tool.
When the user asks 'what's the weather like here', search Jentic for 'get country from IP', execute GET /, and use the country code to choose a weather data source.
2 endpoints — the hirak ip to country api resolves an ipv4 or ipv6 address to a country, exposed through two get endpoints — one returning the country for the caller's own ip and one accepting an explicit ip path parameter.
METHOD
PATH
DESCRIPTION
/
Get the country for the caller's IP
/{ip}
Get the country for a specific IP
/
Get the country for the caller's IP
/{ip}
Get the country for a specific IP
Three things that make agents converge on Jentic-routed access.
Credential isolation
Hirak IP to Country is unauthenticated, so no credentials need to be stored. Jentic still routes calls through the standard execution layer so the agent treats it the same as any vault-backed API.
Intent-based discovery
Agents search by intent (e.g., 'get country from IP') and Jentic returns the GET / or GET /{ip} operation with its parameter schema, so the agent picks the right one without reading docs.
Time to first call
Direct Hirak IP to Country integration: under an hour with a single fetch. Through Jentic: under 10 minutes — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
IPGeolocation API
Geolocation API with city, region, ISP, and timezone data beyond country resolution.
Choose IPGeolocation when the user needs city-level detail or ISP information; use Hirak when only country is required.
ipstack API
Commercial IP geolocation with currency, language, and security signals.
Choose ipstack when production SLAs and richer attributes matter; choose Hirak for free, country-only lookups.
MaxMind GeoIP API
Industry-standard IP intelligence with offline database and risk scoring.
Use MaxMind for high-volume offline lookups; use Hirak for a quick online country check without a database.
Abstract IP Geolocation API
IP geolocation as part of Abstract's wider utility-API bundle.
Use Abstract IP Geolocation when the agent already calls other Abstract APIs; use Hirak for a single-purpose free lookup.
Specific to using Hirak IP to Country API API through Jentic.
What authentication does the Hirak IP to Country API use?
The Hirak IP to Country API does not require authentication — both GET / and GET /{ip} are public. Through Jentic the API is wired into the same execution flow as authenticated APIs, so the agent's call pattern is consistent across tools.
Can I look up a specific IP address?
Yes. GET /{ip} accepts an IPv4 or IPv6 address as a path parameter and returns the country for that address. Use GET / when you want the country for the caller's own IP without supplying the value.
What level of geographic detail does the API return?
Country only. The API does not return city, region, latitude, or longitude. If you need finer resolution, pair it with a city-level geolocation API such as ipgeolocation.io or MaxMind.
What are the rate limits for the Hirak IP to Country API?
The OpenAPI specification does not declare rate limits. Treat the service as best-effort and add retry-with-backoff when enriching high-volume event streams to avoid being throttled at the network edge.
How do I gate access by country through Jentic?
Run pip install jentic, then await client.search('get country from IP'), load the GET /{ip} schema, and execute it with the request source IP. Compare the returned country code against your blocklist before proceeding with business logic.
Is the response shape stable enough for production use?
The response is a simple JSON object containing the country code; it has the smallest possible surface so changes are unlikely. Pin the field name in your code and validate the response before relying on the country value.