Skip to content
Scrappa Get API key
Batdongsan API 1 credit/request

Batdongsan Top Agents API Documentation

GET https://scrappa.co/api/batdongsan/top-agents

Batdongsan Top Agents API returns the professional agents that the site promotes in one province, with their number of listings, photo and a profile id for the agent route.

Batdongsan Top Agents API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/batdongsan/top-agents
Auth header
x-api-key
Cost
1 credit/request
city = example
Response preview
200 OK
{
    "data": {
        "city": "HN",
        "title": "M\u00f4i gi\u1edbi chuy\u00ean nghi\u1ec7p t\u1ea1i H\u00e0 N\u1ed9i",
        "agents": [
            {
                "id": 2376669,
                "name": "Nguy\u1ec5n V\u0103n Ho\u00e0ng",
                "agent_id": "076a6f2705821416",
                "avatar_url": "https://file4.batdongsan.com.vn/resize/200x200/2023/05/13/20230513223708-1759_wm.jpg",
                "profile_url": "https://guru.batdongsan.com.vn/pa/076a6f2705821416",
                "listing_count": 132
            },
            {
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

city string Required

Province code. Examples: HN (Hà Nội), SG (Hồ Chí Minh), DDN (Đà Nẵng), HP (Hải Phòng), CT (Cần Thơ), BD (Bình Dương), DNA (Đồng Nai), KH (Khánh Hòa). All 63 provinces work; the full list is under the table.

Example value example

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "city": "HN",
        "title": "M\u00f4i gi\u1edbi chuy\u00ean nghi\u1ec7p t\u1ea1i H\u00e0 N\u1ed9i",
        "agents": [
            {
                "id": 2376669,
                "name": "Nguy\u1ec5n V\u0103n Ho\u00e0ng",
                "agent_id": "076a6f2705821416",
                "avatar_url": "https://file4.batdongsan.com.vn/resize/200x200/2023/05/13/20230513223708-1759_wm.jpg",
                "profile_url": "https://guru.batdongsan.com.vn/pa/076a6f2705821416",
                "listing_count": 132
            },
            {
                "id": 2047758,
                "name": "Nguy\u1ec5n Th\u1ecb Ho\u00e0n",
                "agent_id": "06897d99e0a176cc",
                "avatar_url": "https://file4.batdongsan.com.vn/resize/200x200/2025/03/26/20250326102741-e04c.jpg",
                "profile_url": "https://guru.batdongsan.com.vn/pa/06897d99e0a176cc",
                "listing_count": 106
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "top_agents"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A value is missing, unknown or out of range. Examples: an unknown province code, a category that does not exist for the listing type, or a reversed range. This response is not billed.

{
    "errors": {
        "city": [
            "The selected city is invalid."
        ]
    },
    "message": "The request validation failed"
}
503

Upstream Unavailable

Batdongsan could not be reached or returned data that does not match the request. Retry shortly. This response is not billed.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "top_agents"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "Batdongsan could not be reached. Please retry shortly."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.