Empresia Scraper
Scrape Empresia.es, the free Spanish company directory built on the Commercial Registry (BORME), into structured data. Open a company report and get its CIF, CNAE code, corporate purpose, share capital, sales band, sales history, employees, registry, address, phones, websites, e-mail, board, officers with appointment dates, BORME announcements and trademarks. Search by name, or pull every company incorporated on a given day, province by province. JSON or CSV.
pip install empresia-scraper
export SCRAPEDO_TOKEN=your_token
empresia-scraper telefonica mercadona -f csv -o companies.csv
empresia-scraper --borme 2026-11-13 --province madrid --details -o new_companies.json
Why go through an API
import requests
requests.get("https://www.empresia.es/empresa/telefonica/")
# fine for a few pages; a crawl of thousands of companies from one IP is what gets throttled
Empresia sits behind Cloudflare. A few requests from your laptop go through, but bulk crawls (all incorporations of a month, thousands of company reports) from a single IP are what get rate limited. This package sends each page through Scrape.do, which rotates the IP for every request and retries failures. A plain Scrape.do request is enough: 1 credit per page, about 2 seconds.
Where the data is
Empresia renders on the server, so every field is in the HTML:
- Company page (
/empresa/<slug>/): the identity box (.datos-ident) holds name, phones, fax, address and websites; the e-mail is hidden with Cloudflare's e-mail obfuscation (data-cfemail, a one-byte XOR key) and decoded here. Label/value pairs give CIF, incorporation date, share capital, sales band, registry, last filed accounts, employees, governing body and auditor. The yearly sales series sits in a Google ChartsarrayToDataTable(...)call. Below: the board (#organigrama), officers with appointment and removal dates (#ListaRelaciones), the BORME timeline (#ListaEventos) and trademarks (#MarcasEmpresa). - Search (
/busqueda/?q=<text>&pagina=<n>): companies, officers and trademarks. Empresia stops at 100 results. - BORME day (
/borme/fecha/<date>/acto/<act>/provincia/<province>/): every company with that act (incorporation, dissolution, capital increase, change of address, appointments...) published that day, with a link to each announcement. - Announcement (
/empresa/<slug>/evento/<id>/): for incorporations, a table with registry, start date, corporate purpose, registered address and share capital, plus the link to the official BORME PDF.
In a live test: a company page returned 13 board members, 30 officers, 31 announcements and 9 trademarks in one request; the BORME of 13 November 2026 had 41 act types across 34 provinces, and Barcelona alone had 71 incorporations.
The company page shows the 30 most recent officers and announcements; the rest load on demand and are not collected.
Python
from empresia_scraper import EmpresiaScraper
em = EmpresiaScraper(token="YOUR_SCRAPEDO_TOKEN") # or set SCRAPEDO_TOKEN
company = em.get_company("telefonica") # slug or URL
print(company.cif, company.cnae_code, company.share_capital_eur, company.employees)
print(company.sales_band, company.sales_history)
print([(o.name, o.role) for o in company.board][:3])
results = em.search("construcciones", pages=2, kind="EMPRESA")
for event in em.new_companies("2026-11-13", province="madrid", limit=10):
print(event.company, event.share_capital_eur, event.corporate_purpose)
print(em.borme_acts("2026-11-13")) # constitucion, disolucion, ...
print(em.credits_used)
Command line
# Company reports by slug or URL
empresia-scraper telefonica https://www.empresia.es/empresa/mercadona/ -f csv -o companies.csv
# Search, then open every company found (one request each)
empresia-scraper --search "construcciones" --pages 2 --companies --limit 20
# New incorporations of one day (all provinces if --province is left out)
empresia-scraper --borme 2026-11-13 --province barcelona --details -f csv -o new_bcn.csv
# Any other act: dissolutions in Valencia
empresia-scraper --borme 2026-11-13 --act disolucion --province valencia
Fields
Company: name, cif, phones, fax, address, websites, email, corporate_purpose, cnae_code, cnae_description, incorporation_date, age, share_capital, share_capital_eur, sales_band, registry, last_accounts_year, employees, governing_body, auditor, sales_history, board, officers, announcements, trademarks, url.
Announcement: title, company, company_url, published, pdf_url, text, registration, registry, start_date, corporate_purpose, address, share_capital, share_capital_eur, details, url.
Values Empresia shows as - come back empty. The sales band is a range ("Superior a 2.500.000 euros"), not an exact figure.
Use it responsibly
The data comes from public registers (BORME, BOE, OEPM), but officers are real people, so their names are personal data under the GDPR. Use it for legitimate purposes such as B2B research, KYC or market analysis, keep only what you need, honour objection requests and respect Empresia's terms. This is not legal advice.
Tests
PYTHONPATH=src python -m unittest discover -s tests
The fixtures are fictional ("EJEMPLO SOLUCIONES SL", example.com).
License
MIT
Metadata
Release files for empresia-scraper 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| empresia_scraper-0.1.0.tar.gz | 23.8 kB | Without provenance | Details for empresia_scraper-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| empresia_scraper-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for empresia_scraper-0.1.0-py3-none-any.whl |
Total release size: 40.8 kB
Release files / empresia_scraper-0.1.0.tar.gz
| Download URL | empresia_scraper-0.1.0.tar.gz |
|---|---|
| Size | 23.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
868cd1d0140aeb52745affc464759aebadff9cc14e006589594f98dd21873132
|
|
BLAKE2b-256 checksum How to use checksums |
53c3a3852106aeed1e36407278384689783544e640e50acaeeda0879fdba0e43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / empresia_scraper-0.1.0-py3-none-any.whl
| Download URL | empresia_scraper-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
699006ab8c5628b5214b7b45a343b85f49cd60ce122dc9fd603e983b179f4bd2
|
|
BLAKE2b-256 checksum How to use checksums |
2bc5aa5736fc65247429b772dec46a53414ca8aa2107349f2dc104f050d5a84c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for empresia-scraper 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.