# Spain Public Tenders Feed: PLACSP + Regional Platforms (`asunoki/spain-public-tenders-feed`) Actor

New Spanish public tenders and contract awards from the official PLACSP open-data feeds, incl. regional platforms. Filter by CPV, NUTS region, value, keyword, buyer. Schedule it daily and get only notices you have not seen. No API key, no contact data.

- **URL**: https://apify.com/asunoki/spain-public-tenders-feed.md
- **Developed by:** [Seisuke Nagahara](https://apify.com/asunoki) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 new tender notices

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 Feed: PLACSP + Regional Platforms

**New Spanish public sector tenders and contract awards from the official open-data feeds of the Plataforma de Contratación del
Sector Público (PLACSP), including the regional platforms it aggregates, in one feed with English labels.**
Filter by CPV code, region (NUTS), value, contract type, keyword and buyer. Schedule it daily and you get only the notices you have
not seen yet. Price: **$0.004 per notice stored** (pay per event). Notices you filter out are free. No API key, no login.

### Who it is for

- **Suppliers and SMEs** (Spanish or foreign) bidding for Spanish public contracts: a daily list of open opportunities in your CPV
  codes and regions, with deadline (converted to UTC), budget and links to the notice and the tender documents.
- **Bid consultants and tender-alert services**: one feed per client, each with its own filters and its own "already seen" memory.
- **Sales and market intelligence**: award notices tell you which company won which contract, for how much, against how many bidders.
- **Automation**: send new rows to Slack, e-mail, a CRM or a spreadsheet with an Apify integration, n8n, Make or Zapier.

Contracts below the EU thresholds are **not on TED** (16 of the 30 notices in our first real runs). This feed covers them.

### What you get (one row per notice and stage)

| Field | Example |
|---|---|
| `stage` / `status` | `opportunity` / Open for tenders (also `planning`, `evaluation`, `award`, `cancelled`) |
| `title` | "Adquisición de un escenario modular portátil y desmontable de 140 m2." (as published, usually Spanish) |
| `buyerName`, `buyerType`, `buyerHierarchy`, `buyerNif`, `buyerDir3` | Alcaldía del Ayuntamiento de Santiago del Teide, Local authority, \["ENTIDADES LOCALES","Canarias",...] |
| `estimatedValue`, `budgetExclVat`, `budgetInclVat`, `currency` | 37383.18, 37383.18, 40000, EUR |
| `submissionDeadline` | 2026-12-07T16:00:00.000Z (17:00 Madrid time) |
| `mainCpv`, `cpvCodes`, `mainCategory`, `contractType`, `procedure` | 39151300, \[...], goods, Supplies, Simplified open |
| `nutsCodes`, `placeOfPerformance` | \["ES709"], Tenerife |
| `aboveEuThreshold`, `euFunded`, `fundingProgram`, `lots` | false, false, null, null |
| `suppliers`, `awardedValueExclVat`, `tendersReceived`, `awardDate`, `result` (awards) | \[{ name: "LIMPIEZAS Y DESATASCOS CECILIA S.L.U.", nif: "B73497323", sme: true }], 264721.34, 1, 2026-11-06, Contract formalised |
| `tenderDocuments` | links to the administrative (PCAP) and technical (PPT) specifications |
| `noticeUrl` | PLACSP notice page, or the regional platform's page |

The full list with descriptions is in the dataset schema. Each run also writes `report.csv` (same rows) and `OUTPUT` (run statistics),
and adds one free `summary` row at the end of the dataset. A procedure appears once per stage you select: e.g. once when it opens and
once more when it is awarded.

### How to use it

1. Pick **notice types** (default: open opportunities only), and optionally **CPV codes**, **regions**, **contract types**, **value range**,
   **keywords** (Spanish, accents ignored) and **buyer**.
2. Run it once to see the last day or two.
3. **Schedule it daily** with `days` = 2. With **Only new** on, each run returns only notices not returned before for the same filters,
   and archive files already read are not downloaded again.

Example input, IT and software opportunities in Madrid and Catalonia worth at least €100k:

```json
{ "noticeTypes": ["opportunity"], "cpvPrefixes": ["72", "48"], "nutsPrefixes": ["ES30", "ES51"], "minValueEur": 100000, "days": 2 }
```

Example input, cleaning contracts awarded in Andalusia this week:

```json
{ "noticeTypes": ["award"], "cpvPrefixes": ["9091"], "nutsPrefixes": ["ES61"], "days": 7, "onlyNew": false }
```

### Run time and cost

- **The PLACSP server is slow.** Its files are large (an archive file is about 15 MB, roughly one working day is 7 to 12 such files per
  feed) and it sends them slowly (about 60 KB/s per connection measured from Japan). A first run with `days` = 2 can take
  **10 to 40 minutes**; later scheduled runs only read files they have not read before. The default run timeout is 30 minutes and memory is 512 MB; raise the timeout for a first history run with `days` above 2 (a run that is close to its limit stops cleanly and marks the summary row `complete: false`).
  The time depends on the server, not on your filters or `maxItems`.
- **Measured on Apify (23 Nov 2026, regional platforms feed, 512 MB):** one file of about 500 entries took 40 to 60 s, so a **7-day first run needs
  about 12 minutes or more** and a 1-day run a few minutes. Use `days` = 1 or 2 for scheduled daily runs (only files not read before are
  downloaded); use a longer run timeout for a first history run.
- **Partial runs are safe.** The run watches its own time limit. If the next file would not fit, it stops reading, stores everything read so far
  (newest files first), and marks the summary row `complete: false`, `timeLimitReached: true` (status message starts with `PARTIAL`). Notices
  from the files not read stay new: run again with **Only new** on to continue. Notices are never output or charged twice for the same filters
  while Only new is on. If a run is killed before it finishes, the `OUTPUT` record shows `complete: false`. With Only new off every run outputs
  (and charges) all matching notices again, by design.
- You pay per notice stored ($0.004), plus Apify's small start fee. A daily run for one niche (CPV + region) typically
  returns 0 to 20 new notices, i.e. **under $0.10 a day**. `maxItems` (default 200) and the run's **max total charge** cap the cost; a
  run stops storing before it would go over your limit, and notices it did not store stay new for the next run.

### Why this one

- **Both PLACSP open-data feeds** (contracting profiles on PLACSP + regional platforms of Catalonia, Madrid, the Basque Country,
  Andalusia, Galicia and others), read from the official files, not by scraping web pages.
- **Built for a slow source when scheduled**: a long per-file timeout, a check that every file arrived complete, retries with
  back-off and `Retry-After`, and a loud failure if the feed format changes (instead of quietly returning empty or wrong rows). If
  one feed is down, notices from the other are still delivered and the run reports the error.
- **English labels** for status, contract type, procedure, result and buyer type; deadlines converted from Madrid time to UTC.
- **No personal data**: buyer contact names, e-mails and phones are never output; award winners that are natural persons
  (self-employed, DNI/NIE) are never named; e-mails and phones in titles are removed.
- **Clear reuse terms**, with attribution in every row (see below).

### Honest limits

- Only what the buyers publish. Some notices have no value, no place of performance or no deadline; `includeUnknownValue` /
  `includeUnknownRegion` (both on by default) decide whether those are kept when you filter.
- Titles are in the language of publication (Spanish, Catalan, Basque, Galician); they are not translated. Keyword matching is on the
  title only (the feeds carry no long description).
- **Minor contracts (contratos menores) are not included.** Regional platforms that are not aggregated into PLACSP are not included.
- Award winners that are natural persons appear as `{ name: null, naturalPersonOrUnverified: true }`. A foreign winner without a
  Spanish company tax id is named only if its name shows a legal form (Ltd, GmbH, SAS, ...).
- The window is by the time PLACSP last updated the entry. A procedure whose stage you already received is not output again for later
  minor updates. If your schedule interval is longer than `days`, entries updated in between are missed (the run warns about a gap).
- Changing `days` later does not re-read archive files already read for the same filters; use a new state store name or
  `onlyNew` = false for a one-off back-fill.
- Contacts are not included: open `noticeUrl` to see how to respond. Tender documents are linked, not downloaded.
- Not affiliated with or endorsed by PLACSP, the Ministerio de Hacienda or any regional platform.

### Data source and terms

Plataforma de Contratación del Sector Público (https://contrataciondelestado.es), Dirección General del Patrimonio del Estado,
Ministerio de Hacienda: open-data ATOM feeds `sindicacion_643` and `sindicacion_1044`. The PLACSP legal notice
(https://contrataciondelestado.es/wps/portal/info/aviso_legal) authorises full or partial reproduction of the portal's contents
provided the origin is expressly cited; every row carries that attribution in `license`. Details: `docs/DATA_SOURCE.md`.

### Errors

| Code | Meaning |
|---|---|
| `input_invalid` | An input value is not valid; the message says which. Nothing is charged. |
| `source_unavailable` / `source_timeout` | The feed did not answer (or sent an incomplete file) after retries. The other feed's notices are still stored. |
| `source_auth` | The server refused the request (HTTP 401/403). Run fails. |
| `source_missing` | A feed or archive file is gone (HTTP 404/410). Run fails. |
| `schema_changed` | The feed format changed. Run fails loudly instead of returning wrong rows. |
| `pricing_misconfigured` | Pay-per-event setup is wrong (owner side). Run stops before reading anything. |

# Actor input Schema

## `noticeTypes` (type: `array`):

Leave empty for opportunities only.

## `cpvPrefixes` (type: `array`):

2 to 8 digits. 72 = IT services, 48 = software, 45 = construction works, 79 = business services, 90 = cleaning and environmental, 85 = health and social. A notice matches if any of its CPV codes (including lots) starts with one of these. Leave empty for all.

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

Only notices whose title contains at least one of these. Case and accents are ignored (licitacion = licitación). Titles are in Spanish or a regional language, so use Spanish words, e.g. limpieza, software, mantenimiento.

## `excludeKeywords` (type: `array`):

Drop notices whose title contains any of these.

## `nutsPrefixes` (type: `array`):

Place-of-performance NUTS codes or their start: ES11 Galicia, ES12 Asturias, ES13 Cantabria, ES21 Basque Country, ES22 Navarre, ES23 La Rioja, ES24 Aragon, ES30 Madrid, ES41 Castile and León, ES42 Castile-La Mancha, ES43 Extremadura, ES51 Catalonia, ES52 Valencian Community, ES53 Balearic Islands, ES61 Andalusia, ES62 Murcia, ES63 Ceuta, ES64 Melilla, ES70 Canary Islands. Nationwide (ES) notices always match.

## `includeUnknownRegion` (type: `boolean`):

Turn off to drop notices that state no place of performance when a region filter is set.

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

Leave empty for all.

## `minValueEur` (type: `integer`):

Estimated value excluding VAT (or the base budget; for awards without either, the awarded amount).

## `maxValueEur` (type: `integer`):

Leave empty for no maximum.

## `includeUnknownValue` (type: `boolean`):

Turn off to drop notices without any amount when a value filter is set.

## `openOnly` (type: `boolean`):

Drop opportunities whose submission deadline has passed.

## `euFundedOnly` (type: `boolean`):

Only notices that state EU funding (e.g. Recovery and Resilience Plan, NextGenerationEU).

## `buyerNameContains` (type: `array`):

Matched against the buyer name and its hierarchy (e.g. ayuntamiento, Generalitat, Ministerio de Defensa, Canarias). Case and accents ignored.

## `sources` (type: `array`):

Leave empty for both. Minor contracts (contratos menores) are not included.

## `days` (type: `integer`):

Read entries updated in the last N days. Use at least one day more than your schedule interval. With "Only new" on, archive files already read by an earlier run are not downloaded again.

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

Output each procedure only once per stage across runs (kept per filter set in a named key-value store).

## `maxItems` (type: `integer`):

You are charged per notice stored, so this caps the cost of a run. On a working day PLACSP publishes several hundred new opportunities and over a thousand updates. Notices cut by the limit stay new for the next run.

## `stateStoreName` (type: `string`):

Leave empty to use the default.

## Actor input object example

```json
{
  "noticeTypes": [
    "opportunity"
  ],
  "cpvPrefixes": [
    "72",
    "48"
  ],
  "includeUnknownRegion": true,
  "includeUnknownValue": true,
  "openOnly": true,
  "euFundedOnly": false,
  "days": 2,
  "onlyNew": true,
  "maxItems": 200
}
```

# Actor output Schema

## `notices` (type: `string`):

No description

## `reportCsv` (type: `string`):

No description

## `runSummary` (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 = {
    "noticeTypes": [
        "opportunity"
    ],
    "cpvPrefixes": [
        "72",
        "48"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("asunoki/spain-public-tenders-feed").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 = {
    "noticeTypes": ["opportunity"],
    "cpvPrefixes": [
        "72",
        "48",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("asunoki/spain-public-tenders-feed").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 '{
  "noticeTypes": [
    "opportunity"
  ],
  "cpvPrefixes": [
    "72",
    "48"
  ]
}' |
apify call asunoki/spain-public-tenders-feed --silent --output-dataset

```

## MCP server setup

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

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/oHqEahbZmiHsJrHab/builds/dgqAEoT8TMKRpcWHG/openapi.json
