Querying EU Company Registries from Python — No Dun & Bradstreet Required
I was doing due diligence on a Spanish startup last month. Needed to verify they were registered with the tax authority, check their filing status, and see if there were any red flags in their recent updates. The usual approach would be to pay Dun & Bradstreet or similar. Instead, I built a Python wrapper around BORME (Spain's official business registry) and figured if it saved me time, it might save someone else time too.
The problem: BORME exists, it's free, it's official government data — 2.8M Spanish companies. But accessing it requires navigating redirects, session handling, and understanding their archaic query format. Same story with SIRENE in France or Companies House in the UK. Each one is public, but each one is a different puzzle.
The quick version
import requests
# Query the BORME registry for a Spanish company
response = requests.get(
"https://api.rapidapi.com/v1/spain/borme/company",
params={"name": "Telefonica", "limit": 5},
headers={"X-RapidAPI-Key": "YOUR_KEY"}
)
companies = response.json()
for company in companies:
print(f"{company['name']} — VAT: {company['tax_id']} — Active: {company['active']}")
That's it. Three lines to pull official data from Spain's registry, no scraping, no session cookies to manage.
Why I built this
When I need to check a European company, I want:
- Official data only — not aggregators, not guesses. The Spanish government maintains BORME, I want BORME.
- Unified interface — BORME, SIRENE, Companies House all use different query models. I want one Python pattern that works for all three.
- No licensing costs — The data is public. Why should I pay $50/month to access something governments publish for free?
The workflow I ended up with:
- Query BORME for Spanish companies (2.8M records)
- Query SIRENE for French companies (25M records) — same pattern, different country
- Query Companies House for UK companies (5M records)
- Cross-reference the results, flag any discrepancies
For the startup I was checking, it took 30 seconds to confirm they were registered since 2019, had filed their 2024 statements, and had no liquidation notices. That's due diligence done.
What's available now
I packaged this into a set of APIs so I don't have to rebuild it each time:
- Spain BORME: 2.8M companies, updated daily
- France SIRENE: 25M companies, official INSEE data
- UK Companies House: 5M companies, Companies House direct feed
- EU Public Tenders TED: 300K+ procurement notices, searchable by keyword and date
- Spain AEMPS: 50K medicines and their approval status
All exposed as REST endpoints. No auth required for the free tier, just pass your API key. Query any of them from Python, Node, Go, whatever — it's just HTTP.
The limitation you should know about
This works great for structured queries: "Give me all companies matching X in country Y." It doesn't do fuzzy matching on company names — garbage in, garbage out. If you search for "Telefonica" it'll find exact matches or close variants in the registry, but if you search for "tele fonica" with a space, it'll miss them. You need to clean your input.
Also, BORME updates daily but with a lag — if a company filed something this morning, it might not show for 24 hours. SIRENE can be slower. Know your latency tolerance before you build something that expects real-time data.
Next steps
If you're doing KYC, compliance, or just need to verify a European company without a subscription service, grab a key and give it a try. Happy to answer questions about the data sources or the setup in the comments.
Happy to answer questions about the data sources or the setup.
Top comments (0)