# /28hse/transactions/search

`POST /api/28hse/transactions/search`

Price: 20 credits

Search the Hong Kong property transaction register that 28Hse and Squarefoot publish — over a million sale and lease records combined from the Land Registry and from market reporting. Filter by sale or lease, the three-level area tree, private estate versus subsidised or public housing, building age band and free text. Each record returns the deal id and page URL, the transaction and last-update dates, the price in HKD, saleable and gross areas with the matching price per square foot, bedroom and carpark counts, whether the unit comes with a carpark, orientation, the extra unit features, the estate with both of the ids the source keys it by, the phase, block, floor band, floor and unit designation, the district, the register the record came from with its Land Registry and agency reference numbers, and — where the same unit changed hands before — the previous price, the previous transaction date and the signed profit or loss percentage. The total number of matching records is returned in the X-Total-Available-Results header.

## How to use it

Search Hong Kong property transactions (成交紀錄) published by 28Hse / Squarefoot. Set count. Narrow with deal_type ('sale'/'rent'/'any'), regions, district_groups, districts, estate_category, building_ages and keyword. Records carry estate_id — pass it to 28hse/estates for the estate profile, or to 28hse/estates/transactions for that estate's own history — and estate_cat_id, which is what 28hse/properties/search takes in estate_cat_ids; records with a unit_id can be expanded with 28hse/estates/units. Prices are HKD, areas are square feet. Both sites read the same register, so site only changes the language edition of the labels.

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `site` (string) — Which Hong Kong portal to read. Both run on the same platform but hold different listing inventories: 28hse is the larger Chinese-first marketplace, squarefoot is the English-first one. (default: "28hse"; one of: "28hse", "squarefoot")
- `lang` (string) — Language of names, addresses and descriptions. It also changes which listings exist: some categories are only published in the Chinese editions. (default: "tc"; one of: "tc", "cn", "en")
- `count` (integer, required) — Number of transactions to return. (min: 1)
- `deal_type` (string) — Restrict to sale or lease transactions. (default: "any"; one of: "any", "sale", "rent")
- `regions` (array, nullable) — Top-level Hong Kong regions. (one of: "hong_kong_island", "kowloon", "new_territories", "outlying_islands")
- `district_groups` (array, nullable) — District groups (the second level of the area tree). (one of: "island_south", "aberdeen_ap_lei_chau_wong_chuk_hang", "chai_wan_siu_sai_wan_shek_o", "shau_kei_wan_heng_fa_chuen", "sai_wan_ho", "taikoo", "quarry_bay", "north_point_mid_levels", "north_point_fortress_hill", "tin_hau_tai_hang", "causeway_bay_happy_valley", "wan_chai_admiralty", "mid_levels", "central_sheung_wan", "sai_ying_pun_shek_tong_tsui", "kennedy_town", "whampoa", "hung_hom", "tsim_sha_tsui", "jordan", "yau_ma_tei", "mong_kok", "prince_edward", "tai_kok_tsui_olympic_kowloon_station", "lai_king", "mei_foo", "cheung_sha_wan", "lai_chi_kok", "sham_shui_po_shek_kip_mei_nam_cheong", "yau_yat_tsuen", "ho_man_tin", "kowloon_tong", "san_po_kong_wong_tai_sin", "kai_tak", "kowloon_city", "to_kwa_wan", "diamond_hill_lok_fu", "ngau_chi_wan", "kowloon_bay", "kwun_tong_ngau_tau_kok", "yau_tong", "lam_tin", "sha_tau_kok", "tsing_yi", "kwai_chung_kwai_fong", "tsuen_wan_tai_wo_hau", "tsuen_wan_sham_tseng", "tuen_mun_castle_peak_road", "tuen_mun", "tin_shui_wai", "yuen_long_hung_shui_kiu", "sheung_shui", "fan_ling", "tai_po_tai_wo_pak_shek_kok", "sha_tin_tai_wai_fotan", "ma_on_shan", "tseung_kwan_o", "sai_kung_clear_water_bay", "cheung_chau_other_islands", "lamma_island", "peng_chau", "south_lantau_island_tai_o", "tung_chung", "discovery_bay", "ma_wan", "greater_bay_area")
- `districts` (array, nullable) — Individual districts (the third level of the area tree). (one of: "pok_fu_lam", "shouson_hill", "baguio_villa", "southern_district", "repulse_bay", "tai_tam", "stanley", "south_horizons", "parkview", "wong_chuk_hang", "ap_lei_chau", "aberdeen", "chai_wan", "shek_o", "siu_sai_wan", "shau_kei_wan", "heng_fa_chuen", "north_point", "fortress_hill", "tai_hang", "tin_hau", "jardines_lookout", "happy_valley", "happy_valley_mid_levels", "causeway_bay", "admiralty", "wan_chai", "shiu_fai_terrace", "western_mid_levels", "mid_levels_central", "the_peak", "sheung_wan", "central", "sai_ying_pun", "shek_tong_tsui", "tai_kok_tsui", "olympic", "kowloon_station", "sham_shui_po", "shek_kip_mei", "nam_cheong", "san_po_kong", "wong_tai_sin", "diamond_hill", "lok_fu", "ngau_tau_kok", "kwun_tong", "kwai_chung", "kwai_fong", "tsuen_wan", "tai_wo_hau", "yuen_long", "hung_shui_kiu", "tai_po", "tai_wo", "pak_shek_kok", "sha_tin", "tai_wai", "fotan", "tseung_kwan_o_town", "lohas_park", "hang_hau", "po_lam", "tiu_keng_leng", "sai_kung", "clear_water_bay", "cheung_chau", "other_islands", "south_lantau_island", "tai_o", "zhongshan", "zhuhai", "guangdong", "huizhou", "shenzhen", "jiangmen")
- `estate_category` (string, nullable) — Private estates or subsidised and public housing. Both are returned when omitted. (one of: "private_estate", "public_and_subsidised_housing")
- `building_ages` (array, nullable) — Age bands of the building. (one of: "brand_new", "within_5_years", "within_10_years", "within_15_years", "within_20_years", "within_30_years", "from_30_to_50_years", "above_50_years")
- `keyword` (string, nullable) — Free text matched against the estate name and address.

## Response

### 200 — Successful Response

- `@type` (string) (default: "Hse28Transaction")
- `id` (string, required)
- `url` (string, nullable)
- `buy_rent` (string, nullable)
- `transaction_at` (integer, nullable)
- `updated_at` (integer, nullable)
- `price` (number, nullable)
- `price_per_saleable_sqft` (number, nullable)
- `price_per_gross_sqft` (number, nullable)
- `saleable_area` (number, nullable)
- `gross_area` (number, nullable)
- `room_count` (integer, nullable)
- `carpark_count` (integer, nullable)
- `has_carpark` (boolean, nullable)
- `direction` (string, nullable)
- `features` (array) (default: [])
- `features_en` (array) (default: [])
- `estate` (string, nullable)
- `estate_id` (string, nullable)
- `estate_cat_id` (string, nullable)
- `phase` (string, nullable)
- `phase_en` (string, nullable)
- `phase_no` (string, nullable)
- `block` (string, nullable)
- `block_en` (string, nullable)
- `block_no` (string, nullable)
- `floor_zone` (string, nullable)
- `floor` (string, nullable)
- `unit` (string, nullable)
- `unit_id` (string, nullable)
- `district` (string, nullable)
- `district_id` (string, nullable)
- `address` (string, nullable)
- `source` (string, nullable)
- `transaction_type` (string, nullable)
- `land_registry_ref` (string, nullable)
- `agency_ref` (string, nullable)
- `previous_price` (number, nullable)
- `previous_transaction_at` (integer, nullable)
- `profit_loss_percent` (number, nullable)

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The entity was not found, or a precondition failed

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

