Repository navigation
Releases: paid-tw/tw-ubn
Release list
Dataset 01-NOV-26
提供機關/單位 財政部財政資訊中心 2026 全國營業(稅籍)登記資料集(版本 01-NOV-26)、全國營業(稅籍)登記(停業)資料集(版本 01-NOV-26)、非營利事業機關團體資料集(版本 1151101)、全國各級學校統一編號資料集(版本 01-NOV-26)、行政院所屬各機關同意開放統一編號資料集(版本未標示)
此開放資料依政府資料開放授權條款 (Open Government Data License) 進行公眾釋出,使用者於遵守本條款各項規定之前提下,得利用之。
政府資料開放授權條款:https://data.gov.tw/license
FIA tax registry snapshot 01-NOV-26. rows=1942054.
Delta {"deletes":344,"hadPrevious":true,"unchanged":1940418,"upserts":1636}.
Dataset 30-OCT-26
提供機關/單位 財政部財政資訊中心 2026 全國營業(稅籍)登記資料集(版本 30-OCT-26)、全國營業(稅籍)登記(停業)資料集(版本 30-OCT-26)、非營利事業機關團體資料集(版本 1151030)、全國各級學校統一編號資料集(版本 01-OCT-26)、行政院所屬各機關同意開放統一編號資料集(版本未標示)
此開放資料依政府資料開放授權條款 (Open Government Data License) 進行公眾釋出,使用者於遵守本條款各項規定之前提下,得利用之。
政府資料開放授權條款:https://data.gov.tw/license
FIA tax registry snapshot 30-OCT-26. rows=1941938.
Delta {"deletes":0,"hadPrevious":true,"unchanged":1941938,"upserts":0}.
@paid-tw/ubn 0.2.0
Added
worker,worker-d1: when a ban is in neither the dataset nor FIA, look it up
in the GCIS company registry. A dissolved, revoked or otherwise terminated
company now answersfound: truewithsource: "gcis",status: "closed",
closedDateand the rawcompanyStatus, instead of a barefound: false; a
live company not in the tax registry answers with its name and nostatus. New
NEGATIVE_CACHE_TTLvar (default 3600 s) for misses GCIS can't confirm
(#16).- Dataset: schools and kindergartens, nonprofits (所得稅法 §11(4) bodies) and
Executive Yuan agencies — UBNs that are withholding units rather than
VAT-registered businesses — are now in the dataset, from the FIA's
BGMOPEN99X,BGMOPEN99and agency-list files. Every row, shard entry and
lookup result carrieskind(business,nonprofit,schooloragency),
and deregistered schools and nonprofits havestatus: "closed". These rows
haveuseInvoice: falseand only a county/city asaddress. Newubn-build
flags--no-withholding,--no-nonprofit,--no-school,--no-agencyand
--nonprofit-csv/--school-csv/--agency-csv
(#18). - Dataset,
worker,worker-d1: rows whose name contains a Unicode Private Use
Area character (the tax registry's locally-defined 造字, shown as a box in
most fonts) carrynameHasPrivateUse: truein shards and lookup results
(name_has_private_useinubn.ndjson.gz,ubn.sqliteand D1), so a
checkout can avoid autofilling them as an invoice title. The name itself is
unchanged.manifest.jsonreports the count asnamesWithPrivateUse
(#20). - Docs: how to read a lookup response, and why
found: falseis not an invalid
UBN — the categories of valid UBNs that have no public source, measured on real
checkout data (#21). lookupTitle(ban, { baseUrl, signal?, timeoutMs?, fetchImpl? })queries a
deployed Worker's/v1/vat/:banand resolves to{ found: true, name, status?, … },
{ found: false }(no source has a record — a hint, not an invalid UBN), ornull
(no answer: bad checksum, timeout, abort, network error, any non-2xx including
502 upstream_unavailable, a malformed body, or a name that is empty or has
Private Use Area glyphs). UnlikelookupVAT, it never throws
(#14).isSameTitle(a, b)compares two invoice titles while ignoring full-/half-width
forms (NFKC), 臺/台, whitespace and Latin case. It never rewrites legal forms
such as 股份有限公司 (#14).hasPrivateUse(s)reports whether a string contains Unicode Private Use Area
characters (the registry's custom glyphs), which should not be auto-filled as a
title (#14).- Types:
RegistryStatusadds'closed', a newRegistryKind
('business' | 'nonprofit' | 'school' | 'agency'), andUBNRecordgains
optionalkindandnameHasPrivateUse(truewhen present)
(#14).
Changed
- Workflows: bump
actions/checkoutto 7.0.1,actions/setup-nodeto 7.1.0 and
pnpm/action-setupto 6.1.0 (#19).
Fixed
worker-d1: fall back to the FIA API when D1 has noubntable yet, instead of
failing with a Cloudflare 1101 (#4).worker-d1: answer instead of failing when the FIA fallback is unreachable, and
don't cache a miss taken while D1 or FIA was down (#4).worker,worker-d1: cache responses without CORS headers and apply the
caller's CORS per request, so one origin'sAccess-Control-Allow-Originis never
served to another (#5).worker,worker-d1: when FIA can't answer,/v1/vat/:bannow responds
502with{ "found": null, "error": "upstream_unavailable" }(never cached)
instead of200 { "found": false }, which was indistinguishable from "no such
business" and was cached for a day byworker. This changes the response
contract: treat a non-2xx as "no answer".found: falseis cached only when the
dataset read succeeded and FIA returned 404 (#15).
Security
- Dataset workflow: the
buildjob runs in thedatasetenvironment, so the R2 /
D1 write credentials can be scoped to the default branch once they are moved
there; admin steps indocs/operations.md(#13). - Workflows: every action is pinned to a full commit SHA, kept current by
Dependabot (#13). - Dataset workflow: a pre-publish check fails the run before anything is released
or written to D1 / R2 when rows drop more than 1% from the previous build, the
build has no rows, or a manifest is malformed; a manual run can override an
intentional shrink withallow_shrink(#13).
npm: @paid-tw/ubn@0.2.0 (published with provenance)
Full changelog: ubn-v0.1.1...ubn-v0.2.0
latest
rolling state for incremental diffs
Dataset 29-OCT-26
提供機關/單位 財政部財政資訊中心 2026 全國營業(稅籍)登記資料集(版本 29-OCT-26)、全國營業(稅籍)登記(停業)資料集(版本 29-OCT-26)
此開放資料依政府資料開放授權條款 (Open Government Data License) 進行公眾釋出,使用者於遵守本條款各項規定之前提下,得利用之。
政府資料開放授權條款:https://data.gov.tw/license
FIA tax registry snapshot 29-OCT-26. rows=1829763.
Delta {"deletes":0,"hadPrevious":false,"unchanged":0,"upserts":1829763}.