Open API

Look up where an IP is: no signup, no key, no 300-page manual. Browsers can call it directly (CORS *) and it works from a single curl line.

No API key 60 req / min / IP CORS enabled HTTP/2 at the edge

Try it

Plain text /geo
Loading…
JSON /geo/json
Loading…
Badge image /img1
Badge preview

Endpoints

PathContent-TypeNotes
/geotext/plain 4 lines of plain text; defaults to your own IP
/geo/<ip or domain>text/plain Explicit target; domains are resolved to their A record
/geo/json[/<ip>]application/json Structured fields including coordinates, timezone and risk score
/geo/jsonp?callback=fnapplication/javascript Old-school JSONP for pages that can only add a <script>
/img1[/<ip>]image/svg+xml Badge image; defaults to the visitor's IP

Every path also accepts ?ip=, e.g. /geo/json?ip=1.1.1.1 — both forms are equivalent.

Plain-text format

Always four lines in a fixed order, with - for anything unavailable — so line numbers never shift:

line 1  IP address
line 2  country region city (space separated)
line 3  ASN, e.g. AS15169
line 4  ISP / organization full name
# just the location
curl -s https://ip.accglam.com/geo/8.8.8.8 | sed -n '2p'
# just the ASN
curl -s https://ip.accglam.com/geo/8.8.8.8 | sed -n '3p'
# in a script (assign to variables)
read -r ip loc asn isp < <(curl -s https://ip.accglam.com/geo/8.8.8.8)

JSON fields

FieldTypeNotes
ipstringThe IP actually queried (domains are resolved first)
inputstringOnly present when a domain was given; keeps the original input
country / country_codestringCountry name and ISO code; Hong Kong / Macao / Taiwan are reported as "Hong Kong SAR, China" / "Macao SAR, China" / "Taiwan, China"
region / citystringRegion and city
locationstringThe three above joined for you
lat / lonnumberCoordinates (city level, not street level)
timezonestringIANA timezone name
asn / asn_orgstringe.g. AS13335 / Cloudflare, Inc.
isp / orgstringCarrier and registered organisation
ip_typestringDatacenter / IDC, CDN edge node, residential / fixed-line, mobile network, VPN / proxy, Tor exit node
risk_scorenumber|null0-100 risk score; null means this IP was never scored here (no blacklists were run, so we don't guess)
risk_levelstring|nullLow / moderate-low / moderate-high / high risk
mapsstring|nullOpenStreetMap link
cachedbooleanWhether the edge cache was hit

Badge image

Drop it into a forum signature, your homepage or a README: it shows the visitor's own IP location, so a thousand people see a thousand different results — that is the fun part. Pure SVG, no external requests, under 2KB.

<img src="https://ip.accglam.com/img1" alt="IP info" />
ParamValueNotes
ipIP / domainOmitted: shows the visitor's own IP
themelight (default) / darkDark background for dark forums
mask1Mask it: IPv4 becomes 1.2.*.*, IPv6 keeps the first 4 groups
langen / zhBadge labels and country name language

The image endpoint has a wider quota — 180 req/min — because one forum page can carry a dozen badges.

Rate limits & caching

KindQuotaWindow
Text / JSON60 requestsper minute, per IP
Badge image180 requestsper minute, per IP

Every response carries these three headers, so you can see the limit coming:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1761495060   # unix timestamp of the window reset

Over quota returns 429 + Retry-After. Responses for an explicit IP are cached 10 minutes at the edge and 1 minute locally; responses for your own IP are never cached (otherwise you would be served someone else's address).

Status codes

CodeMeaning
200OK
400Bad parameters (invalid IP/domain, illegal JSONP callback)
404Not found (private address, domain without an A record, no upstream data)
405Anything other than GET
429Over quota — check Retry-After
504DNS resolution timed out

Data sources & limits

Use it for whatever you like, no attribution needed. Questions or a field you want? Just ask.