Perplexity · Schema

UserLocation

User's geographic location for search personalization

Properties

Name Type Description
latitude object Latitude coordinate
longitude object Longitude coordinate
country object ISO 3166-1 alpha-2 country code
city object City name
region object State or region name
View JSON Schema on GitHub

JSON Schema

perplexity-userlocation-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/UserLocation",
  "title": "UserLocation",
  "description": "User's geographic location for search personalization",
  "properties": {
    "latitude": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Latitude",
      "description": "Latitude coordinate"
    },
    "longitude": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Longitude",
      "description": "Longitude coordinate"
    },
    "country": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Country",
      "description": "ISO 3166-1 alpha-2 country code"
    },
    "city": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "City",
      "description": "City name"
    },
    "region": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Region",
      "description": "State or region name"
    }
  },
  "type": "object"
}