# Spanish Company Registry BORME Scraper — No Login (`studio-amba/registro-mercantil-scraper`) Actor

Scrape Spanish company registry data from BORME (Boletin Oficial del Registro Mercantil). Extract incorporations, director appointments, capital changes. Search by company name, CIF/NIF, or province.

- **URL**: https://apify.com/studio-amba/registro-mercantil-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN 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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Spanish Company Registry Scraper — BORME Data

Extract structured company data from Spain's official **BORME** (Boletín Oficial del Registro Mercantil), the daily publication of the Spanish commercial registry. No login required, no cookies, no fees — uses only free official open data from BOE.es.

### How to scrape Registro Mercantil data

The Registro Mercantil is Spain's official commercial registry. Every corporate act — new company incorporations, officer appointments, capital changes, dissolutions, mergers — must be published in the BORME through the BOE (Boletín Oficial del Estado).

This actor accesses the free BORME open data API to fetch daily summaries, downloads the official province-level PDFs, and extracts structured company data from them.

#### Quick start

1. Set the **Publication Date** to the date you want (or leave empty for the most recent)
2. Optionally set a **Province** filter (e.g., "Madrid", "Barcelona")
3. Optionally search by **Company Name** or **CIF/NIF**
4. Click **Start** and wait for results

#### What you get

Each result contains:

| Field | Description |
|-------|-------------|
| `companyName` | Official company name as registered |
| `cifNif` | Tax identification number (CIF/NIF) when available |
| `province` | Province where the act was registered |
| `actType` | Type of corporate act (see list below) |
| `actDetails` | Full text of the registered act |
| `legalForm` | Legal form (SL, SA, SLL, etc.) |
| `registeredOffice` | Registered office address |
| `capital` | Share capital when mentioned |
| `administrators` | Names of administrators/directors |
| `companyPurpose` | Company purpose/object |
| `bormeId` | Official BORME identifier |
| `publicationDate` | Date of publication |
| `sourceUrl` | Direct link to the source PDF |

#### Corporate act types

The actor classifies entries into these act types:

- **constituciones** — New company incorporations
- **nombramientos** — Appointments of directors, administrators, representatives
- **ceses** — Terminations and resignations
- **ampliaciones_capital** — Capital increases
- **reducciones_capital** — Capital reductions
- **cambios_domicilio** — Address changes
- **disoluciones** — Dissolutions and liquidations
- **fusiones** — Mergers, acquisitions, and spin-offs
- **otros** — Other registered acts

### Input parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `date` | string | No | Publication date (YYYY-MM-DD). Defaults to most recent weekday. |
| `province` | string | No | Filter by province. E.g., "Madrid", "Barcelona", "Valencia". |
| `searchQuery` | string | No | Filter by company name or keywords. |
| `cifNif` | string | No | Search by CIF/NIF tax ID. E.g., "A28015865". |
| `actType` | string | No | Filter by act type (see list above). |
| `daysBack` | integer | No | Number of business days to process. Default: 1, max: 30. |
| `maxResults` | integer | No | Maximum records to return. Default: 100. |
| `proxyConfiguration` | object | No | Proxy settings. Defaults to Spanish residential proxies. |

### Output example

```json
{
    "companyName": "NUEVA TECNOLOGIA APLICADA SL",
    "cifNif": "B12345678",
    "province": "MADRID",
    "actType": "constituciones",
    "actDetails": "Constitución. Comienzo de operaciones: 15.04.2026. Objeto social: Desarrollo de software. Capital: 3.000,00 Euros.",
    "legalForm": "SL",
    "registeredOffice": "Calle Gran Via 28, 28013 Madrid",
    "capital": "3.000,00 Euros",
    "administrators": ["Juan Garcia Lopez"],
    "companyPurpose": "Desarrollo de software y consultoría tecnológica",
    "bormeId": "BORME-A-2026-89-28",
    "publicationDate": "2026-05-12",
    "sourceUrl": "https://www.boe.es/borme/dias/2026/05/12/pdfs/BORME-A-2026-89-28.pdf",
    "scrapedAt": "2026-05-12T10:30:00.000Z"
}
````

### Data source

This actor uses the **official BORME open data API** provided by the BOE (Agencia Estatal Boletín Oficial del Estado) at `boe.es/datosabiertos/`. This is:

- **Free** — No registration, no API key, no per-query fees
- **Official** — Government-published data from the Registro Mercantil
- **Daily** — Updated every business day with 500+ corporate acts
- **Comprehensive** — Covers all 50 Spanish provinces plus Ceuta and Melilla

The data includes all acts that Spanish companies are legally required to publish in the commercial registry: incorporations, officer changes, capital modifications, dissolutions, and more.

### Use cases

- **Lead generation** — Find newly incorporated companies by province and date
- **KYC/KYB compliance** — Verify company registrations and officer appointments
- **Competitive intelligence** — Track capital changes, mergers, and dissolutions
- **Market research** — Analyze incorporation trends by region and industry
- **Legal monitoring** — Track corporate governance changes for specific companies

### Cost and performance

- **Data source cost**: Free (official open data, no API fees)
- **Speed**: Processes 1 province in 2-5 seconds, all 50 provinces in 2-5 minutes
- **Volume**: A single day typically contains 500-1,500 corporate acts across all provinces
- **Proxy**: Spanish residential proxies recommended for reliable PDF downloads

#### Estimated costs per run

| Scenario | Time | Apify cost |
|----------|------|------------|
| 1 province, 1 day | ~10 sec | ~$0.01 |
| All provinces, 1 day | ~3 min | ~$0.05 |
| 1 province, 30 days | ~5 min | ~$0.08 |
| All provinces, 7 days | ~20 min | ~$0.30 |

### Available provinces

All 50 Spanish provinces are supported:

Madrid, Barcelona, Valencia, Sevilla, Alicante, Malaga, Murcia, Cadiz, Vizcaya (Bizkaia), A Coruna, Asturias, Las Palmas, Santa Cruz de Tenerife, Granada, Pontevedra, Zaragoza, Tarragona, Girona, Cordoba, Guipuzcoa (Gipuzkoa), Alava (Araba), Badajoz, Jaen, Toledo, Almeria, Castellon, Huelva, Cantabria, Valladolid, Ciudad Real, Navarra, Caceres, Leon, Illes Balears, Albacete, Salamanca, Burgos, Lleida, La Rioja, Lugo, Ourense, Guadalajara, Huesca, Cuenca, Palencia, Zamora, Segovia, Avila, Soria, Teruel, Ceuta, Melilla.

### Tips

- **Weekend dates** will return no data — BORME only publishes on business days (Monday to Friday)
- **Use `daysBack`** to scan multiple days at once instead of running the actor repeatedly
- **Filter by province** to speed up runs when you only need data from specific regions
- **CIF/NIF search** requires the exact format (letter + 7 digits + check character): e.g., B12345678
- Results are deduplicated by company name and act type within each province and date

### Integrations

This actor works with the standard Apify ecosystem:

- Use the [Apify API](https://docs.apify.com/api/v2) to run the actor programmatically
- Connect to Google Sheets, Slack, or email via [Apify integrations](https://apify.com/integrations)
- Schedule daily runs to monitor new company registrations
- Export data as JSON, CSV, XML, or Excel

# Actor input Schema

## `date` (type: `string`):

BORME publication date in YYYY-MM-DD format. Leave empty for the most recent available date. Example: '2026-05-12'.

## `province` (type: `string`):

Filter by Spanish province. Example: 'Madrid', 'Barcelona', 'Valencia', 'Sevilla'. Leave empty for all provinces.

## `searchQuery` (type: `string`):

Search for a specific company by name or keywords. Filters results from the BORME publication. Example: 'Telefonica', 'Iberdrola', 'Banco Santander'.

## `cifNif` (type: `string`):

Search for a specific company by its CIF or NIF tax identification number. Example: 'A28015865', 'B12345678'.

## `actType` (type: `string`):

Filter by type of corporate act. Leave empty for all types.

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

Number of days to look back from the specified date (or today). Set to 1 for a single day, or up to 30 for a month of data.

## `maxResults` (type: `integer`):

Maximum number of company records to return.

## `proxyConfiguration` (type: `object`):

Select proxies to use for the scraper.

## Actor input object example

```json
{
  "province": "Madrid",
  "actType": "",
  "daysBack": 1,
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# 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 = {
    "date": "",
    "province": "Madrid",
    "daysBack": 1,
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/registro-mercantil-scraper").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 = {
    "date": "",
    "province": "Madrid",
    "daysBack": 1,
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/registro-mercantil-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "date": "",
  "province": "Madrid",
  "daysBack": 1,
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call studio-amba/registro-mercantil-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=studio-amba/registro-mercantil-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Spanish Company Registry BORME Scraper — No Login",
        "description": "Scrape Spanish company registry data from BORME (Boletin Oficial del Registro Mercantil). Extract incorporations, director appointments, capital changes. Search by company name, CIF/NIF, or province.",
        "version": "0.0",
        "x-build-id": "QtfvrUIAyBjpWgzZI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/studio-amba~registro-mercantil-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-studio-amba-registro-mercantil-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/studio-amba~registro-mercantil-scraper/runs": {
            "post": {
                "operationId": "runs-sync-studio-amba-registro-mercantil-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/studio-amba~registro-mercantil-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-studio-amba-registro-mercantil-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "date": {
                        "title": "Publication Date",
                        "type": "string",
                        "description": "BORME publication date in YYYY-MM-DD format. Leave empty for the most recent available date. Example: '2026-05-12'."
                    },
                    "province": {
                        "title": "Province",
                        "type": "string",
                        "description": "Filter by Spanish province. Example: 'Madrid', 'Barcelona', 'Valencia', 'Sevilla'. Leave empty for all provinces."
                    },
                    "searchQuery": {
                        "title": "Company Name / Keywords",
                        "type": "string",
                        "description": "Search for a specific company by name or keywords. Filters results from the BORME publication. Example: 'Telefonica', 'Iberdrola', 'Banco Santander'."
                    },
                    "cifNif": {
                        "title": "CIF / NIF Number",
                        "type": "string",
                        "description": "Search for a specific company by its CIF or NIF tax identification number. Example: 'A28015865', 'B12345678'."
                    },
                    "actType": {
                        "title": "Act Type Filter",
                        "enum": [
                            "",
                            "constituciones",
                            "nombramientos",
                            "ceses",
                            "ampliaciones_capital",
                            "reducciones_capital",
                            "cambios_domicilio",
                            "disoluciones",
                            "fusiones",
                            "otros"
                        ],
                        "type": "string",
                        "description": "Filter by type of corporate act. Leave empty for all types.",
                        "default": ""
                    },
                    "daysBack": {
                        "title": "Days Back",
                        "minimum": 1,
                        "maximum": 30,
                        "type": "integer",
                        "description": "Number of days to look back from the specified date (or today). Set to 1 for a single day, or up to 30 for a month of data.",
                        "default": 1
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of company records to return.",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Select proxies to use for the scraper.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "ES"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
