# Spain Public Tenders & Awards Scraper (PLACSP) (`exeterhope/spain-public-tenders-placsp`) Actor

Every Spanish public tender, award and minor contract from the Ministerio de Hacienda's official monthly open-data bundles (PLACSP plus the regional platforms it aggregates), back to 2012. Daily alerts or historical backfills; filter by keyword, CPV, region (NUTS), budget, status and deadline.

- **URL**: https://apify.com/exeterhope/spain-public-tenders-placsp.md
- **Developed by:** [Aaron Thames](https://apify.com/exeterhope) (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.00 / 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 Public Tenders & Awards Scraper (PLACSP + regional platforms)

Get **every Spanish public-sector tender, award and minor contract** as clean JSON, CSV or Excel, straight from the Spanish government's **official open-data feeds** (Plataforma de Contratación del Sector Público, Ministerio de Hacienda). One run covers the national platform **and the regional platforms it aggregates** (Catalonia, Madrid, Basque Country, Andalusia, Galicia, Navarre, La Rioja and more).

No login, no browser, no CAPTCHA, no page crawling. The actor downloads the **monthly open-data ZIP bundles** the Ministerio de Hacienda lists on its open-data pages for reuse (one file per month and feed, streamed and parsed in memory), so runs are predictable and don't break when the website changes. Bundles go back to 2012, so the same actor does daily alerts and historical backfills.

### What you get

For each tender (licitación):

- **What**: title, file number (expediente), contract type (works / services / supplies / concessions), procedure (open, simplified open, negotiated, framework…), CPV codes, lots with their own budgets and CPVs
- **Who**: contracting body, tax ID (NIF), DIR3 code, body type, city, postcode, website, buyer-profile link, and the full parent hierarchy (e.g. *Intendencia de Rota → Armada → Ministerio de Defensa*)
- **How much**: budget excl. VAT, budget incl. VAT, estimated contract value, currency
- **Where & when**: place of execution + NUTS code, duration, **bid deadline**, first publication date, last update, EU-threshold flag, submission method
- **Documents**: direct links to the administrative and technical specifications (pliegos)
- **Awards**: per-lot result, award date, number of bids received, lowest/highest bid, SME flag, contract signature date, **winning company and its tax ID**, awarded amount
- A link to the official tender page

### Use cases

- **Bid teams & consultancies**: a daily list of new tenders in your CPV codes and regions you can still bid on
- **Sales & business development**: find public buyers and their budgets for your product; see who wins what
- **Competitive intelligence**: track which companies win contracts, at what price, against how many bidders
- **Market research & journalism**: spending by region, buyer or sector; feed BI dashboards or AI agents
- **Tender-alert products**: power your own alert service, newsletter or CRM integration via the Apify API, webhooks or schedules

### Input

| Field | What it does | Example |
|---|---|---|
| `feeds` | `tenders` (national PLACSP profiles), `aggregated` (regional platforms), `minor` (contratos menores) | `["tenders","aggregated"]` |
| `keywords` | Any of these words in title, lots or buyer (accent-insensitive) | `["limpieza","software"]` |
| `cpvPrefixes` | CPV code prefixes | `["72","48"]` (IT), `["909"]` (cleaning) |
| `statuses` | `PRE` prior notice, `PUB` open for bids, `EV` pending award, `ADJ` awarded, `RES` resolved, `ANUL` cancelled | `["PUB"]` |
| `contractTypes` | `1` supplies, `2` services, `3` works, … | `["2"]` |
| `nutsPrefixes` | Region of execution | `["ES30"]` Madrid, `["ES51"]` Catalonia |
| `minBudget` / `maxBudget` | Budget excl. VAT, EUR | `50000` |
| `deadlineAfter` | Only tenders you can still bid on | `"2026-11-05"` |
| `buyerContains` | Buyer name contains | `"Ayuntamiento de Valencia"` |
| `months` | Monthly bundles to read (empty = current month, or back to `updatedSince`) | `["2026-09","2026-10"]` |
| `updatedSince` | Only records published/updated since a date (great for daily schedules) | `"2026-11-01"` |
| `maxItems` | Stop after N results (you pay per result) | `100` |
| `includeBuyerContacts` | Add the contracting office's published email/phone | `false` |

**Typical daily alert:** `{"feeds":["tenders","aggregated"],"statuses":["PUB"],"cpvPrefixes":["72"],"updatedSince":"<yesterday>","maxItems":500}`, scheduled every morning.

### Output example

```json
{
  "placspId": "19140173",
  "url": "https://contrataciondelestado.es/wps/poc?uri=deeplink:detalle_licitacion&idEvl=AI9zABW1YXA4NavIWzMcHA%3D%3D",
  "sourceFeed": "tenders",
  "fileNumber": "2025/AR46U/00002197E",
  "title": "(TA) AM. Mantenimiento y reparación de equipos electrónicos de los sistemas de ayuda al aterrizaje instalados en buques de Armada apoyados por el Arsenal de Cádiz y aquellos en tránsito de otros Arsenales.",
  "statusCode": "RES",
  "status": "Resolved / contract signed",
  "contractType": "Services",
  "procedure": "Open",
  "buyerName": "Intendente de Rota",
  "buyerTaxId": "S2800147G",
  "buyerType": "State authority",
  "buyerCity": "Rota (Cádiz)",
  "buyerHierarchy": [
    "Intendencia de Rota",
    "Armada",
    "Ministerio de Defensa",
    "ADMINISTRACIÓN GENERAL DEL ESTADO",
    "Sector Público"
  ],
  "budgetWithoutTax": 250000.0,
  "budgetWithTax": 250000.0,
  "estimatedValue": 1000000.0,
  "currency": "EUR",
  "cpvCodes": [
    "50241100"
  ],
  "placeOfExecution": "Cádiz",
  "nutsCode": "ES612",
  "duration": "1",
  "durationUnit": "ANN",
  "submissionDeadline": "2026-03-26T23:59:00",
  "firstPublished": "2026-02-27",
  "updatedAt": "2026-11-04T19:50:55.897+01:00",
  "euThreshold": true,
  "lotsCount": 0,
  "awardsCount": 1,
  "winnerName": "SANCHEZ SUR SL",
  "awardedAmountWithoutTax": 250000.0,
  "administrativeSpecsUrl": "https://contrataciondelestado.es/FileSystem/servlet/GetDocumentByIdServlet?...",
  "awards": [
    {
      "lotId": null,
      "resultCode": "8",
      "result": "Awarded",
      "awardDate": "2026-05-19",
      "tendersReceived": 1,
      "awardedAmountWithoutTax": 250000.0,
      "awardedAmountWithTax": 250000.0,
      "lowestTender": 25.0,
      "highestTender": 25.0,
      "smeAwarded": true,
      "contractSignedDate": "2026-07-03",
      "winnerName": "SANCHEZ SUR SL",
      "winnerTaxId": "B11362860",
      "winnerIsCompany": true
    }
  ]
}
```

Download as JSON, CSV, Excel or HTML from the dataset tab, or read it through the Apify API. A ready-made table view shows status, title, buyer, budget, deadline, place, CPV, winner and link.

### Pricing

Pay per result: **$1.50 per 1,000 records** (that's $0.0015 per tender). No start fee, no monthly rental. A typical daily alert for one sector returns 20–200 records, i.e. a few cents a day. Set `maxItems` or Apify's max-charge limit to cap spend.

### FAQ

**How fresh is the data?** The current month's bundle is refreshed once a day (around 05:00 CET) with everything published the day before, so a daily run after 06:00 CET catches every new tender, award and change from the previous day.

**Why do I see the same tender more than once over time?** The official feed is a change log: a tender reappears when it is updated (award, correction, signature). Within one run the actor resolves every record to its newest version across the whole month before filtering (a tender that moved from open to awarded comes back as awarded). Use `updatedSince` in scheduled runs to get just the changes.

**Does it include all of Spain?** It includes everything published on PLACSP plus the regional platforms that syndicate to it (`aggregated`). Some bodies publish only on their own regional portal with a delay; coverage follows the official source.

**Is it legal to use this data commercially?** Yes. The Ministry of Finance publishes these datasets for reuse, commercial or not, under Spain's public-sector-information reuse law (Ley 37/2007, RD 1495/2011; general conditions at datos.gob.es/avisolegal). The conditions require attribution of the source and that the data isn't distorted; every record carries a `source` field for that.

**Personal data?** The actor outputs organisations, not people. Contact person names are never extracted, and when a contract is won by a self-employed individual (identified by a personal DNI/NIE), the winner's name and ID are replaced with `[natural person - redacted]`. Buyer contact email/phone is off by default and refers to the contracting office.

**Why are some awarded amounts tiny (e.g. 25)?** Some framework or unit-price contracts publish a discount percentage or unit price as the "awarded amount". The actor returns the official value unchanged.

**Something missing or wrong?** Open an issue on the actor's Issues tab and it will be looked at quickly.

### Legal note

Source: Plataforma de Contratación del Sector Público, Ministerio de Hacienda (Spain), open data. This actor is not affiliated with or endorsed by the Spanish government. It reads only the official open-data syndication feeds, one request at a time with a politeness delay, and never accesses areas that require login. You are responsible for how you use the data, including GDPR obligations if you enrich it with personal data.

### Data source and licence

Data: Plataforma de Contratación del Sector Público, Ministerio de Hacienda (Spain), monthly open-data bundles listed at hacienda.gob.es > Gobierno Abierto > Datos Abiertos. Reused under Ley 37/2007 and RD 1495/2011 (conditions: https://datos.gob.es/avisolegal). Source: Ministerio de Hacienda. This actor is independent and not endorsed by the Ministry.

# Actor input Schema

## `source` (type: `string`):

zip = the monthly ZIP bundles the Ministerio de Hacienda lists on its open-data pages for reuse (the current month's bundle is refreshed daily around 05:00 CET). One download per month and feed, no page crawling.

## `months` (type: `array`):

Which monthly bundles to read, e.g. \["2026-10", "2026-11"]. Empty = the current month, plus earlier months back to 'Updated since' if you set it. Bundles back to 2012 are published.

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

Which official feeds to read. 'tenders' = PLACSP buyer profiles (all procedures except minor contracts); 'aggregated' = regional platforms published through PLACSP (Catalonia, Madrid, Basque Country, Andalusia, Galicia, Navarre, La Rioja…); 'minor' = minor contracts (contratos menores).

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

Keep records whose title, lot names or buyer contain ANY of these words (accent- and case-insensitive). Spanish works best, e.g. 'limpieza', 'software', 'mantenimiento'.

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

Keep records with at least one CPV code starting with any of these, e.g. '72' (IT services), '909' (cleaning), '45' (construction works).

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

Leave empty for all. PUB = open for bids.

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

Leave empty for all.

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

Place of execution, e.g. 'ES30' (Madrid), 'ES51' (Catalonia), 'ES61' (Andalusia), 'ES52' (Valencian Community).

## `minBudget` (type: `integer`):

Only tenders whose budget excluding VAT is at least this amount (EUR). Leave empty for no minimum.

## `maxBudget` (type: `integer`):

Only tenders whose budget excluding VAT is at most this amount (EUR). Leave empty for no maximum.

## `deadlineAfter` (type: `string`):

Only records whose submission deadline is on/after this date. Use today's date to get tenders you can still bid on.

## `buyerContains` (type: `string`):

e.g. 'Ayuntamiento de Madrid', 'Ministerio de Defensa'.

## `updatedSince` (type: `string`):

Only records published or updated on/after this date. With the bundle source and no Months set, the run reads every month from this date to today. Ideal for daily/weekly scheduled runs (set it to yesterday).

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

Stop after this many matching records (you pay per result).

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

Each page holds up to 500 updates. With narrow filters, raise this or set 'Updated since'. Live Atom source only.

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

Adds the contracting office's published contact email and phone.

## `requestDelaySecs` (type: `number`):

Politeness delay between page requests (live Atom source only). Keep ≥ 1.

## Actor input object example

```json
{
  "source": "zip",
  "months": [],
  "feeds": [
    "aggregated"
  ],
  "keywords": [],
  "maxItems": 50,
  "maxPagesPerFeed": 200,
  "includeBuyerContacts": false,
  "requestDelaySecs": 1.5
}
```

# 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 = {
    "months": [],
    "feeds": [
        "aggregated"
    ],
    "keywords": [],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("exeterhope/spain-public-tenders-placsp").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 = {
    "months": [],
    "feeds": ["aggregated"],
    "keywords": [],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("exeterhope/spain-public-tenders-placsp").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 '{
  "months": [],
  "feeds": [
    "aggregated"
  ],
  "keywords": [],
  "maxItems": 50
}' |
apify call exeterhope/spain-public-tenders-placsp --silent --output-dataset

```

## MCP server setup

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

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/NT0bKi1HXO5Z7qCI0/builds/sxgRTzKrtj0nas0kf/openapi.json
