# Spain Tenders Scraper: PLACSP Licitaciones to Excel (`tenderfeed/spain-placsp-tenders`) Actor

Scrape Spanish public tenders (licitaciones) from PLACSP, the Plataforma de Contratación del Sector Público, via the official open-data ATOM/CODICE feeds, no key. Filter by keyword, CPV, region/NUTS, contract type, value, open deadline. Excel, CSV, JSON.

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

## Pricing

from $2.50 / 1,000 results

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 Tenders Scraper: PLACSP Licitaciones to Excel

**Export Spanish public tenders (licitaciones públicas) from PLACSP to Excel, CSV or JSON, with no API key.** The Plataforma de Contratación del Sector Público ([contrataciondelestado.es](https://contrataciondelestado.es)) is Spain's official national e-procurement platform. This Actor reads its **official open-data ATOM/CODICE syndication feeds** and returns one clean row per contract folder: title, file number, contracting authority (with NIF/DIR3 and hierarchy), contract type, procedure, CPV codes, NUTS region, estimated value in EUR (with and without VAT), submission deadline, tender documents (PCAP, PPT) and the direct PLACSP notice URL. Awards include winners, awarded amount and number of bids.

Built by **TenderFeed** ([apify.com/tenderfeed](https://apify.com/tenderfeed)). No login, no browser, no HTML scraping.

### Data sources (official open data)

- **Buyer profiles hosted on PLACSP** — `sindicacion_643/licitacionesPerfilesContratanteCompleto3.atom` (State, regions and thousands of local councils; excludes minor contracts).
- **Regional platforms aggregated into PLACSP** — `sindicacion_1044/PlataformasAgregadasSinMenores.atom` (Catalonia, Community of Madrid, Basque Country, Andalusia, Galicia, Navarre, La Rioja...; excludes minor contracts).

Both feeds are chains of ATOM pages, newest update first, linked by `rel="next"`. A contract folder appears once per update; the Actor keeps only its newest (current) state. A busy weekday produces roughly 5,000 folder updates on the main feed.

### What can you do with it?

- **Open tender alerts** in Spain for suppliers, SMEs and international bidders, filtered by CPV and region.
- **Bid managers and consultancies**: a daily spreadsheet of every new *licitación en plazo* in your sector.
- **Award intelligence**: who wins which contracts, at what price, with how many bidders (`statuses: ["ADJ","RES"]`).
- **AI agents**: use it as an **MCP tool** (Apify MCP server) and ask *"Which open IT services tenders in Madrid close this month?"*

### Input example

```json
{
  "cpvCodes": ["72", "48"],
  "regions": ["ES30", "Cataluña"],
  "contractTypes": ["services", "goods"],
  "publishedFrom": "7 days",
  "onlyOpen": true,
  "maxResults": 50
}
```

- `keywords`: accent-insensitive match on title, summary and file number (most notices are in Spanish; Catalan/Basque/Galician on regional platforms).
- `cpvCodes`: CPV prefixes (`"72"` = IT services, `"45"` = construction works), matched across all lots.
- `regions`: NUTS prefixes (`ES30` Madrid, `ES51` Catalonia, `ES61` Andalusia, `ES21` Basque Country, `ES52` Valencian Community) or names (`"Sevilla"`, `"Galicia"`).
- `contractTypes`: goods (Suministros), services (Servicios), works (Obras) and concession/other types.
- `procedureTypes`, `buyerName`, `minValue` / `maxValue` (EUR excl. VAT), `publishedFrom` / `publishedTo` (dates or `"7 days"`, `"2 weeks"`).
- `onlyOpen` (default on): status PUB (*en plazo*) and submission deadline today or later. Pick `statuses` (PRE, PUB, EV, ADJ, RES, ANUL) to export evaluations, awards or cancellations instead.
- Default run: open tenders published in the last 7 days, both feeds, 50 results (about 10 seconds).

### Output example

Real row from the default run on 2026-11-07:

```json
{
  "source": "es-placsp",
  "sourceId": "20853933",
  "url": "https://contrataciondelestado.es/wps/poc?uri=deeplink:detalle_licitacion&idEvl=Bd3CdywkJUctm4eBPtV6eQ%3D%3D",
  "title": "Renovación de bocas de riego y acometidas de agua potable en Bobadilla",
  "status": "active",
  "statusLabel": "En plazo",
  "procedureType": "Abierto simplificado (simplified open)",
  "contractType": "works",
  "contractTypeLabel": "Obras",
  "buyerName": "Pleno del Ayuntamiento de Bobadilla",
  "buyerNif": "P2603100E",
  "buyerHierarchy": "Sector Público > ENTIDADES LOCALES > La Rioja > Ayuntamientos > Bobadilla",
  "country": "ES",
  "region": "La Rioja",
  "nutsCode": "ES230",
  "cpvOrNaics": "45232150",
  "publishedAt": "2026-11-06",
  "deadline": "2026-11-20T23:59:00",
  "valueAmount": 64328.41,
  "valueCurrency": "EUR",
  "budgetWithTax": 77837.38,
  "tenderRef": "130/2026",
  "durationMonths": 3.0,
  "documentsUrl": "https://contrataciondelestado.es/FileSystem/servlet/GetDocumentByIdServlet?cifrado=...",
  "feed": "profiles"
}
```

Other fields: `cpvCodes`, `nutsCodes`, `regions`, `procedureCode`, `contractTypeCode`, `statusCode`, `budgetWithoutTax`, `buyerDir3`, `buyerProfileUrl`, `regionalPlatform`, `documentsAvailableUntil`, `overEuThreshold` (SARA), `euFunding`, `lotsCount`, `awardees`, `awardedValue`, `awardDate`, `tendersReceived`, `noticeTypes`, `documents[]` (name, type, url), `updatedAt`. Deadlines are Spanish local time (CET/CEST) as published.

The data follows the same normalized schema (1.2) as our other TenderFeed Actors ([EU TED](https://apify.com/tenderfeed/ted-eu-tenders), [SAM.gov](https://apify.com/tenderfeed/sam-gov-opportunities), [UK tenders](https://apify.com/tenderfeed/uk-tenders)), so you can merge Spain with TED in one sheet.

### Daily alerts ("only new" monitoring mode)

Turn on `onlyNew`, set a `monitoringId` (for example `"es-it-madrid"`) and schedule the Actor daily. Each run returns, and charges for, only tenders you have not received yet.

### Performance and limits

Each feed page holds ~150–500 updates (5–15 MB of XML). With narrow filters over long date ranges the Actor must read many pages; `maxPagesPerFeed` (default 40, about 3–4 busy weekdays on the main feed) caps this. Raise it for a full week or more. Minor contracts (*contratos menores*) are not in these feeds.

### Personal data

PLACSP lists a contact name, email and phone for each contracting authority, and some winners are self-employed individuals. **Buyer contacts are off by default** (GDPR); turn on `includeBuyerContacts` to add `buyerContactName` / `Email` / `Phone` and the names of natural-person awardees (identified by a personal NIF/NIE). Company winners are always included.

### Source and reuse

Data: *Plataforma de Contratación del Sector Público — Ministerio de Hacienda (Spain)*, open data reusable under Ley 37/2007 (basic reuse modality: cite the source, do not alter the meaning, keep the update date — see the `updatedAt` field). TenderFeed is not affiliated with or endorsed by the Ministry.

### Pricing

Pay per result: **$2.50 per 1,000 results**, plus Apify's small actor-start fee. You pay only for tenders saved to the dataset.

# Actor input Schema

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

Words to look for in the title, summary and file number (accent-insensitive), e.g. \["software", "limpieza", "mantenimiento"]. Most notices are in Spanish (some in Catalan, Basque or Galician). Empty = all.

## `keywordMode` (type: `string`):

Match ANY or ALL keywords.

## `cpvCodes` (type: `array`):

CPV prefixes, e.g. \["72"] for IT services, \["45"] for construction works, \["90910000"] for cleaning. Matches any CPV of the contract or its lots.

## `regions` (type: `array`):

Place of performance. NUTS prefixes like \["ES30"] (Madrid), \["ES51"] (Catalonia), \["ES61"] (Andalusia), \["ES21"] (Basque Country), or names (accent-insensitive, also matched against the buyer hierarchy and city), e.g. \["Valencia", "Sevilla"].

## `contractTypes` (type: `array`):

Empty = all.

## `procedureTypes` (type: `array`):

Contains match on the procedure label (Spanish + English), e.g. \["abierto"] (open + simplified open), \["negociado"], \["acuerdo marco"], \["restricted"]. Empty = all.

## `buyerName` (type: `string`):

Contracting authority name or hierarchy contains (accent-insensitive), e.g. "Ayuntamiento de Madrid", "Universidad", "Ministerio de Defensa".

## `minValue` (type: `integer`):

Keep tenders with an estimated value at or above this amount.

## `maxValue` (type: `integer`):

Keep tenders with an estimated value at or below this amount.

## `publishedFrom` (type: `string`):

YYYY-MM-DD or relative ("7 days", "7days", "2 weeks"). Default: last 7 days. Feeds are read newest-first and stop once updates are older than this date.

## `publishedTo` (type: `string`):

YYYY-MM-DD. Default: no upper bound.

## `onlyOpen` (type: `boolean`):

Keep only folders in status PUB (en plazo) whose submission deadline is today or later. Ignored when you pick explicit statuses below.

## `statuses` (type: `array`):

Optional. Pick e.g. ADJ + RES to export recent awards with winners and awarded amounts. Overrides 'Only open'.

## `feeds` (type: `array`):

Both official open-data feeds exclude minor contracts (contratos menores).

## `maxResults` (type: `integer`):

0 = no limit. Default 50.

## `maxPagesPerFeed` (type: `integer`):

Safety cap. Each ATOM page holds ~150-500 updates (5-15 MB); a busy weekday is roughly 5-10 pages on the main feed. Raise it for long date ranges with narrow filters.

## `includeBuyerContacts` (type: `boolean`):

Adds the contracting authority's contact name, email and phone (buyerContactName / Email / Phone) and the names of natural-person awardees (self-employed winners identified by a personal NIF/NIE). Off by default (GDPR).

## `onlyNew` (type: `boolean`):

Remember what earlier runs delivered and return (and charge for) only tenders you have not received yet. Ideal for scheduled daily alerts.

## `monitoringId` (type: `string`):

Name of the watch-list memory used by 'Only new'. Use a different ID per saved search/schedule.

## Actor input object example

```json
{
  "keywordMode": "any",
  "publishedFrom": "7 days",
  "onlyOpen": true,
  "feeds": [
    "profiles",
    "aggregated"
  ],
  "maxResults": 20,
  "maxPagesPerFeed": 40,
  "includeBuyerContacts": false,
  "onlyNew": false
}
```

# Actor output Schema

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

All normalized records from the default dataset, opened in the Overview view.

# 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 = {
    "publishedFrom": "7 days",
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("tenderfeed/spain-placsp-tenders").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 = {
    "publishedFrom": "7 days",
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("tenderfeed/spain-placsp-tenders").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 '{
  "publishedFrom": "7 days",
  "maxResults": 20
}' |
apify call tenderfeed/spain-placsp-tenders --silent --output-dataset

```

## MCP server setup

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

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/7wVYlugSsazvN1Qlp/builds/ecRCniCmWxoBb14GF/openapi.json
