{
  "openapi": "3.1.0",
  "info": {
    "title": "Casafari Area Insights API",
    "version": "2026-10-31.1",
    "summary": "Market statistics for an area: price time series, price, bedroom and time-on-market distributions, analysis and heatmaps, plus registered sale prices, what homes actually sold for, in Spain, France, Italy and Poland (and Portugal as official quarterly medians): weekly price trends, average prices by location and the number of sales by property type.",
    "description": "Casafari sells property data to people and AI agents through self-serve APIs and MCP servers. One account, one key and one balance of tokens work on every product. Tokens are the billing atom; every operation lists its cost in x-casafari-units. When tokens run out the API answers 402 with a payment link to top up."
  },
  "servers": [
    {
      "url": "https://platform.casafari.com"
    }
  ],
  "tags": [
    {
      "name": "Area Insights"
    }
  ],
  "externalDocs": {
    "url": "https://developers.casafari.com/docs"
  },
  "paths": {
    "/v1/area-insights/analysis": {
      "post": {
        "operationId": "area_insights_analysis",
        "summary": "Area insights analysis",
        "description": "Costs 25 tokens a call.",
        "tags": [
          "Area Insights"
        ],
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth2": [
              "area-insights:read"
            ]
          }
        ],
        "x-casafari-operation-id": "area-insights.analysis",
        "x-casafari-units": 25,
        "x-casafari-scope": "area-insights:read",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              },
              "Casafari-Units-Charged": {
                "$ref": "#/components/headers/Casafari-Units-Charged"
              },
              "Casafari-Units-Remaining": {
                "$ref": "#/components/headers/Casafari-Units-Remaining"
              },
              "Casafari-Units-Source": {
                "$ref": "#/components/headers/Casafari-Units-Source"
              },
              "Casafari-Plan": {
                "$ref": "#/components/headers/Casafari-Plan"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `key_in_query` (https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-request",
                      "title": "The request is not valid.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "invalid_request",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "key_in_query": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/key-in-query",
                      "title": "Credentials are not accepted in the URL.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "key_in_query",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "invalid_request",
              "key_in_query"
            ]
          },
          "401": {
            "description": "`unauthorized`, `invalid_credential`, `credential_revoked`, `token_expired` (https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unauthorized",
                      "title": "A credential is required.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "unauthorized",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "invalid_credential": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-credential",
                      "title": "The credential is not valid.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "invalid_credential",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "credential_revoked": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/credential-revoked",
                      "title": "The credential has been revoked.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "credential_revoked",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "token_expired": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/token-expired",
                      "title": "The access token has expired.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "token_expired",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired"
            ]
          },
          "402": {
            "description": "`payment_required` (https://platform.casafari.com/errors/payment-required)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payment_required": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payment-required",
                      "title": "Payment is required to continue.",
                      "status": 402,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "payment_required",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payment_required"
            ]
          },
          "403": {
            "description": "`insufficient_scope`, `not_entitled`, `account_suspended` (https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "insufficient_scope": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/insufficient-scope",
                      "title": "The credential lacks the scope this operation needs.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "insufficient_scope",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "not_entitled": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-entitled",
                      "title": "This account is not entitled to this product or country.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "not_entitled",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "account_suspended": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/account-suspended",
                      "title": "The account is suspended.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "account_suspended",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "insufficient_scope",
              "not_entitled",
              "account_suspended"
            ]
          },
          "404": {
            "description": "`not_found` (https://platform.casafari.com/errors/not-found)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-found",
                      "title": "Not found.",
                      "status": 404,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "not_found",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "not_found"
            ]
          },
          "405": {
            "description": "`method_not_allowed` (https://platform.casafari.com/errors/method-not-allowed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "method_not_allowed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/method-not-allowed",
                      "title": "Method not allowed.",
                      "status": 405,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "method_not_allowed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "method_not_allowed"
            ]
          },
          "409": {
            "description": "`conflict` (https://platform.casafari.com/errors/conflict)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "conflict": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/conflict",
                      "title": "The request conflicts with the current state.",
                      "status": 409,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "conflict",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "conflict"
            ]
          },
          "413": {
            "description": "`payload_too_large` (https://platform.casafari.com/errors/payload-too-large)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payload-too-large",
                      "title": "The request body is too large.",
                      "status": 413,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "payload_too_large",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "description": "`unsupported_media_type` (https://platform.casafari.com/errors/unsupported-media-type)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unsupported-media-type",
                      "title": "Send the body as application/json.",
                      "status": 415,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "unsupported_media_type",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "`validation_failed` (https://platform.casafari.com/errors/validation-failed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation_failed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/validation-failed",
                      "title": "The request body did not match the schema.",
                      "status": 422,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "validation_failed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "`rate_limited`, `daily_limit_reached`, `request_limit_reached`, `usage_limit_reached` (https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/rate-limited",
                      "title": "Too many requests.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "rate_limited",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "daily_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/daily-limit-reached",
                      "title": "This account has reached its daily limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "daily_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "request_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/request-limit-reached",
                      "title": "This account has reached a request limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "request_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "usage_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/usage-limit-reached",
                      "title": "A usage limit of this plan is used up.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "usage_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "usage_limit_reached"
            ]
          },
          "500": {
            "description": "`internal_error` (https://platform.casafari.com/errors/internal-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/internal-error",
                      "title": "Something went wrong on our side.",
                      "status": 500,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "internal_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "internal_error"
            ]
          },
          "502": {
            "description": "`upstream_error` (https://platform.casafari.com/errors/upstream-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-error",
                      "title": "The data service failed to answer.",
                      "status": 502,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "upstream_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_error"
            ]
          },
          "503": {
            "description": "`capacity_exhausted`, `unavailable` (https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "capacity_exhausted": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/capacity-exhausted",
                      "title": "The platform has reached its capacity for today.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "capacity_exhausted",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "unavailable": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unavailable",
                      "title": "The service is not available just now.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "unavailable",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "capacity_exhausted",
              "unavailable"
            ]
          },
          "504": {
            "description": "`upstream_timeout` (https://platform.casafari.com/errors/upstream-timeout)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_timeout": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-timeout",
                      "title": "The data service took too long to answer.",
                      "status": 504,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/analysis",
                      "code": "upstream_timeout",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_timeout"
            ]
          }
        }
      }
    },
    "/v1/area-insights/distributions/properties": {
      "post": {
        "operationId": "area_insights_distributions_properties",
        "summary": "Area insights distributions properties",
        "description": "Costs 25 tokens a call.",
        "tags": [
          "Area Insights"
        ],
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth2": [
              "area-insights:read"
            ]
          }
        ],
        "x-casafari-operation-id": "area-insights.distributions.properties",
        "x-casafari-units": 25,
        "x-casafari-scope": "area-insights:read",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              },
              "Casafari-Units-Charged": {
                "$ref": "#/components/headers/Casafari-Units-Charged"
              },
              "Casafari-Units-Remaining": {
                "$ref": "#/components/headers/Casafari-Units-Remaining"
              },
              "Casafari-Units-Source": {
                "$ref": "#/components/headers/Casafari-Units-Source"
              },
              "Casafari-Plan": {
                "$ref": "#/components/headers/Casafari-Plan"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `key_in_query` (https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-request",
                      "title": "The request is not valid.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "invalid_request",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "key_in_query": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/key-in-query",
                      "title": "Credentials are not accepted in the URL.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "key_in_query",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "invalid_request",
              "key_in_query"
            ]
          },
          "401": {
            "description": "`unauthorized`, `invalid_credential`, `credential_revoked`, `token_expired` (https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unauthorized",
                      "title": "A credential is required.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "unauthorized",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "invalid_credential": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-credential",
                      "title": "The credential is not valid.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "invalid_credential",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "credential_revoked": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/credential-revoked",
                      "title": "The credential has been revoked.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "credential_revoked",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "token_expired": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/token-expired",
                      "title": "The access token has expired.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "token_expired",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired"
            ]
          },
          "402": {
            "description": "`payment_required` (https://platform.casafari.com/errors/payment-required)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payment_required": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payment-required",
                      "title": "Payment is required to continue.",
                      "status": 402,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "payment_required",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payment_required"
            ]
          },
          "403": {
            "description": "`insufficient_scope`, `not_entitled`, `account_suspended` (https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "insufficient_scope": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/insufficient-scope",
                      "title": "The credential lacks the scope this operation needs.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "insufficient_scope",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "not_entitled": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-entitled",
                      "title": "This account is not entitled to this product or country.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "not_entitled",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "account_suspended": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/account-suspended",
                      "title": "The account is suspended.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "account_suspended",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "insufficient_scope",
              "not_entitled",
              "account_suspended"
            ]
          },
          "404": {
            "description": "`not_found` (https://platform.casafari.com/errors/not-found)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-found",
                      "title": "Not found.",
                      "status": 404,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "not_found",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "not_found"
            ]
          },
          "405": {
            "description": "`method_not_allowed` (https://platform.casafari.com/errors/method-not-allowed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "method_not_allowed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/method-not-allowed",
                      "title": "Method not allowed.",
                      "status": 405,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "method_not_allowed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "method_not_allowed"
            ]
          },
          "409": {
            "description": "`conflict` (https://platform.casafari.com/errors/conflict)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "conflict": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/conflict",
                      "title": "The request conflicts with the current state.",
                      "status": 409,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "conflict",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "conflict"
            ]
          },
          "413": {
            "description": "`payload_too_large` (https://platform.casafari.com/errors/payload-too-large)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payload-too-large",
                      "title": "The request body is too large.",
                      "status": 413,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "payload_too_large",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "description": "`unsupported_media_type` (https://platform.casafari.com/errors/unsupported-media-type)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unsupported-media-type",
                      "title": "Send the body as application/json.",
                      "status": 415,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "unsupported_media_type",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "`validation_failed` (https://platform.casafari.com/errors/validation-failed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation_failed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/validation-failed",
                      "title": "The request body did not match the schema.",
                      "status": 422,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "validation_failed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "`rate_limited`, `daily_limit_reached`, `request_limit_reached`, `usage_limit_reached` (https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/rate-limited",
                      "title": "Too many requests.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "rate_limited",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "daily_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/daily-limit-reached",
                      "title": "This account has reached its daily limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "daily_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "request_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/request-limit-reached",
                      "title": "This account has reached a request limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "request_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "usage_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/usage-limit-reached",
                      "title": "A usage limit of this plan is used up.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "usage_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "usage_limit_reached"
            ]
          },
          "500": {
            "description": "`internal_error` (https://platform.casafari.com/errors/internal-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/internal-error",
                      "title": "Something went wrong on our side.",
                      "status": 500,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "internal_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "internal_error"
            ]
          },
          "502": {
            "description": "`upstream_error` (https://platform.casafari.com/errors/upstream-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-error",
                      "title": "The data service failed to answer.",
                      "status": 502,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "upstream_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_error"
            ]
          },
          "503": {
            "description": "`capacity_exhausted`, `unavailable` (https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "capacity_exhausted": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/capacity-exhausted",
                      "title": "The platform has reached its capacity for today.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "capacity_exhausted",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "unavailable": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unavailable",
                      "title": "The service is not available just now.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "unavailable",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "capacity_exhausted",
              "unavailable"
            ]
          },
          "504": {
            "description": "`upstream_timeout` (https://platform.casafari.com/errors/upstream-timeout)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_timeout": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-timeout",
                      "title": "The data service took too long to answer.",
                      "status": 504,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/properties",
                      "code": "upstream_timeout",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_timeout"
            ]
          }
        }
      }
    },
    "/v1/area-insights/distributions/prices": {
      "post": {
        "operationId": "area_insights_distributions_prices",
        "summary": "Area insights distributions prices",
        "description": "Costs 25 tokens a call.",
        "tags": [
          "Area Insights"
        ],
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth2": [
              "area-insights:read"
            ]
          }
        ],
        "x-casafari-operation-id": "area-insights.distributions.prices",
        "x-casafari-units": 25,
        "x-casafari-scope": "area-insights:read",
        "x-casafari-mcp-tools": [
          "area-insights_get_price_distribution"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              },
              "Casafari-Units-Charged": {
                "$ref": "#/components/headers/Casafari-Units-Charged"
              },
              "Casafari-Units-Remaining": {
                "$ref": "#/components/headers/Casafari-Units-Remaining"
              },
              "Casafari-Units-Source": {
                "$ref": "#/components/headers/Casafari-Units-Source"
              },
              "Casafari-Plan": {
                "$ref": "#/components/headers/Casafari-Plan"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `key_in_query` (https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-request",
                      "title": "The request is not valid.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "invalid_request",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "key_in_query": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/key-in-query",
                      "title": "Credentials are not accepted in the URL.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "key_in_query",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "invalid_request",
              "key_in_query"
            ]
          },
          "401": {
            "description": "`unauthorized`, `invalid_credential`, `credential_revoked`, `token_expired` (https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unauthorized",
                      "title": "A credential is required.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "unauthorized",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "invalid_credential": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-credential",
                      "title": "The credential is not valid.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "invalid_credential",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "credential_revoked": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/credential-revoked",
                      "title": "The credential has been revoked.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "credential_revoked",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "token_expired": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/token-expired",
                      "title": "The access token has expired.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "token_expired",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired"
            ]
          },
          "402": {
            "description": "`payment_required` (https://platform.casafari.com/errors/payment-required)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payment_required": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payment-required",
                      "title": "Payment is required to continue.",
                      "status": 402,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "payment_required",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payment_required"
            ]
          },
          "403": {
            "description": "`insufficient_scope`, `not_entitled`, `account_suspended` (https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "insufficient_scope": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/insufficient-scope",
                      "title": "The credential lacks the scope this operation needs.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "insufficient_scope",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "not_entitled": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-entitled",
                      "title": "This account is not entitled to this product or country.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "not_entitled",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "account_suspended": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/account-suspended",
                      "title": "The account is suspended.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "account_suspended",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "insufficient_scope",
              "not_entitled",
              "account_suspended"
            ]
          },
          "404": {
            "description": "`not_found` (https://platform.casafari.com/errors/not-found)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-found",
                      "title": "Not found.",
                      "status": 404,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "not_found",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "not_found"
            ]
          },
          "405": {
            "description": "`method_not_allowed` (https://platform.casafari.com/errors/method-not-allowed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "method_not_allowed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/method-not-allowed",
                      "title": "Method not allowed.",
                      "status": 405,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "method_not_allowed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "method_not_allowed"
            ]
          },
          "409": {
            "description": "`conflict` (https://platform.casafari.com/errors/conflict)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "conflict": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/conflict",
                      "title": "The request conflicts with the current state.",
                      "status": 409,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "conflict",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "conflict"
            ]
          },
          "413": {
            "description": "`payload_too_large` (https://platform.casafari.com/errors/payload-too-large)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payload-too-large",
                      "title": "The request body is too large.",
                      "status": 413,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "payload_too_large",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "description": "`unsupported_media_type` (https://platform.casafari.com/errors/unsupported-media-type)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unsupported-media-type",
                      "title": "Send the body as application/json.",
                      "status": 415,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "unsupported_media_type",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "`validation_failed` (https://platform.casafari.com/errors/validation-failed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation_failed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/validation-failed",
                      "title": "The request body did not match the schema.",
                      "status": 422,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "validation_failed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "`rate_limited`, `daily_limit_reached`, `request_limit_reached`, `usage_limit_reached` (https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/rate-limited",
                      "title": "Too many requests.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "rate_limited",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "daily_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/daily-limit-reached",
                      "title": "This account has reached its daily limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "daily_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "request_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/request-limit-reached",
                      "title": "This account has reached a request limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "request_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "usage_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/usage-limit-reached",
                      "title": "A usage limit of this plan is used up.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "usage_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "usage_limit_reached"
            ]
          },
          "500": {
            "description": "`internal_error` (https://platform.casafari.com/errors/internal-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/internal-error",
                      "title": "Something went wrong on our side.",
                      "status": 500,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "internal_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "internal_error"
            ]
          },
          "502": {
            "description": "`upstream_error` (https://platform.casafari.com/errors/upstream-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-error",
                      "title": "The data service failed to answer.",
                      "status": 502,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "upstream_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_error"
            ]
          },
          "503": {
            "description": "`capacity_exhausted`, `unavailable` (https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "capacity_exhausted": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/capacity-exhausted",
                      "title": "The platform has reached its capacity for today.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "capacity_exhausted",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "unavailable": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unavailable",
                      "title": "The service is not available just now.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "unavailable",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "capacity_exhausted",
              "unavailable"
            ]
          },
          "504": {
            "description": "`upstream_timeout` (https://platform.casafari.com/errors/upstream-timeout)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_timeout": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-timeout",
                      "title": "The data service took too long to answer.",
                      "status": 504,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/prices",
                      "code": "upstream_timeout",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_timeout"
            ]
          }
        }
      }
    },
    "/v1/area-insights/distributions/bedrooms": {
      "post": {
        "operationId": "area_insights_distributions_bedrooms",
        "summary": "Area insights distributions bedrooms",
        "description": "Costs 25 tokens a call.",
        "tags": [
          "Area Insights"
        ],
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth2": [
              "area-insights:read"
            ]
          }
        ],
        "x-casafari-operation-id": "area-insights.distributions.bedrooms",
        "x-casafari-units": 25,
        "x-casafari-scope": "area-insights:read",
        "x-casafari-mcp-tools": [
          "area-insights_get_bedrooms_distribution"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              },
              "Casafari-Units-Charged": {
                "$ref": "#/components/headers/Casafari-Units-Charged"
              },
              "Casafari-Units-Remaining": {
                "$ref": "#/components/headers/Casafari-Units-Remaining"
              },
              "Casafari-Units-Source": {
                "$ref": "#/components/headers/Casafari-Units-Source"
              },
              "Casafari-Plan": {
                "$ref": "#/components/headers/Casafari-Plan"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `key_in_query` (https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-request",
                      "title": "The request is not valid.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "invalid_request",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "key_in_query": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/key-in-query",
                      "title": "Credentials are not accepted in the URL.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "key_in_query",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "invalid_request",
              "key_in_query"
            ]
          },
          "401": {
            "description": "`unauthorized`, `invalid_credential`, `credential_revoked`, `token_expired` (https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unauthorized",
                      "title": "A credential is required.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "unauthorized",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "invalid_credential": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-credential",
                      "title": "The credential is not valid.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "invalid_credential",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "credential_revoked": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/credential-revoked",
                      "title": "The credential has been revoked.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "credential_revoked",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "token_expired": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/token-expired",
                      "title": "The access token has expired.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "token_expired",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired"
            ]
          },
          "402": {
            "description": "`payment_required` (https://platform.casafari.com/errors/payment-required)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payment_required": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payment-required",
                      "title": "Payment is required to continue.",
                      "status": 402,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "payment_required",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payment_required"
            ]
          },
          "403": {
            "description": "`insufficient_scope`, `not_entitled`, `account_suspended` (https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "insufficient_scope": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/insufficient-scope",
                      "title": "The credential lacks the scope this operation needs.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "insufficient_scope",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "not_entitled": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-entitled",
                      "title": "This account is not entitled to this product or country.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "not_entitled",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "account_suspended": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/account-suspended",
                      "title": "The account is suspended.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "account_suspended",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "insufficient_scope",
              "not_entitled",
              "account_suspended"
            ]
          },
          "404": {
            "description": "`not_found` (https://platform.casafari.com/errors/not-found)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-found",
                      "title": "Not found.",
                      "status": 404,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "not_found",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "not_found"
            ]
          },
          "405": {
            "description": "`method_not_allowed` (https://platform.casafari.com/errors/method-not-allowed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "method_not_allowed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/method-not-allowed",
                      "title": "Method not allowed.",
                      "status": 405,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "method_not_allowed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "method_not_allowed"
            ]
          },
          "409": {
            "description": "`conflict` (https://platform.casafari.com/errors/conflict)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "conflict": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/conflict",
                      "title": "The request conflicts with the current state.",
                      "status": 409,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "conflict",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "conflict"
            ]
          },
          "413": {
            "description": "`payload_too_large` (https://platform.casafari.com/errors/payload-too-large)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payload-too-large",
                      "title": "The request body is too large.",
                      "status": 413,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "payload_too_large",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "description": "`unsupported_media_type` (https://platform.casafari.com/errors/unsupported-media-type)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unsupported-media-type",
                      "title": "Send the body as application/json.",
                      "status": 415,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "unsupported_media_type",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "`validation_failed` (https://platform.casafari.com/errors/validation-failed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation_failed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/validation-failed",
                      "title": "The request body did not match the schema.",
                      "status": 422,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "validation_failed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "`rate_limited`, `daily_limit_reached`, `request_limit_reached`, `usage_limit_reached` (https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/rate-limited",
                      "title": "Too many requests.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "rate_limited",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "daily_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/daily-limit-reached",
                      "title": "This account has reached its daily limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "daily_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "request_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/request-limit-reached",
                      "title": "This account has reached a request limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "request_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "usage_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/usage-limit-reached",
                      "title": "A usage limit of this plan is used up.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "usage_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "usage_limit_reached"
            ]
          },
          "500": {
            "description": "`internal_error` (https://platform.casafari.com/errors/internal-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/internal-error",
                      "title": "Something went wrong on our side.",
                      "status": 500,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "internal_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "internal_error"
            ]
          },
          "502": {
            "description": "`upstream_error` (https://platform.casafari.com/errors/upstream-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-error",
                      "title": "The data service failed to answer.",
                      "status": 502,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "upstream_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_error"
            ]
          },
          "503": {
            "description": "`capacity_exhausted`, `unavailable` (https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "capacity_exhausted": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/capacity-exhausted",
                      "title": "The platform has reached its capacity for today.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "capacity_exhausted",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "unavailable": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unavailable",
                      "title": "The service is not available just now.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "unavailable",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "capacity_exhausted",
              "unavailable"
            ]
          },
          "504": {
            "description": "`upstream_timeout` (https://platform.casafari.com/errors/upstream-timeout)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_timeout": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-timeout",
                      "title": "The data service took too long to answer.",
                      "status": 504,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/bedrooms",
                      "code": "upstream_timeout",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_timeout"
            ]
          }
        }
      }
    },
    "/v1/area-insights/distributions/time-on-market": {
      "post": {
        "operationId": "area_insights_distributions_time_on_market",
        "summary": "Area insights distributions time ON market",
        "description": "Costs 25 tokens a call.",
        "tags": [
          "Area Insights"
        ],
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth2": [
              "area-insights:read"
            ]
          }
        ],
        "x-casafari-operation-id": "area-insights.distributions.time-on-market",
        "x-casafari-units": 25,
        "x-casafari-scope": "area-insights:read",
        "x-casafari-mcp-tools": [
          "area-insights_get_time_on_market_distribution"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              },
              "Casafari-Units-Charged": {
                "$ref": "#/components/headers/Casafari-Units-Charged"
              },
              "Casafari-Units-Remaining": {
                "$ref": "#/components/headers/Casafari-Units-Remaining"
              },
              "Casafari-Units-Source": {
                "$ref": "#/components/headers/Casafari-Units-Source"
              },
              "Casafari-Plan": {
                "$ref": "#/components/headers/Casafari-Plan"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `key_in_query` (https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-request",
                      "title": "The request is not valid.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "invalid_request",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "key_in_query": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/key-in-query",
                      "title": "Credentials are not accepted in the URL.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "key_in_query",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "invalid_request",
              "key_in_query"
            ]
          },
          "401": {
            "description": "`unauthorized`, `invalid_credential`, `credential_revoked`, `token_expired` (https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unauthorized",
                      "title": "A credential is required.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "unauthorized",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "invalid_credential": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-credential",
                      "title": "The credential is not valid.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "invalid_credential",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "credential_revoked": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/credential-revoked",
                      "title": "The credential has been revoked.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "credential_revoked",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "token_expired": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/token-expired",
                      "title": "The access token has expired.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "token_expired",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired"
            ]
          },
          "402": {
            "description": "`payment_required` (https://platform.casafari.com/errors/payment-required)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payment_required": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payment-required",
                      "title": "Payment is required to continue.",
                      "status": 402,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "payment_required",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payment_required"
            ]
          },
          "403": {
            "description": "`insufficient_scope`, `not_entitled`, `account_suspended` (https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "insufficient_scope": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/insufficient-scope",
                      "title": "The credential lacks the scope this operation needs.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "insufficient_scope",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "not_entitled": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-entitled",
                      "title": "This account is not entitled to this product or country.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "not_entitled",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "account_suspended": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/account-suspended",
                      "title": "The account is suspended.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "account_suspended",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "insufficient_scope",
              "not_entitled",
              "account_suspended"
            ]
          },
          "404": {
            "description": "`not_found` (https://platform.casafari.com/errors/not-found)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-found",
                      "title": "Not found.",
                      "status": 404,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "not_found",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "not_found"
            ]
          },
          "405": {
            "description": "`method_not_allowed` (https://platform.casafari.com/errors/method-not-allowed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "method_not_allowed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/method-not-allowed",
                      "title": "Method not allowed.",
                      "status": 405,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "method_not_allowed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "method_not_allowed"
            ]
          },
          "409": {
            "description": "`conflict` (https://platform.casafari.com/errors/conflict)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "conflict": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/conflict",
                      "title": "The request conflicts with the current state.",
                      "status": 409,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "conflict",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "conflict"
            ]
          },
          "413": {
            "description": "`payload_too_large` (https://platform.casafari.com/errors/payload-too-large)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payload-too-large",
                      "title": "The request body is too large.",
                      "status": 413,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "payload_too_large",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "description": "`unsupported_media_type` (https://platform.casafari.com/errors/unsupported-media-type)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unsupported-media-type",
                      "title": "Send the body as application/json.",
                      "status": 415,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "unsupported_media_type",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "`validation_failed` (https://platform.casafari.com/errors/validation-failed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation_failed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/validation-failed",
                      "title": "The request body did not match the schema.",
                      "status": 422,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "validation_failed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "`rate_limited`, `daily_limit_reached`, `request_limit_reached`, `usage_limit_reached` (https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/rate-limited",
                      "title": "Too many requests.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "rate_limited",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "daily_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/daily-limit-reached",
                      "title": "This account has reached its daily limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "daily_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "request_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/request-limit-reached",
                      "title": "This account has reached a request limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "request_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "usage_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/usage-limit-reached",
                      "title": "A usage limit of this plan is used up.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "usage_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "usage_limit_reached"
            ]
          },
          "500": {
            "description": "`internal_error` (https://platform.casafari.com/errors/internal-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/internal-error",
                      "title": "Something went wrong on our side.",
                      "status": 500,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "internal_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "internal_error"
            ]
          },
          "502": {
            "description": "`upstream_error` (https://platform.casafari.com/errors/upstream-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-error",
                      "title": "The data service failed to answer.",
                      "status": 502,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "upstream_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_error"
            ]
          },
          "503": {
            "description": "`capacity_exhausted`, `unavailable` (https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "capacity_exhausted": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/capacity-exhausted",
                      "title": "The platform has reached its capacity for today.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "capacity_exhausted",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "unavailable": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unavailable",
                      "title": "The service is not available just now.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "unavailable",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "capacity_exhausted",
              "unavailable"
            ]
          },
          "504": {
            "description": "`upstream_timeout` (https://platform.casafari.com/errors/upstream-timeout)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_timeout": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-timeout",
                      "title": "The data service took too long to answer.",
                      "status": 504,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/distributions/time-on-market",
                      "code": "upstream_timeout",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_timeout"
            ]
          }
        }
      }
    },
    "/v1/area-insights/time-series": {
      "post": {
        "operationId": "area_insights_time_series",
        "summary": "Area insights time series",
        "description": "Costs 25 tokens a call.",
        "tags": [
          "Area Insights"
        ],
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth2": [
              "area-insights:read"
            ]
          }
        ],
        "x-casafari-operation-id": "area-insights.time-series",
        "x-casafari-units": 25,
        "x-casafari-scope": "area-insights:read",
        "x-casafari-mcp-tools": [
          "area-insights_get_time_series_data"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              },
              "Casafari-Units-Charged": {
                "$ref": "#/components/headers/Casafari-Units-Charged"
              },
              "Casafari-Units-Remaining": {
                "$ref": "#/components/headers/Casafari-Units-Remaining"
              },
              "Casafari-Units-Source": {
                "$ref": "#/components/headers/Casafari-Units-Source"
              },
              "Casafari-Plan": {
                "$ref": "#/components/headers/Casafari-Plan"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `key_in_query` (https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-request",
                      "title": "The request is not valid.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "invalid_request",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "key_in_query": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/key-in-query",
                      "title": "Credentials are not accepted in the URL.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "key_in_query",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "invalid_request",
              "key_in_query"
            ]
          },
          "401": {
            "description": "`unauthorized`, `invalid_credential`, `credential_revoked`, `token_expired` (https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unauthorized",
                      "title": "A credential is required.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "unauthorized",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "invalid_credential": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-credential",
                      "title": "The credential is not valid.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "invalid_credential",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "credential_revoked": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/credential-revoked",
                      "title": "The credential has been revoked.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "credential_revoked",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "token_expired": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/token-expired",
                      "title": "The access token has expired.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "token_expired",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired"
            ]
          },
          "402": {
            "description": "`payment_required` (https://platform.casafari.com/errors/payment-required)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payment_required": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payment-required",
                      "title": "Payment is required to continue.",
                      "status": 402,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "payment_required",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payment_required"
            ]
          },
          "403": {
            "description": "`insufficient_scope`, `not_entitled`, `account_suspended` (https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "insufficient_scope": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/insufficient-scope",
                      "title": "The credential lacks the scope this operation needs.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "insufficient_scope",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "not_entitled": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-entitled",
                      "title": "This account is not entitled to this product or country.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "not_entitled",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "account_suspended": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/account-suspended",
                      "title": "The account is suspended.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "account_suspended",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "insufficient_scope",
              "not_entitled",
              "account_suspended"
            ]
          },
          "404": {
            "description": "`not_found` (https://platform.casafari.com/errors/not-found)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-found",
                      "title": "Not found.",
                      "status": 404,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "not_found",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "not_found"
            ]
          },
          "405": {
            "description": "`method_not_allowed` (https://platform.casafari.com/errors/method-not-allowed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "method_not_allowed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/method-not-allowed",
                      "title": "Method not allowed.",
                      "status": 405,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "method_not_allowed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "method_not_allowed"
            ]
          },
          "409": {
            "description": "`conflict` (https://platform.casafari.com/errors/conflict)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "conflict": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/conflict",
                      "title": "The request conflicts with the current state.",
                      "status": 409,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "conflict",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "conflict"
            ]
          },
          "413": {
            "description": "`payload_too_large` (https://platform.casafari.com/errors/payload-too-large)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payload-too-large",
                      "title": "The request body is too large.",
                      "status": 413,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "payload_too_large",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "description": "`unsupported_media_type` (https://platform.casafari.com/errors/unsupported-media-type)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unsupported-media-type",
                      "title": "Send the body as application/json.",
                      "status": 415,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "unsupported_media_type",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "`validation_failed` (https://platform.casafari.com/errors/validation-failed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation_failed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/validation-failed",
                      "title": "The request body did not match the schema.",
                      "status": 422,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "validation_failed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "`rate_limited`, `daily_limit_reached`, `request_limit_reached`, `usage_limit_reached` (https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/rate-limited",
                      "title": "Too many requests.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "rate_limited",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "daily_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/daily-limit-reached",
                      "title": "This account has reached its daily limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "daily_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "request_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/request-limit-reached",
                      "title": "This account has reached a request limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "request_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "usage_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/usage-limit-reached",
                      "title": "A usage limit of this plan is used up.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "usage_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "usage_limit_reached"
            ]
          },
          "500": {
            "description": "`internal_error` (https://platform.casafari.com/errors/internal-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/internal-error",
                      "title": "Something went wrong on our side.",
                      "status": 500,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "internal_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "internal_error"
            ]
          },
          "502": {
            "description": "`upstream_error` (https://platform.casafari.com/errors/upstream-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-error",
                      "title": "The data service failed to answer.",
                      "status": 502,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "upstream_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_error"
            ]
          },
          "503": {
            "description": "`capacity_exhausted`, `unavailable` (https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "capacity_exhausted": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/capacity-exhausted",
                      "title": "The platform has reached its capacity for today.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "capacity_exhausted",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "unavailable": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unavailable",
                      "title": "The service is not available just now.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "unavailable",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "capacity_exhausted",
              "unavailable"
            ]
          },
          "504": {
            "description": "`upstream_timeout` (https://platform.casafari.com/errors/upstream-timeout)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_timeout": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-timeout",
                      "title": "The data service took too long to answer.",
                      "status": 504,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/time-series",
                      "code": "upstream_timeout",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_timeout"
            ]
          }
        }
      }
    },
    "/v1/area-insights/heatmap": {
      "post": {
        "operationId": "area_insights_heatmap",
        "summary": "Area insights heatmap",
        "description": "Costs 25 tokens a call.",
        "tags": [
          "Area Insights"
        ],
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth2": [
              "area-insights:read"
            ]
          }
        ],
        "x-casafari-operation-id": "area-insights.heatmap",
        "x-casafari-units": 25,
        "x-casafari-scope": "area-insights:read",
        "x-casafari-mcp-tools": [
          "area-insights_get_heatmap"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              },
              "Casafari-Units-Charged": {
                "$ref": "#/components/headers/Casafari-Units-Charged"
              },
              "Casafari-Units-Remaining": {
                "$ref": "#/components/headers/Casafari-Units-Remaining"
              },
              "Casafari-Units-Source": {
                "$ref": "#/components/headers/Casafari-Units-Source"
              },
              "Casafari-Plan": {
                "$ref": "#/components/headers/Casafari-Plan"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `key_in_query` (https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-request",
                      "title": "The request is not valid.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "invalid_request",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "key_in_query": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/key-in-query",
                      "title": "Credentials are not accepted in the URL.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "key_in_query",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "invalid_request",
              "key_in_query"
            ]
          },
          "401": {
            "description": "`unauthorized`, `invalid_credential`, `credential_revoked`, `token_expired` (https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unauthorized",
                      "title": "A credential is required.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "unauthorized",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "invalid_credential": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-credential",
                      "title": "The credential is not valid.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "invalid_credential",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "credential_revoked": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/credential-revoked",
                      "title": "The credential has been revoked.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "credential_revoked",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "token_expired": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/token-expired",
                      "title": "The access token has expired.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "token_expired",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired"
            ]
          },
          "402": {
            "description": "`payment_required` (https://platform.casafari.com/errors/payment-required)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payment_required": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payment-required",
                      "title": "Payment is required to continue.",
                      "status": 402,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "payment_required",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payment_required"
            ]
          },
          "403": {
            "description": "`insufficient_scope`, `not_entitled`, `account_suspended` (https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "insufficient_scope": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/insufficient-scope",
                      "title": "The credential lacks the scope this operation needs.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "insufficient_scope",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "not_entitled": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-entitled",
                      "title": "This account is not entitled to this product or country.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "not_entitled",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "account_suspended": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/account-suspended",
                      "title": "The account is suspended.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "account_suspended",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "insufficient_scope",
              "not_entitled",
              "account_suspended"
            ]
          },
          "404": {
            "description": "`not_found` (https://platform.casafari.com/errors/not-found)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-found",
                      "title": "Not found.",
                      "status": 404,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "not_found",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "not_found"
            ]
          },
          "405": {
            "description": "`method_not_allowed` (https://platform.casafari.com/errors/method-not-allowed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "method_not_allowed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/method-not-allowed",
                      "title": "Method not allowed.",
                      "status": 405,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "method_not_allowed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "method_not_allowed"
            ]
          },
          "409": {
            "description": "`conflict` (https://platform.casafari.com/errors/conflict)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "conflict": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/conflict",
                      "title": "The request conflicts with the current state.",
                      "status": 409,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "conflict",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "conflict"
            ]
          },
          "413": {
            "description": "`payload_too_large` (https://platform.casafari.com/errors/payload-too-large)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payload-too-large",
                      "title": "The request body is too large.",
                      "status": 413,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "payload_too_large",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "description": "`unsupported_media_type` (https://platform.casafari.com/errors/unsupported-media-type)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unsupported-media-type",
                      "title": "Send the body as application/json.",
                      "status": 415,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "unsupported_media_type",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "`validation_failed` (https://platform.casafari.com/errors/validation-failed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation_failed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/validation-failed",
                      "title": "The request body did not match the schema.",
                      "status": 422,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "validation_failed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "`rate_limited`, `daily_limit_reached`, `request_limit_reached`, `usage_limit_reached` (https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/rate-limited",
                      "title": "Too many requests.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "rate_limited",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "daily_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/daily-limit-reached",
                      "title": "This account has reached its daily limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "daily_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "request_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/request-limit-reached",
                      "title": "This account has reached a request limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "request_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "usage_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/usage-limit-reached",
                      "title": "A usage limit of this plan is used up.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "usage_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "usage_limit_reached"
            ]
          },
          "500": {
            "description": "`internal_error` (https://platform.casafari.com/errors/internal-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/internal-error",
                      "title": "Something went wrong on our side.",
                      "status": 500,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "internal_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "internal_error"
            ]
          },
          "502": {
            "description": "`upstream_error` (https://platform.casafari.com/errors/upstream-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-error",
                      "title": "The data service failed to answer.",
                      "status": 502,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "upstream_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_error"
            ]
          },
          "503": {
            "description": "`capacity_exhausted`, `unavailable` (https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "capacity_exhausted": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/capacity-exhausted",
                      "title": "The platform has reached its capacity for today.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "capacity_exhausted",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "unavailable": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unavailable",
                      "title": "The service is not available just now.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "unavailable",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "capacity_exhausted",
              "unavailable"
            ]
          },
          "504": {
            "description": "`upstream_timeout` (https://platform.casafari.com/errors/upstream-timeout)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_timeout": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-timeout",
                      "title": "The data service took too long to answer.",
                      "status": 504,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/heatmap",
                      "code": "upstream_timeout",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_timeout"
            ]
          }
        }
      }
    },
    "/v1/area-insights/sales/time-series": {
      "post": {
        "operationId": "area_insights_sales_time_series",
        "summary": "Registered sale price trend in an area, week by week",
        "description": "Costs 10 tokens a call.",
        "tags": [
          "Area Insights"
        ],
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth2": [
              "area-insights:read"
            ]
          }
        ],
        "x-casafari-operation-id": "area-insights.sales.time-series",
        "x-casafari-units": 10,
        "x-casafari-scope": "area-insights:read",
        "x-casafari-mcp-tools": [
          "area-insights_get_sales_time_series"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "enum": [
                      "ES",
                      "FR",
                      "IT",
                      "PL",
                      "PT",
                      "AT"
                    ],
                    "description": "ES (Spain), FR (France), IT (Italy), PL (Poland) or PT (Portugal: INE's official median per m² by municipality and quarter; area as location_ids, a circle or a polygon, only types and sold_at_range as filters, no counts) or AT (Austria: yearly open-data prices per m² by municipality, district or state; location_ids only; no counts; not available until Casafari names its source)."
                  },
                  "location_boundary": {
                    "type": "object",
                    "description": "The area: exactly one of location_ids (from Location Lookup), circle or polygon.",
                    "properties": {
                      "location_ids": {
                        "type": "array",
                        "description": "Location ids from Location Lookup (locations_search), all in the request's country.",
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "minItems": 1,
                        "maxItems": 100
                      },
                      "circle": {
                        "type": "object",
                        "description": "A circle: its centre and radius in metres (1 to 50 000).",
                        "properties": {
                          "coordinates": {
                            "type": "object",
                            "properties": {
                              "lat": {
                                "type": "number",
                                "minimum": -90,
                                "maximum": 90
                              },
                              "lon": {
                                "type": "number",
                                "minimum": -180,
                                "maximum": 180
                              }
                            },
                            "required": [
                              "lat",
                              "lon"
                            ],
                            "additionalProperties": false
                          },
                          "radius_in_meters": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 50000
                          }
                        },
                        "required": [
                          "coordinates",
                          "radius_in_meters"
                        ],
                        "additionalProperties": false
                      },
                      "polygon": {
                        "type": "array",
                        "description": "A closed polygon: at least 4 points, the last equal to the first.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "lat": {
                              "type": "number",
                              "minimum": -90,
                              "maximum": 90
                            },
                            "lon": {
                              "type": "number",
                              "minimum": -180,
                              "maximum": 180
                            }
                          },
                          "required": [
                            "lat",
                            "lon"
                          ],
                          "additionalProperties": false
                        },
                        "minItems": 4,
                        "maxItems": 1000
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1,
                    "maxProperties": 1
                  },
                  "sold_at_range": {
                    "type": "object",
                    "description": "Sale dates, YYYY-MM-DD, both bounds required: {\"gte\": \"2024-01-01\", \"lte\": \"2025-12-31\"} (or gt / lt).",
                    "properties": {
                      "gte": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "gt": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "lte": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "lt": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "types": {
                    "type": "array",
                    "description": "Property types, lower case, e.g. [\"apartment\", \"penthouse\"] or [\"house\", \"villa\"].",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-z][a-z_]*$",
                      "maxLength": 40
                    },
                    "minItems": 1,
                    "maxItems": 40
                  },
                  "conditions": {
                    "type": "array",
                    "description": "Spain, Italy and Poland only: property condition, any of used, ruin, very-good, new, other.",
                    "items": {
                      "type": "string",
                      "enum": [
                        "used",
                        "ruin",
                        "very-good",
                        "new",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 5
                  },
                  "with_mortgage": {
                    "type": "boolean",
                    "description": "Spain only: true for sales financed with a mortgage, false for sales without one."
                  },
                  "price_range": {
                    "type": "object",
                    "description": "Registered sale price in euros: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "price_per_sqm_range": {
                    "type": "object",
                    "description": "Registered sale price per square metre in euros: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "total_area_range": {
                    "type": "object",
                    "description": "Built area in square metres: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "plot_area_range": {
                    "type": "object",
                    "description": "France and Poland only: plot area in square metres: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "bedrooms_range": {
                    "type": "object",
                    "description": "France only: bedrooms: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  }
                },
                "required": [
                  "country",
                  "location_boundary",
                  "sold_at_range"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              },
              "Casafari-Units-Charged": {
                "$ref": "#/components/headers/Casafari-Units-Charged"
              },
              "Casafari-Units-Remaining": {
                "$ref": "#/components/headers/Casafari-Units-Remaining"
              },
              "Casafari-Units-Source": {
                "$ref": "#/components/headers/Casafari-Units-Source"
              },
              "Casafari-Plan": {
                "$ref": "#/components/headers/Casafari-Plan"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `key_in_query` (https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-request",
                      "title": "The request is not valid.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "invalid_request",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "key_in_query": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/key-in-query",
                      "title": "Credentials are not accepted in the URL.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "key_in_query",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "invalid_request",
              "key_in_query"
            ]
          },
          "401": {
            "description": "`unauthorized`, `invalid_credential`, `credential_revoked`, `token_expired` (https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unauthorized",
                      "title": "A credential is required.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "unauthorized",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "invalid_credential": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-credential",
                      "title": "The credential is not valid.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "invalid_credential",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "credential_revoked": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/credential-revoked",
                      "title": "The credential has been revoked.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "credential_revoked",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "token_expired": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/token-expired",
                      "title": "The access token has expired.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "token_expired",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired"
            ]
          },
          "402": {
            "description": "`payment_required` (https://platform.casafari.com/errors/payment-required)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payment_required": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payment-required",
                      "title": "Payment is required to continue.",
                      "status": 402,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "payment_required",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payment_required"
            ]
          },
          "403": {
            "description": "`insufficient_scope`, `not_entitled`, `account_suspended` (https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "insufficient_scope": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/insufficient-scope",
                      "title": "The credential lacks the scope this operation needs.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "insufficient_scope",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "not_entitled": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-entitled",
                      "title": "This account is not entitled to this product or country.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "not_entitled",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "account_suspended": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/account-suspended",
                      "title": "The account is suspended.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "account_suspended",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "insufficient_scope",
              "not_entitled",
              "account_suspended"
            ]
          },
          "404": {
            "description": "`not_found` (https://platform.casafari.com/errors/not-found)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-found",
                      "title": "Not found.",
                      "status": 404,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "not_found",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "not_found"
            ]
          },
          "405": {
            "description": "`method_not_allowed` (https://platform.casafari.com/errors/method-not-allowed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "method_not_allowed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/method-not-allowed",
                      "title": "Method not allowed.",
                      "status": 405,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "method_not_allowed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "method_not_allowed"
            ]
          },
          "409": {
            "description": "`conflict` (https://platform.casafari.com/errors/conflict)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "conflict": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/conflict",
                      "title": "The request conflicts with the current state.",
                      "status": 409,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "conflict",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "conflict"
            ]
          },
          "413": {
            "description": "`payload_too_large` (https://platform.casafari.com/errors/payload-too-large)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payload-too-large",
                      "title": "The request body is too large.",
                      "status": 413,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "payload_too_large",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "description": "`unsupported_media_type` (https://platform.casafari.com/errors/unsupported-media-type)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unsupported-media-type",
                      "title": "Send the body as application/json.",
                      "status": 415,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "unsupported_media_type",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "`validation_failed` (https://platform.casafari.com/errors/validation-failed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation_failed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/validation-failed",
                      "title": "The request body did not match the schema.",
                      "status": 422,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "validation_failed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "`rate_limited`, `daily_limit_reached`, `request_limit_reached`, `usage_limit_reached` (https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/rate-limited",
                      "title": "Too many requests.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "rate_limited",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "daily_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/daily-limit-reached",
                      "title": "This account has reached its daily limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "daily_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "request_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/request-limit-reached",
                      "title": "This account has reached a request limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "request_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "usage_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/usage-limit-reached",
                      "title": "A usage limit of this plan is used up.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "usage_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "usage_limit_reached"
            ]
          },
          "500": {
            "description": "`internal_error` (https://platform.casafari.com/errors/internal-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/internal-error",
                      "title": "Something went wrong on our side.",
                      "status": 500,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "internal_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "internal_error"
            ]
          },
          "502": {
            "description": "`upstream_error` (https://platform.casafari.com/errors/upstream-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-error",
                      "title": "The data service failed to answer.",
                      "status": 502,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "upstream_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_error"
            ]
          },
          "503": {
            "description": "`capacity_exhausted`, `unavailable` (https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "capacity_exhausted": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/capacity-exhausted",
                      "title": "The platform has reached its capacity for today.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "capacity_exhausted",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "unavailable": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unavailable",
                      "title": "The service is not available just now.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "unavailable",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "capacity_exhausted",
              "unavailable"
            ]
          },
          "504": {
            "description": "`upstream_timeout` (https://platform.casafari.com/errors/upstream-timeout)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_timeout": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-timeout",
                      "title": "The data service took too long to answer.",
                      "status": 504,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/time-series",
                      "code": "upstream_timeout",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_timeout"
            ]
          }
        }
      }
    },
    "/v1/area-insights/sales/average-prices": {
      "post": {
        "operationId": "area_insights_sales_average_prices",
        "summary": "Average registered sale prices by location",
        "description": "Costs 10 tokens a call.",
        "tags": [
          "Area Insights"
        ],
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth2": [
              "area-insights:read"
            ]
          }
        ],
        "x-casafari-operation-id": "area-insights.sales.average-prices",
        "x-casafari-units": 10,
        "x-casafari-scope": "area-insights:read",
        "x-casafari-mcp-tools": [
          "area-insights_get_sales_average_prices"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "enum": [
                      "ES",
                      "FR",
                      "IT",
                      "PL",
                      "PT",
                      "AT"
                    ],
                    "description": "ES (Spain), FR (France), IT (Italy), PL (Poland) or PT (Portugal: INE's official median per m² by municipality and quarter; area as location_ids, a circle or a polygon, only types and sold_at_range as filters, no counts) or AT (Austria: yearly open-data prices per m² by municipality, district or state; location_ids only; no counts; not available until Casafari names its source)."
                  },
                  "location_boundary": {
                    "type": "object",
                    "description": "The area: exactly one of location_ids (from Location Lookup), circle or polygon.",
                    "properties": {
                      "location_ids": {
                        "type": "array",
                        "description": "Location ids from Location Lookup (locations_search), all in the request's country.",
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "minItems": 1,
                        "maxItems": 100
                      },
                      "circle": {
                        "type": "object",
                        "description": "A circle: its centre and radius in metres (1 to 50 000).",
                        "properties": {
                          "coordinates": {
                            "type": "object",
                            "properties": {
                              "lat": {
                                "type": "number",
                                "minimum": -90,
                                "maximum": 90
                              },
                              "lon": {
                                "type": "number",
                                "minimum": -180,
                                "maximum": 180
                              }
                            },
                            "required": [
                              "lat",
                              "lon"
                            ],
                            "additionalProperties": false
                          },
                          "radius_in_meters": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 50000
                          }
                        },
                        "required": [
                          "coordinates",
                          "radius_in_meters"
                        ],
                        "additionalProperties": false
                      },
                      "polygon": {
                        "type": "array",
                        "description": "A closed polygon: at least 4 points, the last equal to the first.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "lat": {
                              "type": "number",
                              "minimum": -90,
                              "maximum": 90
                            },
                            "lon": {
                              "type": "number",
                              "minimum": -180,
                              "maximum": 180
                            }
                          },
                          "required": [
                            "lat",
                            "lon"
                          ],
                          "additionalProperties": false
                        },
                        "minItems": 4,
                        "maxItems": 1000
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1,
                    "maxProperties": 1
                  },
                  "sold_at_range": {
                    "type": "object",
                    "description": "Sale dates, YYYY-MM-DD: {\"gte\": \"2024-01-01\"}, an upper bound with lte, or both (or gt / lt).",
                    "properties": {
                      "gte": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "gt": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "lte": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "lt": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "types": {
                    "type": "array",
                    "description": "Property types, lower case, e.g. [\"apartment\", \"penthouse\"] or [\"house\", \"villa\"].",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-z][a-z_]*$",
                      "maxLength": 40
                    },
                    "minItems": 1,
                    "maxItems": 40
                  },
                  "conditions": {
                    "type": "array",
                    "description": "Spain, Italy and Poland only: property condition, any of used, ruin, very-good, new, other.",
                    "items": {
                      "type": "string",
                      "enum": [
                        "used",
                        "ruin",
                        "very-good",
                        "new",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 5
                  },
                  "with_mortgage": {
                    "type": "boolean",
                    "description": "Spain only: true for sales financed with a mortgage, false for sales without one."
                  },
                  "price_range": {
                    "type": "object",
                    "description": "Registered sale price in euros: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "price_per_sqm_range": {
                    "type": "object",
                    "description": "Registered sale price per square metre in euros: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  }
                },
                "required": [
                  "country",
                  "location_boundary"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              },
              "Casafari-Units-Charged": {
                "$ref": "#/components/headers/Casafari-Units-Charged"
              },
              "Casafari-Units-Remaining": {
                "$ref": "#/components/headers/Casafari-Units-Remaining"
              },
              "Casafari-Units-Source": {
                "$ref": "#/components/headers/Casafari-Units-Source"
              },
              "Casafari-Plan": {
                "$ref": "#/components/headers/Casafari-Plan"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `key_in_query` (https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-request",
                      "title": "The request is not valid.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "invalid_request",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "key_in_query": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/key-in-query",
                      "title": "Credentials are not accepted in the URL.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "key_in_query",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "invalid_request",
              "key_in_query"
            ]
          },
          "401": {
            "description": "`unauthorized`, `invalid_credential`, `credential_revoked`, `token_expired` (https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unauthorized",
                      "title": "A credential is required.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "unauthorized",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "invalid_credential": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-credential",
                      "title": "The credential is not valid.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "invalid_credential",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "credential_revoked": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/credential-revoked",
                      "title": "The credential has been revoked.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "credential_revoked",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "token_expired": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/token-expired",
                      "title": "The access token has expired.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "token_expired",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired"
            ]
          },
          "402": {
            "description": "`payment_required` (https://platform.casafari.com/errors/payment-required)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payment_required": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payment-required",
                      "title": "Payment is required to continue.",
                      "status": 402,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "payment_required",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payment_required"
            ]
          },
          "403": {
            "description": "`insufficient_scope`, `not_entitled`, `account_suspended` (https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "insufficient_scope": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/insufficient-scope",
                      "title": "The credential lacks the scope this operation needs.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "insufficient_scope",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "not_entitled": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-entitled",
                      "title": "This account is not entitled to this product or country.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "not_entitled",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "account_suspended": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/account-suspended",
                      "title": "The account is suspended.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "account_suspended",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "insufficient_scope",
              "not_entitled",
              "account_suspended"
            ]
          },
          "404": {
            "description": "`not_found` (https://platform.casafari.com/errors/not-found)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-found",
                      "title": "Not found.",
                      "status": 404,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "not_found",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "not_found"
            ]
          },
          "405": {
            "description": "`method_not_allowed` (https://platform.casafari.com/errors/method-not-allowed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "method_not_allowed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/method-not-allowed",
                      "title": "Method not allowed.",
                      "status": 405,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "method_not_allowed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "method_not_allowed"
            ]
          },
          "409": {
            "description": "`conflict` (https://platform.casafari.com/errors/conflict)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "conflict": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/conflict",
                      "title": "The request conflicts with the current state.",
                      "status": 409,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "conflict",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "conflict"
            ]
          },
          "413": {
            "description": "`payload_too_large` (https://platform.casafari.com/errors/payload-too-large)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payload-too-large",
                      "title": "The request body is too large.",
                      "status": 413,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "payload_too_large",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "description": "`unsupported_media_type` (https://platform.casafari.com/errors/unsupported-media-type)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unsupported-media-type",
                      "title": "Send the body as application/json.",
                      "status": 415,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "unsupported_media_type",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "`validation_failed` (https://platform.casafari.com/errors/validation-failed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation_failed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/validation-failed",
                      "title": "The request body did not match the schema.",
                      "status": 422,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "validation_failed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "`rate_limited`, `daily_limit_reached`, `request_limit_reached`, `usage_limit_reached` (https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/rate-limited",
                      "title": "Too many requests.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "rate_limited",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "daily_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/daily-limit-reached",
                      "title": "This account has reached its daily limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "daily_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "request_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/request-limit-reached",
                      "title": "This account has reached a request limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "request_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "usage_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/usage-limit-reached",
                      "title": "A usage limit of this plan is used up.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "usage_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "usage_limit_reached"
            ]
          },
          "500": {
            "description": "`internal_error` (https://platform.casafari.com/errors/internal-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/internal-error",
                      "title": "Something went wrong on our side.",
                      "status": 500,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "internal_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "internal_error"
            ]
          },
          "502": {
            "description": "`upstream_error` (https://platform.casafari.com/errors/upstream-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-error",
                      "title": "The data service failed to answer.",
                      "status": 502,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "upstream_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_error"
            ]
          },
          "503": {
            "description": "`capacity_exhausted`, `unavailable` (https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "capacity_exhausted": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/capacity-exhausted",
                      "title": "The platform has reached its capacity for today.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "capacity_exhausted",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "unavailable": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unavailable",
                      "title": "The service is not available just now.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "unavailable",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "capacity_exhausted",
              "unavailable"
            ]
          },
          "504": {
            "description": "`upstream_timeout` (https://platform.casafari.com/errors/upstream-timeout)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_timeout": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-timeout",
                      "title": "The data service took too long to answer.",
                      "status": 504,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/average-prices",
                      "code": "upstream_timeout",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_timeout"
            ]
          }
        }
      }
    },
    "/v1/area-insights/sales/count-by-type": {
      "post": {
        "operationId": "area_insights_sales_count_by_type",
        "summary": "Number of registered sales by property type",
        "description": "Costs 10 tokens a call.",
        "tags": [
          "Area Insights"
        ],
        "security": [
          {
            "apiKeyBearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth2": [
              "area-insights:read"
            ]
          }
        ],
        "x-casafari-operation-id": "area-insights.sales.count-by-type",
        "x-casafari-units": 10,
        "x-casafari-scope": "area-insights:read",
        "x-casafari-mcp-tools": [
          "area-insights_count_sales_by_type"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "country": {
                    "type": "string",
                    "enum": [
                      "ES",
                      "FR",
                      "IT",
                      "PL",
                      "PT",
                      "AT"
                    ],
                    "description": "ES (Spain), FR (France), IT (Italy), PL (Poland) or PT (Portugal: INE's official median per m² by municipality and quarter; area as location_ids, a circle or a polygon, only types and sold_at_range as filters, no counts) or AT (Austria: yearly open-data prices per m² by municipality, district or state; location_ids only; no counts; not available until Casafari names its source)."
                  },
                  "location_boundary": {
                    "type": "object",
                    "description": "The area: exactly one of location_ids (from Location Lookup), circle or polygon.",
                    "properties": {
                      "location_ids": {
                        "type": "array",
                        "description": "Location ids from Location Lookup (locations_search), all in the request's country.",
                        "items": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "minItems": 1,
                        "maxItems": 100
                      },
                      "circle": {
                        "type": "object",
                        "description": "A circle: its centre and radius in metres (1 to 50 000).",
                        "properties": {
                          "coordinates": {
                            "type": "object",
                            "properties": {
                              "lat": {
                                "type": "number",
                                "minimum": -90,
                                "maximum": 90
                              },
                              "lon": {
                                "type": "number",
                                "minimum": -180,
                                "maximum": 180
                              }
                            },
                            "required": [
                              "lat",
                              "lon"
                            ],
                            "additionalProperties": false
                          },
                          "radius_in_meters": {
                            "type": "number",
                            "minimum": 1,
                            "maximum": 50000
                          }
                        },
                        "required": [
                          "coordinates",
                          "radius_in_meters"
                        ],
                        "additionalProperties": false
                      },
                      "polygon": {
                        "type": "array",
                        "description": "A closed polygon: at least 4 points, the last equal to the first.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "lat": {
                              "type": "number",
                              "minimum": -90,
                              "maximum": 90
                            },
                            "lon": {
                              "type": "number",
                              "minimum": -180,
                              "maximum": 180
                            }
                          },
                          "required": [
                            "lat",
                            "lon"
                          ],
                          "additionalProperties": false
                        },
                        "minItems": 4,
                        "maxItems": 1000
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1,
                    "maxProperties": 1
                  },
                  "sold_at_range": {
                    "type": "object",
                    "description": "Sale dates, YYYY-MM-DD: {\"gte\": \"2024-01-01\"}, an upper bound with lte, or both (or gt / lt).",
                    "properties": {
                      "gte": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "gt": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "lte": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "lt": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "types": {
                    "type": "array",
                    "description": "Property types, lower case, e.g. [\"apartment\", \"penthouse\"] or [\"house\", \"villa\"].",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-z][a-z_]*$",
                      "maxLength": 40
                    },
                    "minItems": 1,
                    "maxItems": 40
                  },
                  "type_groups": {
                    "type": "array",
                    "description": "Property type groups, e.g. [\"apartment\", \"house\"].",
                    "items": {
                      "type": "string",
                      "enum": [
                        "apartment",
                        "house",
                        "room",
                        "building",
                        "investment",
                        "plot",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 7
                  },
                  "conditions": {
                    "type": "array",
                    "description": "Spain, Italy and Poland only: property condition, any of used, ruin, very-good, new, other.",
                    "items": {
                      "type": "string",
                      "enum": [
                        "used",
                        "ruin",
                        "very-good",
                        "new",
                        "other"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 5
                  },
                  "with_mortgage": {
                    "type": "boolean",
                    "description": "Spain only: true for sales financed with a mortgage, false for sales without one."
                  },
                  "price_range": {
                    "type": "object",
                    "description": "Registered sale price in euros: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "price_per_sqm_range": {
                    "type": "object",
                    "description": "Registered sale price per square metre in euros: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "total_area_range": {
                    "type": "object",
                    "description": "Built area in square metres: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "plot_area_range": {
                    "type": "object",
                    "description": "France and Poland only: plot area in square metres: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "number",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  },
                  "bedrooms_range": {
                    "type": "object",
                    "description": "France only: bedrooms: {\"gte\": n, \"lte\": n} (or gt / lt); at least one bound.",
                    "properties": {
                      "gte": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "gt": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "lte": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "lt": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "additionalProperties": false,
                    "minProperties": 1
                  }
                },
                "required": [
                  "country",
                  "location_boundary"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              },
              "Casafari-Units-Charged": {
                "$ref": "#/components/headers/Casafari-Units-Charged"
              },
              "Casafari-Units-Remaining": {
                "$ref": "#/components/headers/Casafari-Units-Remaining"
              },
              "Casafari-Units-Source": {
                "$ref": "#/components/headers/Casafari-Units-Source"
              },
              "Casafari-Plan": {
                "$ref": "#/components/headers/Casafari-Plan"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `key_in_query` (https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid_request": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-request",
                      "title": "The request is not valid.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "invalid_request",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "key_in_query": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/key-in-query",
                      "title": "Credentials are not accepted in the URL.",
                      "status": 400,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "key_in_query",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "invalid_request",
              "key_in_query"
            ]
          },
          "401": {
            "description": "`unauthorized`, `invalid_credential`, `credential_revoked`, `token_expired` (https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unauthorized",
                      "title": "A credential is required.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "unauthorized",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "invalid_credential": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/invalid-credential",
                      "title": "The credential is not valid.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "invalid_credential",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "credential_revoked": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/credential-revoked",
                      "title": "The credential has been revoked.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "credential_revoked",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "token_expired": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/token-expired",
                      "title": "The access token has expired.",
                      "status": 401,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "token_expired",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired"
            ]
          },
          "402": {
            "description": "`payment_required` (https://platform.casafari.com/errors/payment-required)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payment_required": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payment-required",
                      "title": "Payment is required to continue.",
                      "status": 402,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "payment_required",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payment_required"
            ]
          },
          "403": {
            "description": "`insufficient_scope`, `not_entitled`, `account_suspended` (https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "insufficient_scope": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/insufficient-scope",
                      "title": "The credential lacks the scope this operation needs.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "insufficient_scope",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "not_entitled": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-entitled",
                      "title": "This account is not entitled to this product or country.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "not_entitled",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "account_suspended": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/account-suspended",
                      "title": "The account is suspended.",
                      "status": 403,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "account_suspended",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "insufficient_scope",
              "not_entitled",
              "account_suspended"
            ]
          },
          "404": {
            "description": "`not_found` (https://platform.casafari.com/errors/not-found)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/not-found",
                      "title": "Not found.",
                      "status": 404,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "not_found",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "not_found"
            ]
          },
          "405": {
            "description": "`method_not_allowed` (https://platform.casafari.com/errors/method-not-allowed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "method_not_allowed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/method-not-allowed",
                      "title": "Method not allowed.",
                      "status": 405,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "method_not_allowed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "method_not_allowed"
            ]
          },
          "409": {
            "description": "`conflict` (https://platform.casafari.com/errors/conflict)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "conflict": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/conflict",
                      "title": "The request conflicts with the current state.",
                      "status": 409,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "conflict",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "conflict"
            ]
          },
          "413": {
            "description": "`payload_too_large` (https://platform.casafari.com/errors/payload-too-large)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "payload_too_large": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/payload-too-large",
                      "title": "The request body is too large.",
                      "status": 413,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "payload_too_large",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "payload_too_large"
            ]
          },
          "415": {
            "description": "`unsupported_media_type` (https://platform.casafari.com/errors/unsupported-media-type)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unsupported_media_type": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unsupported-media-type",
                      "title": "Send the body as application/json.",
                      "status": 415,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "unsupported_media_type",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "unsupported_media_type"
            ]
          },
          "422": {
            "description": "`validation_failed` (https://platform.casafari.com/errors/validation-failed)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "validation_failed": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/validation-failed",
                      "title": "The request body did not match the schema.",
                      "status": 422,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "validation_failed",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "validation_failed"
            ]
          },
          "429": {
            "description": "`rate_limited`, `daily_limit_reached`, `request_limit_reached`, `usage_limit_reached` (https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "rate_limited": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/rate-limited",
                      "title": "Too many requests.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "rate_limited",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "daily_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/daily-limit-reached",
                      "title": "This account has reached its daily limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "daily_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "request_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/request-limit-reached",
                      "title": "This account has reached a request limit.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "request_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "usage_limit_reached": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/usage-limit-reached",
                      "title": "A usage limit of this plan is used up.",
                      "status": 429,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "usage_limit_reached",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "usage_limit_reached"
            ]
          },
          "500": {
            "description": "`internal_error` (https://platform.casafari.com/errors/internal-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "internal_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/internal-error",
                      "title": "Something went wrong on our side.",
                      "status": 500,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "internal_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "internal_error"
            ]
          },
          "502": {
            "description": "`upstream_error` (https://platform.casafari.com/errors/upstream-error)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_error": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-error",
                      "title": "The data service failed to answer.",
                      "status": 502,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "upstream_error",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_error"
            ]
          },
          "503": {
            "description": "`capacity_exhausted`, `unavailable` (https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "capacity_exhausted": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/capacity-exhausted",
                      "title": "The platform has reached its capacity for today.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "capacity_exhausted",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  },
                  "unavailable": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/unavailable",
                      "title": "The service is not available just now.",
                      "status": 503,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "unavailable",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "capacity_exhausted",
              "unavailable"
            ]
          },
          "504": {
            "description": "`upstream_timeout` (https://platform.casafari.com/errors/upstream-timeout)",
            "headers": {
              "Casafari-Request-Id": {
                "$ref": "#/components/headers/Casafari-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "upstream_timeout": {
                    "value": {
                      "type": "https://platform.casafari.com/errors/upstream-timeout",
                      "title": "The data service took too long to answer.",
                      "status": 504,
                      "detail": "Written for the request; see the code's page.",
                      "instance": "/v1/area-insights/sales/count-by-type",
                      "code": "upstream_timeout",
                      "request_id": "req_01JABCDEFGHJKMNPQRSTVWXYZ2"
                    }
                  }
                }
              }
            },
            "x-casafari-codes": [
              "upstream_timeout"
            ]
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "instance",
          "code",
          "request_id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "invalid_request",
              "validation_failed",
              "key_in_query",
              "page_depth_exceeded",
              "payload_too_large",
              "unsupported_media_type",
              "unauthorized",
              "invalid_credential",
              "credential_revoked",
              "token_expired",
              "insufficient_scope",
              "not_entitled",
              "verification_required",
              "not_self_serve",
              "account_suspended",
              "permission_denied",
              "origin_mismatch",
              "reauthentication_required",
              "payment_required",
              "not_found",
              "existing_api_path",
              "method_not_allowed",
              "conflict",
              "resource_limit_reached",
              "rate_limited",
              "daily_limit_reached",
              "request_limit_reached",
              "signup_limited",
              "email_not_allowed",
              "terms_not_accepted",
              "verification_code_invalid",
              "verification_code_expired",
              "internal_error",
              "upstream_error",
              "capacity_exhausted",
              "unavailable",
              "upstream_timeout",
              "usage_limit_reached"
            ]
          },
          "request_id": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "AccountStatus": {
        "type": "object",
        "required": [
          "account_id",
          "plan",
          "standing",
          "can_call",
          "units"
        ],
        "properties": {
          "account_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "plan": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "billing_mode": {
                "type": "string"
              }
            }
          },
          "standing": {
            "type": "string"
          },
          "can_call": {
            "type": "boolean"
          },
          "blocked_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "reset_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "request_limits": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "window",
                "unit",
                "limit",
                "used",
                "remaining",
                "period_seconds",
                "reset_at"
              ],
              "properties": {
                "window": {
                  "type": "string",
                  "enum": [
                    "minute",
                    "session",
                    "day",
                    "week",
                    "month",
                    "locations"
                  ]
                },
                "unit": {
                  "type": "string",
                  "enum": [
                    "requests",
                    "places"
                  ]
                },
                "limit": {
                  "type": "integer"
                },
                "used": {
                  "type": "integer"
                },
                "remaining": {
                  "type": "integer"
                },
                "period_seconds": {
                  "type": "integer"
                },
                "reset_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "claro_trial_searches": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "limit",
              "used",
              "remaining"
            ],
            "properties": {
              "limit": {
                "type": "integer"
              },
              "used": {
                "type": "integer"
              },
              "remaining": {
                "type": "integer"
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": true
          },
          "upgrade_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "console_url": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": true
      },
      "PaymentLinkStatus": {
        "type": "object",
        "required": [
          "payment_link_id",
          "status",
          "poll_after_s"
        ],
        "properties": {
          "payment_link_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "completed",
              "expired",
              "superseded"
            ]
          },
          "reason": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "poll_after_s": {
            "type": "integer"
          }
        }
      },
      "SignupRequest": {
        "type": "object",
        "required": [
          "email",
          "terms_version"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "terms_version": {
            "type": "string"
          },
          "account_name": {
            "type": "string"
          },
          "client": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "tips_opt_out": {
            "type": "boolean",
            "default": false,
            "description": "true: don't send the person tips and usage emails. Account, billing and security emails still arrive."
          },
          "news_opt_in": {
            "type": "boolean",
            "default": false,
            "description": "true: the person agrees to news emails."
          }
        }
      },
      "SignupStarted": {
        "type": "object",
        "required": [
          "signup_id",
          "status",
          "verify_url"
        ],
        "properties": {
          "signup_id": {
            "type": "string"
          },
          "status": {
            "const": "code_sent"
          },
          "delivery": {
            "const": "email"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "verify_url": {
            "type": "string",
            "format": "uri"
          },
          "terms_url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "SignupVerifyRequest": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "The 6-digit code emailed to the person."
          }
        }
      },
      "SignupCompleted": {
        "type": "object",
        "required": [
          "account_id",
          "api_key",
          "scopes",
          "plan"
        ],
        "properties": {
          "account_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "api_key": {
            "type": "string",
            "description": "Shown once."
          },
          "key_id": {
            "type": "string"
          },
          "key_hint": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "plan": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "trial_units": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "trial_ends_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          },
          "api_base_url": {
            "type": "string",
            "format": "uri"
          },
          "resources": {
            "type": "object",
            "additionalProperties": true
          },
          "console_url": {
            "type": "string",
            "format": "uri"
          },
          "docs_url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "SignupTerms": {
        "type": "object",
        "required": [
          "terms_version",
          "terms_url",
          "privacy_url"
        ],
        "properties": {
          "terms_version": {
            "type": "string"
          },
          "terms_url": {
            "type": "string",
            "format": "uri"
          },
          "privacy_url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "headers": {
      "Casafari-Request-Id": {
        "description": "Id of this request; quote it when asking for help.",
        "schema": {
          "type": "string"
        }
      },
      "Casafari-Units-Charged": {
        "description": "Tokens this call cost.",
        "schema": {
          "type": "integer"
        }
      },
      "Casafari-Units-Remaining": {
        "description": "Tokens left across the account's funding.",
        "schema": {
          "type": "integer"
        }
      },
      "Casafari-Units-Source": {
        "description": "Which funding paid: trial, included, prepaid or overage.",
        "schema": {
          "type": "string"
        }
      },
      "Casafari-Plan": {
        "description": "The account's plan id.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit": {
        "description": "Current rate-limit state (RFC 9331 draft).",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Policy": {
        "description": "The rate-limit policy that applies.",
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "apiKeyBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "cf_sk_ API key",
        "description": "Authorization: Bearer cf_sk_..."
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "The same API key in a header."
      },
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://platform.casafari.com/oauth/authorize",
            "tokenUrl": "https://platform.casafari.com/oauth/token",
            "scopes": {
              "account:read": "Access to account (read).",
              "locations:read": "Access to locations (read).",
              "area-insights:read": "Access to area-insights (read)."
            }
          },
          "clientCredentials": {
            "tokenUrl": "https://platform.casafari.com/oauth/token",
            "scopes": {
              "account:read": "Access to account (read).",
              "locations:read": "Access to locations (read).",
              "area-insights:read": "Access to area-insights (read)."
            }
          }
        }
      }
    }
  },
  "x-casafari-resource": "https://platform.casafari.com/v1/area-insights"
}
