FlowData

How do I look up the location of an IP address or domain?

Published on 10. November 2026

IP Geolocation tells you roughly where an IP address or domain is located: country, region, city, coordinates, time zone and the network operator behind it. Typical uses are preselecting the country and language in a form or getting a rough idea of where orders come from.

In every example, replace fd_YOUR_KEY with your own FlowData key. Create a FlowData API key explains how to get one.

Look up an IP address or domain

Append the IP address or the domain to the path. IPv4, IPv6 and domain names all work the same way.

curl "https://api.flowdata.one/v1/geolocation/8.8.8.8?lang=en" \
  -H "Authorization: Bearer fd_YOUR_KEY"

The response looks like this:

{
  "status": "success",
  "continent": "North America",
  "continentCode": "NA",
  "country": "United States",
  "countryCode": "US",
  "region": "CA",
  "regionName": "California",
  "city": "Mountain View",
  "district": null,
  "zip": "94043",
  "lat": 37.4192,
  "lon": -122.0574,
  "timezone": "America/Los_Angeles",
  "offset": -25200,
  "currency": "USD",
  "isp": "Google LLC",
  "org": "Google LLC",
  "as": "AS15169 Google LLC",
  "asname": "Google LLC",
  "reverse": null,
  "mobile": null,
  "proxy": null,
  "hosting": null,
  "query": "8.8.8.8"
}

Without an IP in the path, that is with GET https://api.flowdata.one/v1/geolocation, you get the data for the IP address your request comes from. Why does IP Geolocation show my server's location instead of my visitor's? explains why that is rarely what you want when calling from a server.

Afterwards, every lookup appears in the dashboard under Areas › IP Geolocation, with key figures, the last 30 days and the Log of individual requests. Statistics and request log of a FlowData area explains how to read it.

The fields at a glance

  • continent, continentCode: the continent as a name and as a code.
  • country, countryCode: the country as a name and as a two-letter ISO code, for example DE.
  • region, regionName: code and name of the state or region.
  • city, zip: city and postal code. Both can be empty if only the country is known.
  • lat, lon: latitude and longitude. Note that longitude is called lon here, not lng as in Maps.
  • timezone, offset: a time zone such as Europe/Berlin and the current offset from UTC in seconds, so 3600 means one hour.
  • currency: the country's currency as an ISO code, for example EUR.
  • isp, org, asname: the name of the network operator. All three contain the same value.
  • as: network number with name, for example AS15169 Google LLC.
  • query: the IP address that was looked up. If you queried a domain, this is the IP address it resolved to.

The fields district, reverse, mobile, proxy and hosting remain in the response so existing integrations don't break, but they are always null. Don't base any logic on them.

Language of the names

Continent, country, region and city names are in German by default. Use the lang parameter to choose another language: de, en, es, pt-BR, fr, ja, zh-CN or ru. If a name isn't available in the chosen language, it comes back in English.

Use the exact spelling. Any other value is rejected with HTTP 400:

{"status":"fail","message":"Invalid parameters: ..."}

The text after the colon is in German at the moment.

When something goes wrong

If an address can't be located, the API still answers with HTTP 200, so always check the status field. With fail, message gives the reason and the location fields are missing:

{"status":"fail","message":"private range","query":"192.168.1.20"}
HTTP status and message Meaning
200 fail, invalid query Neither a valid IP address nor a domain that can be resolved.
200 fail, private range A private address from a local network.
200 fail, reserved range A reserved address, for example 127.0.0.1.
200 fail, not found The address isn't in the location data.
400 fail, Invalid parameters: ... The value of lang is invalid.
500 fail, Internal server error An unexpected error. Try again after a short pause.
503 fail, Geolocation database unavailable Location lookups are unavailable right now. Try again after a short pause.

Errors related to keys and balance are covered in Errors and rate limits.

What does a lookup cost?

IP Geolocation is billed per 1,000 successful lookups. Only responses with status: success count; fail and all errors are free. The amounts are on the pricing page, and the prices that apply to your team are in the dashboard under Billing. If your balance is too low, the API answers with HTTP 402. See Understanding FlowData prices for details.

Good to know

Was this article helpful?

Back to IP Geolocation & Client Info