Skip to content
Ask for a Budget
TechnologyAugust 31, 20268 min readUpdated on November 11, 2026

Public data collection: the part of a document that takes longest

In most company documents, the slow part is gathering and checking public data. Automating it needs no confidential data and is often the fastest first AI win.

Public data collection: the part of a document that takes longest
Índice do artigo
faltam 7 min de leitura

Nobody hires a specialist to copy a company registration number from a website into a form. But that is where a good part of the deadline goes.

Try the exercise with a typical document from your company: a technical proposal, a regulatory form, an expert report, a legal filing, a due diligence report. Split the time into two piles: time spent thinking and writing, and time spent looking for data, checking data and typing data into fields.

In most cases the second pile is large, sometimes larger than the first. And it is made up almost entirely of information that is already public, available on some portal, waiting for someone to open twenty tabs.

This article is about automating that half. It is the half with no confidentiality and no professional judgment at stake, which makes it technically simple to solve, and it is precisely the one that usually gets pushed back.

Article summary

  • In business documents, the bottleneck is rarely the writing. It is collecting, checking and typing data that is already public.
  • Asking a language model to look up this data does not work: it fills in plausible identifiers with the same confidence as when it is right.
  • The split that works has three roles: a deterministic bot collects, AI writes, a system checks the text against the collected data.
  • Since it does not touch confidential data, this is usually the first possible delivery of an AI project, running while the internal archive is still being processed.

Half of a document's deadline is digging

The anatomy repeats with few variations, whatever the sector. The work that requires professional training is squeezed between two layers of manual labor.

Find out who the counterparty is: legal name, CNPJ (Brazil's company registration number), address, shareholders
Look up the public history: publications, registrations, lawsuits, corporate acts
Check each item: compare with the official source and resolve discrepancies
Analyze and decide: the part that requires the professional
Write on a template: adapt the draft to the case
Type into the fields: transfer everything to the form or system
Of the six steps, one requires professional judgment. The other five are searching, checking and transferring.

What makes this expensive is not difficulty, it is attention. Transferring thirty fields between windows is the task where qualified people make the most mistakes, because it is boring enough for attention to drop and important enough for the error to cost.

What this unlocks: automating the collection and transfer steps does not replace anyone. It gives back to the professional the time they spent as a typist, and reduces the most common class of error in the process.

Why asking AI to look up the data does not work

Because a language model does not search: it completes. When information is missing, it produces the most likely pattern, and a made-up CNPJ has exactly the format of a real one. Case number, revenue figure, registration date and partner name have the same problem: they are identifiers, and a plausible identifier is indistinguishable from a correct one for someone reading quickly.

This is not a defect to be fixed with a better model, it is the nature of the tool. A language model is excellent at interpreting, summarizing, classifying and writing. It is the wrong tool to guarantee that a field matches the official record.

The split that works: a bot collects, AI writes, a system checks

The mature architecture separates inference from verification. AI is free to decide and write only in the middle of the path: before it, deterministic code collects; after it, more deterministic code validates each verifiable claim against the source it came from.

CollectorSearches the official source and stores what it found, with source and date.
Case databaseThe document's source of truth. Nothing goes in without a source.
the model receives the data ready, it does not go looking for it
Assisted writingWrites on the draft using the data already collected.
the text goes back to the code before it leaves
CheckerChecks each field in the text against the database and flags discrepancies. It does not use a language model.

The rule that holds the design together is simple: the model never makes up data because it never needs to look for it. It receives information already collected and checked, and its job is to write and adapt. If the final text mentions a number that is not in the database, the checker flags it before the document reaches anyone.

Isometric illustration with three connected workstations: a deterministic collector, an AI-assisted writer and a checker that verifies field by field

Notice that the checker is the piece almost every prototype skips, and it is the one that decides whether the system can be used in production. Without it, you have a convincing draft generator. With it, you have an auditable process.

It is also the cheapest piece to build, because comparing two values does not require intelligence: it requires code.

What is already public and almost nobody automates

Brazil publishes more structured data than companies' routines take advantage of. Receita Federal (Brazil's federal tax authority), for example, makes CNPJ open data available in the Open Data section of the gov.br portal, with separate files for companies, establishments, partners and enrollment in Simples Nacional (Brazil's simplified tax regime for small businesses), and the field layout documented in public metadata. It is the same information someone looks up manually, one query at a time.

  • Company registryLegal name, status, address, business activity and shareholders.
  • Public company filingsFinancial statements and notices published under regulatory obligation.
  • Official publicationsActs, public notices and decisions published in official gazettes.
  • Public court recordsDocket entries and filings in cases that are not under seal.
  • Public procurementTenders, contracts and amounts of government purchases.
  • Corporate registry and actsAmendments to articles and ownership recorded at the state commercial registries (juntas comerciais).

Not every source is the same, and that difference defines the effort. A source with structured open data, as a file or a documented API, is stable and cheap to consume. A source that exists only as a web page requires scraping, breaks when the site changes layout and needs maintenance. It is worth mapping both categories before estimating anything.

What this unlocks: a collector on a structured source eliminates the digging step once and for all, for all future cases, not just for today's document.

How much it costs to keep a collector running

Little, as long as it does not require a machine running and waiting for work. The model that pays off in a low-volume operation is pay-per-execution billing.

Collector triggered by an event Runs and shuts down Billed per operation executed No idle server
Azure Logic Apps, on the Consumption plan, charges per operation execution and includes an initial tier of free built-in operations per Azure subscription (the official pricing page lists the first 4,000 actions as free), according to Microsoft's pricing page and documentation checked on November 11, 2026.

There is a catch in this model worth knowing before designing the flow: Microsoft documents that billing counts every execution, including retry attempts and loop iterations. An action with five retries is billed as six, and a loop over ten items generates eleven executions. A badly designed collector, which scans entire lists when it could search directly, gets expensive even without infrastructure.

A checked field is worth more than a filled field

This is the difference between a system that saves time and one that also reduces risk: storing, alongside each piece of data, where it came from and when it was read.

It looks like an engineering detail and it is a business decision. With the source recorded, three things become possible. The first is answering a question about a document without redoing the research, because the answer is stored. The second is detecting when a piece of data has gone stale, by comparing the read date with how often that information usually changes. The third is review by exception: instead of checking thirty fields, the reviewer looks at the three the system flagged as divergent or outdated.

What to recordWhat it is for later
Data sourceProve where it came from, without redoing the search.
Read dateKnow when the information went stale and needs to be fetched again.
Raw value and processed valueAudit the transformation when the result looks odd.
Check statusDirect human review to the fields that need attention.

Why this is the best first delivery of an AI project

Because it is the only part that does not depend on the slow work. Organizing the internal archive, removing confidential information from old documents and defining permissions take months and produces nothing visible along the way. Public data collection produces results in the first week of use.

Why it fits first

  • It works on public data, so it does not depend on anonymization
  • Small, verifiable scope, with a result that is right or wrong
  • Noticeable gain from the very first document produced
  • Does not require changing the approval process or the client contract

What it does not solve

  • The writing itself, which depends on a processed archive of drafts
  • Professional judgment, which remains human
  • Sources that exist only as web pages and break when the site changes
  • Data that is not public and has to come from the client

What breaks, and how not to break with it

A collector is not software you install and forget. It depends on third-party systems that change without notice, and the way it fails is what separates a good one from a dangerous one.

The most important rule: fail loudly. A collector that does not find the data needs to stop and alert, never return an empty field or last time's value. An empty field becomes an incomplete document that someone rushes to complete; an old value becomes a silent error nobody notices. Both are worse than the interruption.

Isometric illustration with two pipes feeding the same collector: a sealed pipe coming from a structured database and a patched pipe coming from an unstable web page

The other three: prefer a structured source over scraping whenever one exists, respect the source's usage limits so you do not get blocked, and monitor the success rate over time, because a gradual drop usually signals a site change before it breaks completely.

The difference between the two pipes shows up in maintenance, not in the first week. Both work on delivery day.

How to start

Start with a single document, and with its public fields. The roadmap below takes you from a chosen document to a collector in use, without going through any big architecture decision.

  1. Choose a document your company produces often, and list all the fields it consumes.
  2. Mark which fields are public, which come from the client and which depend on judgment. Only the first column goes into the initial scope.
  3. Separate structured sources from web pages, because the effort and stability of the two are different.
  4. Build the collector with source and date recording from the first version, not later.
  5. Measure the time before and after on the same type of document, with the same professional. That number is what supports the next stage of the project.

The last step is the one that is usually missing. Without measuring the starting point, the gain becomes an impression, and an impression does not get budget approved for the next phase.

Sources and method

Research from August 31, 2026, revised on November 11, 2026. In the revision, the Azure Logic Apps billing model was checked again on the official pricing page (which still lists the first 4,000 actions as free on the Consumption plan) and in Microsoft's documentation, still dated July 10, 2026. Neither source says this tier renews every month: the documentation talks about an initial number of free built-in operations per Azure subscription, and the text stopped calling it monthly. The architecture diagram now shows the checker outside the AI step, as the text always described. Information on CNPJ open data comes from the Receita Federal portal, Open Data section, and from the public layout metadata document. The pay-per-execution billing model, the initial tier of included built-in actions and the rules for counting retries and loops come from those same two sources. Microsoft is a company external to X-Apps and has no commercial relationship with this content. The categories of public sources cited in the corresponding section are examples of source types, and the availability and format of each vary by agency.

Frequently asked questions

You can ask, but the result is not reliable for identifiers. A language model fills in a CNPJ (Brazil's company registration number), case number or amount with the most likely pattern when it does not have the information, and does so in the same tone it uses when it is right. Collection needs to be deterministic.

Previous post
Agentic RAG: when searching once is not enough
Next post
Integrating your ERP with CRM, app and website: where to start
Newsletter

One email a month, no noise

What we learn shipping custom software and applied AI.

Related articles

AI agents or traditional systems: which should your company choose11 min · Technology
Not sending documents to AI: three objections and what each one costs7 min · Technology
Pentest-Tools.com: the scanner that flagged the PHP flaw at UNICEF9 min · Technology
An open database of Brazil's laws: can it be used for legal AI?16 min · Technology
AI in industrial maintenance: why it stalls at the work order7 min · Technology

Accelerate your business with X-Apps

Ask for a Budget
X-Apps is an IT provider partner and advised by
Gartner
Receive our e-mails
News on software and applied AI.
Follow X-Apps