BORME API

Blog

Engineering notes on Spain's company registry

2026-08-19 · postgres · engineering

The guardrail that saves you 364 days a year breaks the export on the 365th

A 10-second per-role statement_timeout protects every API query and then kills the one that legitimately runs for minutes. What it took to stream 3,278,470 rows out of Postgres as gzipped CSV — with no staging volume and no nightly job.

2026-07-16 · kyb · engineering

Your Spanish KYB lookup says "exists". Here's how to answer "who runs it"

A 60-line pattern adding current officers, 17 years of history and live insolvency flags to any CIF lookup — demonstrated on a real KYB provider's own docs example.

2026-07-08 · engineering

You don't need to scrape BORME: Spain's company registry has an open-data API

Notes from parsing 17 years of the official gazette — 9.5M company events: the boe.es API nobody talks about, six traps that cost real time, and the deterministic-parser approach that hit 99.9% coverage.

build 2026.08.19·2ba6b50