# Batdongsan Top Agents API Documentation

<p><strong>Batdongsan Top Agents API</strong> 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.</p>

- **Documentation:** [https://scrappa.co/docs/batdongsan-api/batdongsan_top_agents](https://scrappa.co/docs/batdongsan-api/batdongsan_top_agents)
- **API group:** Batdongsan API
- **Endpoint:** `GET https://scrappa.co/api/batdongsan/top-agents`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `city` | string | Yes | 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 response

```json
{
    "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

| Status | Error | Description |
| --- | --- | --- |
| 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. |
| 503 | Upstream Unavailable | Batdongsan could not be reached or returned data that does not match the request. Retry shortly. This response is not billed. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
