# Spain public tenders (PLACSP) to JSON | Licitaciones España (`fixandfocus/licitaciones-espana`) Actor

Spanish public procurement tenders from the official PLACSP feed as clean JSON, filtered by CPV, province (NUTS), value, contract type, status and keywords. Licitaciones de la Plataforma de Contratación del Sector Público en JSON limpio.

- **URL**: https://apify.com/fixandfocus/licitaciones-espana.md
- **Developed by:** [Santiago Alfonso Ramírez](https://apify.com/fixandfocus) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 licitacións

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 public tenders (PLACSP) to JSON

Spanish public procurement tenders from **PLACSP**, the Spanish government's official contracting platform, as clean JSON ready for your CRM, your AI agent or your alerts. No browsing the portal and no wrestling with the CODICE format: the Actor reads the official ATOM feed, normalises the fields and applies your filters.

*En español, más abajo.*

### What you get

One dataset item per tender: file number, title, status (open, pending award, awarded…), contract type (supplies, services, works…), procedure, contracting body (name, tax ID, DIR3 code, city), value excluding and including VAT, estimated value, CPV codes, NUTS region and province, submission deadline, awards when published, and the link to the official record.

No phone numbers and no contact e-mail addresses are collected.

#### Example output

```json
{ "expediente": "498/2024", "titulo": "Contrato de suministro e instalación de un sistema de gestión inteligente de residuos", "estado": "PUB", "estado_texto": "En plazo", "tipo_contrato_texto": "Suministros", "organo": { "nombre": "Alcaldía del Ayuntamiento de Librilla", "nif": "P3002300F" }, "importe_sin_iva": 24791.67, "cpv": ["32441100"], "lugar": { "nuts": "ES620", "provincia": "Murcia" }, "fin_presentacion": "2026-09-29T23:59:00", "url": "https://contrataciondelestado.es/..." }
```

### How to use it

1. Pick the **status** (`estados`; default `PUB`, still open).
2. Filter by **CPV prefix** (`cpv`, e.g. `72` for IT services or `45` for construction), by **NUTS region** (`nuts`, e.g. `ES30` Madrid, `ES51` Catalonia, `ES61` Andalusia), by **value** or by **keywords**.
3. Keep `soloAbiertas` on to get only tenders you can still bid for.
4. Schedule it daily and push the new ones into your integration (webhooks, Make, Zapier, Google Sheets).

Example input:

```json
{ "estados": ["PUB"], "cpv": ["72"], "nuts": ["ES30"], "importeMinimo": 15000, "soloAbiertas": true, "maxResultados": 100 }
```

### Pricing

You pay per tender that matches your filters and is saved to the dataset. Entries checked but filtered out are not charged. Cap your spend with `maxResultados`.

### Source, licence and limits

Data from the official PLACSP syndication. **Source: Ministerio de Hacienda (Spain).** Commercial reuse is allowed as long as the source is credited, and every item carries it. This Actor is not an official service and does not replace the file on the platform: always check deadlines and tender documents in the official record before bidding. The feed covers contracting profiles hosted on PLACSP (not minor contracts, and not every aggregated regional profile). Each feed page holds about 250 entries; raise `maxPaginas` to look further back.

For tenders across the rest of the EU, see our EU public tenders (TED) Actor.

### Support

If a field looks misread, open an issue in the Issues tab with the file number.

***

### En español

Obtén las licitaciones publicadas en la **Plataforma de Contratación del Sector Público** (PLACSP) en JSON limpio y listo para tu CRM, tu agente de IA o tus alertas. El Actor lee la sindicación oficial ATOM, normaliza los campos y aplica tus filtros.

Por cada licitación: expediente, título, estado (en plazo, pendiente de adjudicación, adjudicada…), tipo de contrato, procedimiento, órgano de contratación (nombre, NIF, código DIR3, ciudad), importe sin IVA, importe con IVA y valor estimado, códigos CPV, región NUTS y provincia, fecha y hora límite de presentación, adjudicaciones cuando las hay y el enlace a la ficha oficial. No se incluyen teléfonos ni correos de contacto.

Filtra por estados, prefijos CPV, región NUTS, importe o palabras clave, y marca «Solo con plazo abierto» para quedarte con lo que aún se puede presentar. Pagas solo por cada licitación guardada.

**Origen de los datos: Ministerio de Hacienda (Plataforma de Contratación del Sector Público).** La reutilización comercial está permitida citando el origen. Este Actor no es un servicio oficial: comprueba siempre plazos y pliegos en la ficha oficial antes de presentar una oferta.

# Actor input Schema

## `estados` (type: `array`):

PRE anuncio previo, PUB en plazo, EV pendiente de adjudicación, ADJ adjudicada, RES resuelta, ANUL anulada.

## `cpv` (type: `array`):

Prefijos CPV, p. ej. 72 (servicios informáticos) o 45 (construcción). Vacío = todos.

## `nuts` (type: `array`):

Prefijos NUTS, p. ej. ES30 (Madrid), ES51 (Cataluña), ES61 (Andalucía). Vacío = toda España.

## `tiposContrato` (type: `array`):

1 Suministros, 2 Servicios, 3 Obras, 21 Gestión de Servicios Públicos, 22 Concesión de Servicios, 31 Concesión de Obras Públicas, 32 Concesión de Obras, 40 Colaboración público-privada, 7 Administrativo especial, 8 Privado, 50 Patrimonial.

## `importeMinimo` (type: `integer`):

Descarta licitaciones con importe sin IVA (o valor estimado) inferior a esta cifra.

## `importeMaximo` (type: `integer`):

Descarta licitaciones con importe sin IVA (o valor estimado) superior a esta cifra.

## `palabrasClave` (type: `array`):

Alguna debe aparecer en el título o en el órgano de contratación.

## `soloAbiertas` (type: `boolean`):

Solo licitaciones cuya fecha límite de presentación no ha pasado.

## `maxResultados` (type: `integer`):

Número máximo de licitaciones a guardar (y a cobrar).

## `maxPaginas` (type: `integer`):

Cuántas páginas del feed oficial revisar; cada página tiene unas 250 entradas recientes.

## Actor input object example

```json
{
  "estados": [
    "PUB"
  ],
  "cpv": [],
  "nuts": [],
  "tiposContrato": [],
  "palabrasClave": [],
  "soloAbiertas": true,
  "maxResultados": 20,
  "maxPaginas": 2
}
```

# Actor output Schema

## `licitaciones` (type: `string`):

Items del dataset predeterminado en JSON: una licitación por item, con órgano, importes, CPV, lugar, plazo y enlace al anuncio.

# 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 = {
    "estados": [
        "PUB"
    ],
    "cpv": [],
    "nuts": [],
    "tiposContrato": [],
    "palabrasClave": [],
    "maxResultados": 20,
    "maxPaginas": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("fixandfocus/licitaciones-espana").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 = {
    "estados": ["PUB"],
    "cpv": [],
    "nuts": [],
    "tiposContrato": [],
    "palabrasClave": [],
    "maxResultados": 20,
    "maxPaginas": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("fixandfocus/licitaciones-espana").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 '{
  "estados": [
    "PUB"
  ],
  "cpv": [],
  "nuts": [],
  "tiposContrato": [],
  "palabrasClave": [],
  "maxResultados": 20,
  "maxPaginas": 2
}' |
apify call fixandfocus/licitaciones-espana --silent --output-dataset

```

## MCP server setup

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

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/7dIR1MwmhnskZkXuS/builds/4391lgWTt0r3K91Ca/openapi.json
