# IP Location Lookup

Locate an IP address, or every address of a domain, using the free DB-IP Lite city and ASN databases. Accepts an IPv4 or IPv6 address, a domain name or a URL. A domain is resolved and up to 6 of its addresses are located. Returns city, region, country, continent, approximate coordinates with a typical radius, the AS number and organisation, the country the address block is registered in (RDAP) and whether it agrees with the DB-IP location, and a flag for well-known anycast and CDN addresses. IP location is approximate: VPNs, mobile networks and carrier-grade NAT put people in other cities. Private and reserved addresses return status special_purpose. The result carries the attribution "IP geolocation by DB-IP" (https://db-ip.com) that the data licence (CC BY 4.0) requires; show it wherever you show the data. While the databases are still downloading, the call fails with UNAVAILABLE.

**Not for:** Street-level or device location, who owns an address (use ip_whois), reverse DNS (use reverse_dns) or finding who hosts a website (use website_hosting).

- Tool id: `ip-location`
- Category: ip
- Execution: network
- MCP tool `ip_location` at https://lookupowl.com/mcp
- REST `GET https://lookupowl.com/api/v1/tools/ip-location` (or POST a JSON body)
- OpenAPI: https://lookupowl.com/api/openapi.json

## Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `q` | string | yes |  | An IPv4 or IPv6 address, a domain name, or a URL (the host is used). A domain is resolved and each of its addresses (up to 6) is located. Private and reserved addresses are answered as special-purpose, not looked up. max length 2048 |
| `registry` | boolean | no | `true` | Also ask the Regional Internet Registry (RDAP) which country the address block is registered in, and compare it with the DB-IP location. One extra lookup per address, for the first three addresses. |

## Output

Results are wrapped in an envelope: `tool`, `version`, `requestId`, `data`, `summary`, `meta` (cache status, timing), `permalink`. `data` has these fields:

| Field | Type | Description |
|---|---|---|
| `query` | string | What was looked up: the address, or the domain name. |
| `kind` | "ip" \| "domain" |  |
| `dns` | object | Only for a domain: how the name resolved. |
| `addresses` | object[] |  |
| `truncated` | boolean | The name has more addresses than the 6 located here. |
| `accuracy` | string | The plain warning to show with any IP location. |
| `notes` | string[] |  |
| `data` | object | The DB-IP Lite database releases the answer came from. |
| `attribution` | object |  |

## Examples

### Google Public DNS (8.8.8.8), an anycast address

```json
{"q":"8.8.8.8","registry":true}
```

```bash
curl 'https://lookupowl.com/api/v1/tools/ip-location?q=8.8.8.8&registry=true'
```

Web page: https://lookupowl.com/ip-lookup?q=8.8.8.8

### Every address of a domain

```json
{"q":"example.com","registry":true}
```

```bash
curl 'https://lookupowl.com/api/v1/tools/ip-location?q=example.com&registry=true'
```

Web page: https://lookupowl.com/ip-lookup?q=example.com

### An IPv6 address

```json
{"q":"2606:4700:4700::1111","registry":true}
```

```bash
curl 'https://lookupowl.com/api/v1/tools/ip-location?q=2606%3A4700%3A4700%3A%3A1111&registry=true'
```

Web page: https://lookupowl.com/ip-lookup?q=2606%3A4700%3A4700%3A%3A1111

### A private address has no public location

```json
{"q":"192.168.1.1","registry":true}
```

```bash
curl 'https://lookupowl.com/api/v1/tools/ip-location?q=192.168.1.1&registry=true'
```

Web page: https://lookupowl.com/ip-lookup?q=192.168.1.1

## Web pages

- https://lookupowl.com/ip-lookup
- https://lookupowl.com/ip-location

## Limits and caching

- Cost: from 1 unit up, depending on the input (a registry lookup counts every upstream request); 1 unit for a cached result. Budgets are per network and published in the `RateLimit` response headers.
- Cache: the lifetime follows the data (for DNS, the record TTL, within a few minutes). Add `fresh=true` (MCP argument or query parameter) to look again; it costs 3 units per unit and is limited to 10 per hour.
- Timeout: 15 s.

## Related tools

- [What Is My IP Address](https://lookupowl.com/tools/what-is-my-ip.md): Show your public IP address, whether it is IPv4 or IPv6, its reverse DNS name and the network it belongs to.
- [IP WHOIS Lookup](https://lookupowl.com/tools/ip-whois.md): Who owns an IPv4 or IPv6 address: network range, name, country, registry, abuse contact and origin AS, from RDAP.
- [ASN Lookup](https://lookupowl.com/tools/asn-lookup.md): Who holds an Autonomous System number: name, country, registry, dates and abuse contact, from RDAP.
- [Reverse DNS Lookup](https://lookupowl.com/tools/reverse-dns.md): Find the host name (PTR record) of an IPv4 or IPv6 address and check that it resolves back to the same address.
- [Who Hosts This Website](https://lookupowl.com/tools/website-hosting.md): Find the web host or CDN, DNS provider and email provider behind a domain, with the evidence, and whether the origin is hidden.

## Guide: IP address lookup

See where an IP address is, which network runs it, and how far to trust the answer.

### What an IP lookup tells you

An IP address is a number that identifies a device or a service on the internet. It does not contain a location, but the companies that run networks tend to use address blocks in predictable places, so databases can make a good guess. A lookup combines that guess with the name of the network that announces the address.

LookupOwl shows the city, region and country that the DB-IP database holds for the address, the network behind it (its AS number and organisation), and the country the address block is registered in at the regional internet registry. Entering a domain name works too: the name is resolved and each address it points to is looked up.

### How to use it

1. **Enter an address or a name**: IPv4 and IPv6 both work, and so does a domain such as `example.com` or a full web address. Up to six addresses of a domain are shown. Private addresses such as `192.168.1.1` are named as private and are not looked up, because they only exist inside a network.
2. **Read the headline first**: The big answer says where DB-IP thinks the address is, at city, region or country level. A badge says whether the registry agrees on the country, and warns when the address belongs to a CDN or an anycast service.
3. **Check the network and the area**: The network tile names the organisation that announces the address. The area tile gives a rule-of-thumb size for the guess, and the map shows a dot at its centre. Open the sources tab to see what each source said.

> **Looking for your own address?** Use [What is my IP](https://lookupowl.com/what-is-my-ip) to see the address a website sees when you visit it, then paste it here.

### Reading the result

| What you see | What it means |
|---|---|
| City level | DB-IP has a city for this address. Think of it as "somewhere around there", within tens of kilometres at best. |
| Region or country level | DB-IP knows less. No city or area is drawn, because that would suggest a precision nobody has. |
| Registry agrees | The country in the registry record matches DB-IP. Two independent sources agreeing is good evidence for the country, not for the city. |
| Registered in another country | Common for global companies, leased address space and cloud networks. The registry country is where the block was registered, which is not always where it is used. |
| Anycast or CDN | The same address is answered from many cities. Any single location is only a label for the range. |
| Not a public address | A private, loopback or reserved address. It has no place on the internet to look up. |

### How accurate is it?

IP location is approximate. Country is usually reliable for ordinary home and office connections. City is a guess, and the guess is worse for mobile networks, satellite links and companies that route all traffic through one office. VPNs and proxies move a person to wherever the exit server is. If many customers share one address through carrier-grade NAT, the location is that of the provider, not of any one customer.

- **Do not use it as proof of identity or presence.** An address shows where traffic comes out of a network, which can differ from where a person sits.
- **Treat the radius as a guide.** DB-IP does not publish an accuracy figure for each address, so the area shown is a rule of thumb.
- **Compare sources.** When DB-IP and the registry name different countries, read the note under the answer before drawing a conclusion.

### Where the data comes from

The location and network come from the free DB-IP Lite databases, published under a Creative Commons Attribution licence and updated every month. They are read from the server's own disk, so a lookup does not send the address to a third party. A domain name is resolved with a normal DNS query, and the registry check asks the regional internet registry over RDAP. Results carry the credit "IP geolocation by DB-IP", as the licence asks.

```bash
curl -s https://lookupowl.com/api/v1/tools/ip-location \
  -H 'content-type: application/json' \
  -d '{"q":"8.8.8.8"}'
```

### Frequently asked questions

**What is an IP lookup?**

An IP lookup takes an IP address and returns what is known about it: the network that announces it, the country it is registered in, and a best guess at the place it is used from. It is a way to learn where traffic seems to come from, not an exact location of a person or a device.

**Can an IP address show my exact location?**

No. An IP address cannot show a street, a building or a person. The best a database can do is name a city or a region, and often only a country. Anyone claiming to pinpoint a home from an IP address is guessing. Your phone or browser can give a precise location only if you allow it to.

**Why does the lookup show the wrong city?**

Databases infer locations from how address blocks are registered and used, and that inference can be off by a city or a country. Mobile networks, VPNs, company networks and shared addresses are the usual reasons. The page on [IP location](https://lookupowl.com/ip-location) explains the causes and what you can do about a wrong result.

**Can I look up an IPv6 address?**

Yes. IPv6 addresses work the same way, including the shortened forms with a double colon. Coverage and detail can differ between IPv4 and IPv6 in any database, so an IPv6 address may show less detail than an IPv4 one from the same network.

**What does it mean when an address is anycast?**

Anycast means the same address is announced from many places, and each visitor reaches the nearest one. Public DNS resolvers such as 8.8.8.8 and 1.1.1.1 work this way. A database can list only one place for them, so the page flags them instead of letting a single city look like a fact.

**Can I look up a domain name instead of an address?**

Yes. Enter a domain and LookupOwl resolves its A and AAAA records and locates each address, up to six. A site behind a CDN will show the CDN's addresses, not the origin server. To see who hosts a site, use [Who hosts this website](https://lookupowl.com/who-hosts-this-website).

**Who owns an IP address?**

The organisation that announces the address owns the network, shown here as the AS number and organisation. The registry record has the full registration, including the abuse contact. For that, use the [IP WHOIS lookup](https://lookupowl.com/ip-whois-lookup), or the [ASN lookup](https://lookupowl.com/asn-lookup) for the network itself.
