# BORME Spain – New Companies, Appointments & Dissolutions (`flets_sv/borme-empresas-espana`) Actor

Parse the official Spanish BORME (Registro Mercantil) daily: new companies with address, capital, CNAE and directors, plus appointments and dissolutions.

- **URL**: https://apify.com/flets_sv/borme-empresas-espana.md
- **Developed by:** [FlEtsv](https://apify.com/flets_sv) (community)
- **Categories:** Lead generation, Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 company act returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## BORME Spain – New Companies, Appointments & Dissolutions

Turn the daily BORME (Boletín Oficial del Registro Mercantil) into one record per company: legal form, registered acts (incorporation, appointments, dissolution, capital changes and more), corporate purpose, CNAE code, address, share capital and the people named, with the link to the PDF. *Versión en español más abajo.*

***

### Use cases

- B2B lead generation: find companies incorporated in your province or sector
- KYB and compliance: follow dissolutions, appointments and address changes
- Accountants and advisors: spot new businesses by province
- Market research: count incorporations by CNAE code and region

### English

#### What does it do?

The Actor asks the BOE open-data API (`boe.es/datosabiertos/api/borme`) for the BORME summary of one date, downloads the XML of each province section (Section A, company acts) and splits it into one record per company. One run reads one daily edition. With `fecha` empty it takes the latest edition, looking back up to 10 days from today.

#### Input

| Field | Meaning | Default |
|---|---|---|
| `fecha` | Edition date, `YYYY-MM-DD` or `YYYYMMDD`. Empty means the latest edition. If there is no edition for that date, the run fails with a message. | empty |
| `soloConstituciones` | Keep only companies with an incorporation (`Constitución`) act. Turn it off to see any other act. | `true` |
| `tiposActo` | Keep companies with at least one of these acts (accents and capitals ignored), for example `Disolución`, `Extinción`, `Ampliación de capital`, `Ceses/Dimisiones`. | none |
| `provincias` | Province names, for example `MADRID`. Each one is matched as text inside the province heading of the edition. Empty means all of Spain. | none |
| `buscar` | Text that must appear in the company name, corporate purpose or address. | empty |
| `maxItems` | Maximum companies returned, 1 to 20000. | `25` |

The minimum input is `{}`: it returns the 25 latest incorporations in Spain.

Note: `soloConstituciones` is on by default, so to list dissolutions or appointments set it to `false` as in example 2.

**1. Latest incorporations in Madrid**

```json
{
  "soloConstituciones": true,
  "provincias": ["MADRID"],
  "maxItems": 25
}
```

**2. Dissolutions and extinctions in Madrid**

```json
{
  "soloConstituciones": false,
  "tiposActo": ["Disolución", "Extinción"],
  "provincias": ["MADRID"],
  "maxItems": 50
}
```

**3. New companies in Barcelona whose name, purpose or address mention "software"**

```json
{
  "soloConstituciones": true,
  "provincias": ["BARCELONA"],
  "buscar": "software",
  "maxItems": 50
}
```

#### Output

One record per company with: `idRegistro`, `empresa`, `formaJuridica` (SL, SLP, SLNE, SA, COOP, SC or COMANDITARIA when the name shows it, otherwise null), `provinciaRegistro`, `fechaPublicacion`, `actos`, `esConstitucion`, `comienzoOperaciones`, `objetoSocial`, `cnae`, `domicilio`, `capitalEuros`, `nombramientos`, `personas`, `datosRegistrales`, `urlPdf`, `urlHtml` and `textoCompleto` (the original text of the entry). Fields the entry does not contain come back as `null`.

#### Pricing (pay per event)

| Event | Price | Per 1,000 |
|---|---|---|
| Company act returned (`company-act`) | $0.003 | $3.00 |

One event is charged for each company record pushed to the dataset. If you set a maximum spend per run, the Actor stops when the limit is reached (it checks it after every record).

#### FAQ

**Where does the data come from?** From the BOE open-data API for the BORME and the XML of each province section it links to. The Actor does not use any other source.

**Does it cover the whole archive?** You can pass any past date in `fecha`, as long as the BORME has an edition for it; one run reads one edition. To build a history, run it once per date.

**Are phone numbers or emails included?** No. The Actor only returns what the entry says; it extracts no contact data.

**Is it legal to use?** The BORME is public information. Check data protection rules (GDPR) before you contact the people named in it.

**Why do I get no results?** The filters are applied together. With the default `soloConstituciones: true`, an edition with no incorporations in your provinces returns nothing; try another date or widen `provincias`.

***

### Español

#### ¿Qué hace?

El Actor pide a la API de datos abiertos del BOE (`boe.es/datosabiertos/api/borme`) el sumario del BORME de una fecha, descarga el XML de cada sección provincial (Sección A, actos de empresas) y lo divide en un registro por empresa. Cada ejecución lee una edición diaria. Con `fecha` vacía usa la última edición, buscando hasta 10 días hacia atrás desde hoy.

#### Entrada

| Campo | Qué hace | Por defecto |
|---|---|---|
| `fecha` | Fecha de la edición, `AAAA-MM-DD` o `AAAAMMDD`. Vacía = última edición. Si no hay edición ese día, la ejecución falla con un mensaje. | vacía |
| `soloConstituciones` | Solo empresas con acto de `Constitución`. Desactívalo para ver cualquier otro acto. | `true` |
| `tiposActo` | Empresas con al menos uno de estos actos (sin distinguir tildes ni mayúsculas), por ejemplo `Disolución`, `Extinción`, `Ampliación de capital`, `Ceses/Dimisiones`. | ninguno |
| `provincias` | Nombres de provincia, por ejemplo `MADRID`. Cada uno se busca como texto dentro del encabezado de provincia de la edición. Vacío = toda España. | ninguna |
| `buscar` | Texto que debe aparecer en el nombre, el objeto social o el domicilio. | vacío |
| `maxItems` | Máximo de empresas devueltas, de 1 a 20000. | `25` |

La entrada mínima es `{}`: devuelve las 25 últimas constituciones de España.

Ojo: `soloConstituciones` viene activado, así que para ver disoluciones o nombramientos ponlo en `false`, como en el ejemplo 2 (los tres ejemplos están en la sección en inglés y usan los mismos campos).

#### Salida

Un registro por empresa con los campos de la sección inglesa. Lo que la entrada del BORME no contiene sale como `null`.

#### Precios (pago por evento)

Company act returned (`company-act`): $0.003 ($3.00 por cada 1.000). Se cobra un evento por cada registro de empresa guardado en el dataset. Si fijas un gasto máximo por ejecución, el Actor se detiene al alcanzarlo (lo comprueba tras cada registro).

#### Preguntas frecuentes

**¿De dónde salen los datos?** De la API de datos abiertos del BOE para el BORME y del XML de cada sección provincial que enlaza. El Actor no usa ninguna otra fuente.

**¿Puedo seguir solo a mi provincia?** Sí: pon su nombre en `provincias`, por ejemplo `MADRID` o `SEVILLA`.

**¿Detecta disoluciones?** Sí: pon `soloConstituciones` en `false` y `tiposActo` con `Disolución` o `Extinción`.

**¿Incluye teléfonos o correos?** No. Solo devuelve lo que dice la entrada; no extrae datos de contacto.

**¿Por qué no obtengo resultados?** Los filtros se aplican juntos. Con `soloConstituciones: true`, una edición sin constituciones en tus provincias no devuelve nada; prueba otra fecha o amplía `provincias`.

# Actor input Schema

## `fecha` (type: `string`):

One edition per run. Written as YYYY-MM-DD or YYYYMMDD. The BORME is published Monday to Friday; if there is no edition for the date, the run fails. Leave empty to use the latest edition (the Actor looks back up to 10 days from today).

## `soloConstituciones` (type: `boolean`):

Keep only companies that were just incorporated. Best option for B2B lead generation.

## `tiposActo` (type: `array`):

Keep companies with at least one of these acts, ignoring accents and capitals: Constitución, Nombramientos, Reelecciones, Ceses/Dimisiones, Revocaciones, Ampliación de capital, Reducción de capital, Disolución, Extinción, Fusión por absorción, Escisión, Transformación de sociedad, Cambio de objeto social, Cambio de domicilio social, Cambio de denominación social, Declaración de unipersonalidad, Apertura de sucursal, Situación concursal. Turn off "Only new companies" to see acts other than Constitución.

## `provincias` (type: `array`):

Registry provinces to read, e.g. MADRID, BARCELONA, SEVILLA. Each value is matched, ignoring accents and capitals, as text inside the province heading of the edition. Empty means all of Spain.

## `buscar` (type: `string`):

Keep companies whose name, corporate purpose or address contains this text, ignoring accents and capitals, e.g. "software" or "inmobiliaria". Leave empty for no text filter.

## `maxItems` (type: `integer`):

Maximum number of companies returned, 1 to 20000. Each company returned is one billed event, so this also bounds the cost of a run.

## Actor input object example

```json
{
  "fecha": "",
  "soloConstituciones": true,
  "tiposActo": [],
  "provincias": [],
  "buscar": "",
  "maxItems": 25
}
```

# Actor output Schema

## `resultados` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "fecha": "",
    "soloConstituciones": true,
    "tiposActo": [],
    "provincias": [],
    "buscar": "",
    "maxItems": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("flets_sv/borme-empresas-espana").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "fecha": "",
    "soloConstituciones": True,
    "tiposActo": [],
    "provincias": [],
    "buscar": "",
    "maxItems": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("flets_sv/borme-empresas-espana").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "fecha": "",
  "soloConstituciones": true,
  "tiposActo": [],
  "provincias": [],
  "buscar": "",
  "maxItems": 25
}' |
apify call flets_sv/borme-empresas-espana --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,flets_sv/borme-empresas-espana"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ngcobULBXwFSK2qL3/builds/M7yCRiXxacPTCSk5Q/openapi.json
