LabStack Docs
Login Signup

IP Lookup

Find location, organization, time zone and other information about an IP

Request

GET https://ip.labstack.com/api/v1/:ip

Parameter Description Type Required Default
ip IP address to lookup String Yes
curl \
  -X GET https://ip.labstack.com/api/v1/52.202.165.8 \
  -H 'Authorization: Bearer <API_KEY>'
c := labstack.NewClient("<API_KEY>")
s := c.IP()
res, err := s.Lookup(&ip.LookupRequest{
  IP: "52.202.165.8",
})
if err != nil {
  fmt.Println(err)
}
Client client = new Client("<API_KEY>");
IPService service = client.ip();
try {
  LookupRequest request = LookupRequest.builder().ip("96.45.83.67").build();
  LookupResponse response = service.lookup(request);
} catch (LabStackException e) {
  e.printStackTrace();
}
const client = new Client("<API_KEY>")
const service = client.ip();
try {
  const response = await service.lookup({
    ip: "96.45.83.67"
  });
} catch (error) {
  console.error(error);
client = Client("<API_KEY>")
service = client.ip()
try:
  response = service.ip({
    "ip": "96.45.83.67"
  })
except LabStackError as e:
  print(e)

Response

{
  "ip": "52.202.165.8",
  "hostname": "ec2-52-202-165-8.compute-1.amazonaws.com.",
  "version": "IPv4",
  "city": "Ashburn",
  "region": "Virginia",
  "region_code": "VA",
  "postal": "20149",
  "country": "United States",
  "country_code": "US",
  "latitude": 39.0481,
  "longitude": -77.4728,
  "organization": {
    "name": "American Registry for Internet Numbers"
  },
  "flag": {
    "svg": "https://cdn.labstack.com/images/flags/us.svg",
    "png": "https://cdn.labstack.com/images/flags/us.png",
    "emoji": "🇺🇸"
  },
  "currencies": ["USD", "USN", "USS"],
  "time_zone": {
    "id": "America/New_York",
    "name": "",
    "abbreviation": "EDT",
    "offset": -14400,
    "time": "2019-07-31T01:41:25-04:00"
  },
  "languages": ["en"],
  "as": {
    "number": 14618,
    "name": "AMAZON-AES",
    "organization": "Amazon.com, Inc."
  },
  "flags": []
}
Parameter Description Type
ip IP address String
time_zone IP time zone TimeZone
flags Extra IP information Flags

TimeZone

Flags