# Spain New Companies (BORME) - B2B Leads, GDPR-safe (`hydramill/new-companies`) Actor

Companies newly registered in Spain, from the official BORME (Registro Mercantil gazette): name, province, municipality, address, business purpose, share capital and registry data. Filter by province, keywords in the business purpose and minimum capital. Company data only: no personal names.

- **URL**: https://apify.com/hydramill/new-companies.md
- **Developed by:** [Hydramill](https://apify.com/hydramill) (community)
- **Categories:** Lead generation, Business
- **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 New Companies (BORME) - B2B Leads, GDPR-safe

Every **company newly registered in Spain**, straight from the official **BORME** (*Boletín Oficial del Registro Mercantil*, the Companies Registry gazette), as clean JSON: company name, province, municipality, registered address, business purpose (*objeto social*), share capital, start of operations, registry data and the link to the official text. Filter by **province**, **keywords in the business purpose** and **minimum capital**.

**Company data only.** Administrators, sole partners, proxies and every other natural person named in the BORME are removed before anything is read, and every row passes a second personal-data check before it is stored.

It reads the BOE open data API directly (structured XML, no PDF parsing, no scraping, no login, no proxy). One week of one province takes about a second; all of Spain about 20 seconds.

### What you can use it for

- **B2B prospecting.** New companies are buying everything at once: accounting and legal advice, insurance, banking, software, telecoms, office space, websites, branding, payroll. Reach them in their first weeks. Example: new companies in Barcelona whose purpose mentions *hostelería* or *restaurante* → suppliers of HORECA equipment.
- **Market research.** How many companies were set up this month per province, sector (keywords or CNAE codes such as `5610` when the company published them) and capital band; spot growing sectors early.
- **Local business monitoring.** Chambers of commerce, town councils, coworkings, local media and business associations: a weekly list of the companies that just registered in their province or municipality.
- **CRM enrichment and alerts.** Schedule a daily run with `dateFrom: "1 day"` and send new rows to Google Sheets, HubSpot, Slack or a webhook (Apify integrations, Make, Zapier).

### Why this actor

Many BORME actors exist on the Apify Store (about 20 checked on 2026-11-01). Most return every corporate act (appointments, dissolutions...) and **include directors' and partners' names**, which turns a lead list into a personal-data processing job for you. This one is built for lead generation that you can actually use under the GDPR:

- **Only new companies, only company data.** Two independent safeguards remove personal names (source scrubber + final output check, both covered by tests over real BORME days with hundreds of names). A row that still looks suspicious is dropped, never returned.
- **Filters that matter for prospecting**: provinces by name or INE code (`Barcelona`, `Gerona`/`Girona`, `Vizcaya`/`Bizkaia`, `08`), keywords in the business purpose with *any*/*all* matching (accent- and case-insensitive, word fragments: `inmobiliari` finds *inmobiliaria* and *inmobiliario*), minimum share capital. Each row says which keywords matched.
- **Fast and cheap for one region**: only the province documents you ask for are downloaded (Barcelona = 2 requests a day instead of ~30).
- **Built for schedules**: relative dates (`"6 days"`, `"1 day"`), weekends and holidays handled as empty days, newest BORME first, run summary in the key-value store (`SUMMARY`).
- **Pay only for matches**, and the run stops at your *maximum cost per run*.
- Documentation in English, Spanish and Catalan.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `dateFrom` | date or period | `dateTo` - 6 days | First BORME date (`YYYY-MM-DD`) or a period counted back from `dateTo`: `"6 days"`, `"2 weeks"`, `"1 month"`. |
| `dateTo` | date | today (Madrid) | Last BORME date. A future date becomes today. At most **31 days** per run. |
| `provinces` | list | all of Spain | INE codes in the Console (`08`); API callers can also send names, accents and case ignored (`"barcelona"`, `"Gerona"`, `"La Coruña"`). |
| `keywords` | list of text | none | Words or fragments searched in the business purpose. Write them in Spanish, as the BORME does. |
| `keywordMode` | `any` / `all` | `any` | `any`: at least one keyword; `all`: every keyword. |
| `minCapital` | integer (EUR) | `0` | Minimum share capital. Most new S.L. have 1-3,000 EUR; 60,000 EUR is the legal minimum of an S.A. Companies without a published capital are left out when above 0. |
| `maxResults` | integer | `1000` | Stop after this many companies, newest BORME first. `0` = no limit. |

#### Example: software companies in Catalonia, last week

```json
{
  "dateFrom": "6 days",
  "provinces": ["Barcelona", "Girona", "Lleida", "Tarragona"],
  "keywords": ["software", "informática", "aplicaciones"],
  "keywordMode": "any"
}
```

#### Example: well-capitalised real-estate companies in Madrid in October

```json
{
  "dateFrom": "2026-10-01",
  "dateTo": "2026-10-31",
  "provinces": ["28"],
  "keywords": ["inmobiliari"],
  "minCapital": 60000
}
```

### Output

One dataset item per new company, newest BORME first, in the order the BORME publishes them. Real item from a run on 2026-11-01:

```json
{
  "name": "INDUSCOR PARTNERS S.L.",
  "province": "Barcelona",
  "provinceCode": "08",
  "municipality": "BARCELONA",
  "address": "CL HORTAL NUM.13 P.2 PTA.7 (BARCELONA)",
  "purpose": "ACTIVIDAD PRINCIPAL: 7020 / OTRAS ACTIVIDADES DE CONSULTORIA DE GESTION EMPRESARIAL",
  "capitalEur": 1000,
  "startDate": "2026-10-22",
  "bormeDate": "2026-10-30",
  "act": "486487",
  "registry": "S 8 , H B 665563, I/A 1 (23.10.26)",
  "registeredOn": "2026-10-23",
  "bormeId": "BORME-A-2026-210-08",
  "url": "https://www.boe.es/diario_borme/txt.php?id=BORME-A-2026-210-08",
  "matchedKeywords": [],
  "retrievedAt": "2026-11-01T04:09:38.245Z",
  "source": "Basado en datos de la Agencia Estatal Boletín Oficial del Estado (https://www.boe.es)"
}
```

| Field | Description |
|---|---|
| `name` | Registered company name, as published. |
| `province`, `provinceCode` | Province of the Registro Mercantil that published the act, and its INE code. |
| `municipality`, `address` | Registered office (*domicilio*) as published; the municipality is its trailing parenthesis. |
| `purpose` | *Objeto social* as published (the BORME truncates long purposes to about 300 characters). |
| `capitalEur` | Share capital in euros; `0` for an AIE; `null` when not published (pension funds). |
| `startDate` | *Comienzo de operaciones*, or `null`. |
| `bormeDate`, `act`, `bormeId`, `url` | BORME issue date, act number, province document id and its official text on boe.es. `bormeDate` + `act` is unique: use it to de-duplicate scheduled runs. |
| `registry`, `registeredOn` | *Datos registrales* (sheet, entry) as published and the entry date. |
| `matchedKeywords` | Your keywords found in the purpose (empty without a keyword filter). |
| `retrievedAt`, `source` | When the actor read the BORME (UTC) and the mandatory attribution. |

The default key-value store also gets a `SUMMARY` record: dates read, dates without BORME, documents read, companies scanned, matches, rows dropped by the personal-data check (expected 0), results and why the run stopped. The Console shows two table views ("Companies" and "Address and registry"). Export as JSON, CSV, Excel or XML.

**No phone numbers or e-mails**: the BORME does not publish them. Use the name and address to find the company's own channels.

### Pricing

Pay per result: you are charged once per company returned (event `company-result`) plus Apify's small start fee. Days without BORME and filtered-out companies cost nothing. `maxResults` and *Maximum cost per run* cap the bill.

### Personal data (GDPR) and your responsibilities

- **What this actor returns:** data of **legal persons** (companies) as published in the official registry gazette. It **removes every natural person's name** the BORME publishes in constitution acts (administrators, sole partners, proxies, representatives, auditors). Caveat: a company's own registered name sometimes contains a founder's name (common in Spain); that is the legal person's public name and is returned as is.
- **You are responsible for how you use the data.** Before contacting a company, check that you have a legal basis under the GDPR (Regulation (EU) 2016/679), Spain's LOPDGDD and the LSSI. In particular, **Article 21 of the LSSI (Ley 34/2002) forbids unsolicited commercial e-mail or equivalent electronic communications without prior consent** (there is an exception only for existing customers). Phone marketing is subject to the Robinson list and the rules of the Ley General de Telecomunicaciones. A sole-shareholder company often equals one identifiable person in practice: treat its contact details with the same care.
- The BOE reuse conditions require reusers to respect data protection law; this actor helps by not distributing personal data, but it does not make any processing of yours lawful.

### Data source and attribution

**Basado en datos de la Agencia Estatal Boletín Oficial del Estado** (<https://www.boe.es>).

- Source: BOE open data API, BORME daily summary (`https://www.boe.es/datosabiertos/api/borme/sumario/YYYYMMDD`, documented at <https://www.boe.es/datosabiertos/documentos/APIsumarioBORME.pdf>) and the section A XML document of each province (`https://www.boe.es/diario_borme/xml.php?id=BORME-A-...`).
- Licence: BOE reuse conditions (Resolución de 27 de junio de 2024), commercial reuse allowed: <https://www.boe.es/informacion/aviso_legal/index.php#reutilizacion>. Cite the source with the sentence above and a link to https://www.boe.es, do not alter the meaning of the data, show when it was retrieved (`retrievedAt`) and respect data protection law.

**This is an independent tool. It is not affiliated with, endorsed by or sponsored by the Agencia Estatal Boletín Oficial del Estado or the Registro Mercantil.** The output is a convenience extract; the only authentic text is the one published on boe.es (follow `url`).

### Limitations

- Only **constitutions** (new companies) of BORME section A. Changes of existing companies (appointments, capital increases, dissolutions) are not returned.
- The BORME publishes acts a few days after their registration (`registeredOn`) and comes out Monday to Friday mornings; weekends, national holidays and today before publication return nothing.
- Fields are as published: addresses and purposes are free text written by each registry, often in capitals; the purpose is truncated to about 300 characters.
- Maximum 31 days per run; split longer periods into several runs.

### En español

**Empresas de nueva creación en España** a partir del **BORME** oficial (sección A, actos de constitución): denominación, provincia, municipio, domicilio, objeto social, capital, inicio de operaciones, datos registrales y enlace al texto oficial. Filtra por **provincia** (nombre o código INE), **palabras clave en el objeto social** (alguna o todas, sin distinguir acentos ni mayúsculas) y **capital mínimo**. Para prospección B2B, estudios de mercado y seguimiento del tejido empresarial local. **Solo datos de empresas**: se eliminan los nombres de administradores, socios y apoderados, con una comprobación final antes de guardar cada fila. Tú eres responsable del uso lícito de los datos (RGPD, LOPDGDD; la LSSI, art. 21, prohíbe el correo comercial no solicitado sin consentimiento previo). Se cobra por empresa devuelta. Basado en datos de la Agencia Estatal Boletín Oficial del Estado (https://www.boe.es). Herramienta independiente, sin relación con la AEBOE ni con el Registro Mercantil.

### En català

**Empreses de nova creació a Espanya** a partir del **BORME** oficial (secció A, actes de constitució): denominació, província, municipi, domicili, objecte social, capital, inici d'operacions, dades registrals i enllaç al text oficial. Filtra per **província** (nom o codi INE), **paraules clau a l'objecte social** (alguna o totes, sense distingir accents ni majúscules) i **capital mínim**. Per a prospecció B2B, estudis de mercat i seguiment del teixit empresarial local. **Només dades d'empreses**: s'eliminen els noms d'administradors, socis i apoderats, amb una comprovació final abans de desar cada fila. Ets responsable de l'ús lícit de les dades (RGPD, LOPDGDD; la LSSI, art. 21, prohibeix el correu comercial no sol·licitat sense consentiment previ). Es cobra per empresa retornada. Basat en dades de l'Agència Estatal Butlletí Oficial de l'Estat; la frase d'atribució obligatòria és «Basado en datos de la Agencia Estatal Boletín Oficial del Estado» (https://www.boe.es). Eina independent, sense relació amb l'AEBOE ni amb el Registre Mercantil.

# Actor input Schema

## `dateFrom` (type: `string`):

First BORME date (YYYY-MM-DD), or a period counted back from 'To date' such as "6 days" (handy for scheduled runs). Empty = 'To date' minus 6 days (one week).

## `dateTo` (type: `string`):

Last BORME date (YYYY-MM-DD). Empty = today (Madrid time). A future date is replaced by today.

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

Keep companies registered in any of these provinces (the province of the Registro Mercantil that published the act). Empty = all of Spain. API callers may also send names ("Barcelona", "Gerona", "Vizcaya", accents and case ignored) or INE codes ("8", "08").

## `keywords` (type: `array`):

Words or word fragments searched in the 'objeto social' (business purpose), accent- and case-insensitive substring match ("hosteleria" finds "Hostelería", "inmobiliari" finds inmobiliaria/inmobiliario). Write them in Spanish, as the BORME does; CNAE codes such as "5610" also work when the company published them. Empty = no keyword filter.

## `keywordMode` (type: `string`):

'Any' keeps a company when at least one keyword appears; 'All' only when every keyword appears.

## `minCapital` (type: `integer`):

Keep only companies with at least this share capital in euros (most new S.L. have 1-3,000 EUR; 60,000 EUR is the legal minimum of an S.A.). Companies that publish no capital (pension funds) are left out when this is above 0. 0 = no filter.

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

Stop after this many companies (each one is a billable result), newest BORME first. 0 = no limit.

## Actor input object example

```json
{
  "dateFrom": "6 days",
  "provinces": [
    "08",
    "17"
  ],
  "keywords": [
    "software",
    "informática"
  ],
  "keywordMode": "any",
  "minCapital": 3000,
  "maxResults": 200
}
```

# Actor output Schema

## `results` (type: `string`):

One item per company registration from BORME (company data only).

## `summary` (type: `string`):

Totals of the run (key SUMMARY in the default key-value store).

# 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 = {
    "dateFrom": "6 days",
    "provinces": [
        "08"
    ],
    "maxResults": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydramill/new-companies").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 = {
    "dateFrom": "6 days",
    "provinces": ["08"],
    "maxResults": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("hydramill/new-companies").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 '{
  "dateFrom": "6 days",
  "provinces": [
    "08"
  ],
  "maxResults": 200
}' |
apify call hydramill/new-companies --silent --output-dataset

```

## MCP server setup

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

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/j3wQfWvgWC2mOYRyo/builds/ShWbHmA9f3xX1K5Ft/openapi.json
