# Batdongsan.com.vn Scraper – Vietnam Real Estate (`anxuanng/batdongsan-scraper`) Actor

Scrape batdongsan.com.vn property listings for sale and rent in all 54 Vietnamese provinces. Extract price in VND, area, bedrooms, district, agent, images, legal status, expiry date and GPS. Pay per listing, JSON/CSV export, API and MCP access.

- **URL**: https://apify.com/anxuanng/batdongsan-scraper.md
- **Developed by:** [Xuan An Nguyen](https://apify.com/anxuanng) (community)
- **Categories:** Real estate, Lead generation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 listing scrapeds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Extract real estate listings from **batdongsan.com.vn**, Vietnam's largest property portal, and get clean JSON: price in VND, area, bedrooms, district, agent, images, and with detail mode the full address, legal status, furnishing, expiry date and GPS coordinates. Pay per listing, no subscription. Works for sale and rent across all 54 provinces.

### What data does the Batdongsan scraper extract?

- Scrape property listings for sale (nhà đất bán) and for rent (nhà đất cho thuê)
- Extract price as text and as a VND number, plus price per m²
- Extract area in m², bedrooms, bathrooms, floors, frontage and road width
- Extract district and ward from the card, full street address from the detail page
- Extract legal status (sổ đỏ / sổ hồng), furnishing, house and balcony direction
- Extract agent name and agent id, verified badge, VIP tier, publish and expiry dates
- Extract all listing images in full resolution
- Extract GPS latitude and longitude for mapping
- Filter by city, property type (apartment, house, land, villa, office, warehouse) or any batdongsan.com.vn URL

### What can you use Vietnam real estate data for?

- **Price monitoring**: track asking prices per m² by district week over week
- **Market research**: measure supply by property type and city, spot new projects early
- **Lead generation**: build lists of agents and owners active in an area
- **Investment analysis**: compare rental yields between districts
- **Property portals and apps**: aggregate listings into your own product
- **Academic and journalism work**: housing affordability studies with real numbers

### How do I scrape batdongsan.com.vn?

1. Open the Actor and press **Try for free**.
2. Choose **For sale** or **For rent**, pick a city from the dropdown, optionally a property type slug such as `can-ho-chung-cu` (apartments) or `nha-rieng` (houses).
3. Set **Max listings**. Turn on **Fetch detail pages** if you need the address, legal status and coordinates.
4. Press **Start**. Rows appear in the Output tab as they are scraped. Export as JSON, CSV, Excel or read them through the API.

You can also paste any batdongsan.com.vn listing URL with your own filters into **Start URLs**, or a single listing URL to scrape just that property.

### What does the output look like?

```json
{
  "id": "46089321",
  "url": "https://batdongsan.com.vn/ban-can-ho-chung-cu-phuong-dong-ngac-sunshine-city/...-pr46089321",
  "title": "Bán căn 3PN Sunshine City 98m2 giá 9,3 tỷ view quảng trường nội khu",
  "listingType": "sell",
  "priceText": "9,3 tỷ",
  "priceVnd": 9300000000,
  "pricePerM2Vnd": 94900000,
  "areaM2": 98,
  "bedrooms": 3,
  "bathrooms": 2,
  "location": "Q. Bắc Từ Liêm (P. Phú Thượng mới)",
  "agentName": "Thu Chang",
  "agentId": "1962810",
  "vipType": "vip-diamond",
  "verified": false,
  "publishedAt": "2026-09-10",
  "images": ["https://file4.batdongsan.com.vn/resize/1275x717/2026/08/05/20260805090142-a671_wm.jpg"],
  "address": "Sunshine City, Phường Đông Ngạc, Quận Bắc Từ Liêm, Hà Nội",
  "project": "Sunshine City",
  "legalStatus": "Sổ đỏ",
  "furnishing": "Full nội thất.",
  "expiresAt": "2026-09-17",
  "latitude": 21.08437,
  "longitude": 105.7917
}
```

Fields from the detail page (`address`, `project`, `floors`, `houseDirection`, `balconyDirection`, `frontageM`, `roadWidthM`, `legalStatus`, `furnishing`, `expiresAt`, `latitude`, `longitude`, `specs`) are present only when **Fetch detail pages** is on. Anything the listing does not show is `null`.

### What are the input options?

| Field | Default | What it does |
|---|---|---|
| `listingType` | `sell` | `sell` or `rent` |
| `city` | `ha-noi` | one of 54 provinces; `tp-hcm` is Ho Chi Minh City. Common aliases such as `ho-chi-minh` are accepted |
| `propertyType` | all | `can-ho-chung-cu`, `nha-rieng`, `nha-mat-pho`, `nha-biet-thu-lien-ke`, `dat`, `dat-nen-du-an`, `van-phong`, `kho-nha-xuong` |
| `startUrls` | none | any listing or detail URL, overrides the filters |
| `maxItems` | 100 | stop after this many listings |
| `maxPages` | 50 | pages per start URL, 20 to 30 listings each |
| `fetchDetails` | off | open each listing for the extra fields |
| `proxyConfiguration` | Apify residential, VN | keep the default |

### How much does it cost to scrape batdongsan.com.vn?

You pay per result. One listing row costs a fraction of a cent, a detail page a little more, and you are only charged for rows actually written to your dataset. A failed page never costs you anything. Set a budget on the run to cap spend; the Actor stops cleanly when it is reached. The Apify free plan includes enough credit to scrape a few hundred listings every month.

### How do I use the Batdongsan scraper API from code?

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("anxuanng/batdongsan-scraper").call(run_input={
    "listingType": "rent", "city": "da-nang", "maxItems": 200, "fetchDetails": True,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["title"], row["priceVnd"], row["areaM2"], row["address"])
```

```bash
curl -X POST "https://api.apify.com/v2/acts/anxuanng~batdongsan-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"listingType":"sell","city":"tp-hcm","propertyType":"nha-rieng","maxItems":50}'
```

The Actor also works as an **MCP tool**, so Claude, Cursor or any agent can call it, and it plugs into Zapier, Make, n8n, Google Sheets and webhooks through Apify integrations. Schedule it daily to build a price history.

### Frequently asked questions

#### Why does the site sometimes take a minute to answer?

batdongsan.com.vn runs a Cloudflare challenge. The Actor drives a real browser that passes it and reuses the clearance for all following pages, so the first page is slow and the rest are fast.

#### Why did my run stop with "does not recognise the filters"?

The site redirects unknown slugs to the nationwide page instead of returning an error. The Actor refuses to charge you for nationwide results you did not ask for. Pick the city from the dropdown and check the property type slug in the site URL.

#### Can I get phone numbers?

No. Phone numbers are behind a click-to-reveal and are not extracted.

#### Is it legal to scrape batdongsan.com.vn?

The Actor only reads listings that are publicly visible without logging in. Scraping public data is generally legal, but you are responsible for how you use it. Do not republish personal data and respect the site's terms.

#### Which other Vietnamese data sources are available?

See [Vietnam Jobs Scraper](https://apify.com/anxuanng/vietnam-jobs-scraper) for VietnamWorks, TopCV and ITviec job postings, and [GrabFood Restaurants Scraper](https://apify.com/anxuanng/grabfood-restaurants-scraper) for restaurants and menus across Southeast Asia.

### Need a custom dataset or another site?

I build and maintain scrapers for Vietnamese and Southeast Asian websites (real estate, jobs, food delivery, e-commerce, Telegram). If you need a one-off dataset, a daily feed into Google Sheets or your database, or a scraper for a site that is not listed here, open an issue on this page with the site and the fields you need. You get a sample of real rows before you pay for anything.

### Support

Open an issue on this page for bugs or a data field you need. Typical response within one business day (GMT+7).

# Actor input Schema

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

Sale (nhà đất bán) or rent (nhà đất cho thuê). Ignored when startUrls is set.

## `city` (type: `string`):

Province as used in batdongsan.com.vn URLs. Leave empty for nationwide.

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

Optional: can-ho-chung-cu, nha-rieng, nha-mat-pho, nha-biet-thu-lien-ke, dat, dat-nen-du-an, kho-nha-xuong, van-phong… Empty = all types.

## `startUrls` (type: `array`):

Any batdongsan.com.vn listing URL (with filters/pagination) or detail URL (…-pr12345678). Overrides the filters above.

## `maxItems` (type: `integer`):

Stop after this many listings. Charged per listing actually pushed.

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

Safety cap on pagination depth (30 listings per page).

## `fetchDetails` (type: `boolean`):

Open each listing for full address, floors, direction, legal status, furnishing, expiry, GPS. Charged as a separate 'detail' event.

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

Residential proxy with country VN recommended. The site runs a Cloudflare challenge that blocks most datacenter IPs.

## Actor input object example

```json
{
  "listingType": "sell",
  "city": "ha-noi",
  "startUrls": [],
  "maxItems": 100,
  "maxPages": 50,
  "fetchDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "VN"
  }
}
```

# Actor output Schema

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

All scraped rows as JSON; append ?format=csv for CSV.

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

Counts of pushed/skipped/failed rows and whether the budget limit was hit.

# 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 = {
    "propertyType": "",
    "startUrls": [],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "VN"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("anxuanng/batdongsan-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 = {
    "propertyType": "",
    "startUrls": [],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "VN",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("anxuanng/batdongsan-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 '{
  "propertyType": "",
  "startUrls": [],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "VN"
  }
}' |
apify call anxuanng/batdongsan-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,anxuanng/batdongsan-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/oiJ73drrEN7t16q0n/builds/r6qF7TXTZtIJ6LEFH/openapi.json
