Look up where an IP address belongs: country, region, city, ISP and AS number, with approximate coordinates outside China.
| Method & path | Description |
|---|---|
GET /v1/ip | With no parameters, looks up the caller's own IP; pass ip to look up a specific address. IPv4 and IPv6 supported. |
| Parameter | Values | Notes |
|---|---|---|
ip | IPv4 / IPv6 address | Optional; malformed values return 400 |
lang | zh / en / hant / tw / hk | Optional, default zh; affects error messages and country names (see notes below) |
| Field | Notes |
|---|---|
country / country_code | Country name and ISO alpha-2 code |
province / city | Region/state and city; null when the database has none |
isp | For China, the carrier (e.g. China Telecom / Unicom / Mobile, sometimes an organisation); elsewhere, the ASN organisation name |
asn | AS number, e.g. 15169 |
latitude / longitude | Approximate city reference point; only on DB-IP (non-China) results |
is_anycast | Whether the address matches our built-in list of well-known anycast ranges (list-based: a match is flagged, no match does not rule out anycast; anycast addresses are served from many locations, so any location given is a registered or reference location) |
is_private | Private/reserved addresses have no geolocation; other fields are null |
source | Which database produced this result: ip2region / dbip / 自有 (our own logic, e.g. private/reserved) |
An address in China (/v1/ip?ip=223.5.5.5&lang=en):
{"code":0,"message":"ok","data":{"ip":"223.5.5.5","version":4,"country":"中国","country_code":"CN","province":"浙江省","city":"杭州市","isp":"阿里","asn":37963,"latitude":null,"longitude":null,"is_anycast":false,"is_private":false,"source":"ip2region"}}
An overseas anycast address (/v1/ip?ip=8.8.8.8&lang=en):
{"code":0,"message":"ok","data":{"ip":"8.8.8.8","version":4,"country":"United States","country_code":"US","province":"California","city":"Mountain View","isp":"Google LLC","asn":15169,"latitude":37.422,"longitude":-122.085,"is_anycast":true,"is_private":false,"source":"dbip"}}
Country names follow lang (Chinese or English); region/city names in DB-IP Lite are English only, while Chinese addresses get Chinese names from ip2region.
This endpoint combines two free offline databases: ip2region answers for China, DB-IP Lite for the rest of the world, each backing up the other; the source field says which one answered, and both are refreshed monthly. IP Geolocation by DB-IP (CC BY 4.0).
Accuracy: IP geolocation is table lookup, not measurement — city level at best, and easily shifted by VPNs, proxies and carrier egress routing. Both free databases are below commercial grade; treat results as a reference only.
This endpoint group has been called 29 times in total · 0 today · All endpoint statistics
| Endpoint | Path | Today | Total |
|---|---|---|---|
| IP Geolocation | /v1/ip | 0 | 29 |
Enter an IP and look it up, or just click Look up to see your own
A dynamic image for forum signatures and blog sidebars: whoever opens it sees their own IP and location. The generator now lives on the Tools site — ready-to-copy image URLs, Markdown and BBCode snippets, with size and language options.
Paste a small snippet into any web page to show each visitor their own IP, location, ISP and browser. Embed codes and live previews in five styles and three sizes are on the Tools site.