# Public Tenders & Government Contracts Scraper — Spain EU LATAM (`olican/public-tenders-government-contracts-scraper`) Actor

Scrape public tenders, government contracts and procurement opportunities from Spain (PLACE), EU (TED) and Colombia (SECOP II) in real time. MCP-native tool for AI agents. Filter by keywords, budget, CPV/UNSPSC and jurisdiction. Ideal for B2G sales teams, procurement, and legal AI agents.

- **URL**: https://apify.com/olican/public-tenders-government-contracts-scraper.md
- **Developed by:** [Sergio Calvo](https://apify.com/olican) (community)
- **Categories:** AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## Public Tenders & Government Contracts Scraper — Spain, EU & LATAM

**Extract real-time public procurement data from government tender portals across Spain, the European Union and Latin America. MCP-native tool compatible with Claude, GPT, Cursor and any AI agent using Model Context Protocol.**

---

### What does this Actor do?
This Apify Actor extracts public tenders, government contracts, and procurement opportunities directly from official portals in Spain, the European Union, and Latin America. By indexing feeds and querying APIs in real time, it allows businesses, research teams, and automated agents to track and respond to new business-to-government (B2G) opportunities.

For Spain, the Actor polls the public ATOM feed of the **Plataforma de Contratación del Sector Público (PLACE)**. This enables direct extraction of Spanish government contract folders, tender specifications, budgets, and deadlines. It bypasses the complex, certificate-based authentication requirements of PLACE by utilizing the open, public syndication channels.

For the European Union, the Actor queries the official **Tenders Electronic Daily (TED) API v3**, which publishes notices of high-value public procurement across the European Economic Area. This provides access to European-wide bids, cross-border tenders, and municipal contract notices in a normalized format.

For Latin America, the Actor queries the official **Colombia SECOP II API** (Socrata Open Data) in real time. This allows querying Colombian public tenders, municipal contracts, and school/institution bids. It uses UNSPSC codes for categorization, which are normalized alongside CPV codes.

Finally, this Actor is designed **MCP-native**. It means it exposes its interface via Model Context Protocol, allowing AI assistants like Claude, GPT, or Cursor to execute searches, filter by budget, query specific CPV codes, and analyze contract terms on behalf of users without needing separate integrations or custom API integrations.

---

### Use cases
- **B2G Sales Teams**: Monitor open tenders matching your products or services and receive alerts on new bids.
- **Procurement Intelligence**: Aggregate public procurement data to analyze market trends, competitor awards, and agency spending.
- **Legal & Compliance AI Agents**: Automate the discovery of regulatory contracts, public terms, and municipal contract notices.
- **Startups & SMEs**: Automate bid tracking with keyword and budget filters to discover accessible public projects.

---

### Input parameters

The Actor accepts the following input parameters:

| Field Name | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `keywords` | `string` | *(optional)* | Keywords to search tenders and contracts (e.g. `'software management'`, `'IT consulting'`). Searches both titles and summaries. |
| `cpv_code` | `string` | *(optional)* | Filter by CPV (Common Procurement Vocabulary) code or UNSPSC (Colombia) code (e.g., `72000000` or prefix `72`). |
| `country` | `string (enum)` | `"ALL"` | Jurisdiction to query: `ES` (Spain PLACE), `EU` (European Union TED), `CO` (Colombia SECOP II), or `ALL` (all combined). |
| `min_budget_eur` | `integer` | `0` | Minimum estimated contract value in EUR to filter results. |
| `max_results` | `integer` | `20` | Maximum number of tenders to return (1-50, maximum `50`). |

---

### Output fields

Every returned tender record is normalized to a clean JSON structure optimized for LLM consumption. It contains exactly these 12 fields:

| Field Name | Type | Description |
| :--- | :--- | :--- |
| `tender_id` | `string` | Unique identifier from the source portal. |
| `title` | `string` | Official title of the tender. |
| `contracting_authority` | `string` | Name of the government body or public authority issuing the tender. |
| `country` | `string` | ISO 3166-1 alpha-2 country code (e.g., `ES`, `FR`, `DE`). |
| `budget_eur` | `number` | Estimated contract value in EUR. Normalized from other currencies. `null` if not specified. |
| `cpv_code` | `string` | Common Procurement Vocabulary classification code (e.g. `72000000`). |
| `cpv_description` | `string` | Human-readable category description matching the CPV code. |
| `deadline` | `string` | ISO 8601 date-time string indicating the submission deadline. |
| `published` | `string` | ISO 8601 date-time string indicating when the tender was published. |
| `status` | `string` | Current state of the tender: `open`, `closed`, `awarded`, or `cancelled`. |
| `tender_url` | `string` | Direct link to the official tender document or portal detail page. |
| `source` | `string` | The source portal: `PLACE`, `TED`, or `SECOP`. |

---

### CPV Code Reference — Most Searched Categories

Use these common Common Procurement Vocabulary (CPV) codes as filters for high-demand B2G categories:

| CPV Code | Category Description |
| :--- | :--- |
| **72000000** | IT services: consulting, software development, internet and support |
| **72200000** | Software programming and consultancy |
| **72300000** | Data services (archiving, processing, database management) |
| **72500000** | Computer-related services (hardware maintenance, networking) |
| **48000000** | Software packages and information systems |
| **45000000** | Construction work |
| **79000000** | Business services: law, marketing, consulting, recruitment |
| **85000000** | Health and social work services |
| **80000000** | Education and training services |
| **60000000** | Transport services (excluding waste transportation) |

---

### Data sources
- **Spain**: Plataforma de Contratación del Sector Público (PLACE) — Polled via open Atom feeds without authentication or certificate requirements.
- **European Union**: Tenders Electronic Daily (TED) — Queried via the official REST API v3 notices search endpoint.
- **Latin America (Colombia)**: SECOP II — Queried via Socrata Open Data API without authentication.
- **Latin America (Mexico)**: *Fase 3 (CompraNet Mexico) — Coming soon.*

---

### MCP Integration

This Actor can be connected directly to your local AI agents (Claude Desktop, Cursor, or GPTs) using the Apify Model Context Protocol bridge.

Add the following to your `claude_desktop_config.json` or Cursor MCP settings:

```json
{
  "mcpServers": {
    "apify-public-tenders": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/cli",
        "mcp",
        "run",
        "scalvo/public-tenders-government-contracts-scraper",
        "--token",
        "YOUR_APIFY_API_TOKEN"
      ]
    }
  }
}
````

#### Example AI Agent Tool Call

```json
{
  "name": "search_tenders",
  "arguments": {
    "keywords": "gestión documental",
    "country": "ES",
    "min_budget_eur": 30000,
    "max_results": 5
  }
}
```

***

### Output Example

Here is an example of the output structure containing three realistic tenders (one from Spain's PLACE, one from the EU's TED, and one from Colombia's SECOP II):

```json
[
  {
    "tender_id": "Sum.10/2026 Montijo",
    "title": "Suministro, en régimen de alquiler, instalación y desmontaje de ornamentación Navideña de Montijo y Lacara",
    "contracting_authority": "Alcaldía del Ayuntamiento de Montijo",
    "country": "ES",
    "budget_eur": 132495.0,
    "cpv_code": "34991000",
    "cpv_description": "Other public contract category",
    "deadline": "2026-06-23T23:59:00.000Z",
    "published": "2026-06-08T18:26:35.972Z",
    "status": "open",
    "tender_url": "https://contrataciondelestado.es/wps/poc?uri=deeplink:detalle_licitacion&idEvl=kUZQw3xwExp%2BF6L2uCfUWg%3D%3D",
    "source": "PLACE"
  },
  {
    "tender_id": "14-2026",
    "title": "Españaa – Servicios de vigilancia y seguridad privada de polígono industrial, edificios y recintos del Consorcio",
    "contracting_authority": "Consorcio de la Zona Franca de Barcelona",
    "country": "ES",
    "budget_eur": 2150000.00,
    "cpv_code": "79710000",
    "cpv_description": "Business services: law, marketing, consulting",
    "deadline": "2026-07-15T12:00:00.000Z",
    "published": "2026-06-02T11:00:00.000Z",
    "status": "open",
    "tender_url": "https://ted.europa.eu/en/notice/-/detail/14-2026",
    "source": "TED"
  },
  {
    "tender_id": "CO1.REQ.2907228",
    "title": "acuerdo marco de precios tecnologia",
    "contracting_authority": "COLOMBIA COMPRA EFICIENTE",
    "country": "CO",
    "budget_eur": 125000.0,
    "cpv_code": "72101516",
    "cpv_description": "IT services / Software / Data",
    "deadline": "2026-04-04T00:00:00.000Z",
    "published": "2026-01-18T00:00:00.000Z",
    "status": "open",
    "tender_url": "https://community.secop.gov.co/Public/Tendering/OpportunityDetail/Index?noticeUID=CO1.NTC.2597221",
    "source": "SECOP"
  }
]
```

***

### Pricing

Running this Actor consumes Apify compute units. On the Apify platform, it runs efficiently on the free tier:

- Standard execution takes **less than 6 seconds** to scan both PLACE feeds and TED APIs.
- Average cost: ~**$0.003 per run** (~0.01 Compute Units), making it ideal for high-frequency Cron executions or AI agent integrations.

# Actor input Schema

## `keywords` (type: `string`):

Keywords to search government tenders and public contracts (e.g. 'software management', 'cloud infrastructure', 'IT consulting')

## `cpv_code` (type: `string`):

Filter by CPV (EU/Spain) or UNSPSC (Colombia) code. Examples: 72000000 (IT services), 45000000 (construction). Leave empty to search all categories.

## `country` (type: `string`):

Jurisdiction: ES for Spain (PLACE), EU for European Union (TED), CO for Colombia (SECOP II), ALL for all sources combined

## `min_budget_eur` (type: `integer`):

Minimum contract value in EUR to filter results

## `max_results` (type: `integer`):

Maximum number of tenders to return (1-50)

## Actor input object example

```json
{
  "keywords": "software gestión documental",
  "cpv_code": "72000000",
  "country": "ALL",
  "min_budget_eur": 50000,
  "max_results": 20
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("olican/public-tenders-government-contracts-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("olican/public-tenders-government-contracts-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 '{}' |
apify call olican/public-tenders-government-contracts-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Public Tenders & Government Contracts Scraper — Spain EU LATAM",
        "description": "Scrape public tenders, government contracts and procurement opportunities from Spain (PLACE), EU (TED) and Colombia (SECOP II) in real time. MCP-native tool for AI agents. Filter by keywords, budget, CPV/UNSPSC and jurisdiction. Ideal for B2G sales teams, procurement, and legal AI agents.",
        "version": "1.0",
        "x-build-id": "yua1GYCOxCWfuXjYc"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/olican~public-tenders-government-contracts-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-olican-public-tenders-government-contracts-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/olican~public-tenders-government-contracts-scraper/runs": {
            "post": {
                "operationId": "runs-sync-olican-public-tenders-government-contracts-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/olican~public-tenders-government-contracts-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-olican-public-tenders-government-contracts-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": {
                    "keywords": {
                        "title": "Keywords",
                        "type": "string",
                        "description": "Keywords to search government tenders and public contracts (e.g. 'software management', 'cloud infrastructure', 'IT consulting')"
                    },
                    "cpv_code": {
                        "title": "CPV or UNSPSC Code",
                        "type": "string",
                        "description": "Filter by CPV (EU/Spain) or UNSPSC (Colombia) code. Examples: 72000000 (IT services), 45000000 (construction). Leave empty to search all categories."
                    },
                    "country": {
                        "title": "Jurisdiction",
                        "enum": [
                            "ES",
                            "EU",
                            "CO",
                            "ALL"
                        ],
                        "type": "string",
                        "description": "Jurisdiction: ES for Spain (PLACE), EU for European Union (TED), CO for Colombia (SECOP II), ALL for all sources combined",
                        "default": "ALL"
                    },
                    "min_budget_eur": {
                        "title": "Minimum Budget (EUR)",
                        "type": "integer",
                        "description": "Minimum contract value in EUR to filter results",
                        "default": 0
                    },
                    "max_results": {
                        "title": "Maximum Results",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of tenders to return (1-50)",
                        "default": 20
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
