# Spain Company Register (BORME): Search and Change Monitor (`ricardonldev/spain-companies-borme`) Actor

Search and monitor acts published in the Spanish Commercial Register gazette (BORME): incorporations, appointments, capital changes, dissolutions and insolvency. Structured records with official source links. Names of individuals are excluded.

- **URL**: https://apify.com/ricardonldev/spain-companies-borme.md
- **Developed by:** [Ricardo Narvaez Lorenzo](https://apify.com/ricardonldev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Spain Company Register (BORME): Search and Change Monitor

### Overview

This Actor retrieves and structures the acts published in the *Boletín Oficial del Registro Mercantil* (BORME), the official gazette of the Spanish Commercial Register. It reads Section A (registered acts) from the open data service of the Agencia Estatal Boletín Oficial del Estado (BOE) and returns one structured record per published act.

Each record refers to a company and includes the type of act, the company data published with it, the registry details and a link to the official PDF.

### Use cases

- **Counterparty monitoring.** Track a list of customers, suppliers or debtors and receive only the acts published since the previous run. Typical events are insolvency proceedings, dissolution, extinction, changes of registered office and capital changes.
- **Company due diligence.** Retrieve every act published for a company over a given period before entering into a contract.
- **Market research.** Obtain the companies incorporated in a period, optionally filtered by province, together with their registered office, share capital and corporate purpose.

### Modes

| Mode | Description |
|---|---|
| `search` | Returns every act published in the selected period for the given company names or registry sheets. |
| `monitor` | Returns only the acts not delivered in previous runs. Intended for scheduled runs. |
| `newCompanies` | Returns every incorporation (*Constitución*) published in the selected period. |

### Input

| Field | Type | Description |
|---|---|---|
| `mode` | string | `search`, `monitor` or `newCompanies`. Required. |
| `companies` | array of strings | Full or partial company names. Matching ignores case, accents and legal form suffixes such as "S.L." or "S.A." |
| `registrySheets` | array of strings | Registry sheet as published in BORME, for example `M 123456`. This is the most precise identifier available. |
| `provinces` | array of strings | Restricts results to the given provinces. Leave empty for the whole of Spain. |
| `daysBack` | integer | Number of calendar days to process, from 1 to 90. BORME is published Monday to Friday. Default: 7. |
| `toDate` | string | Last day of the period, in `YYYY-MM-DD` format. Default: the current date. |

Example input:

```json
{
  "mode": "monitor",
  "companies": ["Example Trading", "Sample Logistics"],
  "provinces": ["Madrid"],
  "daysBack": 7
}
```

### Output

Each dataset item corresponds to one act published in BORME.

```json
{
  "company": "EXAMPLE TRADING SL",
  "date": "2026-11-12",
  "province": "MADRID",
  "acts": ["Constitución", "Nombramientos", "Declaración de unipersonalidad"],
  "positions": [{ "act": "Nombramientos", "role": "Adm. Unico", "count": 1 }],
  "corporatePurpose": "Consultancy and business management services.",
  "address": "C/ EXAMPLE 1 (MADRID)",
  "capital": "3.000,00 Euros",
  "startOfOperations": "6.10.26",
  "newName": null,
  "soleShareholder": true,
  "registry": { "section": "8", "sheet": "M 123456", "entry": "1", "entryDate": "4.11.26" },
  "bormeId": "BORME-A-2026-217-28",
  "actNumber": "505104",
  "officialPdf": "https://www.boe.es/borme/dias/2026/11/12/pdfs/BORME-A-2026-217-28.pdf",
  "source": "Based on data from the Agencia Estatal Boletín Oficial del Estado (BOE). Not an official copy."
}
```

| Field | Description |
|---|---|
| `company` | Company name as published. |
| `date` | Publication date of the BORME issue. |
| `province` | Commercial Register province. |
| `acts` | Types of act, using the official Spanish terminology. |
| `positions` | Appointments, removals and re-elections: role and number of holders. Names are not included. |
| `corporatePurpose`, `address`, `capital`, `startOfOperations` | Published with incorporations and with the corresponding changes. |
| `newName` | New company name, when the act is a change of name. |
| `registry` | Registry section, sheet, entry number and entry date. |
| `officialPdf` | Link to the official BORME PDF for the province and date. |

### Data source and terms of reuse

The data comes from the BOE open data service and from the official text of each BORME issue. It is reused under the terms published by the Agencia Estatal Boletín Oficial del Estado, which require citing the source and indicating the publication date. Each record includes both.

This Actor is not an official source and is neither affiliated with nor endorsed by the BOE. For legal purposes, refer to the official PDF linked in each record.

### Data protection

BORME entries contain the names of individuals such as directors, sole shareholders and attorneys. To comply with the GDPR, this Actor does not store or return the names of natural persons. For each appointment or removal it returns only the role and the number of holders. Free text that may contain personal data is discarded.

### Limitations

- BORME does not publish tax identification numbers (NIF/CIF). Companies can be identified by name or by registry sheet.
- Name matching is based on partial text. Searching by registry sheet avoids matches with similarly named companies.
- The period is limited to 90 days per run. Days already processed are cached, so scheduled and repeated runs are fast.
- Section B (other acts) and Section C (legal notices) are not covered in this version.

### Support

For questions, issues or feature requests, use the Issues tab of this Actor. Reports are usually answered within one business day.

# Actor input Schema

## `mode` (type: `string`):

search: every act of the given companies in the period. monitor: only acts not returned in previous runs. newCompanies: every incorporation in the period.

## `companies` (type: `array`):

Full or partial names, for example 'TELEFONICA'. Case, accents and legal form suffixes are ignored. Required for search and monitor unless registry sheets are given.

## `registrySheets` (type: `array`):

Registry sheet as published in BORME, for example 'M 123456'. More precise than names.

## `provinces` (type: `array`):

Restricts results to these provinces, for example 'MADRID'. Leave empty for the whole of Spain.

## `daysBack` (type: `integer`):

Number of calendar days to process, counting back from the current date or from 'Up to date'. BORME is published Monday to Friday.

## `toDate` (type: `string`):

Last day of the period, in YYYY-MM-DD format. Default: the current date.

## Actor input object example

```json
{
  "mode": "newCompanies",
  "companies": [],
  "registrySheets": [],
  "provinces": [],
  "daysBack": 7
}
```

# Actor output Schema

## `acts` (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 = {
    "mode": "newCompanies",
    "daysBack": 7
};

// Run the Actor and wait for it to finish
const run = await client.actor("ricardonldev/spain-companies-borme").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 = {
    "mode": "newCompanies",
    "daysBack": 7,
}

# Run the Actor and wait for it to finish
run = client.actor("ricardonldev/spain-companies-borme").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 '{
  "mode": "newCompanies",
  "daysBack": 7
}' |
apify call ricardonldev/spain-companies-borme --silent --output-dataset

```

## MCP server setup

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

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/TXgdDlSVMmcQF5KqR/builds/ArSc5jgs9jtpX8YtZ/openapi.json
