{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/casatoo-pt/json-schema/casatoo-pt-public-search-request-schema.json",
  "title": "PublicSearchRequest",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/casatoo-pt-openapi.yml#/components/schemas/PublicSearchRequest",
  "properties": {
    "cursor": {
      "anyOf": [
        {
          "maxLength": 500,
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "geometry": {
      "anyOf": [
        {
          "properties": {
            "coordinates": {
              "items": {
                "items": {
                  "items": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "integer"
                      }
                    ]
                  },
                  "type": "array"
                },
                "type": "array"
              },
              "type": "array"
            },
            "type": {
              "const": "Polygon",
              "type": "string"
            }
          },
          "required": [
            "type",
            "coordinates"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "gross_area_max": {
      "anyOf": [
        {
          "type": "integer"
        }
      ]
    },
    "gross_area_min": {
      "default": 0,
      "maximum": 100000,
      "minimum": 0,
      "type": "integer"
    },
    "limit": {
      "default": 18,
      "maximum": 24,
      "minimum": 1,
      "type": "integer"
    },
    "location_slug": {
      "anyOf": [
        {
          "maxLength": 100,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "plot_area_max": {
      "anyOf": [
        {
          "type": "number"
        }
      ]
    },
    "plot_area_min": {
      "default": 0,
      "maximum": 100000000,
      "minimum": 0,
      "type": "number"
    },
    "plot_zoning_categories": {
      "items": {
        "enum": [
          "urban",
          "urbanizable",
          "rustic"
        ],
        "type": "string"
      },
      "maxItems": 1,
      "type": "array"
    },
    "price_max": {
      "anyOf": [
        {
          "type": "number"
        }
      ]
    },
    "price_min": {
      "default": 0,
      "maximum": 100000000,
      "minimum": 0,
      "type": "number"
    },
    "property_categories": {
      "items": {
        "enum": [
          "apartment",
          "house",
          "plot"
        ],
        "type": "string"
      },
      "maxItems": 1,
      "type": "array"
    },
    "rooms": {
      "items": {
        "enum": [
          "T0",
          "T1",
          "T2",
          "T3",
          "T4",
          "T5+"
        ],
        "type": "string"
      },
      "maxItems": 6,
      "type": "array"
    },
    "sort_by": {
      "default": "newest",
      "enum": [
        "newest",
        "highest_price",
        "lowest_price"
      ],
      "type": "string"
    }
  },
  "type": "object"
}