Skip to main content

Parse Spanish Business Registry Files

A Python library for extracting company data from BORME (Boletín Oficial del Registro Mercantil) files. Download, parse, and convert official business registry documents to structured data.

Quick Start

Get up and running with bormeparser in three simple steps

1

Install bormeparser

Install the library using pip:
pip install bormeparser
You may need to install system dependencies first:
sudo apt-get install python3-dev libxslt1-dev libffi-dev zlib1g-dev gcc
2

Parse a BORME file

Download and parse a BORME PDF file:
import bormeparser
from datetime import date

# Parse a local PDF file
borme = bormeparser.parse('BORME-A-2015-27-10.pdf', bormeparser.SECCION.A)

# Access parsed data
print(f"Date: {borme.date}")
print(f"Province: {borme.provincia}")
print(f"Number of companies: {len(borme.get_companies())}")
3

Extract and export data

Extract company information and export to JSON:
# Get all companies in the BORME
companies = borme.get_companies()

# Get acts for a specific company
for company in companies[:5]:
    print(f"\n{company}:")
    acts = borme.get_acts(company)
    for act in acts:
        print(f"  - {act}")

# Export to JSON
borme.to_json('output.json')
{
  "date": "2015-02-10",
  "provincia": "MADRID",
  "seccion": "A",
  "companies": {
    "EXAMPLE COMPANY SL": [
      {
        "type": "Nombramientos",
        "value": ["JOHN DOE"]
      }
    ]
  }
}

Key Features

Everything you need to work with Spanish business registry data

Parse PDF & XML Files

Extract structured data from BORME PDF and XML files using multiple parser backends (PyPDF2, lxml).

Download from Official Sources

Automatically download BORME files from boe.es for any date, province, or section.

Extract Company Data

Access company names, business acts, appointments, dissolutions, and registry information.

Convert to JSON

Export parsed BORME data to JSON format for easy integration with other tools.

Multiple Provinces & Sections

Support for all 52 Spanish provinces and three BORME sections (A, B, C).

Rich Data Models

Type-safe enums for business acts, positions, provinces, and sections.

Explore the Documentation

Learn about BORME files and how to use bormeparser effectively

BORME Overview

Learn what BORME is and why it matters

File Formats

Understand PDF, XML, and HTML formats

Sections Explained

Explore sections A, B, and C

Parsing Guide

Parse BORME files step-by-step

Download Guide

Download files programmatically

API Reference

Complete API documentation

Ready to Get Started?

Install bormeparser and start extracting Spanish business registry data in minutes

View Installation Guide

Build docs developers (and LLMs) love