Case study

597 portals, one question.

Every Indonesian government tender is public, and almost none of it is usable. I built Nusantara Procurement Data to fix that: a pipeline that collects every tender and the plan behind it, a data model that is tested on every build, integrity indicators held to an international standard, and a text-to-SQL analyst: it turns a question into one SQL query, runs it on the data, and lets anyone check the answer: what was counted, the rows, the tenders on SPSE and the query itself.

Role
Solo: data engineering, analytics, the agent, product, design and deployment
Built with
Python, dlt, DuckDB, dbt, Dagster, LangGraph, FastAPI, Next.js
Status
Live and crawling daily; detail pages for 2020 onward, newest year first
tenders
1.79Mtenders1,785,304 from 597 portals, 2008–2026
procurement plans
7.5Mprocurement plansSiRUP packages, matched to the tenders that cite them
agent accuracy
99.1%agent accuracyon 125 questions, scored by results, not text
red flags applied
15red flags appliedof the 73 in the Open Contracting guide

The problem

Public, but not usable.

  • 597 separate portals and no API. Each LPSE runs its own copy of SPSE behind session tokens; there is no way to ask a question across them.
  • 2,752 ways to write an owner. One column mixes districts, cities, provinces and ministries, spelled however each portal likes.
  • “1.000 Jt” is a label, not a number. Estimates are published as text; some contracts carry three extra zeros.
  • No memory. The tender list shows today's stage and overwrites yesterday's.
  • The plan lives elsewhere. What an owner meant to buy, and for how much, sits in SiRUP, a different system.

Who it is for

Residents who want to know what their region buys, journalists and watchdogs looking for where to dig, and analysts comparing places and years. None of them should need SQL, and all of them should be able to check the answer.

Decisions that mattered

Six choices that shaped it.

01

Crawl like a careful visitor

The problem
Hundreds of portals, no API, and a firewall that refuses data-centre addresses.
What I did
robots.txt checked in code, one request a second across every portal, time-boxed runs that resume where they stopped, and back-off that stops instead of pressing a struggling site. SiRUP is read in pagu bands from the top down, because paging over tied values silently skipped packages (1,737 unique of 1,777 in a test).
What it bought
About 13,000 tender pages a day within robots.txt, and SiRUP totals that match the site's own counts exactly.

02

Make the mess a tested model

The problem
Owner names, money labels and stages that change under you.
What I did
dbt owns every transformation: owners resolved to Kemendagri codes with reviewed overrides, a money parser pinned by tests, a snapshot that dates every stage change, and implausible values noted with the rule that caught them instead of deleted.
What it bought
100% of owners resolved, 55 models and 149 tests on every build.

03

Readers never block writers

The problem
DuckDB allows one writer or many readers, and the agent is always reading.
What I did
Each build copies the served tables into a new read-only file and flips a pointer atomically, but only if no table lost more than 1% of its rows.
What it bought
Crawls and rebuilds run around the clock; a bad build never goes live, and the last good snapshot is one call away.

04

An agent you can check

The problem
A language model that writes SQL will sometimes be confidently wrong.
What I did
One guarded, read-only query per question; place names resolved in code, not by the model; every number in the answer checked against the result; and a Check under every answer shows in plain words what was counted, the rows, the tenders behind it on SPSE, and the SQL to run in an editor.
What it bought
Accuracy went from 90.9% on the first run to 99.1%, measured by running the query, on questions it never saw while tuning too.

05

Indicators held to a standard

The problem
“Suspicious tender” is easy to say and hard to defend.
What I did
Every indicator is mapped to the Open Contracting Partnership's red flags and the same 55,590 tenders were run through Cardinal, OCP's own calculator, to explain every difference. Flags that fire on a quarter of all tenders here were dropped.
What it bought
Indicators that point where to look, always called indicators, never accusations.

06

Follow the money from plan to contract

The problem
Tenders alone cannot show splitting: the small packages never reach the tender module.
What I did
A second crawler for 7.5 million planned packages, linked to every tender that cites them, and a check for direct purchases planned as numbered parts just under the legal limit.
What it bought
4,492 groups of 17,078 packages in 2025, each a lead to look into.

What went wrong

The bugs that taught me most.

  • “1.000 Jt” read as one million.

    Indonesian uses the dot for thousands. The data-quality notes caught a jump no real budget makes; a test now pins the parser to known labels.

  • A site that answers short under load.

    SiRUP sometimes returned empty or partial pages for minutes. Every answer is now checked against the count still expected, and a band read short is not recorded, so the next run reads it again.

  • HPS above the planned budget looked four times as common as it is.

    Some tenders bundle several planned packages, up to forty, and only the first was being compared. Linking every package cut the cases from about 1,070 to about 270.

  • The agent misread its own coverage.

    A plan table's column shared a name with a tender column, so an answer claimed details existed for “4% of tenders” when the year's figure was about 80%. The coverage check now knows which tables hold tenders.

  • Budget-account labels looked like split packages.

    Fifty packages called “Pemeliharaan Rutin Jalan” are usually fifty separate roads. Names shared by ten or more work units now only count when they are numbered.

  • Evaluation, not intuition, decided.

    The first evaluation run scored 90.9%. Most of the gain came from the data model, rules and column descriptions, not from a bigger model or a fancier agent.

What the data shows

A few things it found.

Fewer tenders, the same money. In 2025, owners put out 48,838 tenders, 33% fewer than in 2024, for about the same Rp 225.4 T of estimates: the money moved into fewer, larger tenders.

Estimates above the plan. 298 crawled tenders carry an estimate more than 1% above the budget their own plan set, which the rules do not allow.

Jobs planned in parts. One district works office planned 98 supervision packages of exactly Rp 100 jt each, the consulting limit; nationally, 2.8% of planned direct purchases sit within 5% under their limit.

Groups that take turns. Of 232 clusters of companies that keep bidding together, 3 win most of the tenders they meet in and take turns winning.

Each is a reason to look closer, never a finding about anyone.

The company network: clusters of companies that keep bidding together
The bidding network, with the groups whose winners take turns marked.

The product

What a visitor gets.

Asking which district ran the most tenders, with the answer and the tenders behind it

Ask in plain words

Text-to-SQL: the question becomes one SQL query. Check shows what was counted, the rows, the tenders on SPSE and the query.

A tender's plan: pagu, estimate and contract on one scale

Open any tender

Each tender as SPSE shows it, plus its indicators, its price against similar tenders and the plan it cites, on one scale.

The progress rail of an answer that searched the web

See every step

The chat shows what it understood and the SQL it ran; when it searches the web, every site and page it read, marked cited or not.

  • Open data, gated depth. Every tender is open to everyone; the analysis layers open with a free access grant, approved by hand.
  • Safe with untrusted input. Tender text and web pages reach the model as data, never as instructions, and a security suite of prompt-injection and unsafe-SQL cases is part of the evaluation.

Honest limits

What it is not, yet.

  • Details cover 2020 onward. Every tender since 2008 is listed, but bids and winners are collected for budget years 2020 on (70,918 tenders so far, newest year first, at one request a second); an older year would add about a month of crawling.
  • Plans cover two budget years. Earlier SiRUP years arrive with the weekly crawl.
  • The questions were written by me. Held-out sets were written once and never tuned on, but questions from real users would be the fairer test.
  • It is a portfolio, not a service. One server, no accounts or alerts beyond RSS, and not affiliated with LKPP or SPSE.

Feedback

Tell me what you think.

Criticism, a suggestion, or a number that looks wrong: real readers are the test this project has not had yet, and every message is read.

Name and e-mail are optional. Leave an address if you would like a reply; a data error comes back fixed, or with the reason it is right.

What is it about?

Read only by me. An address you leave is used for the reply and nothing else.

See it work.

Ask it something about your own region, or read how every layer is built. If you would like to talk about the work, the access form on the site reaches me directly.