# Spain Public Tenders Scraper (`automation-lab/spain-public-tenders-scraper`) Actor

Monitor official PLACSP public tenders and awards across Spain. Filter buyers, CPV codes, regions, values, dates, and notice status.

- **URL**: https://apify.com/automation-lab/spain-public-tenders-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Spain Public Tenders Scraper

Track public procurement opportunities and contract awards across Spain from the official **Plataforma de Contratación del Sector Público (PLACSP)** syndication feed.

Spain Public Tenders Scraper turns namespace-heavy Atom/CODICE XML into clean JSON, CSV, Excel, XML, and RSS-ready dataset records. Find relevant tenders, monitor deadlines, identify contracting authorities, and study winning suppliers without maintaining your own XML pipeline.

- 🇪🇸 Nationwide official PLACSP coverage
- 🔎 Keyword, buyer, CPV, region, status, value, and date filters
- 💶 Estimated, tax-exclusive, total, and awarded EUR values
- 🏆 Award winners, tax IDs, bid counts, SME flags, and criteria
- 📄 Tender detail pages and procurement-document URLs
- ⚡ Direct HTTP extraction with no browser, login, or user-supplied proxy

### What does Spain Public Tenders Scraper do?

The Actor downloads public Atom feeds published by Spain's official procurement platform and parses their embedded CODICE contract records.

Each output row represents one published tender lifecycle revision. It includes the contract folder, authority, project classification, dates, budget, procedure, award details, and source links available in that revision.

Use it for current opportunities or follow the official archive links with `maxPages` to inspect older publications.

### Why use this PLACSP scraper?

PLACSP data is public and structured, but the source XML contains many namespaces, nested repeating blocks, raw code lists, and notice revisions.

This Actor removes that integration work:

- ✅ validates that custom feeds stay on official PLACSP hosts;
- ✅ handles singleton and repeated CODICE nodes;
- ✅ normalizes money and bid counts as numbers;
- ✅ preserves official status, notice, CPV, and procedure codes;
- ✅ keeps lifecycle revisions distinguishable;
- ✅ applies filters after parsing, with missing values failing closed;
- ✅ bounds records and archive pages for predictable runs.

### Who is it for?

#### Spanish and EU suppliers

Schedule searches for products or services you sell. Send new matching opportunities to email, Slack, a CRM, or a bid-management queue.

#### B2G sales teams

Build territory lists from contracting-authority names, contacts, locations, CPV codes, and upcoming submission deadlines.

#### Bid-intelligence providers

Enrich an existing procurement product with official tender status, values, award winners, tax IDs, bids received, and source documents.

#### Procurement analysts

Compare buyers, categories, regions, procedures, awarded amounts, and SME participation using repeatable dataset exports.

#### Compliance and research teams

Retain source IDs, raw official codes, publication dates, and document URLs for auditable downstream review.

### What Spanish tender data can I extract?

| Group | Example fields |
| --- | --- |
| Identity | `entryId`, `contractFolderId`, `title`, `statusCode` |
| Publication | `updatedAt`, `noticeTypes`, `publicationDates` |
| Authority | name, NIF, DIR3 ID, hierarchy, profile, website |
| Contact | address, city, postcode, contact name, email, phone |
| Classification | contract type/subtype, CPV codes, region, NUTS |
| Values | estimated, tax-exclusive, total, awarded EUR amounts |
| Schedule | planned dates, submission and document deadlines |
| Procedure | procedure, urgency, funding, notice codes |
| Award | reason/date, bids, winner, winner NIF, SME indicator |
| Evaluation | weighted criteria, notes, subtype codes |
| Sources | PLACSP detail page and procurement-document URLs |

Fields unavailable in a particular lifecycle revision are returned as `null` or an empty array rather than guessed.

### How to scrape Spain public tenders

1. Open the Actor input form.
2. Enter a keyword such as `servicios informáticos`.
3. Optionally add buyer, CPV, region, status, value, or date filters.
4. Disable **Include awarded contracts** when you only want opportunities.
5. Keep `maxItems` and `maxPages` low for your first test.
6. Click **Start**.
7. Review the Overview table or export the dataset.
8. Save the input as an Apify Task to run it on a schedule.

### Input

All fields are optional. With no custom feed, the Actor uses the nationwide complete contracting-profile feed.

| Field | Type | Purpose |
| --- | --- | --- |
| `query` | string | Search title, folder ID, authority, and CPV text |
| `authority` | string | Contracting-authority name contains this text |
| `statusCodes` | string[] | Exact PLACSP folder status codes |
| `cpvPrefixes` | string[] | One or more CPV prefixes, such as `72` |
| `regions` | string[] | Region names or NUTS prefixes |
| `noticeTypes` | string[] | Exact CODICE notice type codes |
| `minValueEur` | number | Minimum comparable contract value |
| `maxValueEur` | number | Maximum comparable contract value |
| `publicationDateFrom` | date | Earliest publication, `YYYY-MM-DD` |
| `publicationDateTo` | date | Latest publication, `YYYY-MM-DD` |
| `submissionDeadlineFrom` | date | Earliest deadline, `YYYY-MM-DD` |
| `submissionDeadlineTo` | date | Latest deadline, `YYYY-MM-DD` |
| `includeAwarded` | boolean | Include records containing award data |
| `startUrls` | URL[] | Official PLACSP HTTPS `.atom` feeds |
| `maxItems` | integer | Maximum matching rows to save |
| `maxPages` | integer | Maximum linked feed pages per seed |

### Input examples

Find open-looking IT service opportunities in Madrid:

```json
{
  "query": "servicios informáticos",
  "regions": ["Madrid", "ES30"],
  "cpvPrefixes": ["72"],
  "includeAwarded": false,
  "maxItems": 100,
  "maxPages": 5
}
````

Track award and formalization notices:

```json
{
  "noticeTypes": ["DOC_ADJ", "DOC_FORM"],
  "includeAwarded": true,
  "maxItems": 250,
  "maxPages": 10
}
```

### Output example

```json
{
  "contractFolderId": "2026/EA61/00000177E",
  "title": "Servicios integrales de trabajos de apoyo",
  "statusCode": "RES",
  "authorityName": "Jefatura de la Sección Económico-Administrativa 61",
  "authorityTaxId": "S0722001E",
  "cpvCodes": ["98300000"],
  "region": "Illes Balears",
  "nutsCode": "ES53",
  "estimatedValueEur": 84509.62,
  "taxExclusiveValueEur": 70424.77,
  "submissionDeadline": "2026-04-14T06:00:00",
  "noticeTypes": ["DOC_CAN_ADJ", "DOC_CN", "DOC_FORM"],
  "awards": [{
    "awardDate": "2026-05-04",
    "bidsReceived": 2,
    "winnerName": "ONDA GAMA PLUS SL",
    "winnerTaxId": "B57428757",
    "awardedTaxExclusiveAmountEur": 69650,
    "winnerIsSme": true
  }]
}
```

The exact fields depend on what PLACSP published for that revision.

### Understanding PLACSP codes

The source uses official code lists for contract status, notice type, procedure, urgency, authority activity, and other classifications.

The Actor preserves those raw values instead of inventing translations. This makes scheduled data stable when labels or code-list versions change.

Common notice values include `DOC_CN` for a contract notice, `DOC_ADJ` for award material, and `DOC_FORM` for formalization material. Treat these examples as guidance and verify important workflows against current official code lists.

### Tender lifecycle revisions and deduplication

A contract folder can be updated as it moves from publication through evaluation, award, resolution, and formalization.

Records are deduplicated by Atom entry identity plus update timestamp. Identical entries encountered through overlapping feed pages are emitted once, while a meaningful later revision can remain available as a separate row.

Use `contractFolderId` as the business key when building a latest-state table downstream.

### How much does it cost to scrape Spanish public tenders?

The Actor uses pay-per-event pricing:

- **$0.005** when a run starts;
- **$0.000088546 per saved tender** on the BRONZE plan;
- automatic lower per-tender rates on higher Apify plans.

A run saving 100 records costs about $0.0139 at the BRONZE rate, excluding your normal platform usage terms. Filters that save fewer records reduce result charges.

Check the live pricing panel before starting because Store pricing is authoritative.

### Scheduling tender and award monitoring

Create an Apify Task with narrow filters, then schedule it hourly, daily, or weekly.

A practical daily workflow is:

1. query a product or service phrase;
2. limit regions and CPV prefixes;
3. exclude awards for opportunity alerts;
4. compare `entryId` and `updatedAt` with your stored keys;
5. notify account owners about unseen deadlines;
6. run a separate award task for competitor intelligence.

The default feed is updated by the source, not by this Actor.

### Integrations

#### Google Sheets

Export the dataset after each run or connect through Make to maintain a tender-review sheet.

#### Slack and Microsoft Teams

Trigger a webhook for rows with upcoming deadlines, large budgets, or target buyers.

#### Salesforce and HubSpot

Map `authorityName`, contact fields, CPV codes, and `detailUrl` into account and opportunity records.

#### BigQuery and data warehouses

Use `contractFolderId` plus `updatedAt` as a revision key and build latest-state or award-history tables.

#### Zapier and Make

Run a saved task on schedule and route qualifying records into alerts, documents, or enrichment steps.

### Use with the Apify API

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/spain-public-tenders-scraper').call({
  query: 'ciberseguridad',
  includeAwarded: false,
  maxItems: 100,
  maxPages: 3,
});
const items = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.items);
```

#### Python

```python
from apify_client import ApifyClient
import os

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/spain-public-tenders-scraper').call(run_input={
    'cpvPrefixes': ['72'],
    'includeAwarded': False,
    'maxItems': 100,
    'maxPages': 3,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

#### cURL

```bash
curl -X POST \
  'https://api.apify.com/v2/acts/automation-lab~spain-public-tenders-scraper/runs?token=YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"query":"ciberseguridad","maxItems":50,"maxPages":2}'
```

### Use Spain Public Tenders Scraper with MCP

Connect Apify's MCP server to **Claude Code**:

```bash
claude mcp add --transport http apify \
  'https://mcp.apify.com/?tools=automation-lab/spain-public-tenders-scraper'
```

**Claude Desktop** configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=automation-lab/spain-public-tenders-scraper"
    }
  }
}
```

For **Cursor**, add the same URL as a remote MCP server in Cursor Settings → Tools & MCP. For **VS Code**, add it as an HTTP MCP server in your workspace MCP configuration.

Example prompts:

- “Find recent Spanish cybersecurity tenders and rank them by estimated value.”
- “Extract Madrid IT procurement opportunities with their authority contacts and deadlines.”
- “Monitor formalized contracts and summarize winning suppliers and awarded amounts.”

### Tips for better results

- 🎯 Start with one filter family, then narrow further.
- 🧩 Use CPV prefixes rather than full codes when categories are broad.
- 🗺️ Combine a region name and NUTS prefix only when either match is acceptable.
- 📅 Use publication filters for notices and deadline filters for active bid windows.
- 🏆 Run opportunity and award monitoring as separate saved tasks.
- 💾 Store `entryId`, `contractFolderId`, and `updatedAt` for incremental workflows.
- 🔗 Retain `detailUrl` and `documentUrls` for auditability.
- 📉 Keep `maxPages` low when testing a new filter.

### Limitations

- PLACSP controls source availability, freshness, field completeness, and archive links.
- Raw official codes are preserved; the Actor does not translate every code-list version.
- A notice may omit budgets, deadlines, contacts, winners, or documents.
- Keyword search is applied to parsed feed records, not a full-text index of attached PDFs.
- `maxPages` follows the source's current `rel=next` chain and does not promise all historical procurement.
- Custom start URLs must be official HTTPS `.atom` syndication paths.
- This Actor does not submit bids or access private procurement workspaces.

### Data quality and reliability

The extractor validates the Atom envelope and fails the run if PLACSP returns no parseable entries. It retries transient HTTP failures and rejects arbitrary start URLs.

Numeric filters exclude records lacking a comparable value. Date filters exclude records lacking the relevant date. This fail-closed behavior prevents missing source fields from silently passing strict buyer rules.

Always review critical procurement decisions against the linked official source.

### Is scraping Spanish public tenders legal?

The Actor reads anonymous public procurement syndication data and does not bypass authentication or access controls.

Public availability does not remove every obligation. Users remain responsible for lawful processing, retention, redistribution, tender participation rules, personal-data handling, and compliance with applicable Spanish and EU law.

Do not use contact details for unlawful spam. Respect PLACSP availability and avoid unnecessarily aggressive schedules.

### Troubleshooting

#### Why did my run return zero records?

Your filters may be stricter than the current feed page. Remove filters one at a time, increase `maxPages`, or test a broader Spanish keyword. Numeric and date filters intentionally reject missing values.

#### Why is a status or notice type unfamiliar?

PLACSP publishes raw CODICE codes and can evolve its code lists. Inspect the source detail page and current official documentation before hard-coding business decisions.

#### Why was my custom feed rejected?

Only official PLACSP HTTPS syndication URLs ending in `.atom` are accepted. Use the default feed unless you have a valid official alternative.

#### Why do I see the same contract folder more than once?

Those rows can represent different lifecycle revisions. Group by `contractFolderId` and select the newest `updatedAt` for a current-state view.

### Frequently asked questions

#### Does the Actor need a PLACSP account?

No. It uses the public official Atom/CODICE syndication feed anonymously.

#### Does it use a browser or proxy?

No browser or user-supplied proxy is required for the official feed route.

#### Can it extract award winners?

Yes, when the source revision includes award data. Output can include winner name, NIF, bids, values, award reason, date, and SME indicators.

#### Can I scrape attached PDF text?

The Actor exports document names and URLs but does not download or OCR attachments.

#### Can I monitor one buyer?

Yes. Set `authority` to a distinctive part of the contracting authority's name and save the run as a scheduled task.

### Related public procurement scrapers

- [BOAMP Public Tenders Scraper](https://apify.com/automation-lab/boamp-public-tenders-scraper) — French public tender notices.
- [UK Find a Tender Scraper](https://apify.com/automation-lab/uk-find-a-tender-scraper) — UK high-value procurement notices.
- [TED Europa Tenders Scraper](https://apify.com/automation-lab/ted-europa-tenders-scraper) — EU-wide TED notices.
- [Singapore GeBIZ Tender Opportunities Scraper](https://apify.com/automation-lab/singapore-gebiz-tender-opportunities-scraper) — Singapore opportunities.
- [CanadaBuys Tender Opportunities Scraper](https://apify.com/automation-lab/canadabuys-tender-opportunities-scraper) — Canadian procurement.

### Support

For reproducible support, include the Actor run ID, the exact input, the expected contract folder or filter, and the relevant PLACSP source link.

Do not include private credentials or unrelated personal data. Run logs and a small input usually provide enough context to diagnose source or filter changes.

# Actor input Schema

## `query` (type: `string`):

Case-insensitive text matched against title, folder ID, contracting authority, and CPV codes.

## `authority` (type: `string`):

Keep notices whose contracting authority contains this text.

## `statusCodes` (type: `array`):

Exact PLACSP ContractFolderStatus codes, for example PUB, EV, ADJ or RES.

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

Keep tenders whose CPV code begins with one of these prefixes, such as 72 for IT services.

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

Case-insensitive region names or NUTS prefixes, such as Madrid or ES30.

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

Exact CODICE notice codes such as DOC\_CN, DOC\_CD, DOC\_ADJ or DOC\_FORM.

## `minValueEur` (type: `number`):

Fail closed: notices without a comparable amount are excluded when this filter is set.

## `maxValueEur` (type: `number`):

Maximum estimated, tax-exclusive, or total value in EUR.

## `publicationDateFrom` (type: `string`):

Earliest publication date in YYYY-MM-DD format.

## `publicationDateTo` (type: `string`):

Latest publication date in YYYY-MM-DD format.

## `submissionDeadlineFrom` (type: `string`):

Earliest submission deadline in YYYY-MM-DD format.

## `submissionDeadlineTo` (type: `string`):

Latest submission deadline in YYYY-MM-DD format.

## `includeAwarded` (type: `boolean`):

Disable to omit records that already contain award or winner data.

## `startUrls` (type: `array`):

Optional official HTTPS .atom syndication URLs. Leave empty to use the nationwide complete contracting-profile feed.

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

Maximum matching tender records saved across all pages.

## `maxPages` (type: `integer`):

How many linked Atom archive pages to inspect per start feed.

## Actor input object example

```json
{
  "query": "servicios",
  "includeAwarded": true,
  "startUrls": [
    {
      "url": "https://contrataciondelsectorpublico.gob.es/sindicacion/sindicacion_643/licitacionesPerfilesContratanteCompleto3.atom"
    }
  ],
  "maxItems": 20,
  "maxPages": 1
}
```

# Actor output Schema

## `overview` (type: `string`):

Open the default dataset overview containing filtered tenders, authorities, values, deadlines, awards, and source links.

# 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 = {
    "query": "servicios",
    "startUrls": [
        {
            "url": "https://contrataciondelsectorpublico.gob.es/sindicacion/sindicacion_643/licitacionesPerfilesContratanteCompleto3.atom"
        }
    ],
    "maxItems": 20,
    "maxPages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/spain-public-tenders-scraper").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 = {
    "query": "servicios",
    "startUrls": [{ "url": "https://contrataciondelsectorpublico.gob.es/sindicacion/sindicacion_643/licitacionesPerfilesContratanteCompleto3.atom" }],
    "maxItems": 20,
    "maxPages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/spain-public-tenders-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "servicios",
  "startUrls": [
    {
      "url": "https://contrataciondelsectorpublico.gob.es/sindicacion/sindicacion_643/licitacionesPerfilesContratanteCompleto3.atom"
    }
  ],
  "maxItems": 20,
  "maxPages": 1
}' |
apify call automation-lab/spain-public-tenders-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/spain-public-tenders-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Spain Public Tenders Scraper",
        "description": "Monitor official PLACSP public tenders and awards across Spain. Filter buyers, CPV codes, regions, values, dates, and notice status.",
        "version": "0.1",
        "x-build-id": "s5zG27DdL7dcd6GsQ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~spain-public-tenders-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-spain-public-tenders-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/automation-lab~spain-public-tenders-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-spain-public-tenders-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/automation-lab~spain-public-tenders-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-spain-public-tenders-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "query": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Case-insensitive text matched against title, folder ID, contracting authority, and CPV codes."
                    },
                    "authority": {
                        "title": "Contracting authority",
                        "type": "string",
                        "description": "Keep notices whose contracting authority contains this text."
                    },
                    "statusCodes": {
                        "title": "Status codes",
                        "type": "array",
                        "description": "Exact PLACSP ContractFolderStatus codes, for example PUB, EV, ADJ or RES.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "cpvPrefixes": {
                        "title": "CPV code prefixes",
                        "type": "array",
                        "description": "Keep tenders whose CPV code begins with one of these prefixes, such as 72 for IT services.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "regions": {
                        "title": "Regions or NUTS codes",
                        "type": "array",
                        "description": "Case-insensitive region names or NUTS prefixes, such as Madrid or ES30.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "noticeTypes": {
                        "title": "Notice type codes",
                        "type": "array",
                        "description": "Exact CODICE notice codes such as DOC_CN, DOC_CD, DOC_ADJ or DOC_FORM.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "minValueEur": {
                        "title": "Minimum estimated value (EUR)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Fail closed: notices without a comparable amount are excluded when this filter is set."
                    },
                    "maxValueEur": {
                        "title": "Maximum estimated value (EUR)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Maximum estimated, tax-exclusive, or total value in EUR."
                    },
                    "publicationDateFrom": {
                        "title": "Published from",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Earliest publication date in YYYY-MM-DD format."
                    },
                    "publicationDateTo": {
                        "title": "Published to",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Latest publication date in YYYY-MM-DD format."
                    },
                    "submissionDeadlineFrom": {
                        "title": "Submission deadline from",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Earliest submission deadline in YYYY-MM-DD format."
                    },
                    "submissionDeadlineTo": {
                        "title": "Submission deadline to",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                        "type": "string",
                        "description": "Latest submission deadline in YYYY-MM-DD format."
                    },
                    "includeAwarded": {
                        "title": "Include awarded contracts",
                        "type": "boolean",
                        "description": "Disable to omit records that already contain award or winner data.",
                        "default": true
                    },
                    "startUrls": {
                        "title": "Official PLACSP Atom feed URLs",
                        "type": "array",
                        "description": "Optional official HTTPS .atom syndication URLs. Leave empty to use the nationwide complete contracting-profile feed.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Maximum tenders",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum matching tender records saved across all pages.",
                        "default": 50
                    },
                    "maxPages": {
                        "title": "Maximum feed pages",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "How many linked Atom archive pages to inspect per start feed.",
                        "default": 1
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
