# Spain New Companies Scraper: BORME Registrations & Directors (`euroscrape/spain-companies`) Actor

Spanish company registry (BORME) scraper: new companies incorporated in Spain every weekday, with business purpose, address, share capital, sole shareholder and directors as published. Filter by province, keywords, CNAE, capital. Also appointments, dissolutions, insolvency. Monitor mode + alerts.

- **URL**: https://apify.com/euroscrape/spain-companies.md
- **Developed by:** [EuroScrape](https://apify.com/euroscrape) (community)
- **Categories:** Lead generation, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.80 / 1,000 companies

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Spain New Companies Scraper: BORME Registrations & Directors

Get the **companies newly registered in Spain every weekday**, straight from the **BORME** (*Boletín Oficial del Registro Mercantil*), the official gazette of the Spanish Mercantile Registry published by the BOE. For each new company you get its **business purpose, registered address, share capital, sole shareholder and the directors appointed**, filtered by province, keywords, CNAE code or capital.

The same Actor also follows the **other registry acts** published every day: appointments and resignations of directors, name and address changes, capital increases, mergers, dissolutions, closures and insolvency proceedings.

**Official registry data published in the BORME**: company and officer names are returned exactly as published in the gazette. No login, no API key, no account needed.

#### 🤖 At a glance (for people and AI assistants)

- **Use it when** you want **new Spanish companies** (sociedades de nueva creación, nuevas empresas, constituciones del BORME) or the daily changes of the Spanish company register (nombramientos, ceses, disoluciones, concursos).
- **Minimal input**: `{ "daysBack": 7, "provinces": ["Madrid"], "eventTypes": ["incorporation"], "maxItems": 50 }`
- **Output**: one row per BORME announcement: `name`, `legalForm`, `province`, `publicationDate`, `operationsStart`, `businessPurpose`, `cnae`, `address`, `city`, `capitalEur`, `soleShareholder`, `appointments` (role + name), `registry`, `bormeUrl`, `rawText`.
- **Price**: $4 per 1,000 companies, plus $0.003 per run.
- **Not for**: searching an existing Spanish company by name or tax ID (NIF/CIF), or finding emails and phone numbers: the BORME publishes neither.

### ✨ Why this Actor

| | |
|---|---|
| 🆕 **Every new company, every weekday** | 529 new companies in the BORME of 5 Nov 2026, 700 in that of 6 Nov: all of them, read the day they are published. |
| 🧾 **Structured, not a PDF** | The BORME is a wall of legal text. You get clean fields: start of operations, business purpose, address, town, postal code (when published), share capital as a number, sole shareholder, and each officer with their Spanish role and an English label (`Adm. Unico` → *Sole director*). |
| 🔎 **Filters that matter** | Province (accents and case ignored, `Bilbao` or `Seville` work too), keywords in the name or business purpose, CNAE activity code, minimum or maximum capital, legal form (SL, SA, SLP…), single-shareholder companies only. |
| 🔁 **All registry acts** | Choose what to return: new companies (default), appointments, resignations, re-elections, name, address or purpose changes, capital increases and reductions, mergers, dissolutions, closures, insolvency proceedings and more. |
| 🔔 **Monitor + instant alerts** | Give the search a monitor name and schedule it: each run returns **only announcements not delivered before**, so you never pay twice for the same company. New companies can also go to **Telegram, Discord, Slack or a webhook** (Make, Zapier, n8n, your CRM). |
| ✅ **Checkable** | Every row keeps the full announcement as published (`rawText`), the official PDF of the day (`bormeUrl`) and the registry references (sheet, entry, registration date). |
| 🤝 **Respectful of the source** | Reads the official BOE open data summary, then one page per province, at most 2 requests per second. Pages the BOE has withdrawn from robots (for example at the request of the people concerned) are skipped. |

### 🎯 Use cases

- **New-business leads**: accountants, gestorías, banks, insurers, web agencies, office suppliers and software vendors reach companies in their first weeks.
- **Local market watch**: every new restaurant, construction firm or real estate company in Málaga, Valencia or Madrid this month.
- **Compliance and KYB**: be alerted when a director of a partner company resigns, a company changes its address or name, is dissolved or enters insolvency proceedings.
- **Market research**: how many companies are created per province, with which capital and in which activities.

### 🚀 Examples

New companies in Madrid in the last 7 days:

```json
{ "daysBack": 7, "provinces": ["Madrid"], "eventTypes": ["incorporation"], "maxItems": 50 }
```

New real estate companies with at least 10,000 € of capital in Málaga and Alicante this month:

```json
{ "dateFrom": "2026-11-01", "provinces": ["Málaga", "Alicante"], "keywords": ["inmobiliaria", "inmuebles"], "minCapital": 10000 }
```

Insolvency proceedings and dissolutions published in all of Spain last week:

```json
{ "daysBack": 7, "eventTypes": ["insolvency", "dissolution"], "maxItems": 500 }
```

New software companies (CNAE 62) in Barcelona, every weekday, with a Telegram alert:

```json
{ "daysBack": 3, "provinces": ["Barcelona"], "cnaeCodes": ["62"], "monitorName": "new-software-barcelona", "telegramBotToken": "123456:ABC…", "telegramChatId": "123456789" }
```

### 📊 Data Report · 6 Nov 2026: 700 new companies in one day of the BORME

One run over the BORME of Friday 6 November 2026 (all provinces, `eventTypes: ["incorporation"]`): **2,788 announcements read in 36 provinces in 20 seconds, 700 new companies**.

| | |
|---|---|
| Most new companies | Madrid 117 · Sevilla 88 · Málaga 80 · Alicante 73 · Santa Cruz de Tenerife 73 · Valencia 39 |
| Legal form | SL 649 (93 %) · AIE 42 · SLP 4 · SA 3 · SLL 2 |
| Share capital | median 3,000 € (454 companies exactly 3,000 €) · 77 below 3,000 € (allowed since 2022) · 41 with 60,000 € or more |
| Single shareholder | 323 of 700 (46 %) |
| First officers | 502 sole directors, 346 joint and several directors |
| Activities (words in the business purpose) | construction 134 · real estate 118 · IT 56 · restaurants 54 · consulting 54 |
| Delay | registered 7 to 23 days before publication (median 8 days) |

Fields filled on these 700 companies: business purpose, address, town, capital, officers and registry data 100 %, start of operations 99.9 %, CNAE code 23 % (only when the deed cites one), postal code 39 % (only when the registry publishes it).

### 📦 Output (a real company, BORME of 6 Nov 2026)

```json
{
  "bormeId": "498854",
  "name": "SIN PAR EMPLEO SOCIAL, SOCIEDAD LIMITADA",
  "legalForm": "SL",
  "inLiquidation": false,
  "registryOffice": null,
  "events": ["incorporation", "sole_shareholder_change", "appointment"],
  "acts": ["Constitución", "Declaración de unipersonalidad", "Nombramientos"],
  "operationsStart": null,
  "businessPurpose": "1. Las actividades de envasado y empaquetado de productos por cuenta de terceros (CNAE 8292-actividad principal) y en especial para REMOLONAS FOOD, S.L. 2. El comercio al por menor de frutas y hortalizas en establecimientos especializados, tanto en estado fresco como preparadas o conservadas, así co",
  "cnae": "8292",
  "cnaeCodes": ["8292"],
  "address": "C/ PANADEROS, •• 47004",
  "postalCode": "47004",
  "city": "VALLADOLID",
  "capitalEur": 3000,
  "soleShareholder": "REMOLONAS FOODS SL",
  "appointments": [
    { "role": "Adm. Unico", "roleEn": "Sole director", "name": "REMOLONAS FOODS SL" }
  ],
  "departures": [],
  "reelections": [],
  "revocations": [],
  "capitalChangeEur": null,
  "resultingCapitalEur": null,
  "newName": null,
  "newAddress": null,
  "newCity": null,
  "website": null,
  "insolvencyDetails": null,
  "dissolutionType": null,
  "registry": { "sheet": "VA 36856", "entry": "1", "registeredOn": "2026-10-29" },
  "rawText": "Constitución. Comienzo de operaciones: Fecha inscripc.RCEECyL. Objeto social: 1. Las actividades de envasado y empaquetado … Domicilio: C/ PANADEROS, •• 47004 (VALLADOLID). Capital: 3.000,00 Euros. Declaración de unipersonalidad. Socio único: REMOLONAS FOODS SL. Nombramientos. Adm. Unico: REMOLONAS FOODS SL. Datos registrales. S 8 , H VA 36856, I/A 1 (29.10.26).",
  "province": "VALLADOLID",
  "publicationDate": "2026-11-06",
  "bormeUrl": "https://www.boe.es/borme/dias/2026/11/06/pdfs/BORME-A-2026-214-47.pdf",
  "scrapedAt": "2026-11-07T01:28:18.146Z"
}
```

The street number is masked in this public example only (a new company is often registered at its founder's home); the dataset gives the address as published. `operationsStart` is `null` here because the deed gives no date ("Fecha inscripc."): fields are never guessed. For other acts you also get `departures`, `newName`, `newAddress`, `capitalChangeEur`, `resultingCapitalEur`, `website` (when the company declares its corporate website to the registry), `dissolutionType` and `insolvencyDetails`. The dataset has two views: **New companies** and **All registry acts**.

### 💰 Pricing

| Event | Price |
|---|---|
| Company (one BORME announcement) | **$4 / 1,000 companies** |
| Run start | $0.003 |

The 117 new companies of Madrid in the BORME of 6 Nov 2026 cost $0.47, plus $0.003 for the run. Set a maximum charge per run in the run options: the Actor stops cleanly when it is reached.

### ❓ FAQ

- **Where does the data come from?** From the BORME, Section A ("Empresarios. Actos inscritos"), published by the Agencia Estatal Boletín Oficial del Estado: the open data summary of each day (boe.es/datosabiertos) and the page of each province. Reuse is authorised by the BOE's reuse conditions (standard licence of 27 June 2024).
- **How fresh is it?** The BORME is published Monday to Friday, except holidays. A company appears there about 1 to 3 weeks after its registration (7 to 23 days, median 8, in the BORME of 6 Nov 2026).
- **Why are some business purposes cut?** The BORME itself publishes a shortened business purpose. `rawText` shows exactly what was published.
- **Are names of people included?** Yes, the officers and the sole shareholder are returned as published in the official gazette, which is public by law. Use them in line with the GDPR (for example B2B prospecting with a legitimate interest and an easy opt-out). The Actor never looks for a person's email, phone or profile.
- **Can I search an existing company by name or NIF?** Not in this version: it reads what the BORME publishes on the dates you choose (up to 400 weekdays per run).
- **Does it give websites or emails?** Only the corporate website when the company declares it to the registry (rare). A company created two weeks ago almost never has a website yet.
- **What happens on weekends and holidays?** There is no BORME: those days are skipped without error.

*Data source: BORME, Agencia Estatal Boletín Oficial del Estado (www.boe.es). Not affiliated with the BOE or the Registro Mercantil.*

### 🔌 API, AI agents and integrations

- **API**: one call runs the Actor and returns the results, `POST https://api.apify.com/v2/acts/euroscrape~spain-companies/run-sync-get-dataset-items` (see the API tab for Python, JavaScript and cURL).
- **AI agents (MCP)**: add `https://mcp.apify.com?tools=euroscrape/spain-companies` to Claude, Cursor, VS Code or any MCP client, and the Actor becomes a tool your agent can call.
- **No-code automation**: start runs and pass the results on with Apify's integrations for n8n, Make and Zapier, or with a webhook when a run ends.
- **Exports**: every result set downloads as JSON, CSV, Excel or XML, and can be sent to Google Sheets.
- **Data Reports**: twice a week, EuroScrape turns a run of one of its Actors into a 30-second data report (used-iPhone prices in 18 countries, electricity prices, Ryanair fares…) on [LinkedIn](https://www.linkedin.com/company/euroscrape). Follow the page to see what the data looks like.

### 🗓️ Run it on a schedule: only new companies

1. Set your filters and give the search a **monitor name**:

```json
{
  "daysBack": 3,
  "provinces": ["Valencia"],
  "eventTypes": ["incorporation"],
  "monitorName": "new-companies-valencia",
  "webhookUrl": "https://hook.eu1.make.com/your-webhook-id"
}
```

2. In Apify Console, **save it as a task** and add a **schedule** to it (for example every weekday at 9:00).
3. The first run is the baseline: it returns the matching announcements and remembers all of them. Every run after that returns **only the announcements not delivered before** (`changeType: "new"`). With `daysBack: 3`, a missed day is caught up on the next run, and you pay only for what is new, plus $0.003 per run.

**Straight into Google Sheets:** put your Make, Zapier or n8n webhook address in `webhookUrl`. Each run sends one POST `{"count": N, "items": [...]}` with the new companies only (the baseline run sends nothing). Make: Custom webhook → Iterator on `items` → Google Sheets › Add a row. Zapier: Catch Hook → Looping → Create Spreadsheet Row. n8n: Webhook → Split Out → Append row.

**Instant alerts:** add `telegramBotToken` + `telegramChatId`, `slackWebhookUrl` or `discordWebhookUrl` to get one message per new company (up to `maxNotifications` per run, 30 by default).

### ⭐ Your feedback

If this Actor saves you time, a short review on Apify Store helps other users find it. Missing a field or a filter (search by company name, contacts)? Say it in your review: the most requested features are added first.

### 🔗 More from EuroScrape

**Chosen by our paying customers**

- [French Companies Scraper: SIRENE Leads, Directors & Emails](https://apify.com/euroscrape/france-companies): every French company from the official SIRENE register by activity, area and size, with directors, finances, BODACC insolvency check, VAT check and verified emails.
- [Google Maps No-Website Leads: Businesses Without Website](https://apify.com/euroscrape/google-maps-no-website-leads): local businesses on Google Maps that have no website of their own, double-checked: ready-made leads for web agencies.

**Also by EuroScrape**

- [No-Website Leads: New Businesses Without a Website (US, UK, FR)](https://apify.com/euroscrape/no-website-leads): newly registered UK and French companies with no website yet, with the creation date of their domain name.
- [Trusted Shops Scraper: Shop Leads, Ratings, Reviews & Alerts](https://apify.com/euroscrape/trusted-shops-scraper): online shops of 11 European markets with their company, contacts, rating and review volume, plus customer reviews and alerts on negative ones.
- [France Fuel Prices: Cheapest Stations Near You & Alerts](https://apify.com/euroscrape/france-fuel-prices): live official prices of all ~10,000 French stations — cheapest Diesel, E10, E85 or LPG around any point, with distances and price-drop alerts.
- [France Real Estate Sold Prices (DVF): €/m², Sales & Trends](https://apify.com/euroscrape/france-property-prices): every property sale registered by the French State — real prices, €/m², addresses, GPS, market trends per city and alerts on new sales.
- [France Energy Ratings (DPE): Homes, Energy Sieves & Alerts](https://apify.com/euroscrape/france-energy-ratings): official energy certificates of French homes — class, address, consumption, yearly bill — with the F/G energy sieves of any city and alerts on new certificates.
- [France Building Permits (Sitadel): Projects, Builders & Alerts](https://apify.com/euroscrape/france-building-permits): official register of French building permits — housing programmes and commercial buildings with the developer (name, SIREN), address, size and status, and alerts when works start.
- [EU VAT Number Validator (VIES): Bulk Check, Proof & Alerts](https://apify.com/euroscrape/vat-validator): validate VAT numbers in bulk against the EU's official registry, with consultation proof for tax audits and alerts when a customer's number becomes invalid.
- [EU Public Tenders Scraper: TED, BOAMP & Awards](https://apify.com/euroscrape/eu-public-tenders): open tenders and contract awards from all of Europe (TED) and France (BOAMP, DECP), with winners per lot, values in € and daily alerts.
- [Website Tech Stack Detector: 280+ Technologies, Leads & Signals](https://apify.com/euroscrape/website-intelligence): technologies, company identity, contacts and sales signals for any website.
- [Kleinanzeigen Scraper: Deal Finder & Price-Drop Alerts](https://apify.com/euroscrape/kleinanzeigen-scraper): German classifieds with a 0–100 deal score, new-ad & price-drop monitoring and instant alerts.
- [UK Companies House Scraper](https://apify.com/euroscrape/uk-companies): UK companies by SIC code, location and incorporation date, with directors, filing dates, websites, emails and phones.
- [Impressum & Legal Notice Scraper (EU)](https://apify.com/euroscrape/company-identity): Turn any company website into a verified identity: legal name, registry numbers, VAT IDs, directors and contacts, across Europe.
- [EU Second-Hand Marketplaces Scraper: Vinted, OLX & More](https://apify.com/euroscrape/eu-marketplace-deals): one search on the top second-hand marketplace of 18 European countries, prices in €, cheapest country and resale margin.
- [Google Hotels Scraper: Prices from Every Booking Site](https://apify.com/euroscrape/google-hotels-prices): hotel prices for any destination and dates, with the price on every booking site, rate parity, price calendars and alerts.
- [App Store Reviews + Google Play Reviews Scraper (All Countries)](https://apify.com/euroscrape/app-reviews): reviews from both stores in 175 countries, rating by version and country, free top charts and keyword rankings, alerts on new negative reviews.
- [Google Flights Scraper: Cheapest Dates, Prices & Price History](https://apify.com/euroscrape/google-flights-prices): flight prices for any route and dates, cheapest day to fly, typical price range, CO2 and price-drop alerts.
- [Vinted Scraper: 26 Countries, Deals, Alerts & Seller Data](https://apify.com/euroscrape/vinted-scraper): search Vinted across 26 countries, prices with buyer fees, seller ratings, cheapest-country comparison and instant alerts on new listings.
- [Ryanair Low Fare Finder: Cheapest Days, Anywhere & Alerts](https://apify.com/euroscrape/ryanair-low-fares): Ryanair fare calendars months ahead, every destination under your price cap from any airport, and alerts on drops and new deals.
- [EU Electricity Prices (Day-Ahead): All Zones & Cheap Hours](https://apify.com/euroscrape/eu-electricity-prices): tomorrow's spot prices for 40+ European bidding zones, the cheapest 3-hour window of each day, negative-price alerts and years of history.

💡 Already have company websites? Use the **Impressum & Legal Notice Scraper** to get their legal identity and contacts directly.

# Actor input Schema

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

Read the BORME issues of the last N calendar days (it is published Monday to Friday). Ignored if 'From date' is set.

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

First BORME publication date to read (YYYY-MM-DD). Overrides 'Days back'.

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

Last publication date to read (YYYY-MM-DD). Default: today.

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

Spanish provinces, e.g. Madrid, Barcelona, Valencia, Sevilla, Málaga, Bizkaia, Alicante, A Coruña, Las Palmas, Illes Balears (accents and case do not matter). Empty = all of Spain.

## `eventTypes` (type: `array`):

Registry acts to return. Default: newly incorporated companies only. Add appointments, departures, dissolutions, insolvency… to monitor changes. Empty = every act.

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

Keep only companies whose name or business purpose contains one of these words (Spanish, accents and case ignored), e.g. inmobiliaria, software, restaurante, energía solar.

## `excludeKeywords` (type: `array`):

Drop companies whose name or business purpose contains one of these words, e.g. holding.

## `cnaeCodes` (type: `array`):

Activity codes, e.g. 6201 (software), 4121 (construction), 5610 (restaurants), 68 (real estate, prefix). Only matches companies whose deed cites a CNAE code (about 1 in 4 new companies): for wider results use keywords.

## `legalForms` (type: `array`):

Keep only these legal forms (read from the company name). Empty = all.

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

For new companies: keep only those with at least this share capital, e.g. 10000.

## `maxCapital` (type: `integer`):

For new companies: keep only those with at most this share capital.

## `soleShareholderOnly` (type: `boolean`):

Keep only companies with a declared sole shareholder (socio único).

## `includeRawText` (type: `boolean`):

Adds the full announcement as published (rawText), so you can check every field.

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

Stops after this many companies (most recent BORME first).

## `monitorName` (type: `string`):

Name this search and schedule it (e.g. every weekday): each run then returns only announcements not delivered by a previous run of this monitor, so you are never charged twice for the same company. The first run is the baseline.

## `telegramBotToken` (type: `string`):

Get an instant message for each new company of your monitor. Create a bot with @BotFather.

## `telegramChatId` (type: `string`):

Your chat or channel ID (message @userinfobot to get yours).

## `discordWebhookUrl` (type: `string`):

Channel settings → Integrations → Webhooks.

## `slackWebhookUrl` (type: `string`):

Incoming webhook URL.

## `webhookUrl` (type: `string`):

Receives one JSON POST per run with all new companies (Make, Zapier, n8n, your CRM…).

## `maxNotifications` (type: `integer`):

Extra companies are summarized in one message.

## Actor input object example

```json
{
  "daysBack": 7,
  "provinces": [
    "Madrid"
  ],
  "eventTypes": [
    "incorporation"
  ],
  "soleShareholderOnly": false,
  "includeRawText": true,
  "maxItems": 50,
  "maxNotifications": 30
}
```

# Actor output Schema

## `overview` (type: `string`):

Companies with incorporation data and officers.

## `changes` (type: `string`):

Appointments, departures, name/address/capital changes, dissolutions, insolvency.

## `runSummary` (type: `string`):

Counters for this run (BORME issues, announcements read, output).

# 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 = {
    "daysBack": 7,
    "provinces": [
        "Madrid"
    ],
    "eventTypes": [
        "incorporation"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("euroscrape/spain-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 = {
    "daysBack": 7,
    "provinces": ["Madrid"],
    "eventTypes": ["incorporation"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("euroscrape/spain-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 '{
  "daysBack": 7,
  "provinces": [
    "Madrid"
  ],
  "eventTypes": [
    "incorporation"
  ],
  "maxItems": 50
}' |
apify call euroscrape/spain-companies --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,euroscrape/spain-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/7vnNdbjvb5KUiJSOf/builds/OkxwrM3swGaxGvKcV/openapi.json
