Understanding the API response - data definitions

Parsing the response, and interpretation of fields/attributes.

Once you have made your first API call, read on to understand the data expressed in the HTTP 200 OK response.

A sample response

{
  "ip": "98.97.16.1",
  "isEuropeanUnion": false,
  "l10n": {
    "currencyName": "Dollar",
    "currencyCode": "USD",
    "currencySymbol": "$",
    "langCodes": [
      "en-US",
      "es-US",
      "haw",
      "fr"
    ]
  },
  "locationData": {
    "countryName": "United States",
    "countryCode": "US",
    "stateName": "New York",
    "stateCode": "NY",
    "cityName": "New York City, NY",
    "cityGeonamesId": 5128581,
    "lat": 40.71,
    "lng": -74.01,
    "tz": "America/New_York",
    "continentCode": "NA"
  },
  "satellite": {
    "provider": "SpaceX Starlink"
  }
}

Interpreting data fields

Here are the key JSON properties you will need to parse. Note that due to the statistical models used for IP geo-location, all locations should be considered approximate.

Field NameDescription
ip The IP address described in the response that follows. If you specified 'auto' in the REST API path, this also denotes the client's IP address observed by Fastah's server.
isEuropeanUnionWhether the IP is used in an EU member state.
l10n.currencyNameThe short-form colloquially-used currency name, e.g., "Dollar" but not "United States Dollar." Suitable for displaying to the user with accompanying context such as country name, flag, etc.
l10n.currencyCodeThe 3-letter ISO 4217 code for the currency. Suitable for programmers but only sometimes understood by end users. E.g. USD, EUR, or CNY.
l10n.currencySymbolThe symbol for the currency, such as $, ¥, when written in Latin script.
l10n.langCodesAn array of language locales used in the country - used for text formatting or translation text lookups.

Always of length >= 1, _defaults to "en" _as a reasonable fallback when data is unavailable.
locationData.countryNameThe short-form colloquially-used name of the country, e.g., "United States" but not "United States of America."
locationData.countryCodeThe two-letter country code (ISO 3166-1).
locationData.stateNameThe short-form colloquially-used state or province name, e.g. "Massachusetts". This is the first-level administrative subdivision of a country, so this may be an empty string for smaller nations such as Singapore.
locationData.stateCodeThe ISO code of the state or province name (see above). May be empty for smaller nations that don't have such subdivisions.
locationData.cityNameThe major city closest to the geo-coordinates described below.
locationData.cityGeonamesIdThe unique ID of the city as defined in the Geonames.org database.
locationData.lat, locationData.lngThe approximate latitude and longitude based on statistical models.
locationData.tzThe timezone in tzdata string format widely supported in date and time packages of programming languages.
locationData.continentCodeThe continent code of the country, e.g "NA" for North America, or "AS" for Asia. Note that "EU" for Europe in this field does not imply membership of the European Union for which a separate attribute isEuropeanUnion exists (see above).
satelliteAn optional attribute that only exists if this IP belongs to a known satellite internet systems such as Starlink by SpaceX or Viasat.
satellite.providerThe name of the satellite internet provider, e.g "SpaceX Starlink".