跳到内容
Bitaloka Docs
区域数据

区域数据

查询省、市/县、区、村。

请求

GET https://api.bitaloka.io/v1/region/{code}
路径参数→ application/json

参数

名称类型描述
code必填 文本 Province (2), regency (4) or district (6) code.示例: 317101

代码示例

由同一来源生成,并已针对线上 API 测试。

curl -sS "https://api.bitaloka.io/v1/region/317101" \
  -H "X-API-Key: $BITALOKA_API_KEY" \
  --fail-with-body

使用: curl 7.x+ · example.sh

响应

线上 API 对示例请求返回的真实响应。

200 OK · application/json
{
  "valid": true,
  "input": "317101",
  "normalized": "317101",
  "level": "district",
  "province": {
    "code": "31",
    "name": "Daerah Khusus Ibukota Jakarta"
  },
  "regency": {
    "code": "3171",
    "name": "Kota Administrasi Jakarta Pusat"
  },
  "district": {
    "code": "317101",
    "name": "Gambir"
  },
  "summary": "Kecamatan, Gambir, Kota Administrasi Jakarta Pusat, Daerah Khusus Ibukota Jakarta",
  "errors": [],
  "warnings": []
}

在 AI 智能体中使用

在 Bitaloka MCP 服务器上,此服务对应 lookup_region 工具。 MCP 服务器 →