IP Info (free IP geolocation API)
IP Info is a free IP geolocation and ASN API maintained by Shifter. One GET request returns the country, region, city, coordinates, time zone, ISP, ASN and connection type of an IP address as JSON. There is no signup, no API key and no subscription.
It runs on the same IP location and network database that Shifter uses for its own proxy pools, so when you check a Shifter exit IP with IP Info you see the location the way our network sees it.
Endpoints
Section titled “Endpoints”| Request | Returns |
|---|---|
GET http://ip-info.com/json | The IP that made the request (your server, or your proxy exit when sent through a proxy) |
GET http://ip-info.com/json?ip=8.8.8.8 | A specific public IPv4 or IPv6 address |
GET http://ip-info.com/8.8.8.8/json | The same lookup, path form |
HTTPS (https://ip-info.com/json) works too, on the same routes. Plain HTTP is never redirected; use HTTPS when calling from a web page served over HTTPS, to avoid mixed-content blocking. Responses allow cross-origin GET, so browser code can call the API directly.
curl --max-time 10 "http://ip-info.com/json?ip=94.204.59.232"{ "ip": "94.204.59.232", "city": "Motor City", "region": "Dubai", "region_code": "DU", "country": "AE", "country_name": "United Arab Emirates", "continent": "AS", "loc": "25.0459,55.241", "latitude": 25.0459, "longitude": 55.241, "postal": null, "timezone": "Asia/Dubai", "asn": 15802, "as_name": "Emirates Integrated Telecommunications Company PJSC", "isp": "Emirates Integrated Telecommunications Company PJSC", "org": "Emirates Integrated Telecommunications Company", "connection_type": "Corporate", "user_type": "business", "is_anycast": false}The live response has 29 fields; the example above shows the ones most integrations read. Every field is always present, and a value the database does not have comes back as null.
Check a Shifter proxy exit
Section titled “Check a Shifter proxy exit”Send the no-argument request through your proxy. The IP Info response describes the exit IP, so you can confirm that the country, city or ASN you targeted is the one you got.
curl --max-time 15 \ --proxy http://p.shifter.io:443 \ --proxy-user "customer-USERNAME-country-us-city-new_york:PASSWORD" \ http://ip-info.com/jsonimport requests
proxy = "http://customer-USERNAME-country-us:PASSWORD@p.shifter.io:443"r = requests.get( "http://ip-info.com/json", proxies={"http": proxy, "https": proxy}, timeout=15,)r.raise_for_status()exit_ip = r.json()print(exit_ip["ip"], exit_ip["country"], exit_ip["city"], exit_ip["asn"])assert exit_ip["country"] == "US", f"expected US, got {exit_ip['country']}"import { HttpsProxyAgent } from "https-proxy-agent";import fetch from "node-fetch";
const agent = new HttpsProxyAgent( "http://customer-USERNAME-country-de:PASSWORD@p.shifter.io:443");const res = await fetch("http://ip-info.com/json", { agent });const exit = await res.json();console.log(exit.ip, exit.country, exit.city, `AS${exit.asn}`);Compare country (ISO 3166 two-letter code) with the country you requested and asn (a plain number, no AS prefix) with the network you targeted. See Geo-targeting for the username flags.
Use it from AI agents
Section titled “Use it from AI agents”IP Info needs no authentication flow, so an agent can call it like any other HTTP endpoint. It publishes machine-readable descriptions that agents and tool builders can load directly:
https://ip-info.com/llms.txt: a short introduction written for LLMshttps://ip-info.com/llms-full.txt: the complete reference as plain texthttps://ip-info.com/openapi.json: the OpenAPI 3.1 contract (security is empty, no key required)
No MCP server is required. If your framework takes function or tool definitions, this one is enough:
{ "name": "ip_lookup", "description": "Approximate geolocation and network (ASN, ISP) for a public IP address. Omit ip to look up the agent's own network exit.", "input_schema": { "type": "object", "properties": { "ip": { "type": "string", "description": "Public IPv4 or IPv6 literal. Leave empty for the caller's exit IP." } } }}Implement it as GET http://ip-info.com/json when ip is empty and GET http://ip-info.com/json?ip=<URL-encoded ip> otherwise.
Give the agent these rules along with the tool:
- A call without
ipdescribes the agent’s own server or proxy exit, not the human user. To look up a user’s IP, the agent must be given that IP explicitly. - Use
countryfor country comparisons andasnfor network checks. - Treat
nullas unknown. Never fill in a missing field. - Location is approximate, and IP Info is not VPN or proxy detection.
Typical agent uses: confirming a browsing agent’s proxy is in the right country before it scrapes a localized page, tagging collected data with the exit location it was fetched from, and enriching log or signup IPs with country and ASN.
Errors and retries
Section titled “Errors and retries”Errors come back as JSON with a stable code:
{ "error": { "code": "invalid_ip", "message": "Supply a literal IPv4 or IPv6 address." } }| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_ip | Malformed, private, reserved or otherwise non-public input, or conflicting parameters |
| 404 | ip_not_found | No record for this IP in the active database |
| 405 | method_not_allowed | Use GET |
| 503 | database_unavailable | Temporary; retry with backoff |
| 504 | timeout | Temporary; retry with backoff |
Fix 4xx inputs before retrying. For 503, 504 and connection errors, retry with a short bounded backoff (for example 1, 2 and 4 seconds), then give up and report the failure.
Data and limits
Section titled “Data and limits”- Free, no quota. There is no per-key or per-app quota and no API key. It is a shared service with finite capacity: make the requests your application needs and follow the terms. Automated and commercial use is allowed.
- Approximate by design. Coordinates point to an area, not an address, and never identify a person.
- Not a proxy or VPN detector.
connection_type,user_typeandis_anycastare database classifications, not proof of how an IP is used. - Privacy. The API keeps no lookup history. See the privacy policy.
Questions or data discrepancies: email hi@shifter.io with the IP and the location you expected.