---
updatedAt: 2026-07-20T07:51:42.000Z
agentTools:
  projectIndex: https://docs.getfastah.com/llms.txt
---

# Looks up IP attributes

Find information about an IPv4 or IPv6 address such as city, state, country, timezone, satellite ISP, and geo-coordinates. An API key is available via a free trial on AWS Marketplace (https://aws.amazon.com/marketplace/pp/B084VR96P3).

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "externalDocs": {
    "description": "Quick-start guide for developers",
    "url": "https://docs.getfastah.com/docs/getting-started"
  },
  "info": {
    "title": "Fastah IP Geolocation API for City, Country, Maps - Personalization & Security",
    "description": "Fastah API on AWS Marketplace provides approximate city-level location, country, timezone, and mapping geo-coordinates for an IP address using statistical models.",
    "contact": {
      "name": "Fastah Support",
      "url": "https://docs.getfastah.com",
      "email": "support@getfastah.com"
    },
    "version": "1.0.3"
  },
  "servers": [
    {
      "url": "https://ep.api.getfastah.com/whereis/v1/json",
      "description": "AWS Marketplace API endpoint; sign-up here for a Fastah-Key API key - https://aws.amazon.com/marketplace/pp/B084VR96P3"
    }
  ],
  "tags": [
    {
      "name": "location",
      "description": "Location-related API"
    }
  ],
  "paths": {
    "/{ip}": {
      "get": {
        "security": [
          {
            "ApiKeyAsHeader": []
          }
        ],
        "tags": [
          "location"
        ],
        "summary": "Looks up IP attributes",
        "description": "Find information about an IPv4 or IPv6 address such as city, state, country, timezone, satellite ISP, and geo-coordinates. An API key is available via a free trial on AWS Marketplace (https://aws.amazon.com/marketplace/pp/B084VR96P3).",
        "operationId": "getLocationByIP",
        "parameters": [
          {
            "name": "ip",
            "in": "path",
            "description": "An IP address. 129.222.224.1, or just 'auto' for IP auto-detection.",
            "required": true,
            "schema": {
              "type": "string",
              "default": "auto"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "This success response returns the approximate geo-coordinates, city name, country, and time zone of the specified IP.",
            "headers": {
              "Cache-Control": {
                "required": true,
                "description": "As IP address data is refreshed daily, do not cache or use a Fastah API responses beyond 24 hours.",
                "schema": {
                  "type": "string",
                  "default": "private, max-age=86400"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/locationResponse"
                }
              }
            }
          },
          "400": {
            "description": "This response is returned when a malformed or invalid IP address was specified in the request.",
            "headers": {
              "Cache-Control": {
                "required": false,
                "description": "Invalid IP address response may be cached as the result is not going to be stale.",
                "schema": {
                  "type": "string",
                  "default": "private, max-age=86400"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/problemResponse"
                },
                "example": {
                  "error": {
                    "message": "The IP specified (192.168.2.1) is not publicly addressable - see the IANA IPv4 Special-Purpose Address Registry"
                  }
                }
              }
            }
          },
          "404": {
            "description": "This response is returned when Fastah did not have any information about the requested IP.",
            "headers": {
              "Cache-Control": {
                "required": false,
                "description": "If we don't have an IP address today; maybe tomorrow's data refresh will add it.",
                "schema": {
                  "type": "string",
                  "default": "private, max-age=86400"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/problemResponse"
                },
                "example": {
                  "error": {
                    "message": "No information is available on the IP specified"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "locationResponse": {
        "required": [
          "ip",
          "isEuropeanUnion",
          "l10n",
          "locationData"
        ],
        "type": "object",
        "properties": {
          "ip": {
            "type": "string",
            "description": "the IP address which is described in this response",
            "example": "98.97.16.1"
          },
          "isEuropeanUnion": {
            "type": "boolean",
            "description": "True if the country is a member state of the European Union",
            "example": false
          },
          "locationData": {
            "required": [
              "cityGeonamesId",
              "cityName",
              "continentCode",
              "countryCode",
              "countryName",
              "lat",
              "lng",
              "stateCode",
              "stateName",
              "tz"
            ],
            "type": "object",
            "properties": {
              "countryName": {
                "type": "string",
                "description": "Country name as a display string",
                "example": "United States"
              },
              "countryCode": {
                "type": "string",
                "description": "Country name as an ISO 3166-1 code",
                "example": "US"
              },
              "stateName": {
                "type": "string",
                "description": "Name of the first-order administrative entity below the country level, which is usually a state or province.",
                "example": "New York",
                "default": ""
              },
              "stateCode": {
                "type": "string",
                "description": "ISO2 code, if available, of the first-order administrative entity below the country level, which is usually a state or province.",
                "example": "NY",
                "default": ""
              },
              "cityName": {
                "type": "string",
                "description": "City name",
                "example": "New York City, NY"
              },
              "cityGeonamesId": {
                "type": "integer",
                "description": "Lookup key for the city in Geonames.org",
                "format": "uint64",
                "example": 4930956
              },
              "lat": {
                "type": "number",
                "description": "Latitude representing the approximate location",
                "example": 42.36
              },
              "lng": {
                "type": "number",
                "description": "Longitude representing the approximate location",
                "example": -71.06
              },
              "tz": {
                "type": "string",
                "description": "Time zone for the region",
                "example": "America/New_York"
              },
              "continentCode": {
                "type": "string",
                "description": "2-letter continent code",
                "example": "NA"
              }
            },
            "description": "Geo-location data for this IP"
          },
          "l10n": {
            "required": [
              "currencyCode",
              "currencyName",
              "currencySymbol",
              "langCodes"
            ],
            "type": "object",
            "properties": {
              "currencyName": {
                "type": "string",
                "description": "Currency name in abbreviated form",
                "example": "Dollar"
              },
              "currencyCode": {
                "type": "string",
                "description": "Currency code in 3-letter ISO 4217 form",
                "example": "USD"
              },
              "currencySymbol": {
                "type": "string",
                "description": "Currency symbol in abbreviated form (e.g $ and not US$)",
                "example": "$"
              },
              "langCodes": {
                "minItems": 1,
                "type": "array",
                "description": "List of language codes or locales that are used in the country",
                "example": [
                  "en-US",
                  "es-US",
                  "haw",
                  "fr"
                ],
                "items": {
                  "type": "string"
                }
              }
            },
            "description": "Localization related attributes"
          },
          "satellite": {
            "required": [
              "provider"
            ],
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "description": "Name of the satellite internet service provider, and empty string if this is not one.",
                "example": "SpaceX Starlink",
                "default": ""
              }
            },
            "description": "Detection of one of the two satellite internet service providers supported : SpaceX Starlink and ViaSat."
          }
        }
      },
      "problemResponse": {
        "required": [
          "error"
        ],
        "type": "object",
        "properties": {
          "error": {
            "required": [
              "message"
            ],
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "A description of what went wrong",
                "example": "127.0.0.1 is not a valid, globally routable IP address."
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAsHeader": {
        "description": "Recommended method for Fastah API authentication using an HTTP header called Fastah-Key",
        "type": "apiKey",
        "name": "Fastah-Key",
        "in": "header"
      }
    }
  },
  "x-readme": {}
}
```