---
title: "IP Lookup"
method: GET
path: "/ip.json"
tags: ["Geo"]
---

# IP Lookup

`GET /ip.json`

Returns geolocation and timezone data for a given IPv4 or IPv6 address. Pass `auto:ip` to auto-detect the caller's IP.

## Query parameters

- `key` string, required
- `q` string, required

## Response `200`

IP geolocation data

- IpLookupResponse
  - `ip` string
  - `type` 'ipv4' | 'ipv6'
  - `continent_code` string
  - `continent_name` string
  - `country_code` string
  - `country_name` string
  - `is_eu` boolean
  - `geoname_id` string
  - `city` string
  - `region` string
  - `lat` number
  - `lon` number
  - `tz_id` string
  - `localtime_epoch` integer
  - `localtime` string

## Other responses

- `400` — Bad request — invalid parameter or location not found.
- `401` — Unauthorized — API key missing or invalid.

---

[API](https://skmtc.dev/weatherapi/apis/weatherapi-com.md) · [All operations](https://skmtc.dev/weatherapi/apis/weatherapi-com/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/weatherapi/weatherapi-com/revisions/bf3da15deb3e/schema)
