> ## Documentation Index
> Fetch the complete documentation index at: https://doc.fluximmo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics generales par filtres

> Statistiques agrégées (prix moyen, distribution surface) sur des filtres.



## OpenAPI

````yaml post /v2/protected/analytics/property/search
openapi: 3.0.0
info:
  title: Real-estate data API - Fluximmo V2
  description: >+
    ## Fluximmo

    ##### Real-time real estate data: Power workflows, business applications and
    decision-making.


    Real estate expert since 2017, Fluximmo aggregates, exploits, enriches &
    analyzes the 


    real-estate market in real time to offer data flows, APIs and innovative
    services to real estate professionals.


    ## Authentification

    You'll need to be authenticated with an active subscription to access our
    REST endpoints.


    To get an API-KEY please contact us at contact@fluximmo.com or book a call
    with our team: https://calendly.com/fluximmo/meet-fluximmo

    ##### How to use your API KEY

    Simply add to your HTTP request your API KEY in the headers:
    `{'x_api_key':'randomApiKey'}`


    ## Properties and Adverts

    Real-estate market can be conceptualized in different ways. We offer two
    different conceptualization depending on your needs: Properties & Adverts.

    #### Properties (BAAS)

    A property is a real-estate habitation/land/commercial/building to which is
    attached adverts.


    We gather all the adverts offering (selling or renting) this real-estate
    asset and consolidate all the information into one Property.


    A Property is by definition `de-duplicated` and can gather 1 to x adverts:
    these adverts are either duplicates from different portals or with mandates
    from different agencies or republication of the same advertising with a
    price update or not.


    The concept of property is in constant mutation until the real-estate asset
    is sold: We'll keep merging new adverts within the Property concept and
    update the price if needed.


    By it's nature in constant mutation, we do not offer the possibility to
    receive these Properties on webhooks. You'll need to use our APIs as a
    Backend As A Service (BaaS).


    #### Adverts (BAAS and WEBHOOK)

    Adverts are advertising of a real-estate property. Adverts can come from
    many sources: Agencies websites, Aggregation real-estate portals,
    Social-Networks, NewsPaper etc...


    After gathering all these adverts our proprietary AI algorithms will
    de-duplicate these adverts and associate them to a Property


    An advert have a unique URL. Meaning that the same advertising re-published
    twice (with our without any change, on the same website or not, by the same
    agency or not) is considered as 2 ads.


    You can choose either to retrieve all the Adverts or only the non duplicated
    ones. Adverts can be retrieved either by API (Search or Alerts) or Webhook

    ## Webhooks

    We offer the possibility to receive our real-estate Adverts data in
    real-time using webhooks. As soon as we gather the data, you'll receive it
    few moments later.


    Using ALERTS, you can receive new adverts matching your criteria on a
    webhook.


    ##### Webhook differences between Adverts and Properties

    As Properties are by nature in perpetual evolutions (new duplicated ads will
    be merged, new data to be consolidated etc..), we do not offer the
    possibility to receive through Webhooks the full body of the properties.
    Properties webhook will only send you the list of the properties FlxIds
    matching your search.


    You'll find below the schema of the data you would receive on your webhook
    (`/v2/sample/webhook/properties`, `/v2/sample/webhook/adverts`)

    ##### What is a webhook

    A webhook can be thought of as a type of API that is driven by events rather
    than requests


    .Instead of one application making a request to another to receive a
    response, a webhook is a service that allows one program to send data to
    another as soon as a particular event takes place.


    Webhooks are sometimes referred to as “reverse APIs,” because communication
    is initiated by the application sending the data rather than the one
    receiving it.


    With web services becoming increasingly interconnected, webhooks are seeing
    more action as a lightweight solution for enabling real-time notifications
    and data updates without the need to develop a full-scale API.

    ##### When to use a webhook instead of the REST API

    You're supposed to receive a high volume of data (frequently or not), you're
    looking for real-time data, you just have to relax and wait (no cron, no
    call on our API etc..)

    ##### Webhook implementation examples

    A webhook is simply a POST endpoint we can request

    * Python:
    https://gist.github.com/aloysius-tim/293772256526efa20d5c625c6ace036a

    * Node:
    https://gist.github.com/aloysius-tim/ea1d9feb2c527b5b09ffc356b662d14b

  version: 2.0.0
  contact: {}
  x-logo:
    url: https://www.fluximmo.com/assets/images/logo_text.png
    backgroundColor: '#F31051'
    altText: Fluximmo logo
servers:
  - url: https://api.fluximmo.io
security: []
tags:
  - name: PropertyModel
    description: <SchemaDefinition schemaRef="#/components/schemas/PropertyDto" />
  - name: AdvertModel
    description: <SchemaDefinition schemaRef="#/components/schemas/AdvertDto" />
paths:
  /v2/protected/analytics/property/search:
    post:
      tags:
        - Properties Analytics
      summary: Properties General Analytics for search filters
      description: Retrieve advanced statistics of historical immo's market
      operationId: SearchPropertiesAnalyticsController_searchPropertiesAnalytics
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalyticsGeneralAnalyticsRequestPayloadDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsGeneralAnalyticsResponseDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionDto'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionDto'
      security:
        - x_api_key: []
components:
  schemas:
    AnalyticsGeneralAnalyticsRequestPayloadDto:
      type: object
      properties:
        query:
          $ref: '#/components/schemas/SearchPropertyQueryLitePayloadDto'
        studiedData:
          $ref: '#/components/schemas/AnalyticsAnalyzedTypeEnumDto'
          example: PRICE_PER_AREA_ANALYZED_TYPE
        type:
          $ref: '#/components/schemas/AnalyticsGeneralAnalyticTypeEnumDto'
          example: SUMMARY_ANALYSIS_TYPE
      required:
        - query
        - studiedData
        - type
    AnalyticsGeneralAnalyticsResponseDto:
      type: object
      properties:
        data:
          description: Analytics data for the given context
          allOf:
            - $ref: '#/components/schemas/AnalyticsAnalysisDto'
    ExceptionDto:
      type: object
      properties:
        error:
          description: Error object
          allOf:
            - $ref: '#/components/schemas/ErrorDto'
      required:
        - error
    SearchPropertyQueryLitePayloadDto:
      type: object
      properties:
        filterProperty:
          $ref: '#/components/schemas/FilterPropertyLiteDto'
        fullTexts:
          description: >-
            Search terms for full text search. We'll search in title,
            description, and keywords for terms similar to these (typically,
            we'll use a fuzzy search).
          type: array
          items:
            type: string
        keywords:
          description: >-
            Search terms for keyword search. We'll search in title, description,
            and keywords for exact matches to these terms (typically, we'll use
            a term search).
          type: array
          items:
            type: string
      required:
        - filterProperty
        - fullTexts
        - keywords
    AnalyticsAnalyzedTypeEnumDto:
      type: string
      enum:
        - PRICE_ANALYZED_TYPE
        - HABITATION_SURFACE_ANALYZED_TYPE
        - LAND_SURFACE_ANALYZED_TYPE
        - PRICE_PER_AREA_ANALYZED_TYPE
    AnalyticsGeneralAnalyticTypeEnumDto:
      type: string
      enum:
        - SUMMARY_ANALYSIS_TYPE
        - ADVANCED_ANALYSIS_TYPE
        - BOX_PLOT_ANALYSIS_TYPE
        - PERCENTILES_ANALYSIS_TYPE
    AnalyticsAnalysisDto:
      type: object
      properties:
        percentilesValues:
          $ref: '#/components/schemas/AnalyticsPercentilesValueDto'
        boxplotValue:
          $ref: '#/components/schemas/AnalyticsBoxplotValueDto'
        advancedKpiValue:
          $ref: '#/components/schemas/AnalyticsAdvancedSummaryValueDto'
        summaryValue:
          $ref: '#/components/schemas/AnalyticsSummaryValueDto'
        countValue:
          type: number
    ErrorDto:
      type: object
      properties:
        message:
          type: string
          description: Error message
        code:
          type: number
          description: Error code
      required:
        - message
        - code
    FilterPropertyLiteDto:
      type: object
      properties:
        land:
          $ref: '#/components/schemas/FilterTypeLandLiteDto'
        location:
          example: []
          type: array
          items:
            $ref: '#/components/schemas/FilterLocationLiteDto'
        meta:
          $ref: '#/components/schemas/FilterMetaDto'
        price:
          $ref: '#/components/schemas/FilterPriceLiteDto'
        type:
          type: array
          example:
            - CLASS_HOUSE
          items:
            $ref: '#/components/schemas/EnumPropertyClassDto'
        offer:
          example: []
          type: array
          items:
            $ref: '#/components/schemas/FilterOfferLiteDto'
        habitation:
          $ref: '#/components/schemas/FilterTypeHabitationLiteDto'
    AnalyticsPercentilesValueDto:
      type: object
      properties:
        percentiles:
          example:
            '1.0': 199.01825941147465
            '25.0': 873.0233360295258
            '5.0': 320.3792919192797
            '50.0': 1749.9910946795994
            '75.0': 3184.9963201136397
            '95.0': 11208.899561561651
            '99.0': 48335.94583529406
          allOf:
            - $ref: '#/components/schemas/Percentiles'
    AnalyticsBoxplotValueDto:
      type: object
      properties:
        lower:
          type: number
        max:
          type: number
        min:
          type: number
        q1:
          type: number
        q2:
          type: number
        q3:
          type: number
        upper:
          type: number
    AnalyticsAdvancedSummaryValueDto:
      type: object
      properties:
        avg:
          type: number
        count:
          type: number
        max:
          type: number
        min:
          type: number
        stdDeviation:
          type: number
        stdDeviationBounds:
          $ref: '#/components/schemas/AnalyticsStandardDeviationBoundsDto'
        stdDeviationPopulation:
          type: number
        stdDeviationSampling:
          type: number
        sum:
          type: number
        sumOfSquares:
          type: number
        variance:
          type: number
        variancePopulation:
          type: number
        varianceSampling:
          type: number
    AnalyticsSummaryValueDto:
      type: object
      properties:
        avg:
          type: number
        count:
          type: number
        max:
          type: number
        min:
          type: number
        sum:
          type: number
    FilterTypeLandLiteDto:
      type: object
      properties:
        surface:
          $ref: '#/components/schemas/FilterIntRangeDto'
    FilterLocationLiteDto:
      type: object
      properties:
        department:
          type: string
        inseeCode:
          type: string
        irisCode:
          type: string
        locationCoordinate:
          $ref: '#/components/schemas/FilterCompleteLatLngLiteDto'
        postalCode:
          type: string
    FilterMetaDto:
      type: object
      properties:
        firstSeenAt:
          $ref: '#/components/schemas/FilterDateRangeDto'
        isTotallyOffline:
          type: boolean
        lastPublishedAt:
          $ref: '#/components/schemas/FilterDateRangeDto'
        lastSeenAt:
          $ref: '#/components/schemas/FilterDateRangeDto'
        lastUpdatedAt:
          $ref: '#/components/schemas/FilterDateRangeDto'
    FilterPriceLiteDto:
      type: object
      properties:
        latest:
          $ref: '#/components/schemas/FilterPropertyPriceLiteDto'
    EnumPropertyClassDto:
      type: string
      enum:
        - CLASS_UNKNOWN
        - CLASS_HOUSE
        - CLASS_FLAT
        - CLASS_PROGRAM
        - CLASS_SHOP
        - CLASS_PREMISES
        - CLASS_OFFICE
        - CLASS_LAND
        - CLASS_BUILDING
        - CLASS_PARKING
        - CLASS_ROOM
        - CLASS_OTHER
    FilterOfferLiteDto:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/EnumPropertyOfferTypeDto'
          example: OFFER_BUY
    FilterTypeHabitationLiteDto:
      type: object
      properties:
        bedroomCount:
          $ref: '#/components/schemas/FilterIntRangeDto'
        roomCount:
          $ref: '#/components/schemas/FilterIntRangeDto'
        characteristics:
          $ref: '#/components/schemas/CharacteristicsLiteDto'
        climate:
          $ref: '#/components/schemas/FilterClimateLiteDto'
        surface:
          $ref: '#/components/schemas/FilterSurfaceLiteDto'
        features:
          $ref: '#/components/schemas/FilterFeaturesLiteDto'
        propertyCondition:
          type: array
          items:
            $ref: '#/components/schemas/PropertyConditionLiteDto'
    Percentiles:
      type: object
      properties:
        '1.0':
          type: number
        '5.0':
          type: number
        '25.0':
          type: number
        '50.0':
          type: number
        '75.0':
          type: number
        '95.0':
          type: number
        '99.0':
          type: number
    AnalyticsStandardDeviationBoundsDto:
      type: object
      properties:
        lower:
          type: number
        lowerPopulation:
          type: number
        lowerSampling:
          type: number
        upper:
          type: number
        upperPopulation:
          type: number
        upperSampling:
          type: number
    FilterIntRangeDto:
      type: object
      properties:
        max:
          type: number
          description: The maximum value of the range
        min:
          type: number
          description: The minimum value of the range
    FilterCompleteLatLngLiteDto:
      type: object
      properties:
        location:
          description: Filter by location geo coordinates
          allOf:
            - $ref: '#/components/schemas/FilterLatLngLiteDto'
    FilterDateRangeDto:
      type: object
      properties:
        max:
          format: date-time
          type: string
          description: >-
            Date filter - Date should be in ISO format (ex:
            `2022-10-21T11:31:33.593Z`)
          example: '2022-10-21T11:31:33.593Z'
        min:
          format: date-time
          type: string
          description: >-
            Date filter - Date should be in ISO format (ex:
            `2022-10-21T11:31:33.593Z`)
          example: '2022-10-21T11:31:33.593Z'
    FilterPropertyPriceLiteDto:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/FilterIntRangeDto'
        valuePerArea:
          $ref: '#/components/schemas/FilterIntRangeDto'
    EnumPropertyOfferTypeDto:
      type: string
      enum:
        - OFFER_UNKNOWN
        - OFFER_BUY
        - OFFER_RENT
        - OFFER_BUSINESS_TAKE_OVER
        - OFFER_LEASE_BACK
        - OFFER_LIFE_ANNUITY_SALE
        - OFFER_HOLIDAYS
        - OFFER_AUCTION
    CharacteristicsLiteDto:
      type: object
      properties:
        hasBalcony:
          type: boolean
        hasCellar:
          type: boolean
        hasGarage:
          type: boolean
        hasLift:
          type: boolean
        hasParking:
          type: boolean
        hasPool:
          type: boolean
        hasTerrace:
          type: boolean
    FilterClimateLiteDto:
      type: object
      properties:
        epcClimate:
          type: array
          example: []
          description: >-
            The classification value of the greenhouse gas emission
            classification - GES
          items:
            $ref: '#/components/schemas/EnumGreenhouseClassificationDto'
        epcEnergy:
          type: array
          example: []
          description: The classification value of the energy classification - DPE
          items:
            $ref: '#/components/schemas/EnumEnergyClassificationDto'
    FilterSurfaceLiteDto:
      type: object
      properties:
        total:
          description: The total habitable surface of the property in m²
          allOf:
            - $ref: '#/components/schemas/FilterIntRangeDto'
    FilterFeaturesLiteDto:
      type: object
      properties:
        furniture:
          type: array
          example: []
          items:
            $ref: '#/components/schemas/EnumFurnitureDto'
        propertyFloor:
          $ref: '#/components/schemas/FilterIntRangeDto'
        propertyTotalFloor:
          $ref: '#/components/schemas/FilterIntRangeDto'
    PropertyConditionLiteDto:
      type: object
      properties:
        constructionYear:
          type: number
        generalConditions:
          type: array
          example: []
          items:
            $ref: '#/components/schemas/EnumPropertyGeneralConditionDto'
    FilterLatLngLiteDto:
      type: object
      properties:
        geoDistance:
          $ref: '#/components/schemas/FilterLatLngGeoDistanceDto'
    EnumGreenhouseClassificationDto:
      type: string
      enum:
        - GREENHOUSE_CLASSIFICATION_UNKNOWN
        - GREENHOUSE_CLASSIFICATION_G
        - GREENHOUSE_CLASSIFICATION_F
        - GREENHOUSE_CLASSIFICATION_E
        - GREENHOUSE_CLASSIFICATION_D
        - GREENHOUSE_CLASSIFICATION_C
        - GREENHOUSE_CLASSIFICATION_B
        - GREENHOUSE_CLASSIFICATION_A
        - GREENHOUSE_CLASSIFICATION_NC
    EnumEnergyClassificationDto:
      type: string
      enum:
        - ENERGY_CLASSIFICATION_UNKNOWN
        - ENERGY_CLASSIFICATION_G
        - ENERGY_CLASSIFICATION_F
        - ENERGY_CLASSIFICATION_E
        - ENERGY_CLASSIFICATION_D
        - ENERGY_CLASSIFICATION_C
        - ENERGY_CLASSIFICATION_B
        - ENERGY_CLASSIFICATION_A
        - ENERGY_CLASSIFICATION_NC
    EnumFurnitureDto:
      type: string
      enum:
        - UNKNOWN_FURNITURE
        - UNFURNISHED
        - PARTIALLY_FURNISHED
        - FULLY_FURNISHED
    EnumPropertyGeneralConditionDto:
      type: string
      enum:
        - GENERAL_CONDITION_UNKNOWN
        - GENERAL_CONDITION_TO_BE_RENOVATED
        - GENERAL_CONDITION_BRAND_NEW
        - GENERAL_CONDITION_RENOVATED
        - GENERAL_CONDITION_TO_BE_REFRESHED
        - GENERAL_CONDITION_GOOD
        - GENERAL_CONDITION_EXCELLENT
        - GENERAL_CONDITION_DECREPIT
        - GENERAL_CONDITION_TO_BE_BUILT
    FilterLatLngGeoDistanceDto:
      type: object
      properties:
        distanceKm:
          type: number
        pin:
          $ref: '#/components/schemas/LatLngDto'
    LatLngDto:
      type: object
      properties:
        lat:
          type: number
          description: Latitude
        lon:
          type: number
          description: Longitude
  securitySchemes:
    x_api_key:
      type: apiKey
      in: header
      name: x-api-key

````