# Spain Company Directory — CIF, Address, CNAE, Contact Data (`bovi/spain-company-directory`) Actor

Look up Spanish companies by name. Returns CIF/NIF tax ID, legal form, status, full address, province, CNAE industry code, phone/email/website, employee count and revenue bracket from a public company directory.

- **URL**: https://apify.com/bovi/spain-company-directory.md
- **Developed by:** [Vitalii Bondarev](https://apify.com/bovi) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 spain company directory — cif, address, cnae, contact data

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

### Spain Company Directory — CIF, Address, CNAE, Contact Data

Look up Spanish companies by name. Returns the CIF/NIF tax ID, legal form, registry status, full address (including province), CNAE industry classification code, contact details, employee count, and revenue bracket.

#### What it does

This actor looks up each requested company name against a public Spanish company directory and returns a structured record — no login, no API key required from you. Because the source uses exact name-to-page matching rather than fuzzy search, every result carries a `match_confidence` flag; low-confidence (unrelated-company) results are reported as `not_found` instead of silently returning the wrong company.

#### Input

- **Company names** — the names to look up (e.g. `Inditex`, `Cerrajeria Alonso 2000`). Give the name as it would appear on the company's own registry page, without the legal-form suffix (S.L., S.A.) — the actor strips those automatically before matching, so including them is also fine.
- **Proxy configuration** — Apify Proxy, RESIDENTIAL group, country ES (prefilled).

#### Fields returned

Company identity (name, legal name, CIF/NIF, legal form, registry status), full address (street, city, province, postal code), CNAE industry code + description, sector/activity, contact info (phone, email, website), employee count and year, declared annual revenue bracket, source URL, and both a `match_confidence` and a `parse_confidence` score.

#### What this does NOT return

**Company officers/administrators, EUID, and Registro Mercantil Tomo/Folio/Hoja registry-sheet numbers are not included.** We checked directly (live-tasted 6 companies, including a large corporate and 5 SMEs across different provinces): the source's own page shows those fields exist only behind a separate paid/lead-gated report on the site itself (an "get your free report" signup flow, not a plain page load) — they are never present in the page we scrape. If your workflow specifically needs officer names or the exact registry Tomo/Folio/Hoja reference, this actor is not the right fit; every field it does list above is confirmed present on real company pages, not a placeholder.

#### CNAE coverage gap

CNAE industry code is present on most, but not all, company pages — some companies genuinely have no CNAE on file with the registry. This is a source data-sparsity gap, not a parsing failure; `cnae_code` and `cnae_description` come back empty in that case rather than a guessed value.

#### Output

One dataset item per requested name. A matched company is a full record (charged); an unresolved name is a lightweight `{query, status: "not_found", slug}` row (never charged). Export to JSON/CSV/Excel or pull via the Apify API/MCP.

### 💰 Pricing & how we compare

**Pay-per-result (PPE): billed per matched `company-record` only** — unresolved lookups are never charged.

**Our edge:** exact-match safety (`match_confidence` guards against a wrong-company mismatch that the source's own URL scheme allows) · contact info (phone/email/website) · employee count + revenue bracket · CNAE industry code.

### 🤖 Use with AI agents (MCP)

This actor is agent-ready. Point any MCP client (Claude Desktop, Cursor, n8n AI, LangGraph) at it:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?actors=bovi/spain-company-directory",
      "headers": { "Authorization": "Bearer <YOUR_APIFY_TOKEN>" }
    }
  }
}
```

# Actor input Schema

## `companyNames` (type: `array`):

Spanish company names to look up (as they'd appear on the company's own registry page, without the legal-form suffix — e.g. 'Inditex' or 'Cerrajeria Alonso 2000'). One record per name. This is an EXACT lookup, not fuzzy search — a name that doesn't resolve to a real company page is returned as not\_found rather than guessed.

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

Proxy settings. Use Apify Proxy with the RESIDENTIAL group and country ES (Spain) — required for reliable access to the source site.

## Actor input object example

```json
{
  "companyNames": [
    "Inditex",
    "Nestle Espana",
    "Seat"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# Actor output Schema

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

Dataset containing Spain Company Directory records (company\_name, nif, legal\_form, status, street\_address, city, province, cnae\_code, phone, email, employees\_count, annual\_revenue\_bracket, match\_confidence, parse\_confidence).

# 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 = {
    "companyNames": [
        "Inditex",
        "Nestle Espana",
        "Seat"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/spain-company-directory").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 = {
    "companyNames": [
        "Inditex",
        "Nestle Espana",
        "Seat",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/spain-company-directory").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 '{
  "companyNames": [
    "Inditex",
    "Nestle Espana",
    "Seat"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call bovi/spain-company-directory --silent --output-dataset

```

## MCP server setup

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

```

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/3e9YjUdFM0rqFrnD0/builds/U8vdrsOToQceWt5xx/openapi.json
