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

# /midland/transactions/search

> Search Midland Realty's Hong Kong property deal archive — Land Registry records plus Midland's own transactions, covering the full history rather than a recent window. Filters cover sale or rental deals, free text, recency window, primary or secondary market, resale at a profit or a loss, unit features, record source, ownership class, the luxury segment, the eight-level geography, estate, phase, building, street and unit ids, MTR station with walking time, primary school net, universities, price, saleable area, price per area unit, building age, holding period, bedrooms, floor band and ordering. Each deal carries the transacted price and price per saleable area, areas, the previous deal price and date with the gain and holding period, room counts, floor and flat, the estate / phase / building, unit features, floor plans, coordinates and the deal record source.

**Price:** 1 credit



## OpenAPI

````yaml /openapi/real-estate.json post /api/midland/transactions/search
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/midland/transactions/search:
    post:
      tags:
        - /midland
      summary: /midland/transactions/search
      description: >-
        Search Midland Realty's Hong Kong property deal archive — Land Registry
        records plus Midland's own transactions, covering the full history
        rather than a recent window. Filters cover sale or rental deals, free
        text, recency window, primary or secondary market, resale at a profit or
        a loss, unit features, record source, ownership class, the luxury
        segment, the eight-level geography, estate, phase, building, street and
        unit ids, MTR station with walking time, primary school net,
        universities, price, saleable area, price per area unit, building age,
        holding period, bedrooms, floor band and ordering. Each deal carries the
        transacted price and price per saleable area, areas, the previous deal
        price and date with the gain and holding period, room counts, floor and
        flat, the estate / phase / building, unit features, floor plans,
        coordinates and the deal record source.


        **Price:** 1 credit
      operationId: __api_midland_transactions_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MidlandTransactionsSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MidlandTransactionCard'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MidlandTransactionsSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        lang:
          $ref: '#/components/schemas/MidlandLang'
          default: zh-hk
        unit:
          $ref: '#/components/schemas/MidlandUnit'
          default: feet
        currency:
          $ref: '#/components/schemas/MidlandCurrency'
          default: HKD
        min_building_age:
          anyOf:
            - type: integer
              maximum: 999
              minimum: 0
            - type: 'null'
        max_building_age:
          anyOf:
            - type: integer
              maximum: 999
              minimum: 0
            - type: 'null'
        count:
          type: integer
          maximum: 10000
          minimum: 1
        transaction_type:
          anyOf:
            - $ref: '#/components/schemas/MidlandTransactionType'
            - type: 'null'
        text:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        transaction_date:
          anyOf:
            - $ref: '#/components/schemas/MidlandTransactionDate'
            - type: 'null'
        market_types:
          anyOf:
            - items:
                $ref: '#/components/schemas/MidlandMarketType'
              type: array
            - type: 'null'
        gains:
          anyOf:
            - items:
                $ref: '#/components/schemas/MidlandGainType'
              type: array
            - type: 'null'
        features:
          anyOf:
            - items:
                $ref: '#/components/schemas/MidlandTransactionFeature'
              type: array
            - type: 'null'
        source:
          anyOf:
            - $ref: '#/components/schemas/MidlandTransactionSource'
            - type: 'null'
        property_types:
          anyOf:
            - items:
                $ref: '#/components/schemas/MidlandTransactionPropertyType'
              type: array
            - type: 'null'
        is_deluxe:
          anyOf:
            - type: boolean
            - type: 'null'
        sort:
          $ref: '#/components/schemas/MidlandTransactionSort'
          default: default
        region_id:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        subregion_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        district_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        sm_district_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        combined_district_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        int_district_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        int_sm_district_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        estate_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        phase_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        building_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        street_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        house_street_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        unit_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        mtr_ids:
          anyOf:
            - items:
                type: string
                minLength: 1
              type: array
            - type: 'null'
        walking_duration:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
        school_net:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
        university_ids:
          anyOf:
            - items:
                $ref: '#/components/schemas/MidlandUniversity'
              type: array
            - type: 'null'
        min_price:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
        max_price:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
        min_net_area:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
        max_net_area:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
        min_net_ft_price:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
        max_net_ft_price:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
        min_holding_period:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
        max_holding_period:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
        bedrooms:
          anyOf:
            - items:
                $ref: '#/components/schemas/MidlandBedroomCount'
              type: array
            - type: 'null'
        floor_levels:
          anyOf:
            - items:
                $ref: '#/components/schemas/MidlandFloorLevel'
              type: array
            - type: 'null'
      type: object
      required:
        - count
    MidlandTransactionCard:
      properties:
        '@type':
          type: string
          default: MidlandTransactionCard
        id:
          type: string
        url:
          anyOf:
            - type: string
            - type: 'null'
        transaction_type:
          anyOf:
            - type: string
            - type: 'null'
        transaction_at:
          anyOf:
            - type: integer
            - type: 'null'
        market_type:
          anyOf:
            - type: string
            - type: 'null'
        source:
          anyOf:
            - type: string
            - type: 'null'
        original_source:
          anyOf:
            - type: string
            - type: 'null'
        tags:
          items:
            type: string
          type: array
          default: []
        price:
          anyOf:
            - type: number
            - type: 'null'
        price_per_net_area:
          anyOf:
            - type: number
            - type: 'null'
        area:
          anyOf:
            - type: number
            - type: 'null'
        net_area:
          anyOf:
            - type: number
            - type: 'null'
        previous_price:
          anyOf:
            - type: number
            - type: 'null'
        previous_transaction_at:
          anyOf:
            - type: integer
            - type: 'null'
        gain_percent:
          anyOf:
            - type: number
            - type: 'null'
        holding_period_years:
          anyOf:
            - type: number
            - type: 'null'
        bedroom_count:
          anyOf:
            - type: integer
            - type: 'null'
        sitting_room_count:
          anyOf:
            - type: integer
            - type: 'null'
        floor:
          anyOf:
            - type: string
            - type: 'null'
        floor_level:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
        flat:
          anyOf:
            - type: string
            - type: 'null'
        is_premium_paid:
          anyOf:
            - type: boolean
            - type: 'null'
        deal_type:
          anyOf:
            - type: string
            - type: 'null'
        geo:
          anyOf:
            - $ref: '#/components/schemas/MidlandGeo'
            - type: 'null'
        estate:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
        phase:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
        building:
          anyOf:
            - $ref: '#/components/schemas/MidlandBuilding'
            - type: 'null'
        features:
          items:
            $ref: '#/components/schemas/MidlandRef'
          type: array
          default: []
        floor_plans:
          items:
            $ref: '#/components/schemas/MidlandFloorPlan'
          type: array
          default: []
        image:
          anyOf:
            - type: string
            - type: 'null'
        location:
          anyOf:
            - $ref: '#/components/schemas/MidlandLocation'
            - type: 'null'
        listings_url:
          anyOf:
            - type: string
            - type: 'null'
        updated_at:
          anyOf:
            - type: integer
            - type: 'null'
      type: object
      required:
        - id
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    MidlandLang:
      type: string
      enum:
        - zh-hk
        - zh-cn
        - en
    MidlandUnit:
      type: string
      enum:
        - feet
        - meter
    MidlandCurrency:
      type: string
      enum:
        - HKD
        - CNY
    MidlandTransactionType:
      type: string
      enum:
        - S
        - L
    MidlandTransactionDate:
      type: string
      enum:
        - 7days
        - 30days
        - 90days
        - 180days
        - 1year
        - 3year
    MidlandMarketType:
      type: string
      enum:
        - '1'
        - '2'
    MidlandGainType:
      type: string
      enum:
        - profit
        - loss
    MidlandTransactionFeature:
      type: string
      enum:
        - balcony
        - utility_platform
        - flat_roof
        - carpark
        - roof
        - garden
        - duplex
        - triplex
        - combined
    MidlandTransactionSource:
      type: string
      enum:
        - landreg
        - midland
        - hkp
    MidlandTransactionPropertyType:
      type: string
      enum:
        - private
        - hos
        - tps
    MidlandTransactionSort:
      type: string
      enum:
        - default
        - price
        - price_desc
        - net_area
        - net_area_desc
        - net_ft_price
        - net_ft_price_desc
    MidlandUniversity:
      type: string
      enum:
        - U01
        - U02
        - U03
        - U04
        - U05
        - U06
        - U07
        - U08
        - U09
        - U10
        - U11
        - U12
        - U13
    MidlandBedroomCount:
      type: string
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
        - 4+
    MidlandFloorLevel:
      type: string
      enum:
        - H
        - M
        - L
    MidlandRef:
      properties:
        '@type':
          type: string
          default: MidlandRef
        id:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    MidlandGeo:
      properties:
        '@type':
          type: string
          default: MidlandGeo
        region:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
        subregion:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
        district:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
        sm_district:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
        combined_district:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
        int_district:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
        int_sm_district:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
        lux_district:
          anyOf:
            - $ref: '#/components/schemas/MidlandRef'
            - type: 'null'
      type: object
    MidlandBuilding:
      properties:
        '@type':
          type: string
          default: MidlandBuilding
        id:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        address:
          anyOf:
            - type: string
            - type: 'null'
        first_op_at:
          anyOf:
            - type: integer
            - type: 'null'
        floor_count:
          anyOf:
            - type: integer
            - type: 'null'
        building_type:
          anyOf:
            - type: string
            - type: 'null'
        latitude:
          anyOf:
            - type: number
            - type: 'null'
        longitude:
          anyOf:
            - type: number
            - type: 'null'
        streetview_latitude:
          anyOf:
            - type: number
            - type: 'null'
        streetview_longitude:
          anyOf:
            - type: number
            - type: 'null'
        streetview_angle:
          anyOf:
            - type: integer
            - type: 'null'
      type: object
    MidlandFloorPlan:
      properties:
        '@type':
          type: string
          default: MidlandFloorPlan
        id:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
        source:
          anyOf:
            - type: string
            - type: 'null'
        phase_id:
          anyOf:
            - type: string
            - type: 'null'
        phase_name:
          anyOf:
            - type: string
            - type: 'null'
        building_id:
          anyOf:
            - type: string
            - type: 'null'
        building_name:
          anyOf:
            - type: string
            - type: 'null'
        floor_from:
          anyOf:
            - type: string
            - type: 'null'
        floor_to:
          anyOf:
            - type: string
            - type: 'null'
        floor_text:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    MidlandLocation:
      properties:
        '@type':
          type: string
          default: MidlandLocation
        latitude:
          anyOf:
            - type: number
            - type: 'null'
        longitude:
          anyOf:
            - type: number
            - type: 'null'
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````