# Aviso Legal Scraper: CIF/NIF & Emails from Spanish Websites (`sandy_yclept/aviso-legal-scraper`) Actor

Read the aviso legal of Spanish websites: company name, CIF/NIF (control letter checked), Registro Mercantil entry, address and emails. The host's, the agency's and a platform's numbers are left out. Pay per company with an email.

- **URL**: https://apify.com/sandy_yclept/aviso-legal-scraper.md
- **Developed by:** [Rafal Sav](https://apify.com/sandy_yclept) (community)
- **Categories:** Lead generation, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.60 / 1,000 company leads

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

### What does Aviso Legal Scraper do?

**Aviso Legal Scraper** reads the legal notice (aviso legal) of Spanish company websites and returns **who runs each site**: the company name and legal form, its **CIF/NIF**, the Registro Mercantil entry, the registered address — and the emails and phone numbers on the same pages. One record per website.

Spanish law (LSSI) makes every site name the company behind it; many also print the agency that built it, a platform they sell through, or a second data controller in the privacy policy. This Actor keeps the company's own data and leaves the others out, and it **checks every number by its control character**: a misprinted CIF is not returned as one. You pay **only per company with an email of its own**.

### Why use it?

- **Spanish B2B leads** with the company data a CRM needs: CIF/NIF, address, an email to write to.
- **KYB and data cleaning**: match a list of websites to tax numbers before a registry lookup.
- **From the company's own website**, not a directory.

### How to use it

1. Open the **Input** tab and paste the websites (domains or URLs), upload a text or CSV file, or link a Google Sheet.
2. Click **Start**.
3. Download the results as JSON, CSV, Excel or HTML from the **Output** tab.

### Output

kelisto.es, one of the prefill's websites, as read on October 10, 2026:

```json
{
  "domain": "https://kelisto.es/",
  "status": "ok",
  "company": {
    "company": "KELISTO IBERIA, S.L.",
    "legal_form": "S.L.",
    "register_type": "NIF",
    "register_number": "B86746161",
    "register_court": "Madrid",
    "vat_id": null,
    "address": {"street": "Paseo de la Castellana 81, Planta 15", "postal_code": "28046", "city": "Madrid"},
    "representatives": [],
    "country": "ES"
  },
  "best_email": "dpo@kelisto.es",
  "phones": ["+34917325253"],
  "billed": true
}
```

| Field | Meaning |
|---|---|
| `company.register_number` | CIF/NIF, its control character checked; `register_court` the Registro Mercantil's town. |
| `company.vat_id` | The intra-EU VAT number when printed apart (ES + NIF), or a foreign seller's. |
| `company.company`, `legal_form`, `address` | As the notice prints them for the company itself. |
| `emails`, `best_email`, `phones` | The contacts on the same pages, emails MX-checked. |

### Accuracy

Measured on random Spanish domains from the Tranco list, labelled by reading each page before the extractor was run on them (the second blind draw, the number to quote):

| Field | Right | Wrong | Missed |
|---|---|---|---|
| CIF / NIF | 9 | 1 | 0 |
| VAT number | 1 | 0 | 1 |
| Company name | 5 | 2 | 7 |
| Postcode | 7 | 2 | 3 |

The wrong number is habitissimo.es's: its privacy policy names its sister company as a second data controller, and that CIF was read as the site's. The company name is the weak field.

### How much does it cost?

**$0.0045 per company with an email** — on its own domain, or a personal mailbox it uses, accepting mail — on the Free and Starter plans; 10% less on Scale, 20% less from Business up. A site without one is returned and costs nothing.

### Related Actors

- [Impressum & Legal Notice Scraper](https://apify.com/sandy_yclept/impressum-email-scraper) — the same engine for German Impressum pages and every EU country it reads.
- [Mentions Légales Scraper](https://apify.com/sandy_yclept/mentions-legales-scraper) — French websites: SIREN, SIRET and TVA.
- [KvK & BTW Number Scraper](https://apify.com/sandy_yclept/kvk-company-data-scraper) — Dutch websites: KvK and BTW numbers.
- [Website Contact & Email Scraper](https://apify.com/sandy_yclept/website-contact-email-scraper) — emails, phone numbers and social profiles from any list of websites.

### Disclaimer

This Actor is a **tool**. You are responsible for complying with the GDPR, LSSI and the target sites' Terms of Service, and `robots.txt`, which it respects.

### Support

A number that is someone else's, or a notice that was missed? Open an issue on the **Issues** tab with the website.

# Actor input Schema

## `startUrls` (type: `array`):

List of Spanish websites (domains or URLs) to read the legal notice of. One record per URL. Paste them, upload or link a text or CSV file of them, or link a Google Sheet shared with "anyone with the link". A URL listed twice is read once.

## `maxContactPages` (type: `integer`):

How many subpages to read per site on top of the homepage. The legal notice is read first, then the contact and privacy pages.

## `validateEmails` (type: `boolean`):

Check each discovered email against its domain's MX records and attach a confidence score. Turn off for a faster run without deliverability checks.

## `includeSocials` (type: `boolean`):

Extract LinkedIn, X/Twitter, Facebook, Instagram, YouTube and TikTok profile links (share/intent URLs are filtered out).

## `renderJs` (type: `string`):

Load pages in a real browser to reach contacts that are rendered by JavaScript. Off (default) is the fastest and cheapest. Auto scans without a browser first and only re-crawls a site in the browser when nothing was found — best accuracy/cost ratio. On always uses the browser. Auto and On require the run memory to be at least 2048 MB. Below 1024 MB the browser is not started and the run says so.

## `phoneRegion` (type: `string`):

ISO country code used to parse phone numbers written without an international prefix. Defaults to ES.

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

Optional proxy for fetching pages. Apify Proxy's datacenter IPs are included in every Apify plan, the Free plan too; residential proxies are billed separately. Left disabled, the Actor connects directly, and retries sites that refuse it through Apify Proxy (see below).

## `proxyFallback` (type: `boolean`):

Every cloud run has a datacenter IP address, and some sites turn those away. A site that refuses or drops the direct connection is retried once through Apify Proxy's datacenter IPs (included in every Apify plan, the Free plan too), then once more directly. Sites that answer directly never go through the proxy, and robots.txt is respected either way. Has no effect when a proxy is configured above.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.acciona.es/"
    },
    {
      "url": "https://kelisto.es/"
    }
  ],
  "maxContactPages": 6,
  "validateEmails": true,
  "includeSocials": true,
  "renderJs": "off",
  "phoneRegion": "PL",
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "proxyFallback": true
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        {
            "url": "https://www.acciona.es/"
        },
        {
            "url": "https://kelisto.es/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sandy_yclept/aviso-legal-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 = { "startUrls": [
        { "url": "https://www.acciona.es/" },
        { "url": "https://kelisto.es/" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("sandy_yclept/aviso-legal-scraper").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 '{
  "startUrls": [
    {
      "url": "https://www.acciona.es/"
    },
    {
      "url": "https://kelisto.es/"
    }
  ]
}' |
apify call sandy_yclept/aviso-legal-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sandy_yclept/aviso-legal-scraper"
        }
    }
}
```

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/FhM00G5Jehqw5ZZGS/builds/KHqslUjIEDW93lF5T/openapi.json
