Twinkle HubTwinkle Hub

地址查郵遞區號

tw_address_to_postal_code

更多工具 · 同一族🇹🇼 台灣唯讀

從中文地址推 3 碼郵遞區號 + 縣市區(district-precision)。

Args: address: 中文地址,例 "臺北市信義區忠孝東路五段 7 號"。

Returns: {postal_3, county, district, name_zh, precision}。 5/6 碼街道精度不在範圍內(避免 bundle 中華郵政 80MB 表 + 上游 schema 不穩);嚴格 5 碼請走中華郵政 web tool。

參數

參數型別說明
address *string—
原始 JSON schema
{
  "properties": {
    "address": {
      "title": "Address",
      "type": "string"
    }
  },
  "required": [
    "address"
  ],
  "title": "address_to_postal_codeArguments",
  "type": "object",
  "additionalProperties": false
}

呼叫​方式

起手式——參數見上表
tw_address_to_postal_code({ address: "…" })