# Cafeland Property Scraper - Vietnam Real Estate Listings (`sian.agency/cafeland-property-scraper`) Actor

Scrape Nhà Đất CafeLand listings in all 34 Vietnamese provinces: price in VND and USD, area, price per m², ward, photos and update date, for sale and rent. Add the full advert with GPS, rooms and legal status.

- **URL**: https://apify.com/sian.agency/cafeland-property-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Real estate, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.32 / 1,000 property searches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Cafeland Scraper: Vietnam Property Listings and Prices 🚀

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Batdongsan Scraper](https://img.shields.io/badge/Store-Batdongsan%20Scraper-1AE392)](https://apify.com/sian.agency/batdongsan-property-scraper?fpr=sian) [![Nhatot Scraper](https://img.shields.io/badge/Store-Nhatot%20Scraper-FFBA00)](https://apify.com/sian.agency/nhatot-property-scraper?fpr=sian) [![FazWaz Scraper](https://img.shields.io/badge/Store-FazWaz%20Scraper-1AE392)](https://apify.com/sian.agency/fazwaz-property-scraper?fpr=sian)

#### 🎉 Nhà Đất CafeLand in all 34 Vietnamese provinces: more than 145,000 homes, apartments and plots for sale, plus rentals and rooms

##### For investors, agencies, analysts and developers who want Vietnam's property listings in a spreadsheet

***

### 🔎 What is the Cafeland Scraper — and when should you use it?

The **Cafeland Scraper** turns public Nhà Đất CafeLand (nhadat.cafeland.vn) listings of Vietnamese homes, apartments, land, offices and rooms for sale and rent, from all 34 provinces, into clean, structured rows you can filter, export and feed straight into a spreadsheet, database or AI agent. No account, no portal API key, no browser automation to maintain.

**Use it when you need:** Vietnamese property listings as rows. Every search row carries the asking price in VND and USD, area, price per m², ward and province, the advert summary, photos, the verified badge and the last update time. Open each listing in full and you also get the description, every photo, GPS, bedrooms, toilets, floors, road width, legal status (sổ đỏ / sổ hồng) and the posting date.

**Use something else when:** you want Vietnam's largest portals rather than Cafeland's own stock. Use [Batdongsan Scraper](https://apify.com/sian.agency/batdongsan-property-scraper?fpr=sian) for Batdongsan.com.vn, Vietnam's largest property portal. Use [Nhatot Scraper](https://apify.com/sian.agency/nhatot-property-scraper?fpr=sian) for Chợ Tốt Nhà classifieds for homes and rooms. This actor reads live Cafeland listings only. It returns no phone numbers or poster names, offers no price or size filter on the site's side, and does not return sold prices.

### 🤖 Use with AI agents

Already connected to the [Apify MCP server](https://mcp.apify.com)? Just ask for this Actor by name: sian.agency/cafeland-property-scraper

**Your agent can pay for its own runs.** This Actor is eligible for [agentic payments](https://docs.apify.com/platform/actors/publishing/monetize), so an agent can discover it, run it and settle the bill over [x402](https://www.x402.org/) (USDC on Base) or [Skyfire](https://www.skyfire.xyz/) — without an Apify account or API token of its own. Billing is the same either way: per successful row, never for errors.

Otherwise copy this prompt into Claude, ChatGPT, Cursor or any MCP-enabled assistant:

```text
I want Vietnamese property listings for sale or rent from Nhà Đất CafeLand using the Apify Actor `sian.agency/cafeland-property-scraper`.

Use it when I need: Vietnamese property listings as rows. Every search row carries the asking price in VND and USD, area, price per m², ward and province, the advert summary, photos, the verified badge and the last update time. Open each listing in full and you also get the description, every photo, GPS, bedrooms, toilets, floors, road width, legal status (sổ đỏ / sổ hồng) and the posting date.

Don't use it when: you want Vietnam's largest portals rather than Cafeland's own stock — use batdongsan-property-scraper or nhatot-property-scraper instead.

How to call it: set `listingType` to `sale` or `rent`, `propertyType` to `all` or a type such as `apartment`, `house`, `residential-land` or `room`, and `provinces` to province slugs such as `tp-ho-chi-minh`, `ha-noi` or `da-nang` (empty means all of Vietnam). `maxResults` sets how many listings come back. `includeDetails` opens each listing for the full advert with GPS and legal status, for an extra charge per listing. `searchUrls` takes Cafeland results pages as [{"url": ...}] objects, which is how to search one ward. To expand listings you already have, set `operation` to `detail` and pass `listingUrls`.

Start with this input:
{
  "operation": "search",
  "listingType": "sale",
  "propertyType": "apartment",
  "provinces": [
    "da-nang"
  ],
  "maxResults": 50,
  "includeDetails": false
}

Ask me which province to cover, whether I want listings for sale or for rent, and which property type, then run the Actor and summarise the results as a table.
```

**Things you can ask your agent for:**

- *List apartments for sale in Đà Nẵng with price per m² in VND and USD.*
- *Find boarding rooms for rent in Hà Nội and sort them by monthly rent.*
- *Export residential land for sale in Khánh Hòa with GPS and legal status.*

Machine-readable API, MCP config and OpenAPI definition for this Actor are published at [apify.com/sian.agency/cafeland-property-scraper.md](https://apify.com/sian.agency/cafeland-property-scraper.md).

***

### 📋 Overview

**Cafeland Scraper** reads Nhà Đất CafeLand (nhadat.cafeland.vn), the listings side of the Vietnamese property news site CafeLand, and turns it into rows you can sort, filter and export. It suits anyone tracking prices, supply or new stock in Vietnam.

**What you get:**

- ✅ **All 34 provinces and cities**: Hồ Chí Minh City, Hà Nội, Đà Nẵng and every other province on the 2025 map, with wards under their new names
- 💰 **Prices you can compute with**: "1 tỷ 770 triệu" becomes 1,770,000,000 VND, plus a USD figure and price per m²
- 🏘️ **Sale and rent, 14 property types**: houses, townhouses, villas, apartments, land, project plots, warehouses, offices, retail space and rooms
- 📄 **Full advert on request**: description, every photo, GPS, bedrooms, toilets, floors, road width and legal status (sổ đỏ / sổ hồng)
- 🧭 **Listings the big portals miss**: in photo-matched samples only 7-34% of Cafeland listings were on Chợ Tốt Nhà and 0-2% on Batdongsan
- 🔒 **No personal data**: no poster names, phone numbers or emails, and contact details typed into adverts are removed

***

### ✨ Features

- 🗺️ **Province search**: one search per province, or the whole country in one go
- 🏡 **Property type filter**: 14 Cafeland categories, each marked sale-only or rent-only where that applies
- 🔗 **Paste any results page**: ward pages and other Cafeland category pages work as they are
- 📄 **Property Detail mode**: paste listing URLs you already have and get the full advert for each
- 💱 **VND and USD side by side**: one live exchange rate per run, stamped on every row
- 📐 **Price per m²**: computed for sale listings that state both price and area
- 🔁 **No double billing**: a listing that appears on several pages, or in two of your searches, is returned and charged once
- 📊 **Run report**: a summary page with the rows, any input that needs fixing and exactly what you paid

***

### 🎬 Quick Start

Pick a province, sale or rent, and a property type. Run it. Your listings land in a dataset you can download as JSON, CSV or Excel.

```bash
curl -X POST "https://api.apify.com/v2/acts/sian.agency~cafeland-property-scraper/runs?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"listingType": "sale", "propertyType": "apartment", "provinces": ["da-nang"], "maxResults": 100}'
```

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Pick where

Choose one or more provinces in "Provinces and cities", or leave it empty for all of Vietnam.

#### Step 2: Pick what

Choose "For sale" or "For rent" and a property type. Switch on the full advert if you need GPS, rooms and legal status.

#### Step 3: Run and export

Press Start. Download the dataset or open the run report.

**That's it! A 100-listing run takes about 30 seconds, and you'll have:**

- Asking prices in VND and USD with area and price per m²
- Ward and province for every listing, plus photos and the last update time
- A link to every advert on nhadat.cafeland.vn

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `operation` | string | No | `search` (default) reads results pages; `detail` opens listing URLs you paste |
| `listingType` | string | No | `sale` (default) or `rent` |
| `propertyType` | string | No | `all` (default) or one of 14 types, for example `apartment`, `house`, `residential-land`, `room` |
| `provinces` | array | No | Province slugs such as `tp-ho-chi-minh`, `ha-noi`, `da-nang`. Empty means all of Vietnam |
| `maxResults` | integer | No | How many listings to return in total (default 100) |
| `includeDetails` | boolean | No | Also open each listing for the full advert (billed per listing) |
| `searchUrls` | array | No | Cafeland results pages to read as they are; the fields above are then ignored |
| `listingUrls` | array | No | For `detail`: listing addresses ending in -<number>.html |

**Search example:**

```json
{
  "operation": "search",
  "listingType": "sale",
  "propertyType": "apartment",
  "provinces": ["tp-ho-chi-minh", "ha-noi"],
  "maxResults": 200
}
```

**One ward, pasted from the site:**

```json
{
  "searchUrls": [{ "url": "https://nhadat.cafeland.vn/nha-dat-ban/ban-nha-rieng-tai-thu-duc-tp-ho-chi-minh/" }],
  "maxResults": 100
}
```

**Full adverts for listings you already have:**

```json
{
  "operation": "detail",
  "listingUrls": [{ "url": "https://nhadat.cafeland.vn/03-dich-vong-hau-cau-giay-lo-goc-full-noi-that-3191370.html" }]
}
```

**Property types:** `house`, `villa`, `apartment`, `hospitality` and `warehouse` exist for sale and rent. `project-townhouse`, `mini-apartment`, `residential-land`, `project-land` and `farm-land` are sale-only. `townhouse`, `room`, `office` and `retail-space` are rent-only. Picking a type that does not exist on the chosen side stops the run before anything is charged.

**One search reaches at most 9,984 listings.** Cafeland's own results stop at page 384. For a big city, run it by property type, or paste ward pages into `searchUrls`.

***

### 📤 Output

Every row is one listing, with **46 fields**. Search rows carry what the results card shows. Turn on the full advert, or use Property Detail, to fill in the rest.

| Field | Type | Description |
|-------|------|-------------|
| `thumbnail` | string | Main photo |
| `listingId` | string | Cafeland's listing number |
| `propertyTitle` | string | Advert headline (contact details removed) |
| `priceText` | string | Price as shown, e.g. "1 tỷ 770 triệu" or "Thương lượng" |
| `priceVnd` / `priceUsd` | number | Price in dong and in US dollars |
| `rentPeriod` | string | `month` on rent rows |
| `areaSqm` | number | Area in m² |
| `pricePerSqmVnd` | number | Price per m² for sale listings |
| `ward` / `province` | string | Location on the 2025 map |
| `summary` | string | Opening text of the advert |
| `imageUrls` / `photoCount` | array / number | Photos and how many there are |
| `isVerified` | boolean | Cafeland's verified badge (Uy tín) |
| `listingTier` | string | free, standard, vip1 or supervip |
| `updatedAt` | string | When the advert was last updated (+07:00) |
| `bedrooms`, `toilets`, `floors` | number | From the full advert |
| `legalStatus` | string | Sổ hồng, sổ đỏ and similar, from the full advert |
| `latitude` / `longitude` | number | Map pin from the full advert |
| `descriptionText` | string | Full advert text, contact details removed |
| `listingUrl` | string | Link to the advert |

**Example (Property Detail row):**

```json
{
  "listingId": "3191545",
  "listingUrl": "https://nhadat.cafeland.vn/vn236-ban-nha-san-vuon-2-tang-mat-tien-duong-lien-hoa-gan-song-vinh-ngoc-3191545.html",
  "propertyTitle": "VN236 Bán nhà sân vườn 2 tầng mặt tiền đường Liên Hoa gần sông Vĩnh Ngọc",
  "listingType": "sale",
  "priceText": "6 tỷ 300 triệu",
  "priceVnd": 6300000000,
  "priceUsd": 242622.79,
  "fxRateVndPerUsd": 25966.23,
  "areaSqm": 134,
  "pricePerSqmVnd": 47014925,
  "ward": "Tây Nha Trang",
  "province": "Khánh Hòa",
  "realEstateType": "Bán nhà riêng",
  "bedrooms": 3,
  "toilets": 4,
  "floors": 1,
  "livingRooms": 1,
  "latitude": 12.2693505,
  "longitude": 109.1603608,
  "photoCount": 14,
  "thumbnail": "https://static2.cafeland.vn/static01/sgd/news/2026/10/06/ban-nha-rieng-khanh-hoa-tay-nha-trang-1791287112-nhadat.cafeland.vn.jpg",
  "postedAt": "2026-10-06",
  "assetCode": "26103191545",
  "isVerified": true,
  "hasDetail": true,
  "status": "success"
}
```

***

### 💼 Use Cases & Examples

#### 1. Price watch by province and ward

**Analysts and investors tracking what Vietnamese property costs, area by area.**

**Input:** `listingType: "sale"`, a property type, the provinces you follow
**Output:** asking price in VND and USD, area and price per m² with ward and province
**Use:** run it weekly on a schedule and chart the median price per m² per ward

#### 2. Listings the big portals do not carry

**Agencies and data buyers who already read Batdongsan or Chợ Tốt.**

**Input:** the same province and type you pull elsewhere
**Output:** Cafeland's own stock; in photo-matched samples 66-93% of it was not on Chợ Tốt Nhà
**Use:** add it to your feed to widen coverage instead of buying the same listings twice

#### 3. Rental and room market research

**Property managers, relocation services and student-housing operators.**

**Input:** `listingType: "rent"` with `apartment`, `room` or `office`
**Output:** monthly rent in VND and USD, area, ward and photos
**Use:** compare rents across cities, or watch boarding-room prices near universities

#### 4. Land and project-plot scouting

**Developers and land investors looking for plots outside the big cities.**

**Input:** `residential-land`, `project-land` or `farm-land` in the provinces you scout, with the full advert on
**Output:** price, area, GPS, road width and legal status (sổ đỏ / sổ hồng)
**Use:** map plots on GPS and shortlist the ones with clean paperwork

#### 5. Inputs for a valuation model

**PropTech teams and banks building automated valuations.**

**Input:** a property type and province, full advert on
**Output:** area, bedrooms, toilets, floors, road width, legal status and price as clean columns
**Use:** train or check a price model on current asking prices

#### 6. Daily check for new stock

**Buyers' agents who want to see new listings first.**

**Input:** a ward page pasted into `searchUrls`, run every morning
**Output:** listings with their last update time
**Use:** filter on `updatedAt` for the last 24 hours and send the new ones to your client

***

### 🔗 Integration Examples

#### JavaScript/Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/cafeland-property-scraper').call({
  listingType: 'sale',
  propertyType: 'apartment',
  provinces: ['tp-ho-chi-minh'],
  maxResults: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/cafeland-property-scraper').call(
    run_input={'listingType': 'rent', 'propertyType': 'room', 'provinces': ['ha-noi'], 'maxResults': 100}
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item['priceVnd'], item['areaSqm'], item['ward'])
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~cafeland-property-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"listingType": "sale", "propertyType": "residential-land", "provinces": ["khanh-hoa"], "maxResults": 50, "includeDetails": true}'
```

#### Automation Workflows (n8n / Zapier / Make)

1. **Trigger**: a schedule, for example every morning at 7:00
2. **HTTP Request**: call the run-sync endpoint above with your search
3. **Process**: keep rows whose `updatedAt` is newer than the last run
4. **Action**: write them to Google Sheets, a database, or send them to Slack or email

***

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- **25 listings** per run, with every field and the full advert option
- No credit card required
- Enough to check a province or a property type before you scale up

#### PAID Tier (Production Ready)

- **Unlimited** listings per run, across as many provinces as you like
- Pay per result: listings are charged only when returned, once each per run, plus a small start fee per run
- The full advert is charged only when its page was read

💰 **$1.50 per 1,000 listings** on the Bronze plan, with lower prices on higher plans. The full advert adds $3.00 per 1,000.

🔗 [View current pricing](https://apify.com/sian.agency/cafeland-property-scraper?fpr=sian)

***

### ❓ Frequently Asked Questions

**Q: Do I get the seller's phone number or name?**
A: No. The actor never collects the poster's name, phone, email or profile, and phone numbers typed into titles or descriptions are removed. Each row links to the advert so you can contact the seller there.

**Q: Why do I get at most 9,984 listings per search?**
A: Cafeland's own results stop at page 384. Split a big city by property type, or paste ward results pages into `searchUrls`, to go further.

**Q: Are the 34 provinces the new ones?**
A: Yes. Cafeland already uses the 2025 map, so Bình Dương listings sit under TP. Hồ Chí Minh and wards carry their new names.

**Q: How fresh is the data?**
A: Every run reads the live site. Each row carries the time the advert was last updated, and the posting date when you open the full advert.

**Q: Can I filter by price or area?**
A: Not as input fields. Cafeland runs those filters through its search endpoint, which its robots.txt asks crawlers to avoid, so the actor does not use it. Filter the dataset afterwards; every price and area is a number.

**Q: How reliable is the GPS?**
A: It is the map pin the poster set on the advert. Many posters leave the site's default pin or drop it in the wrong city, so a pin that is the default, or falls outside the listing's own province, is left empty rather than passed on as a location.

**Q: What output formats are available?**
A: JSON, CSV, Excel, XML and HTML, straight from the Apify dataset.

**Q: How long does a run take?**
A: About 30 seconds for 100 listings, and about 2 seconds more per listing when the full advert is on.

***

### 🐛 Troubleshooting

**"Cafeland has no separate page for ..."**

- That property type and province have no page of their own on Cafeland. Pick another combination, or open the page on nhadat.cafeland.vn and paste its address into `searchUrls`.

**"Not found: that listing is no longer on Cafeland"**

- The advert was sold, rented or taken down. Run the search again to get live listings.

**"not a Cafeland listing"**

- Paste the full listing address, with the words before the -<number>.html ending. A bare number does not open on Cafeland.

**Fewer listings than `maxResults`**

- The search ran out of listings, or several provinces shared the budget. The run log shows how many each search returned.

***

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. This actor goes further and removes phone numbers and emails that posters type into their adverts. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the **GDPR** in the European Union, by Vietnam's Personal Data Protection Law and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

CafeLand and Nhà Đất CafeLand are trademarks of their owner. This actor is not affiliated with, endorsed by, or sponsored by CafeLand.

***

### 🤝 Support

**Join our active support community**

- For issues or questions, open an issue on the actor's [Issues tab](https://apify.com/sian.agency/cafeland-property-scraper/issues)
- Check [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- 📧 <apify@sian-agency.online>

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Changelog

This Actor's version history is a separate document: https://apify.com/sian.agency/cafeland-property-scraper/changelog.md

# Actor input Schema

## `operation` (type: `string`):

Property Search reads Cafeland results pages, 26 listings per page. Property Detail opens the listing addresses you paste in "Cafeland listing URLs" and returns the full advert: description, every photo, GPS, rooms, floors, legal status and posting date.

## `listingType` (type: `string`):

Which half of the Cafeland market to read. Rent prices are monthly and the row says so, so sale and rent rows never get mixed up after export. Some property types exist on only one side; the type list marks them, and an impossible pairing stops the run before anything is charged.

## `propertyType` (type: `string`):

Which Cafeland category to read. Land, project plots, mini apartments and project townhouses are sale-only; rooms, offices, retail space and townhouses are rent-only. A type that does not exist for the chosen side stops the run with the list of types that do, before any charge. It never falls back to all types and bills you for the wrong rows.

## `provinces` (type: `array`):

One search per province, from the 34 provinces and cities of Vietnam's 2025 map. Leave it empty to read the whole country in one search. One search can page through at most 9,984 listings (384 pages), so for a big city pick a property type as well when you need more than that.

## `maxResults` (type: `integer`):

Stop after this many listings across every province in the list. A results page holds 26 listings and the run stops inside the page that reaches your limit. Free-plan runs are capped lower and the log says so.

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

Also open every listing's own page and add the full description, every photo, GPS, bedrooms, toilets, floors, facing, road width, legal status, street and posting date. One extra page per listing, billed as a Property Detail on top of the listing. Off by default.

## `searchUrls` (type: `array`):

Paste Cafeland results addresses, for example https://nhadat.cafeland.vn/nha-dat-ban/ban-nha-rieng-tai-thu-duc-tp-ho-chi-minh/ for houses in one ward. They are read exactly as given and the fields above are ignored. Ward pages, which have no field here, are reached this way.

## `listingUrls` (type: `array`):

For Property Detail: listing addresses from nhadat.cafeland.vn, ending in -<number>.html. Each one becomes one full row. Duplicates are read once.

## Actor input object example

```json
{
  "operation": "search",
  "listingType": "sale",
  "propertyType": "all",
  "provinces": [
    "tp-ho-chi-minh"
  ],
  "maxResults": 100,
  "includeDetails": false
}
```

# Actor output Schema

## `cafelandListings` (type: `string`):

Every listing this run returned: price, area, location, photos, and the full advert when requested.

## `scrapingSummary` (type: `string`):

HTML summary showing successful and failed results with key metrics

# 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 = {
    "operation": "search",
    "listingType": "sale",
    "propertyType": "all",
    "provinces": [
        "tp-ho-chi-minh"
    ],
    "maxResults": 100,
    "includeDetails": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/cafeland-property-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 = {
    "operation": "search",
    "listingType": "sale",
    "propertyType": "all",
    "provinces": ["tp-ho-chi-minh"],
    "maxResults": 100,
    "includeDetails": False,
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/cafeland-property-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 '{
  "operation": "search",
  "listingType": "sale",
  "propertyType": "all",
  "provinces": [
    "tp-ho-chi-minh"
  ],
  "maxResults": 100,
  "includeDetails": false
}' |
apify call sian.agency/cafeland-property-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sian.agency/cafeland-property-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/a8KP8zF7zh8B24Xfs/builds/lb2Lq3uUoctZwVJUU/openapi.json
