# 28HSE Properties and Details Scraper (`realestateapi/28hse-properties-and-details-scraper`) Actor

Scrapes public 28Hse buy and rent listings into detailed Hong Kong property records, including listing and estate details, gross and saleable areas, school networks, agent information, nearby places, recent transactions, and listing photos.

- **URL**: https://apify.com/realestateapi/28hse-properties-and-details-scraper.md
- **Developed by:** [Real Estate API](https://apify.com/realestateapi) (community)
- **Stats:** 2 total users, 1 monthly users, 30.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 28HSE Properties and Details Scraper

Collects public buy and rent listings from 28Hse and follows each listing to its public detail page. The parser combines the page’s Schema.org data with visible detail tables, so rows include the same fields shown to a browser visitor instead of only the sparse JSON-LD summary.

Detailed rows include the listing reference, asking-price text and numeric price when available, gross and saleable areas with price per square foot, estate and unit details, floor range, room and bathroom counts, orientation, estate age and development profile, primary and secondary school networks, property features, listing dates and views, agent company and contact credentials, nearby places and walking times, recent estate transactions, and gallery photos or floor plans. Negotiable asking prices remain text and are not converted to zero. `areaSqFt` remains an alias for saleable area for compatibility.

The actor uses public 28Hse HTML pages. It does not log in, contact agents, submit forms, or call private APIs. Set `includeDetails` to `false` only when a compact index of listing URLs is preferred; its default is `true`. `maxPages` and `maxProperties` bound search-page and detail-page requests.

### Local run

```text
npm install
npm test
apify validate-schema .actor/input_schema.json
apify validate-schema .actor/dataset_schema.json
apify run --input '{"startUrl":"https://www.28hse.com/buy","maxProperties":10,"maxPages":1,"includeDetails":true,"requestDelayMs":150}'
```

Only property records successfully extracted from a listing or detail page are written to the default dataset. A failed detail request is logged and counted in `OUTPUT_SUMMARY`, but does not create a diagnostic or placeholder row. A run with some real property records finishes with `status: SUCCEEDED`, `runStatus: PARTIAL`, `collectionStatus: PARTIAL`, and `expectedExitCode: 0`, even when other detail requests fail; a failure with no real records reports `FAILED` statuses and expected exit code 1. A valid search with no matching listings completes successfully with an empty dataset. A clean run reports `status: SUCCEEDED`, `runStatus: COMPLETED`, `collectionStatus: COMPLETED`, and `expectedExitCode: 0`. The expected exit code is the Actor's intended process outcome; it does not claim evidence of a previously observed native process exit.

`OUTPUT_SUMMARY.itemCount` and its detail counters describe the current run. They are not cumulative counts of all rows already stored in the default dataset.

### Runtime dependency remediation

Batch input and JSON storage use the documented Apify REST API and isolated local JSON storage, with environment-only credentials, bounded requests, no platform redirects, and no automatic dataset-POST retry. The Actor does not import the full Apify/Crawlee SDK. Source collection rules and authorization gates are unchanged. This adapter does not provide request queues, proxies, browser automation, encrypted input fields, or long-running system-event migration. Those capabilities are not used by this implementation.

# Actor input Schema

## `startUrl` (type: `string`):

Public 28Hse buy/rent search URL or one property detail URL.

## `maxProperties` (type: `integer`):

Maximum unique property rows to emit.

## `maxPages` (type: `integer`):

Maximum public listing pages to inspect when startUrl is a search page.

## `includeDetails` (type: `boolean`):

Fetch each public property page for price, area, agent, and description fields.

## `requestDelayMs` (type: `integer`):

Wait this many milliseconds between public page requests.

## `requestTimeoutSecs` (type: `integer`):

Abort a public page request after this many seconds.

## Actor input object example

```json
{
  "startUrl": "https://www.28hse.com/buy",
  "maxProperties": 10,
  "maxPages": 1,
  "includeDetails": true,
  "requestDelayMs": 150,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("realestateapi/28hse-properties-and-details-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("realestateapi/28hse-properties-and-details-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call realestateapi/28hse-properties-and-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,realestateapi/28hse-properties-and-details-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/xucPRJY5myNtGu41q/builds/JnQKtQEVekvMKlgoL/openapi.json
