跳到正文
DEV Community· Russell Yapp·· 3 小時前AI 評分38

在不公開個人資料的前提下發布英國公共來源數據

Publishing data from UK public sources without publishing people

AI 導讀

三個 Apify Actors 以不同方式處理 HMRC 貿易名單、英國公共合約通知及 Global LEI Index 的個人資料,按欄位限制輸出內容,並在特定模式下統計被隱去的個人紀錄。它們的 README 亦列明遮蓋方法的限制、移除及提出異議的途徑,以及輸出由執行 Actor 的帳戶負責。

正文

UK public bodies publish a lot of open data. An open licence covers the dataset's copyright. It does not make personal data in that dataset safe to republish. Both the HMRC trade lists and the Global LEI Index contain records that are really people. This article looks at how three of my Apify Actors deal with that. It describes what each Store README says, and nothing more. This is not legal advice.

The problem

A sole trader trades under their own name. A register that lists "importers and exporters" or "legal entities" will therefore list some individuals next to companies. A tender notice can name a contact. A name can sit inside a company name. If you collect these sources into one tidy table, you can end up publishing people without meaning to.

The three Actors take different routes. All three are pay per event, and the Store pages carry the current prices.

UK Importers and Exporters (HMRC Trade Info)

This Actor returns one row per trader, flow and month. HMRC publishes sole traders' names next to companies', and the README says the Actor does not return them.

  • Organisations only. A name is returned only if it carries an organisation marker, such as Limited, Ltd, PLC or LLP. A name without one is withheld. So is a name with a title such as Mr or Dr, unless a legal form follows. So is a name that holds a contact or an address.
  • Counted, not silent. In search and alert modes, withheld names are left out and counted in RUN_SUMMARY.withheldPersons.
  • No addresses. Address lines are never output or stored. Only the outward part of the postcode is returned, and there is no address field.
  • Nothing kept. Every run reads HMRC's current publication, and no trader name or address is kept between runs. An alert's store holds hashes only.

The licence is the Open Government Licence v3.0. The README adds that the licence does not cover personal data, so sole traders' details are not ours to republish.

UK Public Contracts Lookup

This Actor returns notices from Find a Tender and Contracts Finder (and Public Contracts Scotland if you choose it) in one schema. The README describes which fields a row can hold and which it never holds. That is a design choice at the field level.

  • No supplier names. A row holds the title, buyer, value, CPV codes, regions, stage, dates and a link. It has no winner, contact, address or description field, and the buyer field is the organisation name only. A suppliers field is reserved for organisation supplier names, pending a review; it is null in this version, and no supplier name is read.
  • Nothing else that identifies a person. Rows hold no contact names, emails, phone numbers, addresses, supplier names or descriptions. Keywords are matched against the description, but the description is never returned.
  • Redaction in titles. Email addresses, UK phone numbers and a name written straight after words such as "contact", "speak to" or "FAO" are replaced with [redacted].

The README is open about the limit: the redaction works by pattern, so a name written some other way in a title is not caught.

LEI Lookup

This Actor returns Legal Entity Identifier records from the Global LEI Index, one row per entity. The data is CC0. The README notes that CC0 applies to the dataset's copyright and does not remove data-protection duties for personal data.

  • Sole proprietors withheld. A recognised sole proprietor is a record with the category SOLE_PROPRIETOR, or one registered under a sole-trader legal form (98 codes in the ISO 20275 list). Arrangements named after a person are treated the same way: settlements, family, will, discretionary and life-interest trusts, and "estate of".
  • Two behaviours. In lei mode, the row keeps the LEI, statuses and dates, but the names, registration number and addresses are null, and the withheld field says which. In name and status modes, these entities are left out and counted in RUN_SUMMARY.withheldPersons.
  • City-level addresses. For everyone, an address is country, region and city only. No street, number or postcode is read.

The README states two limits. A company whose name contains a person's name is returned as published. And the sole-proprietor and arrangement tests can miss a person. The record link opens the source record, which the Actor does not filter.

What the three have in common

Each one decides at the field level what a row can hold, rather than cleaning up afterwards. Each one counts what it withheld, so a result with fewer rows than expected is explained. And each README says where its method stops.

Removal and objection

The Trade Info README sets out a route. HMRC removes a trader who asks, from the following month's publication, and the Actor stops returning it from then. You can also ask us directly. Email info@yappman.com with the trader's name as it appears in the results, or its HMRC trader id. The README says requests get a reply within one month, and that each accepted request is a reviewed change to our own removal list. Traders on it are never returned, and are counted in RUN_SUMMARY.removedByRequest.

The Contracts and LEI READMEs give the same route: email info@yappman.com with the notice id or the LEI, or, without one, the product and the name as it appears.

Who owns the output

Our position is that output belongs to the account that runs the Actor, under Apify's terms. That account is then responsible for what it does with the rows. Again, this is not legal advice. If you are unsure whether a use is lawful, ask a qualified adviser.

The Store pages

Drafted with an AI assistant. The behaviour described comes from the three Store READMEs as they stood on the afternoon of 28 October 2026.

來源:DEV Community · dev.to