# Changelog of Taiwan Company Data — Directors, Shareholders & Financials (`foxlabs/taiwan-company-data`) Actor

- **URL**: https://apify.com/foxlabs/taiwan-company-data/changelog.md
- **Full Actor documentation**: https://apify.com/foxlabs/taiwan-company-data.md

## Changelog

### 0.1.1 — 2026-09-10 — failed lookups become free (per-record billing) + README corrected + balance-sheet totals and UBN check fixed

- **You will pay only for delivered company records.** The Actor now charges a new `company-record` event for each delivered company (`matched: true`, pushed through `src/billing.js`). Rows that only report a failed lookup — a UBN that fails the check-digit rule, a name that could not be resolved to a UBN, or a UBN that neither GCIS nor TWSE returns (`matched: false`) — are pushed without a charge.
- **Timing:** Apify applies pricing changes after a 14-day notice. From **25 September 2026** the pricing switches from the per-dataset-item event to `company-record` at the same price ($0.004). Until then billing is exactly as before; the code detects the switch by itself.
- **Fixed: balance-sheet totals.** `financials.balanceSheet.totalAssets` / `totalLiabilities` / `totalEquity` were `null` for every company: the Actor read 資產總額 / 負債總額 / 權益總額, while TWSE's general-industry balance-sheet file (`t187ap07_L_ci`) labels them 資產總計 / 負債總計 / 權益總計. It now reads the 總計 labels, with 總額 kept as a fallback. Verified for TSMC (22099131), 2026 Q2: 9,375,654,727 / 2,901,183,746 / 6,474,470,981 thousand NT$ — the same figures as TWSE's MOPS balance sheet at 2026-06-30 — and assets = liabilities + equity. `financialsText` now ends with the assets figure (e.g. `Assets NT$9.38T`).
- **Fixed: UBN check.** New `src/ubn.js`: every UBN is checked with the Ministry of Finance check-digit rule (weights 1, 2, 1, 2, 1, 2, 4, 1; digit total divisible by 5 since 1 April 2023, by 10 before; the exception for a 7 in the 7th place) before any lookup. An entry that fails — wrong length, a typo, `00000000`, no digits — gets its own row `Not a valid UBN (統一編號): …` (`matched: false`, plain push) and is not looked up. Before, `00000000` returned one of the 8 foreign-registered companies TWSE lists under that placeholder as `matched: true`, and an entry without digits disappeared without a row. The shipped check rejected none of 1,000 active companies from GCIS.
- **Input form.** The `companyNames` example `台積電` resolves to 台積電機有限公司 (54900838), a different company; the form now shows the full legal name 台灣積體電路製造股份有限公司, which resolves to TSMC (22099131). The `ubns` description mentions the check.
- No output field was added, renamed or removed.
- **README corrected.** The 2026-09-07 README was generic and partly false. Corrected claims:
  - It documented inputs this Actor does not read — `queries`, `maxResultsPerQuery`, `includeRaw` — with the example `{"queries":["undefined"],"maxResultsPerQuery":50}` in the Quick Start, AI-agent, JS and Python snippets, and described `maxConcurrency` as "how many queries to fetch at once". The real inputs are `ubns`, `companyNames`, `includeFinancials`, `maxResults`, `maxConcurrency` and `proxyConfiguration`.
  - "Whole registry, one call" and "formation / status monitoring": neither is a feature.
  - "Relevance-ranked name search": an exact legal-name match wins, otherwise GCIS's first hit among active companies — `台積電` resolved to 台積電機有限公司, not TSMC.
  - "The registry's own contact fields" and "use something else when you need revenue, headcount, website, email … we don't ship empty columns": email, phone, website and revenue come from TWSE for listed companies and are `null` for the others; there is no headcount.
  - "Every row carries `query`": only rows for unresolved names do.
  - "`status` is `active` / `inactive` / `dissolved`": it is GCIS's Chinese status text (e.g. `核准設立`).
  - "No empty-promise columns": the TWSE fields are `null` for companies that are not TWSE-listed (the always-null balance-sheet totals are fixed above).
  - "Empty or failed lookups are never billed": until the pricing switch they are counted as dataset items.

### 0.1 — 2026-09-07

- **Enabled AI-agent payments (x402) + rebuilt the README to the full standard** (What-is / when, AI-agents + x402 agentic payments + MCP, Overview, Features, Use cases, Integration, FAQ, Troubleshooting, Support & contact).

### 0.0

- Initial release: data from the Taiwan Ministry of Economic Affairs business registry (open data) by name or registry ID.
