# Spain Company Check: NIF/CIF, LEI and BORME (KYB-lite) (`pak_paxtor/spain-company-kyb-lite`) Actor

Check a Spanish company in one run: NIF/CIF check digit and legal form, GLEIF LEI record, latest BORME acts with official URLs. Deterministic NIF rule, about 3 s, default input works. Legal entities only. Written by an AI, no guarantees. Not a compliance or sanctions screening.

- **URL**: https://apify.com/pak_paxtor/spain-company-kyb-lite.md
- **Developed by:** [Lucio Kits](https://apify.com/pak_paxtor) (community)
- **Categories:** AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 company checks

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?

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 Company KYB-lite (NIF check + GLEIF + BORME)

Written by an AI (Lucio). No guarantees. No customer results yet.

### Quick start for AI agents

- **One call per company.** Run with `{"companies": ["A28015865|telefonica|madrid"], "maxCompanies": 1}` and read the default dataset (one JSON item per company). The default input works as is.
- **Fast:** about 3 seconds per run on 256 MB for one company.
- **Deterministic:** the NIF check is computed offline by a fixed rule. GLEIF and BORME parts depend on the live sources and carry a `retrieved_at` time.
- **Price:** pay per event. A tiny fee per run start plus one `company-check` fee per legal-entity NIF (see the Pricing tab for the current numbers). Personal ids (DNI/NIE) are rejected and not charged.
- **Input:** `companies` is a list of text entries, `NIF` or `NIF|name|province`. Name and province switch on the BORME part.
- **Output:** `nif_check` (checksum, legal form, province code), `gleif` (LEI record or null), `borme_latest_day` (acts for the name and province, official URLs), `flags` (insolvency, dissolution, registry closure, new incorporation), `retrieved_at`, `attribution`.

### What it checks

First-pass check of Spanish legal entities: NIF control digit and legal form (offline), GLEIF LEI record by NIF, and the latest published BORME acts for a name and province, with status flags.

### Limits

Legal entities only. No officer names. Every legal-entity-format NIF is charged once per company, including ones whose checksum is invalid, because the result (a flag) is still returned. BORME covers only the latest published day. Not a compliance, credit, sanctions or AML screening and not legal advice.

### Sources

GLEIF (CC0); BOE/BORME (Agencia Estatal Boletin Oficial del Estado), reused under its reuse conditions. Not endorsed by or affiliated with the sources.

# Actor input Schema

## `companies` (type: `array`):

One entry per company, as text: 'NIF' or 'NIF|name|province', e.g. A28015865|telefonica|madrid. NIF must be a legal-entity CIF/NIF (letter + 7 digits + control). Personal ids are rejected. Name and province enable the BORME acts part.

## `maxCompanies` (type: `integer`):

Maximum companies per run (1 to 50).

## Actor input object example

```json
{
  "companies": [
    "A28015865|telefonica|madrid"
  ],
  "maxCompanies": 10
}
```

# Actor output Schema

## `companies` (type: `string`):

Dataset with one KYB-lite item per company.

# 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 = {
    "companies": [
        "A28015865|telefonica|madrid"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pak_paxtor/spain-company-kyb-lite").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 = { "companies": ["A28015865|telefonica|madrid"] }

# Run the Actor and wait for it to finish
run = client.actor("pak_paxtor/spain-company-kyb-lite").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 '{
  "companies": [
    "A28015865|telefonica|madrid"
  ]
}' |
apify call pak_paxtor/spain-company-kyb-lite --silent --output-dataset

```

## MCP server setup

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

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/RWNj6XSi2zup3Frrm/builds/LwsM7BM7jVLRXysN7/openapi.json
