Skip to content

Help center

How to find the location of an IP address

Look up the country, region, city and network of an IP address, and learn why the result locates a network and not a person or a street.

Updated 2026-11-23

Enter the address in an IP lookup and read the country, region, city and network. The country is usually right. The region and city are approximate, because an IP address locates a network, not a person. It never gives a street or a name.

What the result is based on

Country and network come from registry-based data, region and city from a geolocation database. The API uses IPinfo Lite for country and ASN and DB-IP Lite for region and city, both credited on the data sources page. IP geolocation accuracy explains where the errors come from. See also IP geolocation.

Free way

  1. Open the IP lookup and enter an IPv4 or IPv6 address, such as 8.8.8.8.
  2. To see your own address, use what is my IP.
  3. Read the country, region, city, ASN and organization. The card also flags Tor and data center networks.

With the API

bash
curl https://api.qelka.com/v1/ip \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ip": "8.8.8.8"}'

It costs 1 credit. Read:

json
{
  "version": 4,
  "country": { "code": "US", "name": "United States" },
  "region": null,
  "city": null,
  "asn": { "number": 15169, "org": "Google LLC", "type": "hosting" },
  "flags": { "tor": false, "vpn": false, "proxy": false, "datacenter": true }
}
Field Meaning
country.code ISO 3166-1 alpha-2 country code. Null when unknown.
region, city Approximate. Null when unknown.
asn.type Kind of network: hosting, isp, mobile, business, education, government or unknown.
flags.datacenter true for hosting networks, where traffic usually comes from servers.

Values are illustrative. A 422 unprocessable_input comes back, free of charge, for private, loopback and documentation addresses such as 127.0.0.1 or 192.168.1.5: they have no public location. This is the usual surprise in local development, where your server sees 127.0.0.1 as the client. Behind a proxy or CDN, read the client address from the header your platform documents, such as X-Forwarded-For or Cloudflare's CF-Connecting-IP. See the IP reference.

Use the result well

Use Verdict
Default language or currency Good. A wrong guess costs little, so let people change it.
Time zone suggestion Good.
Fraud signal Fair, with other signals. Check the network type and flags.
Blocking by country Risky. VPN users and travelers get caught.
Finding a person Not possible.

Mobile addresses are shared by many users behind carrier-grade NAT, so one address says little about one person. Check asn.type before you trust the city.

Common mistakes

  • Treating the city as the user's location. It is the network's.
  • Looking up 127.0.0.1 or a private address. It returns 422.
  • Reading your proxy's address instead of the client's. Read the forwarded header.
  • Blocking by country alone. You turn away travelers.
  • Caching forever. Results are cached 7 days. Send "fresh": true for a new answer.

Frequently asked questions

How accurate is IP geolocation?
Country is usually reliable. Region and city are approximate: they show where the network's addresses are registered or routed, which can be far from the user. Mobile networks, VPNs and company networks widen the gap. Treat the city as a hint, never as an address, and never use it alone to make decisions about a person.
Can I find someone's exact address from their IP?
No. An IP address locates a network. Only the internet provider can link an address to a customer, and it shares that only through legal process. A lookup returns a country and often a region or city, plus the network's name. Any service that promises a street address is guessing.
Why does the lookup show the wrong city?
Databases place an address where its block is registered or where its traffic enters the internet. Many providers route a whole region through one city, and mobile users share a few addresses. The field can also be empty: the API returns null for the region and city when they are unknown. Rely on the country when you can.

Put this check in your product

Get an API key in under a minute. 100 free credits every month, no card required.

  • 100 free credits a month
  • No card
  • Test keys spend nothing
  • Cancel any time