API documentation

REST, JSON, UTF-8. Look-up APIs are free and need no key (100 requests per minute per IP address). Conversion APIs need an API key; each account has 1,000 calls a month, and each address in a batch counts as one call.

Base URL https://www.tinhthanhpho.com/api/v1
Authentication Authorization: Bearer hvn_live_… Get an API key →
Data version 2026.10.8 · 06/10/2026 Spec 1.1.0

The examples read the key from the TTP_API_KEY environment variable; never put a key in code that runs in a browser.

Address - Old Structure

GET /api/v1/provinces No key needed

Get list of provinces (before 1/7/2025)

Get list of provinces

Parameters

keyword
string · query
Search keyword
limit
integer · query
Number of results per page (default 20)
page
integer · query
Page number (default 1)
curl 'https://www.tinhthanhpho.com/api/v1/provinces' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/provinces', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/provinces');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/provinces",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "province_id": 57,
            "code": "89",
            "name": "An Giang",
            "type": "Tỉnh",
            "created_at": null,
            "updated_at": null,
            "area_km2": null,
            "population": null,
            "district_count": 11
        },
        {
            "province_id": 49,
            "code": "77",
            "name": "Bà Rịa - Vũng Tàu",
            "type": "Tỉnh",
            "created_at": null,
            "updated_at": null,
            "area_km2": null,
            "population": null,
            "district_count": 7
        }
    ],
    "metadata": {
        "total": 63,
        "page": 1,
        "limit": 2,
        "data_version": "2026.10.0"
    }
}
GET /api/v1/provinces/{code} No key needed

Get province details

Parameters

code
string · path · required
Province code
curl 'https://www.tinhthanhpho.com/api/v1/provinces/79' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/provinces/79', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/provinces/79');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/provinces/79",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK · Other codes: 404

{
    "success": true,
    "message": "Success",
    "data": {
        "province_id": 50,
        "code": "79",
        "name": "Hồ Chí Minh",
        "type": "Thành phố",
        "created_at": null,
        "updated_at": null,
        "area_km2": null,
        "population": null,
        "district_count": 22
    },
    "metadata": {
        "data_version": "2026.10.0"
    }
}
GET /api/v1/provinces/{provinceCode}/districts No key needed

Get districts by province

Parameters

provinceCode
string · path · required
Province code
keyword
string · query
Search keyword
limit
integer · query
Number of results per page (default 20)
page
integer · query
Page number (default 1)
curl 'https://www.tinhthanhpho.com/api/v1/provinces/79/districts' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/provinces/79/districts', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/provinces/79/districts');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/provinces/79/districts",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "district_id": 541,
            "code": "760",
            "name": "1",
            "type": "Quận",
            "province_code": "79",
            "created_at": null,
            "updated_at": null
        },
        {
            "district_id": 550,
            "code": "771",
            "name": "10",
            "type": "Quận",
            "province_code": "79",
            "created_at": null,
            "updated_at": null
        }
    ],
    "metadata": {
        "total": 22,
        "page": 1,
        "limit": 2,
        "data_version": "2026.10.0"
    }
}
GET /api/v1/districts/{code} No key needed

Get district details

Parameters

code
string · path · required
District code
curl 'https://www.tinhthanhpho.com/api/v1/districts/760' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/districts/760', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/districts/760');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/districts/760",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK · Other codes: 404

{
    "success": true,
    "message": "Success",
    "data": {
        "district_id": 541,
        "code": "760",
        "name": "1",
        "type": "Quận",
        "province_code": "79",
        "created_at": null,
        "updated_at": null,
        "province": {
            "province_id": 50,
            "code": "79",
            "name": "Hồ Chí Minh",
            "type": "Thành phố",
            "created_at": null,
            "updated_at": null,
            "area_km2": null,
            "population": null,
            "district_count": 22
        }
    },
    "metadata": {
        "data_version": "2026.10.0"
    }
}
GET /api/v1/districts/{districtCode}/wards No key needed

Get wards by district

Parameters

districtCode
string · path · required
District code
keyword
string · query
Search keyword
limit
integer · query
Number of results per page (default 20)
page
integer · query
Page number (default 1)
curl 'https://www.tinhthanhpho.com/api/v1/districts/760/wards' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/districts/760/wards', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/districts/760/wards');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/districts/760/wards",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "ward_id": 8195,
            "code": "26740",
            "name": "Bến Nghé",
            "type": "Phường",
            "district_code": "760",
            "province_code": "79",
            "created_at": null,
            "updated_at": null
        },
        {
            "ward_id": 8196,
            "code": "26743",
            "name": "Bến Thành",
            "type": "Phường",
            "district_code": "760",
            "province_code": "79",
            "created_at": null,
            "updated_at": null
        }
    ],
    "metadata": {
        "total": 10,
        "page": 1,
        "limit": 2,
        "data_version": "2026.10.0"
    }
}
GET /api/v1/wards/{code} No key needed

Get ward details

Parameters

code
string · path · required
Ward code
curl 'https://www.tinhthanhpho.com/api/v1/wards/26740' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/wards/26740', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/wards/26740');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/wards/26740",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK · Other codes: 404

{
    "success": true,
    "message": "Success",
    "data": {
        "ward_id": 8195,
        "code": "26740",
        "name": "Bến Nghé",
        "type": "Phường",
        "district_code": "760",
        "province_code": "79",
        "created_at": null,
        "updated_at": null,
        "district": {
            "district_id": 541,
            "code": "760",
            "name": "1",
            "type": "Quận",
            "province_code": "79",
            "created_at": null,
            "updated_at": null
        },
        "province": {
            "province_id": 50,
            "code": "79",
            "name": "Hồ Chí Minh",
            "type": "Thành phố",
            "created_at": null,
            "updated_at": null,
            "area_km2": null,
            "population": null,
            "district_count": 22
        }
    },
    "metadata": {
        "data_version": "2026.10.0"
    }
}
GET /api/v1/full-address No key needed

Get full address information

Parameters

provinceCode
string · query
Province code
districtCode
string · query
District code
wardCode
string · query
Ward code
curl 'https://www.tinhthanhpho.com/api/v1/full-address?provinceCode=79&districtCode=760&wardCode=26740' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/full-address?provinceCode=79&districtCode=760&wardCode=26740', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/full-address?provinceCode=79&districtCode=760&wardCode=26740');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/full-address?provinceCode=79&districtCode=760&wardCode=26740",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK

{
    "success": true,
    "message": "Success",
    "data": {
        "province": {
            "province_id": 50,
            "code": "79",
            "name": "Hồ Chí Minh",
            "type": "Thành phố",
            "created_at": null,
            "updated_at": null,
            "area_km2": null,
            "population": null,
            "district_count": 22
        },
        "district": {
            "district_id": 541,
            "code": "760",
            "name": "1",
            "type": "Quận",
            "province_code": "79",
            "created_at": null,
            "updated_at": null
        },
        "ward": {
            "ward_id": 8195,
            "code": "26740",
            "name": "Bến Nghé",
            "type": "Phường",
            "district_code": "760",
            "province_code": "79",
            "created_at": null,
            "updated_at": null,
            "district": {
                "district_id": 541,
                "code": "760",
                "name": "1",
                "type": "Quận",
                "province_code": "79",
                "created_at": null,
                "updated_at": null
            },
            "province": {
                "province_id": 50,
                "code": "79",
                "name": "Hồ Chí Minh",
                "type": "Thành phố",
                "created_at": null,
                "updated_at": null,
                "area_km2": null,
                "population": null,
                "district_count": 22
            }
        }
    },
    "metadata": {
        "data_version": "2026.10.0"
    }
}
GET /api/v1/search-address No key needed

Search address across all levels

Search address

Parameters

keyword
string · query · required
Search keyword
limit
integer · query
Maximum results (default 20)
curl 'https://www.tinhthanhpho.com/api/v1/search-address?keyword=B%E1%BA%BFn%20Ngh%C3%A9' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/search-address?keyword=B%E1%BA%BFn%20Ngh%C3%A9', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/search-address?keyword=B%E1%BA%BFn%20Ngh%C3%A9');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/search-address?keyword=B%E1%BA%BFn%20Ngh%C3%A9",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "type": "ward",
            "code": "26740",
            "name": "Bến Nghé",
            "full_name": "Phường Bến Nghé",
            "address": "Phường Bến Nghé, Quận 1, Thành phố Hồ Chí Minh",
            "district_code": "760",
            "province_code": "79"
        }
    ],
    "metadata": {
        "data_version": "2026.10.0"
    }
}

Address - New Structure

GET /api/v1/new-provinces No key needed

Get list of provinces (after 1/7/2025)

Get list of new provinces

Parameters

keyword
string · query
Search keyword
limit
integer · query
Number of results per page (default 20)
page
integer · query
Page number (default 1)
curl 'https://www.tinhthanhpho.com/api/v1/new-provinces' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/new-provinces', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/new-provinces');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/new-provinces",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "province_id": 2,
            "code": "91",
            "name": "An Giang",
            "slug": "an-giang",
            "short_name": null,
            "type": "Tỉnh",
            "created_at": null,
            "updated_at": null,
            "area_km2": "9888.91",
            "population": 4952238,
            "hq_address": "Số 06 đường Nguyễn Công Trứ, phường Rạch Giá, tỉnh An Giang",
            "legal_refs": [
                {
                    "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=213930",
                    "date": "2025-06-12",
                    "title": "Nghị quyết về việc sắp xếp đơn vị hành chính cấp tỉnh",
                    "number": "202/2025/QH15",
                    "effective_date": "2025-07-01"
                }
            ],
            "type_history": null,
            "centroid_lat": 10.31725,
            "centroid_lng": 105.034738,
            "neighbors": [
                "82"
            ],
            "merged_from": [
                "89"
            ],
            "ward_count": 102,
            "legal_ref": "202/2025/QH15"
        },
        {
            "province_id": 3,
            "code": "24",
            "name": "Bắc Ninh",
            "slug": "tp-bac-ninh",
            "short_name": null,
            "type": "Thành phố",
            "created_at": null,
            "updated_at": null,
            "area_km2": "4718.60",
            "population": 3619433,
            "hq_address": "Số 82 Hùng Vương, phường Bắc Giang, thành phố Bắc Ninh",
            "legal_refs": [
                {
                    "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=213930",
                    "date": "2025-06-12",
                    "title": "Nghị quyết về việc sắp xếp đơn vị hành chính cấp tỉnh",
                    "number": "202/2025/QH15",
                    "effective_date": "2025-07-01"
                }
            ],
            "type_history": [
                {
                    "from": "2025-07-01",
                    "type": "Tỉnh",
                    "until": "2026-09-19"
                }
            ],
            "centroid_lat": 21.362619,
            "centroid_lng": 106.629202,
            "neighbors": [
                "01"
            ],
            "merged_from": [
                "24"
            ],
            "ward_count": 99,
            "legal_ref": "202/2025/QH15; 39/2026/QH16"
        }
    ],
    "metadata": {
        "total": 34,
        "page": 1,
        "limit": 2,
        "data_version": "2026.10.0"
    }
}
GET /api/v1/new-provinces/{code} No key needed

Get new province details

Parameters

code
string · path · required
Province code
curl 'https://www.tinhthanhpho.com/api/v1/new-provinces/79' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/new-provinces/79', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/new-provinces/79');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/new-provinces/79",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK · Other codes: 404

{
    "success": true,
    "message": "Success",
    "data": {
        "province_id": 37,
        "code": "79",
        "name": "Hồ Chí Minh",
        "slug": "tp-ho-chi-minh",
        "short_name": null,
        "type": "Thành phố",
        "created_at": null,
        "updated_at": null,
        "area_km2": "6772.59",
        "population": 14002598,
        "hq_address": "Số 86 đường Lê Thánh Tôn, phường Sài Gòn, TP Hồ Chí Minh",
        "legal_refs": [
            {
                "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=213930",
                "date": "2025-06-12",
                "title": "Nghị quyết về việc sắp xếp đơn vị hành chính cấp tỉnh",
                "number": "202/2025/QH15",
                "effective_date": "2025-07-01"
            }
        ],
        "type_history": null,
        "centroid_lat": 11.163651,
        "centroid_lng": 106.636408,
        "neighbors": [
            "68"
        ],
        "merged_from": [
            "74"
        ],
        "ward_count": 168,
        "legal_ref": "202/2025/QH15"
    },
    "metadata": {
        "data_version": "2026.10.0"
    }
}
GET /api/v1/new-provinces/{provinceCode}/wards No key needed

Get wards by new province

Parameters

provinceCode
string · path · required
Province code
keyword
string · query
Search keyword
type
string · query
Only this unit type: phuong, xa or dac-khu (diacritics optional)
limit
integer · query
Number of results per page (default 20)
page
integer · query
Page number (default 1)
curl 'https://www.tinhthanhpho.com/api/v1/new-provinces/79/wards?type=phuong' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/new-provinces/79/wards?type=phuong', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/new-provinces/79/wards?type=phuong');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/new-provinces/79/wards?type=phuong",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "ward_id": 2636,
            "code": "27316",
            "name": "An Đông",
            "slug": "phuong-an-dong",
            "short_name": null,
            "type": "Phường",
            "province_code": "79",
            "created_at": null,
            "updated_at": null,
            "area_km2": "1.32",
            "population": 81229,
            "hq_address": "209 An Dương Vương, phường 7, quận 5 cũ",
            "legal_refs": [
                {
                    "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=214007",
                    "date": "2025-06-16",
                    "title": "Nghị quyết về việc sắp xếp các đơn vị hành chính cấp xã của thành phố Hồ Chí Minh năm 2025",
                    "number": "1685/NQ-UBTVQH15",
                    "effective_date": "2025-07-01"
                }
            ],
            "type_history": null,
            "centroid_lat": 10.75475,
            "centroid_lng": 106.671622,
            "neighbors": [
                "27169"
            ]
        },
        {
            "ward_id": 2674,
            "code": "26878",
            "name": "An Hội Đông",
            "slug": "phuong-an-hoi-dong",
            "short_name": null,
            "type": "Phường",
            "province_code": "79",
            "created_at": null,
            "updated_at": null,
            "area_km2": "3.29",
            "population": 123681,
            "hq_address": "328 Thống Nhất, Phường 16, quận Gò Vấp cũ",
            "legal_refs": [
                {
                    "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=214007",
                    "date": "2025-06-16",
                    "title": "Nghị quyết về việc sắp xếp các đơn vị hành chính cấp xã của thành phố Hồ Chí Minh năm 2025",
                    "number": "1685/NQ-UBTVQH15",
                    "effective_date": "2025-07-01"
                }
            ],
            "type_history": null,
            "centroid_lat": 10.850197,
            "centroid_lng": 106.667229,
            "neighbors": [
                "26767"
            ]
        }
    ],
    "metadata": {
        "total": 113,
        "page": 1,
        "limit": 2,
        "data_version": "2026.10.0"
    }
}
GET /api/v1/new-wards/{code} No key needed

Get new ward details

Parameters

code
string · path · required
Ward code
curl 'https://www.tinhthanhpho.com/api/v1/new-wards/26740' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/new-wards/26740', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/new-wards/26740');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/new-wards/26740",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK · Other codes: 404

{
    "success": true,
    "message": "Success",
    "data": {
        "ward_id": 2625,
        "code": "26740",
        "name": "Sài Gòn",
        "slug": "phuong-sai-gon",
        "short_name": null,
        "type": "Phường",
        "province_code": "79",
        "created_at": null,
        "updated_at": null,
        "area_km2": "3.04",
        "population": 47022,
        "hq_address": "45 - 47 Lê Duẩn, phường Bến Nghé, quận 1 cũ",
        "legal_refs": [
            {
                "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=214007",
                "date": "2025-06-16",
                "title": "Nghị quyết về việc sắp xếp các đơn vị hành chính cấp xã của thành phố Hồ Chí Minh năm 2025",
                "number": "1685/NQ-UBTVQH15",
                "effective_date": "2025-07-01"
            }
        ],
        "type_history": null,
        "centroid_lat": 10.781051,
        "centroid_lng": 106.703947,
        "neighbors": [
            "26737"
        ],
        "province": {
            "province_id": 37,
            "code": "79",
            "name": "Hồ Chí Minh",
            "slug": "tp-ho-chi-minh",
            "short_name": null,
            "type": "Thành phố",
            "created_at": null,
            "updated_at": null,
            "area_km2": "6772.59",
            "population": 14002598,
            "hq_address": "Số 86 đường Lê Thánh Tôn, phường Sài Gòn, TP Hồ Chí Minh",
            "legal_refs": [
                {
                    "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=213930",
                    "date": "2025-06-12",
                    "title": "Nghị quyết về việc sắp xếp đơn vị hành chính cấp tỉnh",
                    "number": "202/2025/QH15",
                    "effective_date": "2025-07-01"
                }
            ],
            "type_history": null,
            "centroid_lat": 11.163651,
            "centroid_lng": 106.636408,
            "neighbors": [
                "68"
            ]
        }
    },
    "metadata": {
        "data_version": "2026.10.0"
    }
}
GET /api/v1/new-full-address No key needed

Get full address information (after 1/7/2025)

Get full address information (new structure)

Parameters

provinceCode
string · query
Province code
wardCode
string · query
Ward code
curl 'https://www.tinhthanhpho.com/api/v1/new-full-address?provinceCode=79&wardCode=26740' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/new-full-address?provinceCode=79&wardCode=26740', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/new-full-address?provinceCode=79&wardCode=26740');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/new-full-address?provinceCode=79&wardCode=26740",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK

{
    "success": true,
    "message": "Success",
    "data": {
        "province": {
            "province_id": 37,
            "code": "79",
            "name": "Hồ Chí Minh",
            "slug": "tp-ho-chi-minh",
            "short_name": null,
            "type": "Thành phố",
            "created_at": null,
            "updated_at": null,
            "area_km2": "6772.59",
            "population": 14002598,
            "hq_address": "Số 86 đường Lê Thánh Tôn, phường Sài Gòn, TP Hồ Chí Minh",
            "legal_refs": [
                {
                    "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=213930",
                    "date": "2025-06-12",
                    "title": "Nghị quyết về việc sắp xếp đơn vị hành chính cấp tỉnh",
                    "number": "202/2025/QH15",
                    "effective_date": "2025-07-01"
                }
            ],
            "type_history": null,
            "centroid_lat": 11.163651,
            "centroid_lng": 106.636408,
            "neighbors": [
                "68"
            ]
        },
        "ward": {
            "ward_id": 2625,
            "code": "26740",
            "name": "Sài Gòn",
            "slug": "phuong-sai-gon",
            "short_name": null,
            "type": "Phường",
            "province_code": "79",
            "created_at": null,
            "updated_at": null,
            "area_km2": "3.04",
            "population": 47022,
            "hq_address": "45 - 47 Lê Duẩn, phường Bến Nghé, quận 1 cũ",
            "legal_refs": [
                {
                    "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=214007",
                    "date": "2025-06-16",
                    "title": "Nghị quyết về việc sắp xếp các đơn vị hành chính cấp xã của thành phố Hồ Chí Minh năm 2025",
                    "number": "1685/NQ-UBTVQH15",
                    "effective_date": "2025-07-01"
                }
            ],
            "type_history": null,
            "centroid_lat": 10.781051,
            "centroid_lng": 106.703947,
            "neighbors": [
                "26737"
            ],
            "province": {
                "province_id": 37,
                "code": "79",
                "name": "Hồ Chí Minh",
                "slug": "tp-ho-chi-minh",
                "short_name": null,
                "type": "Thành phố",
                "created_at": null,
                "updated_at": null,
                "area_km2": "6772.59",
                "population": 14002598,
                "hq_address": "Số 86 đường Lê Thánh Tôn, phường Sài Gòn, TP Hồ Chí Minh",
                "legal_refs": [
                    {
                        "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=213930",
                        "date": "2025-06-12",
                        "title": "Nghị quyết về việc sắp xếp đơn vị hành chính cấp tỉnh",
                        "number": "202/2025/QH15",
                        "effective_date": "2025-07-01"
                    }
                ],
                "type_history": null,
                "centroid_lat": 11.163651,
                "centroid_lng": 106.636408,
                "neighbors": [
                    "68"
                ]
            }
        }
    },
    "metadata": {
        "data_version": "2026.10.0"
    }
}
GET /api/v1/search-new-address No key needed

Search address across all levels (after 1/7/2025)

Search address across all levels (new structure)

Parameters

keyword
string · query · required
Search keyword
limit
integer · query
Maximum results (default 20)
curl 'https://www.tinhthanhpho.com/api/v1/search-new-address?keyword=S%C3%A0i%20G%C3%B2n' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/search-new-address?keyword=S%C3%A0i%20G%C3%B2n', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/search-new-address?keyword=S%C3%A0i%20G%C3%B2n');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/search-new-address?keyword=S%C3%A0i%20G%C3%B2n",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "type": "ward",
            "code": "26740",
            "name": "Sài Gòn",
            "full_name": "Phường Sài Gòn",
            "address": "Phường Sài Gòn, Thành phố Hồ Chí Minh",
            "province_code": "79"
        }
    ],
    "metadata": {
        "data_version": "2026.10.0"
    }
}

Address Conversion

POST /api/v1/convert/address API key · scope convert

Convert single address

Send free text (`text`) or the three old codes. The answer keeps the v1 fields (old, new, mergeInfo) and adds confidence (exact | check), reason and candidates (every new ward of a split old ward, or of ambiguous text). Not found: HTTP 422 with message, reason and suggestions.

Request body (JSON)

text
string ≤ 300 · body
Free text; or use the codes below
provinceCode
string · body
districtCode
string · body
wardCode
string · body
streetAddress
string · body
curl -X POST 'https://www.tinhthanhpho.com/api/v1/convert/address' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TTP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"12 Nguyễn Huệ, P. Bến Nghé, Q.1, TP.HCM"}'
const response = await fetch('https://www.tinhthanhpho.com/api/v1/convert/address', {
  method: 'POST',
  headers: {
    'Accept': 'application/json',
    'Authorization': `Bearer ${process.env.TTP_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "text": "12 Nguyễn Huệ, P. Bến Nghé, Q.1, TP.HCM"
  }),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/convert/address');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json', 'Authorization: Bearer ' . getenv('TTP_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'text' => '12 Nguyễn Huệ, P. Bến Nghé, Q.1, TP.HCM',
    ], JSON_UNESCAPED_UNICODE),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import os
import requests

response = requests.post(
    "https://www.tinhthanhpho.com/api/v1/convert/address",
    headers={"Accept": "application/json", "Authorization": f"Bearer {os.environ['TTP_API_KEY']}"},
    json={
        "text": "12 Nguyễn Huệ, P. Bến Nghé, Q.1, TP.HCM"
    },
    timeout=10,
)
print(response.json())

Response · 200 OK · Other codes: 401, 422

{
    "success": true,
    "message": "Success",
    "data": {
        "old": {
            "province": {
                "code": "79",
                "name": "Hồ Chí Minh",
                "type": "Thành phố"
            },
            "district": {
                "code": "760",
                "name": "1",
                "type": "Quận"
            },
            "ward": {
                "code": "26740",
                "name": "Bến Nghé",
                "type": "Phường"
            },
            "fullAddress": "12 Nguyễn Huệ, Phường Bến Nghé, Quận 1, Thành phố Hồ Chí Minh"
        },
        "new": {
            "province": {
                "code": "79",
                "name": "Hồ Chí Minh",
                "type": "Thành phố",
                "slug": "tp-ho-chi-minh"
            },
            "ward": {
                "code": "26740",
                "name": "Sài Gòn",
                "type": "Phường",
                "slug": "phuong-sai-gon"
            },
            "fullAddress": "12 Nguyễn Huệ, Phường Sài Gòn, Thành phố Hồ Chí Minh"
        },
        "mergeInfo": {
            "notes": "Phường Bến Nghé, Quận 1 đã được sắp xếp vào Phường Sài Gòn, Thành phố Hồ Chí Minh.",
            "legal": "1685/NQ-UBTVQH15"
        },
        "confidence": "exact",
        "reason": "merged",
        "candidates": []
    },
    "metadata": {
        "data_version": "2026.10.0"
    }
}
POST /api/v1/convert/batch API key · scope convert

Batch convert addresses

Each address counts as one call against the monthly quota; a batch larger than the calls left this month is refused with 429.

Request body (JSON)

addresses
array<object> · body · required
addresses[].id
string · body
addresses[].text
string · body
addresses[].provinceCode
string · body
addresses[].districtCode
string · body
addresses[].wardCode
string · body
addresses[].streetAddress
string · body
curl -X POST 'https://www.tinhthanhpho.com/api/v1/convert/batch' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TTP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"addresses":[{"id":"addr_001","text":"Phường Bến Nghé, Quận 1, TP HCM"}]}'
const response = await fetch('https://www.tinhthanhpho.com/api/v1/convert/batch', {
  method: 'POST',
  headers: {
    'Accept': 'application/json',
    'Authorization': `Bearer ${process.env.TTP_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "addresses": [
      {
        "id": "addr_001",
        "text": "Phường Bến Nghé, Quận 1, TP HCM"
      }
    ]
  }),
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/convert/batch');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json', 'Authorization: Bearer ' . getenv('TTP_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'addresses' => [
            [
                'id' => 'addr_001',
                'text' => 'Phường Bến Nghé, Quận 1, TP HCM',
            ],
        ],
    ], JSON_UNESCAPED_UNICODE),
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import os
import requests

response = requests.post(
    "https://www.tinhthanhpho.com/api/v1/convert/batch",
    headers={"Accept": "application/json", "Authorization": f"Bearer {os.environ['TTP_API_KEY']}"},
    json={
        "addresses": [
            {
                "id": "addr_001",
                "text": "Phường Bến Nghé, Quận 1, TP HCM"
            }
        ]
    },
    timeout=10,
)
print(response.json())

Response · 200 OK

{
    "success": true,
    "message": "Success",
    "data": {
        "total": 1,
        "converted": 1,
        "failed": 0,
        "results": [
            {
                "id": "addr_001",
                "old": {
                    "province": {
                        "code": "79",
                        "name": "Hồ Chí Minh",
                        "type": "Thành phố"
                    },
                    "district": {
                        "code": "760",
                        "name": "1",
                        "type": "Quận"
                    },
                    "ward": {
                        "code": "26740",
                        "name": "Bến Nghé",
                        "type": "Phường"
                    },
                    "fullAddress": "Phường Bến Nghé, Quận 1, Thành phố Hồ Chí Minh"
                },
                "new": {
                    "province": {
                        "code": "79",
                        "name": "Hồ Chí Minh",
                        "type": "Thành phố",
                        "slug": "tp-ho-chi-minh"
                    },
                    "ward": {
                        "code": "26740",
                        "name": "Sài Gòn",
                        "type": "Phường",
                        "slug": "phuong-sai-gon"
                    },
                    "fullAddress": "Phường Sài Gòn, Thành phố Hồ Chí Minh"
                },
                "confidence": "exact",
                "reason": "merged",
                "candidates": []
            }
        ],
        "errors": []
    },
    "metadata": {
        "data_version": "2026.10.0"
    }
}

Search

GET /api/v1/suggest No key needed

Suggestions for a search box

New provinces and wards, and old wards with the unit they became. Understands names without diacritics and common abbreviations.

Parameters

q
string · query · required
2 to 100 characters
limit
integer · query
(default 6)
curl 'https://www.tinhthanhpho.com/api/v1/suggest?q=ben%20nghe' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/suggest?q=ben%20nghe', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/suggest?q=ben%20nghe');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/suggest?q=ben%20nghe",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK · Other codes: 422, 429

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "type": "old_ward",
            "code": "26740",
            "name": "Phường Bến Nghé",
            "context": "Quận 1, Thành phố Hồ Chí Minh",
            "province_code": "79",
            "slug": null,
            "target": {
                "code": "26740",
                "name": "Phường Sài Gòn",
                "province_code": "79",
                "fullAddress": "Phường Sài Gòn, Thành phố Hồ Chí Minh",
                "confidence": "exact"
            }
        }
    ],
    "metadata": {
        "data_version": "2026.10.0"
    }
}

Account

GET /api/v1/profile API key

The account that owns the API key

Parameters

No parameters.

curl 'https://www.tinhthanhpho.com/api/v1/profile' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TTP_API_KEY"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/profile', {
  headers: {
    'Accept': 'application/json',
    'Authorization': `Bearer ${process.env.TTP_API_KEY}`,
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/profile');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json', 'Authorization: Bearer ' . getenv('TTP_API_KEY')],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import os
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/profile",
    headers={"Accept": "application/json", "Authorization": f"Bearer {os.environ['TTP_API_KEY']}"},
    timeout=10,
)
print(response.json())

Response · 200 OK · Other codes: 401

{
    "success": true,
    "message": "Success",
    "data": {
        "id": 42,
        "name": "Nguyễn An",
        "email": "an.nguyen@example.com",
        "created_at": "2026-01-15T08:30:00.000000Z"
    },
    "metadata": {
        "data_version": "2026.10.0"
    }
}

Merge History

GET /api/v1/merge-history/province/{code} No key needed

Get province merge history

Get merge history for a province

Parameters

code
string · path · required
Province code
curl 'https://www.tinhthanhpho.com/api/v1/merge-history/province/79' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/merge-history/province/79', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/merge-history/province/79');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/merge-history/province/79",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK · Other codes: 404

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "id": 53,
            "old_province_code": "79",
            "new_province_code": "79",
            "notes": "Sát nhập từ: Bà Rịa - Vũng Tàu, Bình Dương, Hồ Chí Minh",
            "created_at": null,
            "updated_at": null,
            "legal_ref": null,
            "old_province": {
                "province_id": 50,
                "code": "79",
                "name": "Hồ Chí Minh",
                "type": "Thành phố",
                "created_at": null,
                "updated_at": null,
                "area_km2": null,
                "population": null,
                "district_count": 22
            },
            "new_province": {
                "province_id": 37,
                "code": "79",
                "name": "Hồ Chí Minh",
                "slug": "tp-ho-chi-minh",
                "short_name": null,
                "type": "Thành phố",
                "created_at": null,
                "updated_at": null,
                "area_km2": "6772.59",
                "population": 14002598,
                "hq_address": "Số 86 đường Lê Thánh Tôn, phường Sài Gòn, TP Hồ Chí Minh",
                "legal_refs": [
                    {
                        "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=213930",
                        "date": "2025-06-12",
                        "title": "Nghị quyết về việc sắp xếp đơn vị hành chính cấp tỉnh",
                        "number": "202/2025/QH15",
                        "effective_date": "2025-07-01"
                    }
                ],
                "type_history": null,
                "centroid_lat": 11.163651,
                "centroid_lng": 106.636408,
                "neighbors": [
                    "68"
                ]
            }
        },
        {
            "id": 54,
            "old_province_code": "74",
            "new_province_code": "79",
            "notes": "Sát nhập từ: Bà Rịa - Vũng Tàu, Bình Dương, Hồ Chí Minh",
            "created_at": null,
            "updated_at": null,
            "legal_ref": null,
            "old_province": {
                "province_id": 47,
                "code": "74",
                "name": "Bình Dương",
                "type": "Tỉnh",
                "created_at": null,
                "updated_at": null,
                "area_km2": null,
                "population": null,
                "district_count": 9
            },
            "new_province": {
                "province_id": 37,
                "code": "79",
                "name": "Hồ Chí Minh",
                "slug": "tp-ho-chi-minh",
                "short_name": null,
                "type": "Thành phố",
                "created_at": null,
                "updated_at": null,
                "area_km2": "6772.59",
                "population": 14002598,
                "hq_address": "Số 86 đường Lê Thánh Tôn, phường Sài Gòn, TP Hồ Chí Minh",
                "legal_refs": [
                    {
                        "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=213930",
                        "date": "2025-06-12",
                        "title": "Nghị quyết về việc sắp xếp đơn vị hành chính cấp tỉnh",
                        "number": "202/2025/QH15",
                        "effective_date": "2025-07-01"
                    }
                ],
                "type_history": null,
                "centroid_lat": 11.163651,
                "centroid_lng": 106.636408,
                "neighbors": [
                    "68"
                ]
            }
        }
    ],
    "metadata": {
        "data_version": "2026.10.0"
    }
}
GET /api/v1/merge-history/ward/{code} No key needed

Get ward merge history

Get merge history for a ward

Parameters

code
string · path · required
Ward code
curl 'https://www.tinhthanhpho.com/api/v1/merge-history/ward/26740' \
  -H "Accept: application/json"
const response = await fetch('https://www.tinhthanhpho.com/api/v1/merge-history/ward/26740', {
  headers: {
    'Accept': 'application/json',
  },
});
const data = await response.json();
console.log(data);
<?php
$ch = curl_init('https://www.tinhthanhpho.com/api/v1/merge-history/ward/26740');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);
import requests

response = requests.get(
    "https://www.tinhthanhpho.com/api/v1/merge-history/ward/26740",
    headers={"Accept": "application/json"},
    timeout=10,
)
print(response.json())

Response · 200 OK · Other codes: 404

{
    "success": true,
    "message": "Success",
    "data": [
        {
            "id": 8456,
            "old_ward_code": "26737",
            "new_ward_code": "26740",
            "old_district_code": "760",
            "notes": "Nhập một phần",
            "created_at": "2026-10-05T17:58:21.000000Z",
            "updated_at": "2026-10-05T17:58:21.000000Z",
            "scope": "partial",
            "legal_ref": null,
            "note_public": null,
            "is_unchanged": 0,
            "old_ward": {
                "ward_id": 8194,
                "code": "26737",
                "name": "Đa Kao",
                "type": "Phường",
                "district_code": "760",
                "province_code": "79",
                "created_at": null,
                "updated_at": null,
                "district": {
                    "district_id": 541,
                    "code": "760",
                    "name": "1",
                    "type": "Quận",
                    "province_code": "79",
                    "created_at": null,
                    "updated_at": null
                }
            },
            "new_ward": {
                "ward_id": 2625,
                "code": "26740",
                "name": "Sài Gòn",
                "slug": "phuong-sai-gon",
                "short_name": null,
                "type": "Phường",
                "province_code": "79",
                "created_at": null,
                "updated_at": null,
                "area_km2": "3.04",
                "population": 47022,
                "hq_address": "45 - 47 Lê Duẩn, phường Bến Nghé, quận 1 cũ",
                "legal_refs": [
                    {
                        "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=214007",
                        "date": "2025-06-16",
                        "title": "Nghị quyết về việc sắp xếp các đơn vị hành chính cấp xã của thành phố Hồ Chí Minh năm 2025",
                        "number": "1685/NQ-UBTVQH15",
                        "effective_date": "2025-07-01"
                    }
                ],
                "type_history": null,
                "centroid_lat": 10.781051,
                "centroid_lng": 106.703947,
                "neighbors": [
                    "26737"
                ]
            }
        },
        {
            "id": 8457,
            "old_ward_code": "26740",
            "new_ward_code": "26740",
            "old_district_code": "760",
            "notes": "Nhập toàn bộ",
            "created_at": "2026-10-05T17:58:21.000000Z",
            "updated_at": "2026-10-05T17:58:21.000000Z",
            "scope": "full",
            "legal_ref": null,
            "note_public": null,
            "is_unchanged": 0,
            "old_ward": {
                "ward_id": 8195,
                "code": "26740",
                "name": "Bến Nghé",
                "type": "Phường",
                "district_code": "760",
                "province_code": "79",
                "created_at": null,
                "updated_at": null,
                "district": {
                    "district_id": 541,
                    "code": "760",
                    "name": "1",
                    "type": "Quận",
                    "province_code": "79",
                    "created_at": null,
                    "updated_at": null
                }
            },
            "new_ward": {
                "ward_id": 2625,
                "code": "26740",
                "name": "Sài Gòn",
                "slug": "phuong-sai-gon",
                "short_name": null,
                "type": "Phường",
                "province_code": "79",
                "created_at": null,
                "updated_at": null,
                "area_km2": "3.04",
                "population": 47022,
                "hq_address": "45 - 47 Lê Duẩn, phường Bến Nghé, quận 1 cũ",
                "legal_refs": [
                    {
                        "url": "https://vanban.chinhphu.vn/?pageid=27160&docid=214007",
                        "date": "2025-06-16",
                        "title": "Nghị quyết về việc sắp xếp các đơn vị hành chính cấp xã của thành phố Hồ Chí Minh năm 2025",
                        "number": "1685/NQ-UBTVQH15",
                        "effective_date": "2025-07-01"
                    }
                ],
                "type_history": null,
                "centroid_lat": 10.781051,
                "centroid_lng": 106.703947,
                "neighbors": [
                    "26737"
                ]
            }
        }
    ],
    "metadata": {
        "data_version": "2026.10.0"
    }
}

llms.txt — a guide for AI

# tinhthanhpho.com

> Đơn vị hành chính Việt Nam trước và sau ngày 1/7/2025 (mô hình 2 cấp: 34 tỉnh/thành, xã/phường/đặc khu, không còn cấp huyện) và công cụ chuyển địa chỉ cũ sang địa chỉ mới. Vietnamese administrative units before and after 1 July 2025, with an old-to-new address converter.

Dữ liệu phiên bản 2026.10.8, cập nhật 06/10/2026. Mã đơn vị theo danh mục của Cục Thống kê; căn cứ là các nghị quyết của Quốc hội và Ủy ban Thường vụ Quốc hội. Khi trích dẫn, ghi nguồn "tinhthanhpho.com" kèm đường dẫn trang.

## Trang
- https://www.tinhthanhpho.com/{tỉnh}: một tỉnh/thành mới, ví dụ https://www.tinhthanhpho.com/tp-ho-chi-minh (khối "Tóm tắt nhanh", các tỉnh cũ hợp nhất, danh sách xã/phường)
- https://www.tinhthanhpho.com/{tỉnh}/{xã}: một xã/phường/đặc khu, ví dụ https://www.tinhthanhpho.com/tp-ho-chi-minh/phuong-sai-gon (hình thành từ các đơn vị cũ nào, toàn bộ hay một phần)
- Thêm `.json` vào cuối hai dạng đường dẫn trên để lấy cùng dữ liệu dạng JSON
- https://www.tinhthanhpho.com/en/…: bản tiếng Anh
- https://www.tinhthanhpho.com/llms-full.txt: danh sách đầy đủ các tỉnh và xã kèm đường dẫn
- https://www.tinhthanhpho.com/ma-vung-dien-thoai: mã vùng điện thoại cố định của 34 tỉnh/thành, kèm mã của từng tỉnh cũ (Công văn 2784/BKHCN-CVT); `?q=0219` tra ngược từ mã
- https://www.tinhthanhpho.com/bien-so-xe: ký hiệu biển số xe của 34 tỉnh/thành (Thông tư 51/2025/TT-BCA); `?q=51` tra ngược từ ký hiệu

## API
- https://www.tinhthanhpho.com/openapi.json: đặc tả OpenAPI
- GET https://www.tinhthanhpho.com/api/v1/new-provinces: tỉnh/thành mới; /api/v1/new-provinces/{mã}/wards: xã/phường của tỉnh
…

Open data

  • Provinces from 1 July 2025 provinces · CSV 9 KB
  • Communes and wards from 1 July 2025 wards · CSV 581 KB
  • Old → new ward mapping ward-merge-history · CSV 740 KB
  • Provinces before 1 July 2025 provinces-legacy · CSV 3 KB
  • Districts before 1 July 2025 districts-legacy · CSV 20 KB
  • Communes and wards before 1 July 2025 wards-legacy · CSV 318 KB

Ward boundaries per province: /data/wards-{province code}.geojson

Licence CC BY 4.0 — credit tinhthanhpho.com