# Thai Property Market Analyzer (`robertosan16/thai-property-analyzer`) Actor

Analyze Thailand property listings by project and district: asking prices per m², rents, gross yields, price cuts and days on market. Track Pattaya and Bangkok, compare duplicate listings and find resale units priced below similar listings. Export project reports and supporting datasets.

- **URL**: https://apify.com/robertosan16/thai-property-analyzer.md
- **Developed by:** [Robert Khairislamov](https://apify.com/robertosan16) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 project market reports

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Thai Property Market Analyzer

Private Actor for market research on Thai condos, houses and villas. It reads the listings of a location on Dot Property and turns them into figures per **project** (condominium) and per **district**: typical asking price per m², typical rent, gross yield, supply, new listings, price cuts and listings that left the market since the last run. Pattaya listings get their tourist district (Wongamat, Pratumnak, Jomtien…) from coordinates.

It is an internal tool: the results are for the owner's own analysis and are not published or resold.

### What it saves

| Dataset | One row per | Main fields |
|---|---|---|
| Projects (default) | project | sale and rent listings, median ฿ per m² with quartiles, typical price and rent, gross yield, new, left the market, price cuts, developer, year, units, nearest landmark and distance |
| Districts | district | the same figures per district |
| Listings | listing | project, district, beds, baths, m², price, ฿ per m², first seen, days listed, price change since the last run |
| Left the market | listing gone since the last run | project, district, last price, first and last date seen |

The `SUMMARY` record in the key-value store says what each search read and whether the read was complete.

### How it works

- **Searches**: every location × property type × sale/rent, 30 listings per page, every page by default.
- **Pace**: two readers with a pause of about a second before each request, as a visitor would browse. Protection pages are never solved.
- **Project details**: one listing page per project, kept for 90 days in the memory store, at most 600 new projects per run (the projects with the most listings first).
- **History**: the memory store keeps, per search, when each listing was first and last seen and at what price. A complete read also tells which listings of the last run are gone; most of them were sold, rented or withdrawn. A partial read (Max pages per search) adds to the history but does not count departures.
- **Figures**: medians of asking prices; prices more than 3 times off a project's median are left out as typos. Gross yield needs at least 3 sale and 3 rent listings in the project. Thailand publishes no sale prices per unit, so all figures are asking prices.

### Districts of Pattaya

From north to south along the coast: Naklua & Wongamat, North Pattaya, Central Pattaya, South Pattaya, Pratumnak, Jomtien, Na Jomtien, Bang Saray; east of Sukhumvit Road: East Pattaya. The borders are approximate (about 200 m). Bangkok uses its district (khet), other locations the subdistrict from the listing.

### Bangkok

Location `bangkok`. Districts are the 50 khet (Watthana, Khlong Toei, Sathon, Chatuchak…), as subdistricts are too small to compare. Every project, listing, lot and below-market record also gets its **nearest BTS, MRT or Airport Rail Link station** and the distance (`nearestStation`, `nearestStationKm`). The station comes from the listing page (`nearestStationSource: page`); for projects whose page names none, it is estimated from the positions of projects the site places next to each station (`estimated`, a few hundred metres accurate, up to 2 km).

Bangkok is about four times Pattaya: some 64,000 condos for sale and 127,000 for rent. Run it with its own memory (`memoryName`: `bangkok-condos`), 4 GB of memory and a time limit of 8 hours; the first runs read project details, photos and floors over several runs (they stop before the time limit and continue next time). A run costs about $6–9.

### Input

```json
{
  "locations": ["chonburi/pattaya"],
  "propertyTypes": ["condo"],
  "transactions": ["sale", "rent"],
  "maxPagesPerSearch": 0,
  "memoryName": "thai-property-history"
}
```

Schedule it weekly with the same memory name to get days on market, price cuts and departures.

### The same unit at several agencies

The **Lots** table groups listings of one unit by different advertisers: same project, bedrooms and size within 1 m², and at least one shared photo among the first four (compared by a visual fingerprint, so re-saved and watermarked copies match). Marketing renders and common-area photos shared by many listings do not count, nor do new and off-plan projects, where many units share show-unit photos. Listings on different floors, with two references of one advertiser, or too far apart in price stay apart, for every pair in a lot. The floor comes from the description; for listings in a lot, the full description on the listing's page is read once and remembered.

### Below market

The **Below market** table lists resale units at least 10% below similar units of their building (same bedrooms, size within 25%, at least three, without the same unit and without Thai-quota listings), with the ownership (Thai or foreign quota) when the advertiser names it.

### Is the listing still on offer

The search list only gives the date a listing was first verified, so a unit listed in 2019 and updated by its agency last week looked stale. For below-market listings (deepest first) and units at several agencies, the listing's own page is read: when the agency last updated it (`siteUpdatedAt`) and whether the site still offers it (`siteStatus`: for sale, not for sale, page removed). The update date counts as activity for `lastActivityAt` and `freshness`. Listings no longer for sale are left out of Below market and Lots. Up to `maxPageChecksPerRun` pages per run (3,000), each at most once a week; floor reads give the same answer for free. An update date shows that the agency keeps the listing in its feed, not that the unit is unsold: some agencies refresh all their listings at once.

# Actor input Schema

## `locations` (type: `array`):

Dot Property location paths, one per line: <code>chonburi/pattaya</code>, <code>phuket</code>, <code>bangkok</code>, <code>prachuap-khiri-khan/hua-hin</code>, <code>chiang-mai</code>. The path is the part of a Dot Property search link after <code>condos-for-sale/</code>.

## `propertyTypes` (type: `array`):

Types of property to read in each location.

## `transactions` (type: `array`):

Sale listings give prices; rent listings give rents and, together, the gross yield of each project.

## `maxPagesPerSearch` (type: `integer`):

30 listings per page. 0 reads every page. A partial read gives figures but cannot tell which listings left the market. The form starts with a small test run (1 page); set 0 to read the whole market.

## `includeProjectDetails` (type: `boolean`):

Read one listing page per project for its developer, completion year, floors, number of units and nearest landmark with its distance. Kept for 90 days, so later runs read only new projects.

## `maxProjectDetailsPerRun` (type: `integer`):

Projects with the most listings first; the rest are read in the next runs.

## `maxRemovalChecksPerRun` (type: `integer`):

A listing missing from the list pages since the last run is checked on its own page: gone or no longer on offer counts as left the market; still on offer means it was only missed. The rest are checked in the next run.

## `maxFloorChecksPerRun` (type: `integer`):

Listings in units listed more than once whose floor is not in the start of the description: their own page is read once for the floor, so neighbouring units furnished alike are not taken for one unit. The rest are read in the next runs.

## `maxPageChecksPerRun` (type: `integer`):

Pages of below-market listings and of units listed by several agencies to read: the date the agency last updated the listing and whether it is still for sale. Each page is read at most once a week. 0 turns the check off.

## `lotsFor` (type: `array`):

Deals in which to find the same unit listed by several advertisers.

## `maxNewPhotoHashesPerRun` (type: `integer`):

Listings that may repeat a unit are compared by their first 4 photos (64×48 thumbnails, about 8 KB each). Comparisons are kept, so later runs read only new photos. The largest projects come first; the rest wait for the next runs.

## `saveListings` (type: `boolean`):

Save every listing as well as the project and district figures.

## `memoryName` (type: `string`):

Key-value store that keeps what earlier runs saw: first date and price of each listing, project details. Use one name per market you track.

## `concurrency` (type: `integer`):

Requests at the same time. Keep it low: the Actor reads the site at a visitor's pace.

## `delayMs` (type: `integer`):

Average pause before each request of each parallel reader.

## `proxyConfiguration` (type: `object`):

Apify Proxy datacenter addresses work.

## Actor input object example

```json
{
  "locations": [
    "chonburi/pattaya"
  ],
  "propertyTypes": [
    "condo"
  ],
  "transactions": [
    "sale",
    "rent"
  ],
  "maxPagesPerSearch": 1,
  "includeProjectDetails": true,
  "maxProjectDetailsPerRun": 10,
  "maxRemovalChecksPerRun": 20,
  "maxFloorChecksPerRun": 20,
  "maxPageChecksPerRun": 20,
  "lotsFor": [
    "sale"
  ],
  "maxNewPhotoHashesPerRun": 100,
  "saveListings": true,
  "memoryName": "thai-property-history",
  "concurrency": 2,
  "delayMs": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `projects` (type: `string`):

Market figures and facts per project (condominium).

## `belowMarket` (type: `string`):

Resale listings at least 10% below similar units of their project, with ownership (Thai or foreign quota).

## `lots` (type: `string`):

The same unit listed by several advertisers, with every price.

## `districts` (type: `string`):

Market figures per district.

## `listings` (type: `string`):

Every listing with its district, history and project facts.

## `removed` (type: `string`):

Listings seen in the last run and gone in this one.

## `summary` (type: `string`):

What the run read for each search, and errors.

# 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 = {
    "locations": [
        "chonburi/pattaya"
    ],
    "maxPagesPerSearch": 1,
    "maxProjectDetailsPerRun": 10,
    "maxRemovalChecksPerRun": 20,
    "maxFloorChecksPerRun": 20,
    "maxPageChecksPerRun": 20,
    "maxNewPhotoHashesPerRun": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("robertosan16/thai-property-analyzer").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 = {
    "locations": ["chonburi/pattaya"],
    "maxPagesPerSearch": 1,
    "maxProjectDetailsPerRun": 10,
    "maxRemovalChecksPerRun": 20,
    "maxFloorChecksPerRun": 20,
    "maxPageChecksPerRun": 20,
    "maxNewPhotoHashesPerRun": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("robertosan16/thai-property-analyzer").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 '{
  "locations": [
    "chonburi/pattaya"
  ],
  "maxPagesPerSearch": 1,
  "maxProjectDetailsPerRun": 10,
  "maxRemovalChecksPerRun": 20,
  "maxFloorChecksPerRun": 20,
  "maxPageChecksPerRun": 20,
  "maxNewPhotoHashesPerRun": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call robertosan16/thai-property-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,robertosan16/thai-property-analyzer"
        }
    }
}
```

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/e4gmUbYdY4805Ct6w/builds/SxhcfuuethMfykd3k/openapi.json
